[OpenWrt-Devel] [PATCH 1/3] kernel: rtl8366_smi: explicitly set phy addr for switch

Linus Walleij linus.walleij at linaro.org
Tue Oct 1 10:36:24 EDT 2019


On Thu, Aug 15, 2019 at 10:27 AM Serge Vasilugin <vasilugin at yandex.ru> wrote:

> By default rtl8366_smi use phy addr 0 at mii-bus to access switch registers.
> This patch allow to set it explicitly in dts-file:
>
>         rtl8367 {
>                 compatible = "realtek,rtl8367b";
>                 phy_id = <29>; /* switch address at mii-bus */
>                 realtek,extif2 = <1 0 1 1 1 1 1 1 2>;
>                 mii-bus = <&mdio>;
>                 cpu-port = <7>;
>         }
>
> Use default 0 address if not set.
> Backward compatibility tested on tplink archer c2 v1 (rtl8367rb switch)
>
> Signed-off-by: Serge Vasilugin <vasilugin at yandex.ru>

Drive-by comment, but is there some chance that you could have a look
at the DSA driver which is upstream and included in the v4.19 baseline
in drivers/net/dsa/rtl8366.c realtek-smi.c etc?

I haven't implemented 8367 variants because I have nothing to test it
on, but I think it could be pretty straight forward just following the
pattern set by rtl8366rb (which is all I have).

In my mind it is just another plug-in below the smi driver, but alas
things are never as simple as one think.

Yours,
Linus Walleij

_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel



More information about the openwrt-devel mailing list