c708bf1f71a82d3ee986393bae9b2c2976c8c14c
[openwrt/staging/jow.git] /
1 From 51cdff455e3c3df29764f71bc0c9dd0e099945d6 Mon Sep 17 00:00:00 2001
2 From: Jonathan Bell <jonathan@raspberrypi.com>
3 Date: Wed, 8 Nov 2023 16:14:25 +0000
4 Subject: [PATCH] arm: dts: change RP1 SDHCI controller compatible string
5
6 Also add a sdio-pi5 overlay which enables mmc0 on GPIOs 22-27, as was
7 possible with earlier models of Pi.
8
9 Signed-off-by: Jonathan Bell <jonathan@raspberrypi.com>
10 ---
11 arch/arm/boot/dts/overlays/Makefile | 1 +
12 arch/arm/boot/dts/overlays/README | 7 ++++++
13 arch/arm/boot/dts/overlays/overlay_map.dts | 4 ++++
14 .../boot/dts/overlays/sdio-pi5-overlay.dts | 24 +++++++++++++++++++
15 arch/arm/boot/dts/rp1.dtsi | 4 ++--
16 5 files changed, 38 insertions(+), 2 deletions(-)
17 create mode 100644 arch/arm/boot/dts/overlays/sdio-pi5-overlay.dts
18
19 --- a/arch/arm/boot/dts/overlays/Makefile
20 +++ b/arch/arm/boot/dts/overlays/Makefile
21 @@ -225,6 +225,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
22 sc16is752-spi1.dtbo \
23 sdhost.dtbo \
24 sdio.dtbo \
25 + sdio-pi5.dtbo \
26 seeed-can-fd-hat-v1.dtbo \
27 seeed-can-fd-hat-v2.dtbo \
28 sh1106-spi.dtbo \
29 --- a/arch/arm/boot/dts/overlays/README
30 +++ b/arch/arm/boot/dts/overlays/README
31 @@ -3932,6 +3932,13 @@ Info: This overlay is now deprecated.
32 Load: <Deprecated>
33
34
35 +Name: sdio-pi5
36 +Info: Selects the rp1_mmc0 interface and enables it on GPIOs 22-27.
37 + Pi 5 only.
38 +Load: dtoverlay=sdio-pi5
39 +Params: <None>
40 +
41 +
42 Name: sdtweak
43 Info: This overlay is now deprecated. Use the sd_* dtparams in the
44 base DTB, e.g. "dtoverlay=sdtweak,poll_once" becomes
45 --- a/arch/arm/boot/dts/overlays/overlay_map.dts
46 +++ b/arch/arm/boot/dts/overlays/overlay_map.dts
47 @@ -250,6 +250,10 @@
48 deprecated = "use sdio,bus_width=1,gpios_22_25";
49 };
50
51 + sdio-pi5 {
52 + bcm2712;
53 + };
54 +
55 sdtweak {
56 deprecated = "use 'dtparam=sd_poll_once' etc.";
57 };
58 --- /dev/null
59 +++ b/arch/arm/boot/dts/overlays/sdio-pi5-overlay.dts
60 @@ -0,0 +1,24 @@
61 +/dts-v1/;
62 +/plugin/;
63 +
64 +/* SDIO/SD/MMC on RP1 bank 0 */
65 +
66 +/{
67 + compatible = "brcm,bcm2712";
68 +
69 + fragment@0 {
70 + target = <&rp1_mmc0>;
71 + frag0: __overlay__ {
72 + status = "okay";
73 + pinctrl-0 = <&rp1_sdio0_22_27>;
74 + pinctrl-names = "default";
75 + };
76 + };
77 +
78 + fragment@1 {
79 + target = <&rp1_sdio_clk0>;
80 + frag1: __overlay__ {
81 + status = "okay";
82 + };
83 + };
84 +};
85 --- a/arch/arm/boot/dts/rp1.dtsi
86 +++ b/arch/arm/boot/dts/rp1.dtsi
87 @@ -962,7 +962,7 @@
88
89 rp1_mmc0: mmc@180000 {
90 reg = <0xc0 0x40180000 0x0 0x100>;
91 - compatible = "snps,dwcmshc-sdhci";
92 + compatible = "raspberrypi,rp1-dwcmshc";
93 interrupts = <RP1_INT_SDIO0 IRQ_TYPE_LEVEL_HIGH>;
94 clocks = <&rp1_clocks RP1_CLK_SYS &sdhci_core
95 &rp1_clocks RP1_CLK_SDIO_TIMER
96 @@ -978,7 +978,7 @@
97
98 rp1_mmc1: mmc@184000 {
99 reg = <0xc0 0x40184000 0x0 0x100>;
100 - compatible = "snps,dwcmshc-sdhci";
101 + compatible = "raspberrypi,rp1-dwcmshc";
102 interrupts = <RP1_INT_SDIO1 IRQ_TYPE_LEVEL_HIGH>;
103 clocks = <&rp1_clocks RP1_CLK_SYS &sdhci_core
104 &rp1_clocks RP1_CLK_SDIO_TIMER