Skip to contentSkip to conversation

ARM: sunxi: Remove left-over cd-inverted property from pcDuino3

PATCH New Tuomas Tynkkynen 3 participants 3 messages Dec 22, 2017 – Jan 10, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: sunxi: Remove left-over cd-inverted property from pcDuino3

Commit 8620f384098b ("dm: sunxi: Linksprite_pcDuino3: Correct polarity of MMC card detect") claims that the Pcduino3 device tree had an incorrect polarity for the card detect pin and thus changed the polarity flag of the cd-gpios from GPIO_ACTIVE_HIGH to GPIO_ACTIVE_LOW.

Actually the DT was correct since according to the mmc binding, a combination of GPIO_ACTIVE_HIGH + cd-inverted results in an active-low polarity. But because the U-Boot driver lacks the code to look at the cd-inverted property (unlike the Linux driver) it interpreted the polarity of active-high. Thus, after that commit the DT is actually wrong from the binding/Linux point of view.

To make both Linux and U-Boot interpret the DT in the same way, just drop the left-over cd-inverted property. I've sent a Linux patch to switch all sunxi DTs over to not using the cd-inverted property, so eventually all sunxi boards in U-Boot will be consistent in not using cd-inverted.

---
This patch supersedes the following two patches:
- [PATCH 1/2] mmc: sunxi: Support cd-inverted DT property
- [PATCH 2/2] ARM: sunxi: Enable DM MMC+SATA for the PcDuino3 Nano board

 arch/arm/dts/sun7i-a20-pcduino3.dts | 1 -
 1 file changed, 1 deletion(-)
arch/arm/dts/sun7i-a20-pcduino3.dts +0 -1
index 37b1e0ee9b..7f449b6a28 100644
@@ -165,7 +165,6 @@
 	vmmc-supply = <&reg_vcc3v3>;
 	bus-width = <4>;
 	cd-gpios = <&pio 7 1 GPIO_ACTIVE_LOW>; /* PH1 */
-	cd-inverted;
 	status = "okay";
 };
 
Signature · 1 line
2.15.0
#1 lore raw

PATCH 1/1 ARM: sunxi: Remove left-over cd-inverted property from pcDuino3

Quoted 12 lines · Tuomas Tynkkynen

Commit 8620f384098b ("dm: sunxi: Linksprite_pcDuino3: Correct polarity of MMC card detect") claims that the Pcduino3 device tree had an incorrect polarity for the card detect pin and thus changed the polarity flag of the cd-gpios from GPIO_ACTIVE_HIGH to GPIO_ACTIVE_LOW.

Actually the DT was correct since according to the mmc binding, a combination of GPIO_ACTIVE_HIGH + cd-inverted results in an active-low polarity. But because the U-Boot driver lacks the code to look at the cd-inverted property (unlike the Linux driver) it interpreted the polarity of active-high. Thus, after that commit the DT is actually wrong from the binding/Linux point of view.

Quoted 7 lines

To make both Linux and U-Boot interpret the DT in the same way, just drop the left-over cd-inverted property. I've sent a Linux patch to switch all sunxi DTs over to not using the cd-inverted property, so eventually all sunxi boards in U-Boot will be consistent in not using cd-inverted.

Thanks!
Maxime

Signature · 10 lines
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180104/0f777c8c/attachment.sig>
#2 lore raw

PATCH 1/1 ARM: sunxi: Remove left-over cd-inverted property from pcDuino3

Quoted 19 lines · Maxime Ripard
Quoted 18 lines · Tuomas Tynkkynen

Commit 8620f384098b ("dm: sunxi: Linksprite_pcDuino3: Correct polarity of MMC card detect") claims that the Pcduino3 device tree had an incorrect polarity for the card detect pin and thus changed the polarity flag of the cd-gpios from GPIO_ACTIVE_HIGH to GPIO_ACTIVE_LOW.

Actually the DT was correct since according to the mmc binding, a combination of GPIO_ACTIVE_HIGH + cd-inverted results in an active-low polarity. But because the U-Boot driver lacks the code to look at the cd-inverted property (unlike the Linux driver) it interpreted the polarity of active-high. Thus, after that commit the DT is actually wrong from the binding/Linux point of view.

To make both Linux and U-Boot interpret the DT in the same way, just drop the left-over cd-inverted property. I've sent a Linux patch to switch all sunxi DTs over to not using the cd-inverted property, so eventually all sunxi boards in U-Boot will be consistent in not using cd-inverted.

Quoted 3 lines
Quoted 1 line

Applied to u-boot-sunxi/master