aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/dsa/microchip/lan937x_main.c
diff options
context:
space:
mode:
authorOleksij Rempel <[email protected]>2024-11-06 07:59:38 +0000
committerJakub Kicinski <[email protected]>2024-11-12 00:04:32 +0000
commit9afaf0eec2ab6bcfa227ab528fbdf2881fa7a293 (patch)
tree8e708abcac119099f50e8e1a10527acdc619efe7 /drivers/net/dsa/microchip/lan937x_main.c
parentdt-bindings: net: dsa: microchip: add mdio-parent-bus property for internal MDIO (diff)
downloadkernel-9afaf0eec2ab6bcfa227ab528fbdf2881fa7a293.tar.gz
kernel-9afaf0eec2ab6bcfa227ab528fbdf2881fa7a293.zip
net: dsa: microchip: Refactor MDIO handling for side MDIO access
Add support for accessing PHYs via a side MDIO interface in LAN937x switches. The existing code already supports accessing PHYs via main management interfaces, which can be SPI, I2C, or MDIO, depending on the chip variant. This patch enables using a side MDIO bus, where SPI is used for the main switch configuration and MDIO for managing the integrated PHYs. On LAN937x, this is optional, allowing them to operate in both configurations: SPI only, or SPI + MDIO. Typically, the SPI interface is used for switch configuration, while MDIO handles PHY management. Additionally, update interrupt controller code to support non-linear port to PHY address mapping, enabling correct interrupt handling for configurations where PHY addresses do not directly correspond to port indexes. This change ensures that the interrupt mechanism properly aligns with the new, flexible PHY address mappings introduced by side MDIO support. Signed-off-by: Oleksij Rempel <[email protected]> Reviewed-by: Andrew Lunn <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Jakub Kicinski <[email protected]>
Diffstat (limited to 'drivers/net/dsa/microchip/lan937x_main.c')
0 files changed, 0 insertions, 0 deletions