Skip to contentSkip to conversation

ARM: dts: alt: use correct logic for SD WP pins

PATCH In review Wolfram Sang 4 participants 5 messages Sep 5, 2017 – Sep 6, 2017 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: alt: use correct logic for SD WP pins

The WP pins are ACTIVE_HIGH, fix it in the DTS.

---
 arch/arm/boot/dts/r8a7794-alt.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a7794-alt.dts +2 -2
index e45f92b5eb1107..bd98790d964e13 100644
@@ -304,7 +304,7 @@
 	vmmc-supply = <&vcc_sdhi0>;
 	vqmmc-supply = <&vccq_sdhi0>;
 	cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
-	wp-gpios = <&gpio6 7 GPIO_ACTIVE_LOW>;
+	wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
 	sd-uhs-sdr50;
 	sd-uhs-sdr104;
 	status = "okay";
@@ -318,7 +318,7 @@
 	vmmc-supply = <&vcc_sdhi1>;
 	vqmmc-supply = <&vccq_sdhi1>;
 	cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
-	wp-gpios = <&gpio6 15 GPIO_ACTIVE_LOW>;
+	wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
 	sd-uhs-sdr50;
 	status = "okay";
 };
Signature · 1 line
2.11.0
#1 lore raw
Quoted 3 lines · Wolfram Sang

The WP pins are ACTIVE_HIGH, fix it in the DTS.

Thanks, I applied this for v4.15 with:

Fixes 2b41091b896b ("ARM: dts: alt: add SDHI0 and 1 support")

Let me know if you'd prefer it to be handled as a fix for v4.14. If the tag above is correct then it looks like this problem has been present since v4.9.

#2 lore raw
Quoted 10 lines
Quoted 4 lines

The WP pins are ACTIVE_HIGH, fix it in the DTS.

Thanks, I applied this for v4.15 with:

Fixes 2b41091b896b ("ARM: dts: alt: add SDHI0 and 1 support")

Let me know if you'd prefer it to be handled as a fix for v4.14.

I'd think 4.14 is more appropriate since it is a bugfix. But then again, nobody noticed so far, so I don't really mind.

#3 lore raw
In reply to Wolfram Sang

Hi Wolfram,

Quoted 21 lines · Wolfram Sang

The WP pins are ACTIVE_HIGH, fix it in the DTS.

---
 arch/arm/boot/dts/r8a7794-alt.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/r8a7794-alt.dts +1 -1
index e45f92b5eb1107..bd98790d964e13 100644
@@ -304,7 +304,7 @@
        vmmc-supply = <&vcc_sdhi0>;
        vqmmc-supply = <&vccq_sdhi0>;
        cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
-       wp-gpios = <&gpio6 7 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
        sd-uhs-sdr50;
        sd-uhs-sdr104;
        status = "okay";

arch/arm/boot/dts/r8a7794-alt.dts line 323

Quoted 7 lines
arch/arm/boot/dts/r8a7794-alt.dts +1 -1
@@ -318,7 +318,7 @@
        vmmc-supply = <&vcc_sdhi1>;
        vqmmc-supply = <&vccq_sdhi1>;
        cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
-       wp-gpios = <&gpio6 15 GPIO_ACTIVE_LOW>;
+       wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
        sd-uhs-sdr50;
        status = "okay";

Thanks, looks good, as in "the same as on the other R-Car Gen2 boards".

Doesn't seem to fix this issue, though:

[    8.792344] sh_mobile_sdhi ee100000.sd: timeout waiting for
hardware interrupt (CMD19)
[   13.912331] sh_mobile_sdhi ee100000.sd: timeout waiting for
hardware interrupt (CMD19)
[   13.972338] sh_mobile_sdhi ee100000.sd: Tuning procedure failed
[   13.978277] mmc1: tuning execution failed: -110
[   13.982854] mmc1: error -110 whilst initialising SD card

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds

#4 lore raw
Quoted 4 lines

Doesn't seem to fix this issue, though:

[    8.792344] sh_mobile_sdhi ee100000.sd: timeout waiting for hardware interrupt (CMD19)

Of course, not :)) But it was still wrong.