diff options
author | Vicente Bergas <vicencb@gmail.com> | 2018-09-17 09:47:14 -0400 |
---|---|---|
committer | Heiko Stuebner <heiko@sntech.de> | 2018-09-22 16:49:22 -0400 |
commit | 88a20edf76091ee7f1bb459b89d714d53f0f8940 (patch) | |
tree | 9eacea80feced47f080e02cec9974d33bad3362e | |
parent | 501500e65fa96f899230d66153fefd780f08dd34 (diff) |
arm64: dts: rockchip: Fix microSD in rk3399 sapphire board
The microSD card slot in the Sapphire board is not working because of
several issues:
1.- The vmmc power supply is missing in the DTS. It is capable of 3.0V
and has a GPIO-based enable control.
2.- The vqmmc power supply can provide up to 3.3V, but it is capped in
the DTS to just 3.0V because of the vmmc capability. This results in a
conflict from the mmc driver requesting an unsupportable voltage range
from 3.3V to 3.0V (min > max) as reported in dmesg. So, extend the
range up to 3.3V. The hw should be able to stand this 0.3V tolerance.
See mmc_regulator_set_vqmmc in drivers/mmc/core/core.c.
3.- The card detect signal is non-working. There is a known conflict
with jtag, but the workaround in drivers/soc/rockchip/grf.c does not
work. Adding the broken-cd attribute to the DTS fixes the issue.
Signed-off-by: Vicente Bergas <vicencb@gmail.com>
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
-rw-r--r-- | arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi index a531cd6c2e83..5421e23760c3 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi | |||
@@ -93,6 +93,19 @@ | |||
93 | vin-supply = <&vcc_1v8>; | 93 | vin-supply = <&vcc_1v8>; |
94 | }; | 94 | }; |
95 | 95 | ||
96 | vcc3v0_sd: vcc3v0-sd { | ||
97 | compatible = "regulator-fixed"; | ||
98 | enable-active-high; | ||
99 | gpio = <&gpio0 RK_PA1 GPIO_ACTIVE_HIGH>; | ||
100 | pinctrl-names = "default"; | ||
101 | pinctrl-0 = <&sdmmc0_pwr_h>; | ||
102 | regulator-always-on; | ||
103 | regulator-max-microvolt = <3000000>; | ||
104 | regulator-min-microvolt = <3000000>; | ||
105 | regulator-name = "vcc3v0_sd"; | ||
106 | vin-supply = <&vcc3v3_sys>; | ||
107 | }; | ||
108 | |||
96 | vcc3v3_sys: vcc3v3-sys { | 109 | vcc3v3_sys: vcc3v3-sys { |
97 | compatible = "regulator-fixed"; | 110 | compatible = "regulator-fixed"; |
98 | regulator-name = "vcc3v3_sys"; | 111 | regulator-name = "vcc3v3_sys"; |
@@ -320,7 +333,7 @@ | |||
320 | regulator-always-on; | 333 | regulator-always-on; |
321 | regulator-boot-on; | 334 | regulator-boot-on; |
322 | regulator-min-microvolt = <1800000>; | 335 | regulator-min-microvolt = <1800000>; |
323 | regulator-max-microvolt = <3000000>; | 336 | regulator-max-microvolt = <3300000>; |
324 | regulator-state-mem { | 337 | regulator-state-mem { |
325 | regulator-on-in-suspend; | 338 | regulator-on-in-suspend; |
326 | regulator-suspend-microvolt = <3000000>; | 339 | regulator-suspend-microvolt = <3000000>; |
@@ -474,6 +487,13 @@ | |||
474 | }; | 487 | }; |
475 | }; | 488 | }; |
476 | 489 | ||
490 | sd { | ||
491 | sdmmc0_pwr_h: sdmmc0-pwr-h { | ||
492 | rockchip,pins = | ||
493 | <RK_GPIO0 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>; | ||
494 | }; | ||
495 | }; | ||
496 | |||
477 | usb2 { | 497 | usb2 { |
478 | vcc5v0_host_en: vcc5v0-host-en { | 498 | vcc5v0_host_en: vcc5v0-host-en { |
479 | rockchip,pins = | 499 | rockchip,pins = |
@@ -508,6 +528,7 @@ | |||
508 | }; | 528 | }; |
509 | 529 | ||
510 | &sdmmc { | 530 | &sdmmc { |
531 | broken-cd; | ||
511 | bus-width = <4>; | 532 | bus-width = <4>; |
512 | cap-mmc-highspeed; | 533 | cap-mmc-highspeed; |
513 | cap-sd-highspeed; | 534 | cap-sd-highspeed; |
@@ -516,6 +537,7 @@ | |||
516 | max-frequency = <150000000>; | 537 | max-frequency = <150000000>; |
517 | pinctrl-names = "default"; | 538 | pinctrl-names = "default"; |
518 | pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; | 539 | pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>; |
540 | vmmc-supply = <&vcc3v0_sd>; | ||
519 | vqmmc-supply = <&vcc_sdio>; | 541 | vqmmc-supply = <&vcc_sdio>; |
520 | status = "okay"; | 542 | status = "okay"; |
521 | }; | 543 | }; |