bcm27xx: import latest patches from the RPi foundation
[openwrt/staging/ynezz.git] / target / linux / bcm27xx / patches-5.4 / 950-0929-overlays-Delete-spi0-hw-cs.patch
1 From 9fcbc40311f8de3f7a0a27155f310ff19e150d76 Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.com>
3 Date: Thu, 30 Jul 2020 18:06:24 +0100
4 Subject: [PATCH] overlays: Delete spi0-hw-cs
5
6 The spi0-hw-cs overlay is unnecessary (and actually harmful) with the
7 current kernels. Delete it, leaving a note in the README and a
8 deprecation message from the firmware:
9
10 dterror: overlay 'spi0-hw-cs' is deprecated: no longer necessary
11
12 Signed-off-by: Phil Elwell <phil@raspberrypi.com>
13 ---
14 arch/arm/boot/dts/overlays/Makefile | 1 -
15 arch/arm/boot/dts/overlays/README | 6 ++---
16 arch/arm/boot/dts/overlays/overlay_map.dts | 4 +++
17 .../boot/dts/overlays/spi0-hw-cs-overlay.dts | 26 -------------------
18 4 files changed, 7 insertions(+), 30 deletions(-)
19 delete mode 100644 arch/arm/boot/dts/overlays/spi0-hw-cs-overlay.dts
20
21 --- a/arch/arm/boot/dts/overlays/Makefile
22 +++ b/arch/arm/boot/dts/overlays/Makefile
23 @@ -159,7 +159,6 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
24 spi-gpio40-45.dtbo \
25 spi-rtc.dtbo \
26 spi0-cs.dtbo \
27 - spi0-hw-cs.dtbo \
28 spi1-1cs.dtbo \
29 spi1-2cs.dtbo \
30 spi1-3cs.dtbo \
31 --- a/arch/arm/boot/dts/overlays/README
32 +++ b/arch/arm/boot/dts/overlays/README
33 @@ -2346,9 +2346,9 @@ Params: cs0_pin GPIO pin
34
35
36 Name: spi0-hw-cs
37 -Info: Re-enables hardware CS/CE (chip selects) for SPI0
38 -Load: dtoverlay=spi0-hw-cs
39 -Params: <None>
40 +Info: This overlay has been deprecated and removed because it is no longer
41 + necessary and has been seen to prevent spi0 from working.
42 +Load: <Deprecated>
43
44
45 Name: spi1-1cs
46 --- a/arch/arm/boot/dts/overlays/overlay_map.dts
47 +++ b/arch/arm/boot/dts/overlays/overlay_map.dts
48 @@ -61,6 +61,10 @@
49 deprecated = "use sdio,bus_width=1,gpios_22_25";
50 };
51
52 + spi0-hw-cs {
53 + deprecated = "no longer necessary";
54 + };
55 +
56 spi3-1cs {
57 bcm2711;
58 };
59 --- a/arch/arm/boot/dts/overlays/spi0-hw-cs-overlay.dts
60 +++ /dev/null
61 @@ -1,26 +0,0 @@
62 -/*
63 - * Device tree overlay to re-enable hardware CS for SPI0
64 - */
65 -
66 -/dts-v1/;
67 -/plugin/;
68 -
69 -/ {
70 - compatible = "brcm,bcm2835";
71 -
72 - fragment@0 {
73 - target = <&spi0>;
74 - __overlay__ {
75 - cs-gpios = <0>, <0>;
76 - status = "okay";
77 - };
78 - };
79 -
80 - fragment@1 {
81 - target = <&spi0_cs_pins>;
82 - __overlay__ {
83 - brcm,pins = <8 7>;
84 - brcm,function = <4>; /* alt0 */
85 - };
86 - };
87 -};