Skip to content

Commit 7226664

Browse files
shawn1221mmind
authored andcommitted
arm64: dts: rockchip: Fix SD card support for RK3576 EVB1
When runtime suspend is enabled, the associated power domain is powered off, which resets the registers, including the power control bit. As a result, the card loses power during runtime suspend. The card should still be able to process I/O with the help of mmc_blk_mq_rw_recovery(), which is suboptimal. To address this issue, we must use vmmc-supply with a GPIO based method to maintain power to the card. Also, add cd-gpios method to make hot-plug work correctly during idle periods. Fixes: f135a1a ("arm64: dts: rockchip: Add rk3576 evb1 board") Cc: stable@vger.kernel.org Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com> Link: https://patch.msgid.link/1768524932-163929-5-git-send-email-shawn.lin@rock-chips.com Signed-off-by: Heiko Stuebner <heiko@sntech.de>
1 parent d813ddc commit 7226664

1 file changed

Lines changed: 22 additions & 0 deletions

File tree

arch/arm64/boot/dts/rockchip/rk3576-evb1-v10.dts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -223,6 +223,18 @@
223223
vin-supply = <&vcc_3v3_s3>;
224224
};
225225

226+
vcc3v3_sd: regulator-vcc-3v3-sd {
227+
compatible = "regulator-fixed";
228+
enable-active-high;
229+
gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>;
230+
pinctrl-names = "default";
231+
pinctrl-0 = <&sdmmc_pwren>;
232+
regulator-name = "vcc3v3_sd";
233+
regulator-min-microvolt = <3300000>;
234+
regulator-max-microvolt = <3300000>;
235+
vin-supply = <&vcc_3v3_s0>;
236+
};
237+
226238
vcc_ufs_s0: regulator-vcc-ufs-s0 {
227239
compatible = "regulator-fixed";
228240
regulator-name = "vcc_ufs_s0";
@@ -904,6 +916,12 @@
904916
};
905917
};
906918

919+
sdmmc {
920+
sdmmc_pwren: sdmmc-pwren {
921+
rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>;
922+
};
923+
};
924+
907925
usb {
908926
usb_host_pwren: usb-host-pwren {
909927
rockchip,pins = <0 RK_PC7 RK_FUNC_GPIO &pcfg_pull_none>;
@@ -958,11 +976,15 @@
958976
bus-width = <4>;
959977
cap-mmc-highspeed;
960978
cap-sd-highspeed;
979+
cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>;
961980
disable-wp;
962981
max-frequency = <200000000>;
963982
no-sdio;
964983
no-mmc;
984+
pinctrl-names = "default";
985+
pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_bus4>;
965986
sd-uhs-sdr104;
987+
vmmc-supply = <&vcc3v3_sd>;
966988
vqmmc-supply = <&vccio_sd_s0>;
967989
status = "okay";
968990
};

0 commit comments

Comments
 (0)