]> git.ipfire.org Git - thirdparty/kernel/stable-queue.git/blob - queue-5.0/arm-dts-rockchip-fix-sd-card-detection-on-rk3288-tinker.patch
Linux 4.19.35
[thirdparty/kernel/stable-queue.git] / queue-5.0 / arm-dts-rockchip-fix-sd-card-detection-on-rk3288-tinker.patch
1 From 8dbc4d5ddb59f49cb3e85bccf42a4720b27a6576 Mon Sep 17 00:00:00 2001
2 From: David Summers <beagleboard@davidjohnsummers.uk>
3 Date: Sat, 9 Mar 2019 15:39:21 +0000
4 Subject: ARM: dts: rockchip: Fix SD card detection on rk3288-tinker
5
6 From: David Summers <beagleboard@davidjohnsummers.uk>
7
8 commit 8dbc4d5ddb59f49cb3e85bccf42a4720b27a6576 upstream.
9
10 The Problem:
11
12 On ASUS Tinker Board S, when booting from the eMMC, and there is card
13 in the sd slot, there are constant errors.
14
15 Also when warm reboot, uboot can not access the sd slot
16
17 Cause:
18
19 Identified by Robin Murphy @ ARM. The Card Detect on rk3288
20 devices is pulled up by vccio-sd; so when the regulator powers this
21 off, card detect gives spurious errors. A second problem, is during
22 power down, vccio-sd apprears to be powered down. This causes a
23 problem when warm rebooting from the sd card. This was identified by
24 Jonas Karlman.
25
26 History:
27
28 A common fault on these rk3288 board, which impliment the reference
29 design.
30
31 When this arose before:
32
33 http://lists.infradead.org/pipermail/linux-arm-kernel/2014-August/281153.html
34
35 And Ulf and Jaehoon clearly said this was a broken card detect design,
36 which should be solved via polling
37
38 Solution:
39
40 Hence broken-cd is set as a property. This cures the errors. The
41 powering down of vccio-sd during reboot is cured by adding
42 regulator-boot-on.
43
44 This solutions has been fairly widely reviewed and tested.
45
46 Fixes: e58c5e739d6f ("ARM: dts: rockchip: move shared tinker-board nodes to a common dtsi")
47 Cc: stable@vger.kernel.org
48 [Heiko: slightly inaccurate fixes but tinker is a sbc (aka like a Pi) where
49 we can hopefully expect people not to rely on overly old stable kernels]
50 Signed-off-by: David Summers <beagleboard@davidjohnsummers.uk>
51 Reviewed-by: Jonas Karlman <jonas@kwiboo.se>
52 Tested-by: Jonas Karlman <jonas@kwiboo.se>
53 Reviewed-by: Robin Murphy <robin.murphy@arm.com>
54 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
55 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
56
57 ---
58 arch/arm/boot/dts/rk3288-tinker.dtsi | 3 ++-
59 1 file changed, 2 insertions(+), 1 deletion(-)
60
61 --- a/arch/arm/boot/dts/rk3288-tinker.dtsi
62 +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
63 @@ -254,6 +254,7 @@
64 };
65
66 vccio_sd: LDO_REG5 {
67 + regulator-boot-on;
68 regulator-min-microvolt = <1800000>;
69 regulator-max-microvolt = <3300000>;
70 regulator-name = "vccio_sd";
71 @@ -430,7 +431,7 @@
72 bus-width = <4>;
73 cap-mmc-highspeed;
74 cap-sd-highspeed;
75 - card-detect-delay = <200>;
76 + broken-cd;
77 disable-wp; /* wp not hooked up */
78 pinctrl-names = "default";
79 pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;