Re: [PATCH net-next v6 6/6] net: dsa: motorcomm: Add support for Motorcomm YT922x

From: Andrew Lunn

Date: Thu Sep 10 2026 - 08:14:34 EST


On Thu, Sep 10, 2026 at 11:23:03AM +0800, Kyle Switch wrote:
>
> On 9/10/26 09:57, Andrew Lunn wrote:
> > > > > No one else, except you, can maintain this stuff. Drop it for now and
> > > > > discuss it later.
> > > > There also appears to be similar magic in the PHY driver. Can this be
> > > > consolidated?
> > > Ans: This part of the initialization is for the switch SerDes, so from my
> > >
> > > side it may be hard to consolidate.
> > Is it the same IP? Same configuration? Or totally different?
> Ans: They are the same IP, but there are the following differences:

> 2. Another point that I think is difficult to integrate is that the phyID
>
>     of the switch serdes (defined in USXGMII reg space mii 0x2, 0x3) is
>
>     inconsistent with the phyID of phy8824 (defined in UTP reg space mii
> 0x2, 0x3),
>
>     so phy8824 cannot be matched, and therefore two sets of initialization
>
>    configurations are required.

Having different IDs is good, because they are different, as you
pointed out. But the shared USXGMII part should really be shared.

For the switch you are going to write a PCS driver, which might live
in drivers/net/pcs. You can split that into a library for the usxgmii
and a driver wrapped around it. The PHY driver can also use the
library.

Does the switch have the same horrible paging design? I really hope
that is changed in the next generation of the IP.

Andrew