Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

net: phy: nxp-c45-tja11xx: enable MDIO write access to the master/slave registers

The SJA1110 switch integrates TJA1103 PHYs, but in SJA1110 switch rev B
silicon, there is a bug in that the registers for selecting the 100base-T1
autoneg master/slave roles are not writable.

To enable write access to the master/slave registers, these additional
PHY writes are necessary during initialization.

The issue has been corrected in later SJA1110 silicon versions and is
not present in the standalone PHY variants, but applying the workaround
unconditionally in the driver should not do any harm.

Suggested-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Signed-off-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Vladimir Oltean and committed by
David S. Miller
0b5f0f29 109258ed

+6
+6
drivers/net/phy/nxp-c45-tja11xx.c
··· 1035 1035 return ret; 1036 1036 } 1037 1037 1038 + /* Bug workaround for SJA1110 rev B: enable write access 1039 + * to MDIO_MMD_PMAPMD 1040 + */ 1041 + phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x01F8, 1); 1042 + phy_write_mmd(phydev, MDIO_MMD_VEND1, 0x01F9, 2); 1043 + 1038 1044 phy_set_bits_mmd(phydev, MDIO_MMD_VEND1, VEND1_PHY_CONFIG, 1039 1045 PHY_CONFIG_AUTO); 1040 1046