Re: [PATCH net-next v4 4/8] dt-bindings: mfd: Add SoC-e SWIP parent
From: Andrew Lunn
Date: Fri Nov 13 2026 - 15:49:44 EST
> > Given the MDIO bus and mux registers are adjacent, I don't know that
> > putting the mux into its own node and driver really buys you anything.
> > Can't your MDIO driver handle the muxing directly? mdio-mux-mmioreg was
> > created for when you have mux registers in some completely unrelated
> > block.
> >
>
> What it buys me is less custom code to maintain for bus selection and
> selector-value validation.
>
> The MDIO controller and mux were combined in a previous version.
> Following Andrew's suggestion [1], I moved the controller into its own
> driver and stacked mdio-mux-mmioreg on top of it.
> Sure, the selector is part of the same MDIO control register. But the
> generic driver already provides the masked register update and
> selector-value checks. My preference is to keep the current approach
> to reuse existing code, even if it requires some integration and
> documentation efforts.
Since you have both implementations. Did the lines of code go down
when you reused the existing mux?
> The IP core can also include an I2C master for accessing external
> devices as a synthesis option.
SFP cage being the obvious thing.
It will need to be a Linux I2C master in order that phylink can use
it. And i would not be too surprised if the existing I2C drivers can
drive it, it will be licensed IP. So an MFD will make it easier to
instantiate.
Andrew