net: phy: micrel: add MDI/MDI-X control support for KSZ9477 switch-integrated PHYs
authorOleksij Rempel <o.rempel@pengutronix.de>
Tue, 10 Jun 2025 09:13:52 +0000 (11:13 +0200)
committerJakub Kicinski <kuba@kernel.org>
Thu, 12 Jun 2025 00:37:48 +0000 (17:37 -0700)
commitee868127170c1211c528f0629277d8b44a0e1852
tree66a2d9326e9baf020f10b9a2926e94f0b63af3c6
parent8f344fe5a1e0241e3f4f343e1a5a3ead843952b0
net: phy: micrel: add MDI/MDI-X control support for KSZ9477 switch-integrated PHYs

Add MDI/MDI-X configuration support for PHYs integrated in the KSZ9477
family of Ethernet switches.

All MDI/MDI-X configuration modes are supported:
  - Automatic MDI/MDI-X (ETH_TP_MDI_AUTO)
  - Forced MDI (ETH_TP_MDI)
  - Forced MDI-X (ETH_TP_MDI_X)

However, when operating in automatic mode, the PHY does not expose the
resolved crossover status (i.e., whether MDI or MDI-X is active).
Therefore, in auto mode, the driver reports ETH_TP_MDI_INVALID as
the current status.

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20250610091354.4060454-2-o.rempel@pengutronix.de
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/micrel.c