[PATCH v3 1/3] arm: dts: rk3288-tinker.dtsi: Fix SD card detection

David Summers beagleboard at davidjohnsummers.uk
Sat Mar 9 07:36:24 PST 2019

The Problem:

On ASUS Tinker Board S, when booting from the eMMC, and there is card
in the sd slot, there are constant errors.

Also when warm reboot, uboot can not access the sd slot


Identified by Robin Murphy @ ARM. The Card Detect on rk3288
devices is pulled up by vccio-sd; so when the regulator powers this
off, card detect gives spurious errors. A second problem, is during
power down, vccio-sd apprears to be powered down. This causes a
problem when warm rebooting from the sd card. This was identified by
Jonas Karlman.


A common fault on these rk3288 board, which impliment the reference

When this arose before:


And Ulf and Jaehoon clearly said this was a broken card detect design,
which should be solved via polling


Hence broken-cd is set as a property. This cures the errors. The
powering down of vccio-sd during reboot is cured by adding

This solutions has been fairly widely reviewed and tested.

Signed-off-by: David Summers <beagleboard at davidjohnsummers.uk>
Reviewed by: Robin Murphy <robin.murphy at arm.com>
Reviewed by: Jonas Karlman <jonas at kwiboo.se>
Test by: TheSaint < @ ArchLinux Arm >
 arch/arm/boot/dts/rk3288-tinker.dtsi | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index aa107ee41b8b..ef653c3209bc 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -254,6 +254,7 @@
 			vccio_sd: LDO_REG5 {
+				regulator-boot-on;
 				regulator-min-microvolt = <1800000>;
 				regulator-max-microvolt = <3300000>;
 				regulator-name = "vccio_sd";
@@ -430,7 +431,7 @@
 	bus-width = <4>;
-	card-detect-delay = <200>;
+	broken-cd;
 	disable-wp;			/* wp not hooked up */
 	pinctrl-names = "default";
 	pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
beagleboard at davidjohnsummers.uk

More information about the linux-arm-kernel mailing list