arm64: rockchip: dts: rk3328-rock-pi-e: enable GbE eth
Subsystems (2)
PATCH 1/1 arm64: rockchip: dts: rk3328-rock-pi-e: enable GbE eth
Adjust the device-tree to get the GbE interface working using a patch found on the Radxa forum.
--- arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-)
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +8 -6
@@ -148,7 +148,7 @@ &gmac2io { assigned-clocks = <&cru SCLK_MAC2IO>, <&cru SCLK_MAC2IO_EXT>; assigned-clock-parents = <&gmac_clkin>, <&gmac_clkin>; clock_in_out = "input"; - phy-handle = <&rtl8211e>; + phy-handle = <&rtl8211f>; phy-mode = "rgmii"; phy-supply = <&vcc_io>; pinctrl-names = "default";
@@ -156,8 +156,8 @@ &gmac2io { snps,aal; snps,rxpbl = <0x4>; snps,txpbl = <0x4>; - tx_delay = <0x26>; - rx_delay = <0x11>; + tx_delay = <0x1a>; + rx_delay = <0x14>; status = "okay"; mdio {
@@ -165,15 +165,17 @@ mdio { #address-cells = <1>; #size-cells = <0>; - rtl8211e: ethernet-phy@1 { + rtl8211f: ethernet-phy@1 { + compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22"; reg = <1>; pinctrl-0 = <ð_phy_int_pin>, <ð_phy_reset_pin>; pinctrl-names = "default"; interrupt-parent = <&gpio1>; interrupts = <24 IRQ_TYPE_LEVEL_LOW>; - reset-assert-us = <10000>; - reset-deassert-us = <50000>; + reset-assert-us = <20000>; + reset-deassert-us = <100000>; reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + max-speed = <1000>; }; }; };
Signature · 1 line
2.43.0.76.g1a87c842ece3
Heiko Stübner
maintainerHi Trevor,
Am Donnerstag, 21. Dezember 2023, 07:22:43 CET schrieb Trevor Woerner:
Quoted 8 lines
Adjust the device-tree to get the GbE interface working using a patch found on the Radxa forum.
Link https://forum.radxa.com/t/rock-pi-e-board-version-1-21-ethhernet-not-working-in-armbian/15061/3Signed-off-by Trevor Woerner <[email protected]>---
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts mdio { · line 169
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +2
-1@@ -165,15 +165,17 @@ mdio { #address-cells = <1>; #size-cells = <0>; - rtl8211e: ethernet-phy@1 { + rtl8211f: ethernet-phy@1 { + compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";
skipping through that thread, it looks like there are variants of the board with one of the rtl8211e _or_ rtl8211f phys.
So while the "ethernet-phy-ieee802.3-c22" compatible would work for both, the "ethernet-phy-id001c.c916" compat effectively disables phy- probing. So applying this patch would effectively disable ethernet support on those older rock-pi-e boards?
In a similar context concerning boards using different phys, it was suggested [0] that the bootloader should modify the dt it passes to the kernel to provide the correct phy id.
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts mdio { · line 176
Quoted 9 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +2
-2reg = <1>; pinctrl-0 = <ð_phy_int_pin>, <ð_phy_reset_pin>; pinctrl-names = "default"; interrupt-parent = <&gpio1>; interrupts = <24 IRQ_TYPE_LEVEL_LOW>; - reset-assert-us = <10000>; - reset-deassert-us = <50000>; + reset-assert-us = <20000>; + reset-deassert-us = <100000>;
I guess for those we can consolidate onto the "slower" ones in the kernel though.
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts mdio { · line 181
Quoted 6 lines
arch/arm64/boot/dts/rockchip/rk3328-rock-pi-e.dts +1
-0reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + max-speed = <1000>; }; }; };
Heiko