Subject: AW: [PATCH 0/9] mdio: realtek-rtl9300: Groundwork for multi SOC support

From: "Markus Stockhausen" <[email-masked]>
Date: Wed, 20 May 2026 08:06:26 +0200

Hi Chris,

> Von: Chris Packham <[email-masked]> 
> Gesendet: Mittwoch, 20. Mai 2026 04:05
> Betreff: Re: [PATCH 0/9] mdio: realtek-rtl9300: Groundwork for multi SOC support
> ...
> I see the MDIO(BUS,ADDR) -> PORT is still causing confusion. It is one 
> of the more annoying aspects of the hardware. The basic summary is the 
> hardware wants to own the PHYs but Linux wants to know about them too. 

Thanks fort he heavy lifting last year. As I was not involved I read through
all what happened. For me [1] sums it up nicely.

> The Realtek SDK bundles this all together with lots of tightly coupled 
> code oriented around switch ports. Linux wants PHYs and MACs to exist 
> separately (IMHO this is the correct thing to do).  I don't know how the 
> Realtek SDK would deal with exotic PHYs with specific requirements for 
> host/line side settings or non-PHY devices like we have with some DSA 
> switches, I suspect it wouldn't

This tight coupling will kick in with future series. To make upstream
somehow production usable we need a place to at least

- setup port polling for ports that are not PHY but SerDes driven [2]
- classify port types [3]

So we must allow that the driver internally works on ports. And if we are 
ok with this I want to remind of another challenge [4] that needs to be
solved.

Markus

[1] https://marc.info/?l=linux-netdev&m=174468002008100&w=2
[2] https://github.com/openwrt/openwrt/blob/d2fabb974c57cc96c12f783f2197cc2639e1ed5a/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c#L814
[3] https://github.com/openwrt/openwrt/blob/d2fabb974c57cc96c12f783f2197cc2639e1ed5a/target/linux/realtek/files-6.18/drivers/net/mdio/mdio-realtek-otto.c#L793
[4] https://marc.info/?l=linux-netdev&m=176905734406837&w=2