From eb658d5020397903b407cd16804d96462daef043 Mon Sep 17 00:00:00 2001 From: Tianling Shen Date: Sun, 19 Jan 2025 17:04:17 +0800 Subject: [PATCH] rockchip: change eth phy mode to rgmii-id for orangepi r1 plus lts In general the delay should be added by the PHY instead of the MAC, and this improves network stability on some boards which seem to need different delay. Signed-off-by: Tianling Shen --- ...ip-change-eth-phy-mode-to-rgmii-id-f.patch | 29 +++++++++++++++++++ ...0-arm64-rockchip-add-OF-node-for-eth.patch | 4 +-- ...ockchip-enable-dmc-for-rk3328-boards.patch | 2 +- 3 files changed, 32 insertions(+), 3 deletions(-) create mode 100644 target/linux/rockchip/patches-6.6/106-arm64-dts-rockchip-change-eth-phy-mode-to-rgmii-id-f.patch diff --git a/target/linux/rockchip/patches-6.6/106-arm64-dts-rockchip-change-eth-phy-mode-to-rgmii-id-f.patch b/target/linux/rockchip/patches-6.6/106-arm64-dts-rockchip-change-eth-phy-mode-to-rgmii-id-f.patch new file mode 100644 index 0000000000..35abbc50b6 --- /dev/null +++ b/target/linux/rockchip/patches-6.6/106-arm64-dts-rockchip-change-eth-phy-mode-to-rgmii-id-f.patch @@ -0,0 +1,29 @@ +From bc9111d1b82684123e6c48817c04d0f8a08669bf Mon Sep 17 00:00:00 2001 +From: Tianling Shen +Date: Sun, 19 Jan 2025 16:24:10 +0800 +Subject: [PATCH] arm64: dts: rockchip: change eth phy mode to rgmii-id for + orangepi r1 plus lts + +In general the delay should be added by the PHY instead of the MAC, +and this improves network stability on some boards which seem to +need different delay. + +Fixes: 387b3bbac5ea ("arm64: dts: rockchip: Add Xunlong OrangePi R1 Plus LTS") +Cc: stable@vger.kernel.org # 6.6+ +Signed-off-by: Tianling Shen +--- + arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts | 3 +-- + 1 file changed, 1 insertion(+), 2 deletions(-) + +--- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts ++++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts +@@ -16,8 +16,7 @@ + + &gmac2io { + phy-handle = <&yt8531c>; +- tx_delay = <0x19>; +- rx_delay = <0x05>; ++ phy-mode = "rgmii-id"; + + mdio { + /delete-node/ ethernet-phy@1; diff --git a/target/linux/rockchip/patches-6.6/610-arm64-rockchip-add-OF-node-for-eth.patch b/target/linux/rockchip/patches-6.6/610-arm64-rockchip-add-OF-node-for-eth.patch index 775eb2ad1f..da0596052f 100644 --- a/target/linux/rockchip/patches-6.6/610-arm64-rockchip-add-OF-node-for-eth.patch +++ b/target/linux/rockchip/patches-6.6/610-arm64-rockchip-add-OF-node-for-eth.patch @@ -64,7 +64,7 @@ Signed-off-by: David Bauer --- a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts +++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts -@@ -31,6 +31,7 @@ +@@ -30,6 +30,7 @@ motorcomm,keep-pll-enabled; motorcomm,rx-clk-drv-microamp = <5020>; motorcomm,rx-data-drv-microamp = <5020>; @@ -72,7 +72,7 @@ Signed-off-by: David Bauer pinctrl-0 = <ð_phy_reset_pin>; pinctrl-names = "default"; -@@ -40,3 +41,7 @@ +@@ -39,3 +40,7 @@ }; }; }; diff --git a/target/linux/rockchip/patches-6.6/806-arm64-dts-rockchip-enable-dmc-for-rk3328-boards.patch b/target/linux/rockchip/patches-6.6/806-arm64-dts-rockchip-enable-dmc-for-rk3328-boards.patch index b31ca56d77..b14bc106bc 100644 --- a/target/linux/rockchip/patches-6.6/806-arm64-dts-rockchip-enable-dmc-for-rk3328-boards.patch +++ b/target/linux/rockchip/patches-6.6/806-arm64-dts-rockchip-enable-dmc-for-rk3328-boards.patch @@ -97,7 +97,7 @@ Signed-off-by: hmz007 + &gmac2io { phy-handle = <&yt8531c>; - tx_delay = <0x19>; + phy-mode = "rgmii-id"; --- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts +++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts @@ -134,6 +134,64 @@