Commit 26b2a265 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files

Merge branch 'net-phy-marvell-88q2xxx-add-driver-for-the-marvell-88q2220-phy'

Dimitri Fedrau says:

====================
net: phy: marvell-88q2xxx: add driver for the Marvell 88Q2220 PHY
====================

Link: https://lore.kernel.org/r/20240218075753.18067-1-dima.fedrau@gmail.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parents 59f95f5d f29207d2
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -232,6 +232,7 @@ config MARVELL_10G_PHY

config MARVELL_88Q2XXX_PHY
	tristate "Marvell 88Q2XXX PHY"
	depends on HWMON || HWMON=n
	help
	  Support for the Marvell 88Q2XXX 100/1000BASE-T1 Automotive Ethernet
	  PHYs.
+611 −29

File changed.

Preview size limit exceeded, changes collapsed.

+2 −1
Original line number Diff line number Diff line
@@ -208,7 +208,8 @@ static int genphy_c45_baset1_an_config_aneg(struct phy_device *phydev)

	adv_l_mask = MDIO_AN_T1_ADV_L_FORCE_MS | MDIO_AN_T1_ADV_L_PAUSE_CAP |
		MDIO_AN_T1_ADV_L_PAUSE_ASYM;
	adv_m_mask = MDIO_AN_T1_ADV_M_MST | MDIO_AN_T1_ADV_M_B10L;
	adv_m_mask = MDIO_AN_T1_ADV_M_1000BT1 | MDIO_AN_T1_ADV_M_100BT1 |
		MDIO_AN_T1_ADV_M_MST | MDIO_AN_T1_ADV_M_B10L;

	switch (phydev->master_slave_set) {
	case MASTER_SLAVE_CFG_MASTER_FORCE:
+1 −0
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@
#define MARVELL_PHY_ID_88E2110		0x002b09b0
#define MARVELL_PHY_ID_88X2222		0x01410f10
#define MARVELL_PHY_ID_88Q2110		0x002b0980
#define MARVELL_PHY_ID_88Q2220		0x002b0b20

/* Marvel 88E1111 in Finisar SFP module with modified PHY ID */
#define MARVELL_PHY_ID_88E1111_FINISAR	0x01ff0cc0
+8 −0
Original line number Diff line number Diff line
@@ -373,6 +373,10 @@ static inline void mii_t1_adv_m_mod_linkmode_t(unsigned long *advertising, u32 l
{
	linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT1L_Full_BIT,
			 advertising, lpa & MDIO_AN_T1_ADV_M_B10L);
	linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT1_Full_BIT,
			 advertising, lpa & MDIO_AN_T1_ADV_M_100BT1);
	linkmode_mod_bit(ETHTOOL_LINK_MODE_1000baseT1_Full_BIT,
			 advertising, lpa & MDIO_AN_T1_ADV_M_1000BT1);
}

/**
@@ -409,6 +413,10 @@ static inline u32 linkmode_adv_to_mii_t1_adv_m_t(unsigned long *advertising)

	if (linkmode_test_bit(ETHTOOL_LINK_MODE_10baseT1L_Full_BIT, advertising))
		result |= MDIO_AN_T1_ADV_M_B10L;
	if (linkmode_test_bit(ETHTOOL_LINK_MODE_100baseT1_Full_BIT, advertising))
		result |= MDIO_AN_T1_ADV_M_100BT1;
	if (linkmode_test_bit(ETHTOOL_LINK_MODE_1000baseT1_Full_BIT, advertising))
		result |= MDIO_AN_T1_ADV_M_1000BT1;

	return result;
}
Loading