arm64: dts: allwinner: Fix SD card CD GPIO for SOPine systems
Subsystems (2)
PATCH 1/1 arm64: dts: allwinner: Fix SD card CD GPIO for SOPine systems
Commit 941432d00768 ("arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card") enabled the card detect GPIO for the SOPine module, along the way with the Pine64-LTS, which share the same base .dtsi.
However while both boards indeed have a working CD GPIO on PF6, the polarity is different: the SOPine modules uses a "push-pull" socket, which has an active-high switch, while the Pine64-LTS use the more traditional push-push socket and the common active-low switch.
Fix the polarity in the sopine.dtsi, and overwrite it in the LTS board .dts, to make the SD card work again on systems using SOPine modules.
---
Hi,
sorry, that slipped through my testing. I verified that the CD switch worked, but didn't actually boot Linux on the SOPine baseboard.
Thanks to Ashley for the heads up!
Cheers,
Andre
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts | 4 ++++ arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts +4 -0
@@ -19,3 +19,7 @@ }; }; }; + +&mmc0 { + cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 push-push switch */ +};
arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi +1 -1
@@ -34,7 +34,7 @@ vmmc-supply = <®_dcdc1>; disable-wp; bus-width = <4>; - cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */ + cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 push-pull switch */ status = "okay"; };
Signature · 1 line
2.17.5
Maxime Ripard
AppliedQuoted 9 lines · Andre Przywara
Commit
941432d00768("arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card") enabled the card detect GPIO for the SOPine module, along the way with the Pine64-LTS, which share the same base .dtsi.However while both boards indeed have a working CD GPIO on PF6, the polarity is different: the SOPine modules uses a "push-pull" socket, which has an active-high switch, while the Pine64-LTS use the more traditional push-push socket and the common active-low switch.
Quoted 7 lines
Fix the polarity in the
sopine.dtsi, and overwrite it in the LTS board .dts, to make the SD card work again on systems using SOPine modules.Fixes 941432d00768 ("arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card")Reported-by Ashley <[email protected]>Signed-off-by Andre Przywara <[email protected]>
Applied, thanks
Maxime