Skip to contentSkip to conversation

arm: dts: db410c: Add missing cd-gpios for SD card detection

PATCH In review Stephan Gerhold 3 participants 3 messages Jun 27, 2021 – Jul 6, 2021 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 arm: dts: db410c: Add missing cd-gpios for SD card detection

It looks like SD card detection is broken at the moment for DB410c. The eMMC is detected correctly, but the SD card is not.

This is probably similar to the issue fixed in commit 850514740358 ("mmc: msm_sdhci: Use mmc_of_parse for setting host_caps") for eMMC, except that the SD card does not have a property like "non-removable" that skips the card detection.

The SDHCI on DB410c cannot detect itself if a SD card is inserted, so add the necessary cd-gpios to make SD card detection work again.

While at it, fix the #gpio-cells for the soc_gpios to avoid DTC warnings - the soc_gpios are actually already used with two cells for the gpio-leds so this was just wrong all the time.

---

 arch/arm/dts/dragonboard410c.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/dts/dragonboard410c.dts +3 -1
index fa348bc621..7e56140df2 100644
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include "skeleton64.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/pinctrl-snapdragon.h>
 
 / {
@@ -91,7 +92,7 @@
 			gpio-controller;
 			gpio-count = <122>;
 			gpio-bank-name="soc";
-			#gpio-cells = <1>;
+			#gpio-cells = <2>;
 		};
 
 		ehci@78d9000 {
@@ -123,6 +124,7 @@
 			bus-width = <0x4>;
 			clock = <&clkc 1>;
 			clock-frequency = <200000000>;
+			cd-gpios = <&soc_gpios 38 GPIO_ACTIVE_LOW>;
 		};
 
 		wcnss {
Signature · 1 line
2.32.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 53 lines · Stephan Gerhold

It looks like SD card detection is broken at the moment for DB410c. The eMMC is detected correctly, but the SD card is not.

This is probably similar to the issue fixed in commit 850514740358 ("mmc: msm_sdhci: Use mmc_of_parse for setting host_caps") for eMMC, except that the SD card does not have a property like "non-removable" that skips the card detection.

The SDHCI on DB410c cannot detect itself if a SD card is inserted, so add the necessary cd-gpios to make SD card detection work again.

While at it, fix the #gpio-cells for the soc_gpios to avoid DTC warnings - the soc_gpios are actually already used with two cells for the gpio-leds so this was just wrong all the time.

---

 arch/arm/dts/dragonboard410c.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
arch/arm/dts/dragonboard410c.dts +3 -2
index fa348bc621..7e56140df2 100644
@@ -8,6 +8,7 @@
 /dts-v1/;
 
 #include "skeleton64.dtsi"
+#include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/pinctrl-snapdragon.h>
 
 / {
@@ -91,7 +92,7 @@
                        gpio-controller;
                        gpio-count = <122>;
                        gpio-bank-name="soc";
-                       #gpio-cells = <1>;
+                       #gpio-cells = <2>;
                };
 
                ehci@78d9000 {
@@ -123,6 +124,7 @@
                        bus-width = <0x4>;
                        clock = <&clkc 1>;
                        clock-frequency = <200000000>;
+                       cd-gpios = <&soc_gpios 38 GPIO_ACTIVE_LOW>;
                };
 
                wcnss {
--
Quoted 2 lines

2.32.0

#2 lore raw
In reply to Stephan Gerhold
Quoted 11 lines · Stephan Gerhold

It looks like SD card detection is broken at the moment for DB410c. The eMMC is detected correctly, but the SD card is not.

This is probably similar to the issue fixed in commit 850514740358 ("mmc: msm_sdhci: Use mmc_of_parse for setting host_caps") for eMMC, except that the SD card does not have a property like "non-removable" that skips the card detection.

The SDHCI on DB410c cannot detect itself if a SD card is inserted, so add the necessary cd-gpios to make SD card detection work again.

Quoted 7 lines

While at it, fix the #gpio-cells for the soc_gpios to avoid DTC warnings - the soc_gpios are actually already used with two cells for the gpio-leds so this was just wrong all the time.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom