Skip to content

Commit d690976

Browse files
Kwibookeveryang
authored andcommitted
arm64: dts: rockchip: Fix sdmmc access on rk3308-rock-s0 v1.1 boards
BootROM leave GPIO4_D6 configured as SDMMC_PWREN function and DW MCI driver set PRWEN high on MMC_POWER_UP and low on MMC_POWER_OFF. Similarly U-Boot also set PRWEN high before accessing mmc. However, HW revision prior to v1.2 must pull GPIO4_D6 low to access sdmmc. For HW revision v1.2 the state of GPIO4_D6 has no impact. Model an always-on active low fixed regulator using GPIO4_D6 to fix use of sdmmc on older HW revisions of the board. Fixes: adeb5d2a4ba4 ("arm64: dts: rockchip: Add Radxa ROCK S0") Signed-off-by: Jonas Karlman <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Stuebner <[email protected]> [ upstream commit: 26c100232b09ced0857306ac9831a4fa9c9aa231 ] (cherry picked from commit ca8e0bedbc790b19b11efc223677d178b8eeb74e) Signed-off-by: Jonas Karlman <[email protected]>
1 parent 8d25dbb commit d690976

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

dts/upstream/src/arm64/rockchip/rk3308-rock-s0.dts

+24-1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,23 @@
7474
vin-supply = <&vcc5v0_sys>;
7575
};
7676

77+
/*
78+
* HW revision prior to v1.2 must pull GPIO4_D6 low to access sdmmc.
79+
* This is modeled as an always-on active low fixed regulator.
80+
*/
81+
vcc_sd: regulator-3v3-vcc-sd {
82+
compatible = "regulator-fixed";
83+
gpios = <&gpio4 RK_PD6 GPIO_ACTIVE_LOW>;
84+
pinctrl-names = "default";
85+
pinctrl-0 = <&sdmmc_2030>;
86+
regulator-name = "vcc_sd";
87+
regulator-always-on;
88+
regulator-boot-on;
89+
regulator-min-microvolt = <3300000>;
90+
regulator-max-microvolt = <3300000>;
91+
vin-supply = <&vcc_io>;
92+
};
93+
7794
vcc5v0_sys: regulator-5v0-vcc-sys {
7895
compatible = "regulator-fixed";
7996
regulator-name = "vcc5v0_sys";
@@ -181,6 +198,12 @@
181198
};
182199
};
183200

201+
sdmmc {
202+
sdmmc_2030: sdmmc-2030 {
203+
rockchip,pins = <4 RK_PD6 RK_FUNC_GPIO &pcfg_pull_none>;
204+
};
205+
};
206+
184207
wifi {
185208
wifi_reg_on: wifi-reg-on {
186209
rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -233,7 +256,7 @@
233256
cap-mmc-highspeed;
234257
cap-sd-highspeed;
235258
disable-wp;
236-
vmmc-supply = <&vcc_io>;
259+
vmmc-supply = <&vcc_sd>;
237260
status = "okay";
238261
};
239262

0 commit comments

Comments
 (0)