Re: [PATCH net-next 2/2] net: dsa: mxl-gsw1xx: reset the switch through reset-gpios

From: Daniel Golle

Date: Wed Nov 04 2026 - 02:39:56 EST


On Wed, Nov 04, 2026 at 02:15:48AM -0500, Joseph Telaak via B4 Relay wrote:
> From: Joseph Telaak <joseph@xxxxxxxxxx>
>
> The switch keeps the configuration the bootloader left in it, and the
> driver never resets it. The MDIO core asserts and releases reset-gpios
> only for PHY devices, so a reset line described on the switch node has
> no effect either.
>
> On the GL.iNet GL-SFT1200 the bootloader leaves each internal PHY of
> the GSW150 one MDIO address above its port. Port 0 then fails with
> "failed to connect to PHY: -ENODEV", and the PHY that answers at a
> port's address belongs to the neighbouring port. After a hardware reset
> every PHY is back at its port's address and all ports work.
>
> Request the reset GPIO in the driver and pulse it before the first
> register access. The timing follows the vendor driver: asserted for
> 2 ms, then 100 ms before the switch is accessed.

Any good reason to open-code this instead of using reset-gpio
(CONFIG_RESET_GPIO)?