Skip to content

Commit 3dd4ce4

Browse files
Andre-ARMmripard
authored andcommitted
arm64: dts: allwinner: Fix SD card CD GPIO for SOPine systems
Commit 941432d ("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. Fixes: 941432d ("arm64: dts: allwinner: Drop non-removable from SoPine/LTS SD card") Reported-by: Ashley <contact@victorianfox.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Maxime Ripard <maxime@cerno.tech> Link: https://lore.kernel.org/r/20210316144219.5973-1-andre.przywara@arm.com
1 parent fbb9e86 commit 3dd4ce4

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

arch/arm64/boot/dts/allwinner/sun50i-a64-pine64-lts.dts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@
1919
};
2020
};
2121
};
22+
23+
&mmc0 {
24+
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 push-push switch */
25+
};

arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
vmmc-supply = <&reg_dcdc1>;
3535
disable-wp;
3636
bus-width = <4>;
37-
cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
37+
cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 push-pull switch */
3838
status = "okay";
3939
};
4040

0 commit comments

Comments
 (0)