Re: [PATCH net v2] net: mdio: mux-meson-g12a: keep the MAC data path when switching MDIO

From: Igor Velkov

Date: Tue Nov 24 2026 - 17:37:06 EST


Hi Martin,

On Tue, Nov 24, 2026 at 10:52 PM Martin Blumenstingl
<martin.blumenstingl@xxxxxxxxxxxxxx> wrote:
> What caught my eye is that the code now reads strange: we have a mux
> that we're following for half of the register values while another
> part is fixed at probe time.

A cleaner plan, for the record: set the data path once at probe from
the board (USE_INTERNAL, RX_CLK_EPHY, and the ephy PLL when the MAC
uses the internal PHY), and let switch_fn flip only SMI_SRC_MAC. That
also covers the reverse case: today an access to the external bus
writes CNTL2 = 0 and stops the PLL, which would cut a MAC on the
internal PHY. No in-tree board triggers it: their ext_mdio is empty.

I did not do it that way: my boards (ODROID-HC4, N2) all use an
external PHY, so I cannot test the internal PHY side, and these boards
needed the fix. If someone has a board with the internal PHY, that
version can be tried.

Igor