From 83d77427640f305803e86140070171b843688474 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sat, 4 Mar 2023 16:17:00 +0800 Subject: [PATCH] rockchip: nanopi r5s: fix gmac reset gpios Move reset gpios to gmac node otherwise the dwmac driver will fail to lookup ethernet phy: > [ 10.398514] rk_gmac-dwmac fe2a0000.ethernet eth0: no phy found > [ 10.399061] rk_gmac-dwmac fe2a0000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19) Signed-off-by: Tianling Shen --- .../arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts index 0c62193c67..7fcc801ffe 100644 --- a/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts +++ b/target/linux/rockchip/files/arch/arm64/boot/dts/rockchip/rk3568-nanopi-r5s.dts @@ -95,6 +95,10 @@ &gmac0_rx_bus2 &gmac0_rgmii_clk &gmac0_rgmii_bus>; + snps,reset-gpio = <&gpio0 RK_PC5 GPIO_ACTIVE_LOW>; + snps,reset-active-low; + /* Reset time is 20ms, 100ms for rtl8211f */ + snps,reset-delays-us = <0 20000 100000>; tx_delay = <0x3c>; rx_delay = <0x2f>; status = "okay"; @@ -106,9 +110,6 @@ reg = <1>; pinctrl-0 = <ð_phy0_reset_pin>; pinctrl-names = "default"; - reset-assert-us = <10000>; - reset-deassert-us = <50000>; - reset-gpios = <&gpio0 RK_PC5 GPIO_ACTIVE_LOW>; }; }; @@ -162,7 +163,7 @@ &pinctrl { gmac0 { eth_phy0_reset_pin: eth-phy0-reset-pin { - rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_down>; + rockchip,pins = <0 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>; }; };