All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] arm: dts: db410c: Add missing cd-gpios for SD card detection
@ 2021-06-27 11:06 Stephan Gerhold
  2021-06-27 19:50 ` Ramon Fried
  2021-07-06 22:50 ` Tom Rini
  0 siblings, 2 replies; 3+ messages in thread
From: Stephan Gerhold @ 2021-06-27 11:06 UTC (permalink / raw)
  To: u-boot; +Cc: Stephan Gerhold, Ramon Fried, Tom Rini

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.

Cc: Ramon Fried <rfried.dev@gmail.com>
Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
---

 arch/arm/dts/dragonboard410c.dts | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
index fa348bc621..7e56140df2 100644
--- a/arch/arm/dts/dragonboard410c.dts
+++ b/arch/arm/dts/dragonboard410c.dts
@@ -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 {
-- 
2.32.0


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm: dts: db410c: Add missing cd-gpios for SD card detection
  2021-06-27 11:06 [PATCH] arm: dts: db410c: Add missing cd-gpios for SD card detection Stephan Gerhold
@ 2021-06-27 19:50 ` Ramon Fried
  2021-07-06 22:50 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Ramon Fried @ 2021-06-27 19:50 UTC (permalink / raw)
  To: Stephan Gerhold; +Cc: U-Boot Mailing List, Tom Rini

On Sun, Jun 27, 2021 at 2:06 PM Stephan Gerhold <stephan@gerhold.net> wrote:
>
> 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.
>
> Cc: Ramon Fried <rfried.dev@gmail.com>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> ---
>
>  arch/arm/dts/dragonboard410c.dts | 4 +++-
>  1 file changed, 3 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm/dts/dragonboard410c.dts b/arch/arm/dts/dragonboard410c.dts
> index fa348bc621..7e56140df2 100644
> --- a/arch/arm/dts/dragonboard410c.dts
> +++ b/arch/arm/dts/dragonboard410c.dts
> @@ -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 {
> --
> 2.32.0
>

Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] arm: dts: db410c: Add missing cd-gpios for SD card detection
  2021-06-27 11:06 [PATCH] arm: dts: db410c: Add missing cd-gpios for SD card detection Stephan Gerhold
  2021-06-27 19:50 ` Ramon Fried
@ 2021-07-06 22:50 ` Tom Rini
  1 sibling, 0 replies; 3+ messages in thread
From: Tom Rini @ 2021-07-06 22:50 UTC (permalink / raw)
  To: Stephan Gerhold; +Cc: u-boot, Ramon Fried

[-- Attachment #1: Type: text/plain, Size: 996 bytes --]

On Sun, Jun 27, 2021 at 01:06:15PM +0200, Stephan Gerhold wrote:

> 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.
> 
> Cc: Ramon Fried <rfried.dev@gmail.com>
> Signed-off-by: Stephan Gerhold <stephan@gerhold.net>
> Reviewed-by: Ramon Fried <rfried.dev@gmail.com>

Applied to u-boot/master, thanks!

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-07-06 22:51 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-27 11:06 [PATCH] arm: dts: db410c: Add missing cd-gpios for SD card detection Stephan Gerhold
2021-06-27 19:50 ` Ramon Fried
2021-07-06 22:50 ` Tom Rini

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.