Skip to content

Commit

Permalink
arm: dts: change RP1 SDHCI controller compatible string
Browse files Browse the repository at this point in the history
Also add a sdio-pi5 overlay which enables mmc0 on GPIOs 22-27, as was
possible with earlier models of Pi.

Signed-off-by: Jonathan Bell <[email protected]>
  • Loading branch information
P33M committed Nov 8, 2023
1 parent 694da98 commit d636935
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 2 deletions.
1 change: 1 addition & 0 deletions arch/arm/boot/dts/overlays/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
sc16is752-spi1.dtbo \
sdhost.dtbo \
sdio.dtbo \
sdio-pi5.dtbo \
seeed-can-fd-hat-v1.dtbo \
seeed-can-fd-hat-v2.dtbo \
sh1106-spi.dtbo \
Expand Down
7 changes: 7 additions & 0 deletions arch/arm/boot/dts/overlays/README
Original file line number Diff line number Diff line change
Expand Up @@ -3936,6 +3936,13 @@ Info: This overlay is now deprecated. Use
Load: <Deprecated>


Name: sdio-pi5
Info: Selects the rp1_mmc0 interface and enables it on GPIOs 22-27.
Pi 5 only.
Load: dtoverlay=sdio-pi5
Params: <None>


Name: sdtweak
Info: This overlay is now deprecated. Use the sd_* dtparams in the
base DTB, e.g. "dtoverlay=sdtweak,poll_once" becomes
Expand Down
4 changes: 4 additions & 0 deletions arch/arm/boot/dts/overlays/overlay_map.dts
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,10 @@
deprecated = "use sdio,bus_width=1,gpios_22_25";
};

sdio-pi5 {
bcm2712;
};

sdtweak {
deprecated = "use 'dtparam=sd_poll_once' etc.";
};
Expand Down
24 changes: 24 additions & 0 deletions arch/arm/boot/dts/overlays/sdio-pi5-overlay.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
/dts-v1/;
/plugin/;

/* SDIO/SD/MMC on RP1 bank 0 */

/{
compatible = "brcm,bcm2712";

fragment@0 {
target = <&rp1_mmc0>;
frag0: __overlay__ {
status = "okay";
pinctrl-0 = <&rp1_sdio0_22_27>;
pinctrl-names = "default";
};
};

fragment@1 {
target = <&rp1_sdio_clk0>;
frag1: __overlay__ {
status = "okay";
};
};
};
4 changes: 2 additions & 2 deletions arch/arm/boot/dts/rp1.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -962,7 +962,7 @@

rp1_mmc0: mmc@180000 {
reg = <0xc0 0x40180000 0x0 0x100>;
compatible = "snps,dwcmshc-sdhci";
compatible = "raspberrypi,rp1-dwcmshc";
interrupts = <RP1_INT_SDIO0 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&rp1_clocks RP1_CLK_SYS &sdhci_core
&rp1_clocks RP1_CLK_SDIO_TIMER
Expand All @@ -978,7 +978,7 @@

rp1_mmc1: mmc@184000 {
reg = <0xc0 0x40184000 0x0 0x100>;
compatible = "snps,dwcmshc-sdhci";
compatible = "raspberrypi,rp1-dwcmshc";
interrupts = <RP1_INT_SDIO1 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&rp1_clocks RP1_CLK_SYS &sdhci_core
&rp1_clocks RP1_CLK_SDIO_TIMER
Expand Down

0 comments on commit d636935

Please sign in to comment.