net: dsa: microchip: lan937x: disable VPHY support
authorLucas Stach <l.stach@pengutronix.de>
Mon, 1 Jul 2024 08:53:43 +0000 (10:53 +0200)
committerDavid S. Miller <davem@davemloft.net>
Wed, 3 Jul 2024 08:13:39 +0000 (09:13 +0100)
commit2e3ed20c17e719cbe7b13feaa3e7c46cf6a85887
tree83e3a3c3b31c80c86f65f146cf9df7dfcd7d70ca
parentc3db39468a42fec7e83add335765f8d81e1864c3
net: dsa: microchip: lan937x: disable VPHY support

As described by the microchip article "LAN937X - The required
configuration for the external MAC port to operate at RGMII-to-RGMII
1Gbps link speed." [1]:

"When VPHY is enabled, the auto-negotiation process following IEEE 802.3
standard will be triggered and will result in RGMII-to-RGMII signal
failure on the interface because VPHY will try to poll the PHY status
that is not available in the scenario of RGMII-to-RGMII connection
(normally the link partner is usually an external processor).

Note that when VPHY fails on accessing PHY registers, it will fall back
to 100Mbps speed, it indicates disabling VPHY is optional if you only
need the port to link at 100Mbps speed.

Again, VPHY must and can only be disabled by writing VPHY_DISABLE bit in
the register below as there is no strapping pin for the control."

This patch was tested on LAN9372, so far it seems to not to affect VPHY
based clock crossing optimization for the ports with integrated PHYs.

[1]: https://microchip.my.site.com/s/article/LAN937X-The-required-configuration-for-the-external-MAC-port-to-operate-at-RGMII-to-RGMII-1Gbps-link-speed

Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Vladimir Oltean <olteanv@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/microchip/lan937x_main.c
drivers/net/dsa/microchip/lan937x_reg.h