1 From 788109b357ddb30a95be72ce46dc22e2335131af Mon Sep 17 00:00:00 2001
2 From: Phil Elwell <phil@raspberrypi.org>
3 Date: Thu, 10 Jan 2019 15:27:56 +0000
4 Subject: [PATCH] overlays: sdio: Add enhanced 1-bit support
6 "dtoverlay=sdio,bus_width=1,gpios_22_25" is equivalent to the sdio-1bit
7 overlay, which is now deprecated.
9 "dtoverlay=sdio,bus_width=1,gpios_34_37" enables 1-bit mode on GPIOs 34-37.
11 Signed-off-by: Phil Elwell <phil@raspberrypi.org>
13 arch/arm/boot/dts/overlays/README | 24 +++++++++++----------
14 arch/arm/boot/dts/overlays/sdio-overlay.dts | 20 ++++++++++++++++-
15 2 files changed, 32 insertions(+), 12 deletions(-)
17 --- a/arch/arm/boot/dts/overlays/README
18 +++ b/arch/arm/boot/dts/overlays/README
19 @@ -479,8 +479,7 @@ Params: <None>
21 Name: bmp085_i2c-sensor
22 Info: This overlay is now deprecated - see i2c-sensor
23 -Load: dtoverlay=bmp085_i2c-sensor
29 @@ -1737,7 +1736,8 @@ Params: overclock_50 Clock (i
32 Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock,
33 - and enables SDIO via GPIOs 22-27.
34 + and enables SDIO via GPIOs 22-27. An example of use in 1-bit mode is
35 + "dtoverlay=sdio,bus_width=1,gpios_22_25"
36 Load: dtoverlay=sdio,<param>=<val>
37 Params: sdio_overclock SDIO Clock (in MHz) to use when the MMC
38 framework requests 50MHz
39 @@ -1747,16 +1747,18 @@ Params: sdio_overclock SDIO Clo
41 bus_width Set the SDIO host bus width (default 4 bits)
43 + gpios_22_25 Select GPIOs 22-25 for 1-bit mode. Must be used
44 + with bus_width=1. This replaces the sdio-1bit
45 + overlay, which is now deprecated.
48 -Info: Selects the bcm2835-sdhost SD/MMC driver, optionally with overclock,
49 - and enables 1-bit SDIO via GPIOs 22-25.
50 -Load: dtoverlay=sdio-1bit,<param>=<val>
51 -Params: sdio_overclock SDIO Clock (in MHz) to use when the MMC
52 - framework requests 50MHz
53 + gpios_34_37 Select GPIOs 34-37 for 1-bit mode. Must be used
56 - poll_once Disable SDIO-device polling every second
57 - (default on: polling once at boot-time)
60 +Info: This overlay is now deprecated. Use
61 + "dtoverlay=sdio,bus_width=1,gpios_22_25" instead.
66 --- a/arch/arm/boot/dts/overlays/sdio-overlay.dts
67 +++ b/arch/arm/boot/dts/overlays/sdio-overlay.dts
69 pinctrl-names = "default";
70 pinctrl-0 = <&sdio_ovl_pins>;
81 + target = <&sdio_ovl_pins>;
83 + brcm,pins = <22 23 24 25>;
84 + brcm,pull = <0 2 2 2>;
89 + target = <&sdio_ovl_pins>;
91 + brcm,pins = <34 35 36 37>;
92 + brcm,pull = <0 2 2 2>;
97 target-path = "/aliases";
99 mmc1 = "/soc/sdio@7e300000";
101 poll_once = <&sdio_ovl>,"non-removable?";
102 bus_width = <&sdio_ovl>,"bus-width:0";
103 sdio_overclock = <&sdio_ovl>,"brcm,overclock-50:0";
104 + gpios_22_25 = <0>,"=3";
105 + gpios_34_37 = <0>,"=4";