From 6d407b9ee8e997f8905d5ae079b99cefa6ca1616 Mon Sep 17 00:00:00 2001 From: AmadeusGhost <42570690+AmadeusGhost@users.noreply.github.com> Date: Sat, 6 Nov 2021 23:02:10 +0800 Subject: [PATCH] rockchip: 5.10: NanoPi R2S: fixes vcc-rtl8153-regulator This patch incorrectly puts vcc-rtl8153-regulator at the forefront, causing probe timeout all the time. This commit backport the upstream commit https://github.com/torvalds/linux/commit/d49f120 ("arm64: dts: rockchip: Enable USB3 Ethernet on rk3328 NanoPi R2S") to ensure that this regulator can be normally supplied. Before: reg-fixed-voltage vcc-rtl8153-regulator: deferred probe timeout, ignoring dependency. After: vdd_5v_lan: supplied by vdd_5v Fixes: d53ae8c ("rockchip: add Kernel 5.10 support") Signed-off-by: AmadeusGhost --- ...ckchip-enable-LAN-port-on-NanoPi-R2S.patch | 52 +++++++++---------- 1 file changed, 26 insertions(+), 26 deletions(-) diff --git a/target/linux/rockchip/patches-5.10/102-rockchip-enable-LAN-port-on-NanoPi-R2S.patch b/target/linux/rockchip/patches-5.10/102-rockchip-enable-LAN-port-on-NanoPi-R2S.patch index 82e2137a8b..e6b1a2fede 100644 --- a/target/linux/rockchip/patches-5.10/102-rockchip-enable-LAN-port-on-NanoPi-R2S.patch +++ b/target/linux/rockchip/patches-5.10/102-rockchip-enable-LAN-port-on-NanoPi-R2S.patch @@ -13,38 +13,38 @@ Signed-off-by: David Bauer --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts -@@ -44,6 +44,18 @@ - }; +@@ -103,6 +103,18 @@ + regulator-min-microvolt = <5000000>; + regulator-max-microvolt = <5000000>; }; - -+ vcc_rtl8153: vcc-rtl8153-regulator { ++ ++ vdd_5v_lan: vdd-5v-lan { + compatible = "regulator-fixed"; -+ gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; -+ pinctrl-names = "default"; -+ pinctrl-0 = <&rtl8153_en_drv>; -+ regulator-always-on; -+ regulator-name = "vcc_rtl8153"; -+ regulator-min-microvolt = <5000000>; -+ regulator-max-microvolt = <5000000>; + enable-active-high; -+ }; -+ - leds { - compatible = "gpio-leds"; - pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>; -@@ -273,6 +285,12 @@ - }; - }; - }; -+ -+ usb { -+ rtl8153_en_drv: rtl8153-en-drv { -+ rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; -+ }; ++ gpio = <&gpio2 RK_PC6 GPIO_ACTIVE_HIGH>; ++ pinctrl-0 = <&lan_vdd_pin>; ++ pinctrl-names = "default"; ++ regulator-name = "vdd_5v_lan"; ++ regulator-always-on; ++ regulator-boot-on; ++ vin-supply = <&vdd_5v>; + }; }; - &io_domains { + &cpu0 { +@@ -313,6 +325,12 @@ + }; + }; + ++ lan { ++ lan_vdd_pin: lan-vdd-pin { ++ rockchip,pins = <2 RK_PC6 RK_FUNC_GPIO &pcfg_pull_none>; ++ }; ++ }; ++ + pmic { + pmic_int_l: pmic-int-l { + rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>; @@ -379,3 +397,12 @@ &usb_host0_ohci { status = "okay";