[PATCH 3/3] arm64: dts: rockchip: Add RTL8367RB-VB switch to Radxa E24C
Jonas Karlman
jonas at kwiboo.se
Mon Jul 28 10:47:44 PDT 2025
Hi Chukun,
On 7/28/2025 4:30 PM, Chukun Pan wrote:
> Hi,
>
>> Initial testing with iperf3 showed ~930-940 Mbits/sec in one direction
>> and only around ~1-2 Mbits/sec in the other direction.
>
>> 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.
>
> Have you tried setting phy-mode to rgmii? (just for testing)
> Usually this problem is caused by incorrect rx/tx delay.
The issue is with TSO and RX checksum offload, with those disabled on
the conduit interface (gmac1/eth0) my issues disappeared.
Use of rgmii-id "RX and TX delays are not provided by the PCB." as
defined by the dt-bindings seem to most correctly describe the HW.
Describing switches is new to me, so I could be wrong :-)
>
>> + ethernet-switch at 1d {
>> + compatible = "realtek,rtl8365mb";
>> + reg = <0x1d>;
>> + pinctrl-names = "default";
>> + pinctrl-0 = <&rtl8367rb_eint>;
>
> Shouldn't this pinctrl be written in interrupts?
Not necessarily, in my mind the pinctrl is applied for the switch
interface to the SoC, not the internal workings of the switch.
>
>> + ethernet-port at 6 {
>> + reg = <6>;
>> + ethernet = <&gmac1>;
>> + label = "cpu";
>
> No need for label = "cpu":
> https://github.com/torvalds/linux/commit/567f38317054e66647fd59cfa4e261219a2a21db
Thanks, will drop in v2.
>
>> This series relaxes the realtek dsa drivers requirement of having a mdio
>> child OF node to probe and instead have it register a user_mii_bus to
>> make it function when a mdio child OF node is missing.
>
> This is weird, the switch is connected to the gmac via mdio.
> Can you try the following and see if it works? I tried it on
> a rk3568 + rtl8367s board and it worked:
With a 'mdio' child node 'make CHECK_DTBS=y' report something like:
rockchip/rk3528-radxa-e24c.dtb: ethernet-switch at 1d (realtek,rtl8365mb): mdio: False schema does not allow { [snip] }
from schema $id: http://devicetree.org/schemas/net/dsa/realtek.yaml#
With a mdio node the driver is happy and dtschema is sad, and without
the mdio node it was the other way around.
The plan is to drop this patch and instead modify the dt-binding to
allow describing a mdio node when the switch node has a reg prop in v2.
Regards,
Jonas
>
> ```
> &mdio1 {
> switch at 29 {
> compatible = "realtek,rtl8365mb";
> reg = <29>;
> reset-gpios = ...
>
> switch_intc: interrupt-controller {
> interrupt-parent = ...
> interrupts = ...
> interrupt-controller;
> #address-cells = <0>;
> #interrupt-cells = <1>;
> };
>
> mdio {
> #address-cells = <1>;
> #size-cells = <0>;
>
> phy0: ethernet-phy at 0 {
> reg = <0>;
> interrupt-parent = <&switch_intc>;
> interrupts = <0>;
> };
>
> phy1: ethernet-phy at 1 {
> reg = <1>;
> interrupt-parent = <&switch_intc>;
> interrupts = <1>;
> };
>
> phy2: ethernet-phy at 2 {
> reg = <2>;
> interrupt-parent = <&switch_intc>;
> interrupts = <2>;
> };
>
> phy3: ethernet-phy at 3 {
> reg = <3>;
> interrupt-parent = <&switch_intc>;
> interrupts = <3>;
> };
> };
>
> ports {
> #address-cells = <1>;
> #size-cells = <0>;
>
> port at 0 {
> reg = <0>;
> label = "wan";
> phy-handle = <&phy0>;
> };
>
> port at 1 {
> reg = <1>;
> label = "lan1";
> phy-handle = <&phy1>;
> };
>
> port at 2 {
> reg = <2>;
> label = "lan2";
> phy-handle = <&phy2>;
> };
>
> port at 3 {
> reg = <3>;
> label = "lan3";
> phy-handle = <&phy3>;
> };
>
> port at x {
> reg = <x>;
> ethernet = <&gmac1>;
> phy-mode = "rgmii";
>
> fixed-link {
> speed = <1000>;
> full-duplex;
> };
> };
> };
> };
> };
> ```
>
> Thanks,
> Chukun
>
> --
> 2.25.1
>
>
More information about the linux-arm-kernel
mailing list