[PATCH 3/3] arm64: dts: rockchip: Add RTL8367RB-VB switch to Radxa E24C
Jonas Karlman
jonas at kwiboo.se
Sun Jul 27 11:03:00 PDT 2025
The Radxa E24C has a Realtek RTL8367RB-VB switch with four usable ports
and is connected using a fixed-link to GMAC1 on the RK3528 SoC.
Add an ethernet-switch node to describe the RTL8367RB-VB switch.
Signed-off-by: Jonas Karlman <jonas at kwiboo.se>
---
Initial testing with iperf3 showed ~930-940 Mbits/sec in one direction
and only around ~1-2 Mbits/sec in the other direction.
The RK3528 hardware design guide recommends that timing between TXCLK
and data is controlled by MAC, and timing between RXCLK and data is
controlled by PHY.
Any mix of MAC (rx/tx delay) and switch (rx/tx internal delay) did not
seem to resolve this speed issue, however dropping snps,tso seems to fix
that issue.
Unsure what is best here, should MAC or switch add the delays? Here I
just followed DT from vendor downstream tree and added rx/tx internal
delay to switch.
Vendor downstream DT also adds 'pause' to the fixed-link nodes, and this
may be something that should be added here. However, during testing flow
control always ended up being disabled so I skipped 'pause' here.
Schematics: https://dl.radxa.com/e/e24c/docs/radxa_e24c_v1200_schematic.pdf
---
.../boot/dts/rockchip/rk3528-radxa-e24c.dts | 55 +++++++++++++++++++
1 file changed, 55 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e24c.dts b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e24c.dts
index 225f2b0c5339..26754ff7f4ef 100644
--- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e24c.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e24c.dts
@@ -196,6 +196,7 @@ &cpu3 {
};
&gmac1 {
+ /delete-property/ snps,tso;
clock_in_out = "output";
phy-mode = "rgmii-id";
phy-supply = <&avdd_rtl8367rb>;
@@ -368,6 +369,60 @@ &mdio1 {
reset-delay-us = <25000>;
reset-gpios = <&gpio4 RK_PC2 GPIO_ACTIVE_LOW>;
reset-post-delay-us = <100000>;
+
+ ethernet-switch at 1d {
+ compatible = "realtek,rtl8365mb";
+ reg = <0x1d>;
+ pinctrl-names = "default";
+ pinctrl-0 = <&rtl8367rb_eint>;
+
+ ethernet-ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ ethernet-port at 0 {
+ reg = <0>;
+ label = "wan";
+ };
+
+ ethernet-port at 1 {
+ reg = <1>;
+ label = "lan1";
+ };
+
+ ethernet-port at 2 {
+ reg = <2>;
+ label = "lan2";
+ };
+
+ ethernet-port at 3 {
+ reg = <3>;
+ label = "lan3";
+ };
+
+ ethernet-port at 6 {
+ reg = <6>;
+ ethernet = <&gmac1>;
+ label = "cpu";
+ phy-mode = "rgmii-id";
+ rx-internal-delay-ps = <2000>;
+ tx-internal-delay-ps = <2000>;
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+
+ interrupt-controller {
+ interrupt-parent = <&gpio1>;
+ interrupts = <RK_PC2 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-controller;
+ #address-cells = <0>;
+ #interrupt-cells = <1>;
+ };
+ };
};
&pinctrl {
--
2.50.1
More information about the linux-arm-kernel
mailing list