aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-5.4/950-0929-overlays-Delete-spi0-hw-cs.patch
blob: 044a3ad3f12e7be7233e6cd55ae5d5e67b739b10 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
From 9fcbc40311f8de3f7a0a27155f310ff19e150d76 Mon Sep 17 00:00:00 2001
From: Phil Elwell <phil@raspberrypi.com>
Date: Thu, 30 Jul 2020 18:06:24 +0100
Subject: [PATCH] overlays: Delete spi0-hw-cs

The spi0-hw-cs overlay is unnecessary (and actually harmful) with the
current kernels. Delete it, leaving a note in the README and a
deprecation message from the firmware:

    dterror: overlay 'spi0-hw-cs' is deprecated: no longer necessary

Signed-off-by: Phil Elwell <phil@raspberrypi.com>
---
 arch/arm/boot/dts/overlays/Makefile           |  1 -
 arch/arm/boot/dts/overlays/README             |  6 ++---
 arch/arm/boot/dts/overlays/overlay_map.dts    |  4 +++
 .../boot/dts/overlays/spi0-hw-cs-overlay.dts  | 26 -------------------
 4 files changed, 7 insertions(+), 30 deletions(-)
 delete mode 100644 arch/arm/boot/dts/overlays/spi0-hw-cs-overlay.dts

--- a/arch/arm/boot/dts/overlays/Makefile
+++ b/arch/arm/boot/dts/overlays/Makefile
@@ -159,7 +159,6 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
 	spi-gpio40-45.dtbo \
 	spi-rtc.dtbo \
 	spi0-cs.dtbo \
-	spi0-hw-cs.dtbo \
 	spi1-1cs.dtbo \
 	spi1-2cs.dtbo \
 	spi1-3cs.dtbo \
--- a/arch/arm/boot/dts/overlays/README
+++ b/arch/arm/boot/dts/overlays/README
@@ -2346,9 +2346,9 @@ Params: cs0_pin                 GPIO pin
 
 
 Name:   spi0-hw-cs
-Info:   Re-enables hardware CS/CE (chip selects) for SPI0
-Load:   dtoverlay=spi0-hw-cs
-Params: <None>
+Info:   This overlay has been deprecated and removed because it is no longer
+        necessary and has been seen to prevent spi0 from working.
+Load:   <Deprecated>
 
 
 Name:   spi1-1cs
--- a/arch/arm/boot/dts/overlays/overlay_map.dts
+++ b/arch/arm/boot/dts/overlays/overlay_map.dts
@@ -61,6 +61,10 @@
 		deprecated = "use sdio,bus_width=1,gpios_22_25";
 	};
 
+	spi0-hw-cs {
+		deprecated = "no longer necessary";
+	};
+
 	spi3-1cs {
 		bcm2711;
 	};
--- a/arch/arm/boot/dts/overlays/spi0-hw-cs-overlay.dts
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Device tree overlay to re-enable hardware CS for SPI0
- */
-
-/dts-v1/;
-/plugin/;
-
-/ {
-	compatible = "brcm,bcm2835";
-
-	fragment@0 {
-		target = <&spi0>;
-		__overlay__ {
-			cs-gpios = <0>, <0>;
-			status = "okay";
-		};
-	};
-
-	fragment@1 {
-		target = <&spi0_cs_pins>;
-		__overlay__ {
-			brcm,pins = <8 7>;
-			brcm,function = <4>; /* alt0 */
-		};
-	};
-};