Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

arm64: dts: rockchip: Fix SD card support for RK3576 Nanopi R76s

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 and store valid tuning phases. Also, add cd-gpios
method to make hot-plug work correctly during idle periods.

Fixes: 7fee88882704 ("arm64: dts: rockchip: Add devicetree for the FriendlyElec NanoPi R76S")
Cc: stable@vger.kernel.org
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
Tested-by: Marco Schirrmeister <mschirrmeister@gmail.com>
Link: https://patch.msgid.link/1768524932-163929-6-git-send-email-shawn.lin@rock-chips.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

authored by

Shawn Lin and committed by
Heiko Stuebner
a9c1aceb 7226664b

+22 -1
+22 -1
arch/arm64/boot/dts/rockchip/rk3576-nanopi-r76s.dts
··· 192 192 regulator-name = "vcc_3v3_s0"; 193 193 vin-supply = <&vcc_3v3_s3>; 194 194 }; 195 + 196 + vcc3v3_sd: regulator-vcc-3v3-sd { 197 + compatible = "regulator-fixed"; 198 + enable-active-high; 199 + gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_HIGH>; 200 + pinctrl-names = "default"; 201 + pinctrl-0 = <&sdmmc_pwren>; 202 + regulator-name = "vcc3v3_sd"; 203 + regulator-min-microvolt = <3300000>; 204 + regulator-max-microvolt = <3300000>; 205 + vin-supply = <&vcc_3v3_s0>; 206 + }; 195 207 }; 196 208 197 209 &combphy0_ps { ··· 738 726 }; 739 727 }; 740 728 729 + sdmmc { 730 + sdmmc_pwren: sdmmc-pwren { 731 + rockchip,pins = <0 RK_PB6 RK_FUNC_GPIO &pcfg_pull_none>; 732 + }; 733 + }; 734 + 741 735 usb { 742 736 usb_otg0_pwren_h: usb-otg0-pwren-h { 743 737 rockchip,pins = <0 RK_PD1 RK_FUNC_GPIO &pcfg_pull_none>; ··· 769 751 bus-width = <4>; 770 752 cap-mmc-highspeed; 771 753 cap-sd-highspeed; 754 + cd-gpios = <&gpio0 RK_PA7 GPIO_ACTIVE_LOW>; 772 755 disable-wp; 773 756 no-mmc; 774 757 no-sdio; 758 + pinctrl-names = "default"; 759 + pinctrl-0 = <&sdmmc0_clk &sdmmc0_cmd &sdmmc0_det &sdmmc0_bus4>; 775 760 sd-uhs-sdr104; 776 - vmmc-supply = <&vcc_3v3_s3>; 761 + vmmc-supply = <&vcc3v3_sd>; 777 762 vqmmc-supply = <&vccio_sd_s0>; 778 763 status = "okay"; 779 764 };