mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/2] net: dsa: mxl-gsw1xx: reset the switch through reset-gpios
@ 2026-11-08 22:59 Joseph Telaak via B4 Relay
  2026-11-08 22:59 ` [PATCH net-next v2 1/2] dt-bindings: net: dsa: lantiq,gswip: add reset-gpios Joseph Telaak via B4 Relay
  2026-11-08 22:59 ` [PATCH net-next v2 2/2] net: dsa: mxl-gsw1xx: reset the switch through reset-gpios Joseph Telaak via B4 Relay
  0 siblings, 2 replies; 5+ messages in thread
From: Joseph Telaak via B4 Relay @ 2026-11-08 22:59 UTC (permalink / raw)
  To: Hauke Mehrtens, Andrew Lunn, Vladimir Oltean, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley
  Cc: Daniel Golle, netdev, devicetree, linux-kernel, Joseph Telaak

The GSW1xx driver never resets the switch, and the MDIO core does not
handle reset-gpios for non-PHY devices, so the driver works with whatever
the bootloader configured. On the GL.iNet GL-SFT1200 (Siflower SF19A2890 +
GSW150) the bootloader leaves the internal PHYs one MDIO address too high,
and the WAN port has no PHY.

Patch 1 allows reset-gpios in the binding for the standalone switches.
Patch 2 pulses it at probe.

This is separate from commit 82e2c7db0830 ("net: dsa: mxl-gsw1xx: force
internal PHYs into a known reset state"), which only programs the PHY
bits of RST_REQ. On this board that commit is applied, and the PHYs still
sit at the shifted addresses; only a hardware reset of the switch moves
them back.

Tested on a GL.iNet GL-SFT1200 (Intel GSW150 / PEB7084 at SMI address
0x1f, reset on an active-low SoC GPIO), on v7.4-rc1 with
CONFIG_RESET_GPIO=y: after a warm reboot and after a cold power-on, all
three ports find their PHYs at addresses 0 to 2 and link at 1 Gbit/s.
Without the patch, port 0 fails with -ENODEV after every boot.

There is no in-tree user yet: the GL-SFT1200's device tree is under
review on linux-mips without the switch, which follows once the SoC's
GMAC is supported.

---
Changes in v2:
- Use the reset controller API, so reset-gpios goes through reset-gpio,
  instead of driving the GPIO from the driver (Daniel).
- Use the vendor driver's reset timing, 250 ms asserted and 1 s before
  the first access. v1 gave 2 ms and 100 ms as the vendor's, which they
  are not.
- Patch 1: add Rob's Ack.
- Link to v1: https://patch.msgid.link/20261104-mxl-gsw1xx-reset-v1-0-53839bf5c88e@telaak.dev

---
Joseph Telaak (2):
      dt-bindings: net: dsa: lantiq,gswip: add reset-gpios
      net: dsa: mxl-gsw1xx: reset the switch through reset-gpios

 .../devicetree/bindings/net/dsa/lantiq,gswip.yaml  |  6 ++++++
 drivers/net/dsa/lantiq/mxl-gsw1xx.c                | 25 ++++++++++++++++++++++
 drivers/net/dsa/lantiq/mxl-gsw1xx.h                |  4 ++++
 3 files changed, 35 insertions(+)
---
base-commit: 4dd16e31135ea8437a720222df34e8745f385d6d
change-id: 20261102-mxl-gsw1xx-reset-37ac836b31fe

Best regards,
--  
Joseph Telaak <joseph@telaak.dev>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-09 23:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-08 22:59 [PATCH net-next v2 0/2] net: dsa: mxl-gsw1xx: reset the switch through reset-gpios Joseph Telaak via B4 Relay
2026-11-08 22:59 ` [PATCH net-next v2 1/2] dt-bindings: net: dsa: lantiq,gswip: add reset-gpios Joseph Telaak via B4 Relay
2026-11-08 22:59 ` [PATCH net-next v2 2/2] net: dsa: mxl-gsw1xx: reset the switch through reset-gpios Joseph Telaak via B4 Relay
2026-11-09 23:37   ` netdev-bot+sashiko
2026-11-09 23:45     ` Joseph Telaak

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®