]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: dsa: microchip: Set SPI as bus interface during reset for KSZ8463
authorBastien Curutchet <bastien.curutchet@bootlin.com>
Thu, 18 Sep 2025 08:33:52 +0000 (10:33 +0200)
committerJakub Kicinski <kuba@kernel.org>
Mon, 22 Sep 2025 23:31:18 +0000 (16:31 -0700)
commita0b977a3d19368b235f2a6c06e800fb25452029b
treef232c14dfc4eaccae5960a9964ad6c52b236c4c0
parente469b87e0fb0d1209edb6c291474b1a1afa45bd5
net: dsa: microchip: Set SPI as bus interface during reset for KSZ8463

At reset, the KSZ8463 uses a strap-based configuration to set SPI as
bus interface. SPI is the only bus supported by the driver. If the
required pull-ups/pull-downs are missing (by mistake or by design to
save power) the pins may float and the configuration can go wrong
preventing any communication with the switch.

Introduce a ksz8463_configure_straps_spi() function called during the
device reset. It relies on the 'straps-rxd-gpios' OF property and the
'reset' pinmux configuration to enforce SPI as bus interface.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Bastien Curutchet (Schneider Electric) <bastien.curutchet@bootlin.com>
Link: https://patch.msgid.link/20250918-ksz-strap-pins-v3-3-16662e881728@bootlin.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/dsa/microchip/ksz_common.c