aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/phy
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/phy')
-rw-r--r--drivers/net/phy/bcm-phy-ptp.c12
-rw-r--r--drivers/net/phy/broadcom.c764
-rw-r--r--drivers/net/phy/microchip.c27
3 files changed, 439 insertions, 364 deletions
diff --git a/drivers/net/phy/bcm-phy-ptp.c b/drivers/net/phy/bcm-phy-ptp.c
index d3501f8487d9..fcb004fcba3d 100644
--- a/drivers/net/phy/bcm-phy-ptp.c
+++ b/drivers/net/phy/bcm-phy-ptp.c
@@ -912,6 +912,18 @@ struct bcm_ptp_private *bcm_ptp_probe(struct phy_device *phydev)
switch (BRCM_PHY_MODEL(phydev)) {
case PHY_ID_BCM54210E:
break;
+#ifdef PHY_ID_BCM54213PE
+ case PHY_ID_BCM54213PE:
+ switch (phydev->mdio.addr) {
+ case 0: // CM4 - this is a BCM54210PE which supports PTP
+ break;
+ case 1: // 4B - this is a BCM54213PE which doesn't
+ return NULL;
+ default: // Unknown - assume it's BCM54210PE
+ break;
+ }
+ break;
+#endif
default:
return NULL;
}
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index cb306f9e80cc..ddd055da6684 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -31,34 +31,30 @@ MODULE_AUTHOR("Maciej W. Rozycki");
MODULE_LICENSE("GPL");
struct bcm54xx_phy_priv {
- u64 *stats;
+ u64 *stats;
struct bcm_ptp_private *ptp;
- int wake_irq;
- bool wake_irq_enabled;
- bool brr_mode;
+ int wake_irq;
+ bool wake_irq_enabled;
+ bool brr_mode;
};
/* Link modes for BCM58411 PHY */
-static const int bcm54811_linkmodes[] = {
- ETHTOOL_LINK_MODE_100baseT1_Full_BIT,
- ETHTOOL_LINK_MODE_10baseT1BRR_Full_BIT,
- ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
- ETHTOOL_LINK_MODE_1000baseX_Full_BIT,
- ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
- ETHTOOL_LINK_MODE_100baseT_Full_BIT,
- ETHTOOL_LINK_MODE_100baseT_Half_BIT,
- ETHTOOL_LINK_MODE_10baseT_Full_BIT,
- ETHTOOL_LINK_MODE_10baseT_Half_BIT
-};
+static const int bcm54811_linkmodes[] = { ETHTOOL_LINK_MODE_100baseT1_Full_BIT,
+ ETHTOOL_LINK_MODE_10baseT1BRR_Full_BIT,
+ ETHTOOL_LINK_MODE_1000baseT_Full_BIT,
+ ETHTOOL_LINK_MODE_1000baseX_Full_BIT,
+ ETHTOOL_LINK_MODE_1000baseT_Half_BIT,
+ ETHTOOL_LINK_MODE_100baseT_Full_BIT,
+ ETHTOOL_LINK_MODE_100baseT_Half_BIT,
+ ETHTOOL_LINK_MODE_10baseT_Full_BIT,
+ ETHTOOL_LINK_MODE_10baseT_Half_BIT };
/* Long-Distance Signaling (BroadR-Reach mode aneg) relevant linkmode bits */
-static const int lds_br_bits[] = {
- ETHTOOL_LINK_MODE_Autoneg_BIT,
- ETHTOOL_LINK_MODE_Pause_BIT,
- ETHTOOL_LINK_MODE_Asym_Pause_BIT,
- ETHTOOL_LINK_MODE_10baseT1BRR_Full_BIT,
- ETHTOOL_LINK_MODE_100baseT1_Full_BIT
-};
+static const int lds_br_bits[] = { ETHTOOL_LINK_MODE_Autoneg_BIT,
+ ETHTOOL_LINK_MODE_Pause_BIT,
+ ETHTOOL_LINK_MODE_Asym_Pause_BIT,
+ ETHTOOL_LINK_MODE_10baseT1BRR_Full_BIT,
+ ETHTOOL_LINK_MODE_100baseT1_Full_BIT };
static bool bcm54xx_phy_can_wakeup(struct phy_device *phydev)
{
@@ -84,8 +80,7 @@ static int bcm54xx_config_clock_delay(struct phy_device *phydev)
/* Enable RGMII RXC-RXD skew */
val |= MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RGMII_SKEW_EN;
}
- rc = bcm54xx_auxctl_write(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC,
- val);
+ rc = bcm54xx_auxctl_write(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC, val);
if (rc < 0)
return rc;
@@ -123,6 +118,11 @@ static int bcm54210e_config_init(struct phy_device *phydev)
return 0;
}
+static int bcm54213pe_config_init(struct phy_device *phydev)
+{
+ return bcm54210e_config_init(phydev);
+}
+
static int bcm54612e_config_init(struct phy_device *phydev)
{
int reg;
@@ -159,8 +159,7 @@ static int bcm54616s_config_init(struct phy_device *phydev)
return val;
val &= ~MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RGMII_EN;
val |= MII_BCM54XX_AUXCTL_MISC_WREN;
- rc = bcm54xx_auxctl_write(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC,
- val);
+ rc = bcm54xx_auxctl_write(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC, val);
if (rc < 0)
return rc;
@@ -181,8 +180,8 @@ static int bcm54616s_config_init(struct phy_device *phydev)
/* Select proper interface mode */
val &= ~BCM54XX_SHD_INTF_SEL_MASK;
val |= phydev->interface == PHY_INTERFACE_MODE_SGMII ?
- BCM54XX_SHD_INTF_SEL_SGMII :
- BCM54XX_SHD_INTF_SEL_GBIC;
+ BCM54XX_SHD_INTF_SEL_SGMII :
+ BCM54XX_SHD_INTF_SEL_GBIC;
rc = bcm_phy_write_shadow(phydev, BCM54XX_SHD_MODE, val);
if (rc < 0)
return rc;
@@ -209,7 +208,7 @@ static int bcm50610_a0_workaround(struct phy_device *phydev)
err = bcm_phy_write_exp(phydev, MII_BCM54XX_EXP_AADJ1CH0,
MII_BCM54XX_EXP_AADJ1CH0_SWP_ABCD_OEN |
- MII_BCM54XX_EXP_AADJ1CH0_SWSEL_THPF);
+ MII_BCM54XX_EXP_AADJ1CH0_SWSEL_THPF);
if (err < 0)
return err;
@@ -239,10 +238,9 @@ static int bcm54xx_phydsp_config(struct phy_device *phydev)
int err, err2;
/* Enable the SMDSP clock */
- err = bcm54xx_auxctl_write(phydev,
- MII_BCM54XX_AUXCTL_SHDWSEL_AUXCTL,
+ err = bcm54xx_auxctl_write(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_AUXCTL,
MII_BCM54XX_AUXCTL_ACTL_SMDSP_ENA |
- MII_BCM54XX_AUXCTL_ACTL_TX_6DB);
+ MII_BCM54XX_AUXCTL_ACTL_TX_6DB);
if (err < 0)
return err;
@@ -274,8 +272,7 @@ static int bcm54xx_phydsp_config(struct phy_device *phydev)
error:
/* Disable the SMDSP clock */
- err2 = bcm54xx_auxctl_write(phydev,
- MII_BCM54XX_AUXCTL_SHDWSEL_AUXCTL,
+ err2 = bcm54xx_auxctl_write(phydev, MII_BCM54XX_AUXCTL_SHDWSEL_AUXCTL,
MII_BCM54XX_AUXCTL_ACTL_TX_6DB);
/* Return the first error reported. */
@@ -293,6 +290,7 @@ static void bcm54xx_adjust_rxrefclk(struct phy_device *phydev)
phy_id_compare_model(phydev->drv->phy_id, PHY_ID_BCM50610) ||
phy_id_compare_model(phydev->drv->phy_id, PHY_ID_BCM50610M) ||
phy_id_compare_model(phydev->drv->phy_id, PHY_ID_BCM54210E) ||
+ phy_id_compare_model(phydev->drv->phy_id, PHY_ID_BCM54213PE) ||
phy_id_compare_model(phydev->drv->phy_id, PHY_ID_BCM54810) ||
phy_id_compare_model(phydev->drv->phy_id, PHY_ID_BCM54811)))
return;
@@ -328,8 +326,10 @@ static void bcm54xx_adjust_rxrefclk(struct phy_device *phydev)
val |= BCM54XX_SHD_SCR3_DLLAPD_DIS;
if (phydev->dev_flags & PHY_BRCM_DIS_TXCRXC_NOENRGY) {
- if (phy_id_compare_model(phydev->drv->phy_id, PHY_ID_BCM54210E) ||
- phy_id_compare_model(phydev->drv->phy_id, PHY_ID_BCM54810) ||
+ if (phy_id_compare_model(phydev->drv->phy_id,
+ PHY_ID_BCM54210E) ||
+ phy_id_compare_model(phydev->drv->phy_id,
+ PHY_ID_BCM54810) ||
phy_id_compare_model(phydev->drv->phy_id, PHY_ID_BCM54811))
val |= BCM54XX_SHD_SCR3_RXCTXC_DIS;
else
@@ -386,8 +386,8 @@ static int bcm5481x_set_brrmode(struct phy_device *phydev, bool on)
else
reg &= ~BCM54810_EXP_BROADREACH_LRE_MISC_CTL_EN;
- err = bcm_phy_write_exp(phydev,
- BCM54810_EXP_BROADREACH_LRE_MISC_CTL, reg);
+ err = bcm_phy_write_exp(phydev, BCM54810_EXP_BROADREACH_LRE_MISC_CTL,
+ reg);
if (err)
return err;
@@ -444,11 +444,10 @@ static int bcm54811_config_init(struct phy_device *phydev)
/* Also writing Reserved bits 6:5 because the documentation requires
* them to be written to 0b11
*/
- err = bcm54xx_auxctl_write(phydev,
- MII_BCM54XX_AUXCTL_SHDWSEL_MISC,
- MII_BCM54XX_AUXCTL_MISC_WREN |
- aux_rgmii_en |
- MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RSVD);
+ err = bcm54xx_auxctl_write(
+ phydev, MII_BCM54XX_AUXCTL_SHDWSEL_MISC,
+ MII_BCM54XX_AUXCTL_MISC_WREN | aux_rgmii_en |
+ MII_BCM54XX_AUXCTL_SHDWSEL_MISC_RSVD);
if (err < 0)
return err;
@@ -458,6 +457,9 @@ static int bcm54811_config_init(struct phy_device *phydev)
static int bcm54xx_config_init(struct phy_device *phydev)
{
int reg, err, val;
+ u32 led_modes[] = { BCM_LED_MULTICOLOR_LINK_ACT,
+ BCM_LED_MULTICOLOR_LINK };
+ struct device_node *np = phydev->mdio.dev.of_node;
reg = phy_read(phydev, MII_BCM54XX_ECR);
if (reg < 0)
@@ -470,8 +472,7 @@ static int bcm54xx_config_init(struct phy_device *phydev)
return err;
/* Unmask events we are interested in. */
- reg = ~(MII_BCM54XX_INT_DUPLEX |
- MII_BCM54XX_INT_SPEED |
+ reg = ~(MII_BCM54XX_INT_DUPLEX | MII_BCM54XX_INT_SPEED |
MII_BCM54XX_INT_LINK);
err = phy_write(phydev, MII_BCM54XX_IMR, reg);
if (err < 0)
@@ -482,6 +483,9 @@ static int bcm54xx_config_init(struct phy_device *phydev)
(phydev->dev_flags & PHY_BRCM_CLEAR_RGMII_MODE))
bcm_phy_write_shadow(phydev, BCM54XX_SHD_RGMII_MODE, 0);
+ if (of_property_read_bool(np, "brcm,powerdown-enable"))
+ phydev->dev_flags |= PHY_BRCM_AUTO_PWRDWN_ENABLE;
+
bcm54xx_adjust_rxrefclk(phydev);
switch (phydev->drv->phy_id & PHY_ID_MATCH_MODEL_MASK) {
@@ -495,6 +499,9 @@ static int bcm54xx_config_init(struct phy_device *phydev)
case PHY_ID_BCM54612E:
err = bcm54612e_config_init(phydev);
break;
+ case PHY_ID_BCM54213PE:
+ err = bcm54213pe_config_init(phydev);
+ break;
case PHY_ID_BCM54616S:
err = bcm54616s_config_init(phydev);
break;
@@ -503,9 +510,8 @@ static int bcm54xx_config_init(struct phy_device *phydev)
val = bcm_phy_read_exp(phydev,
BCM54810_EXP_BROADREACH_LRE_MISC_CTL);
val &= ~BCM54810_EXP_BROADREACH_LRE_MISC_CTL_EN;
- err = bcm_phy_write_exp(phydev,
- BCM54810_EXP_BROADREACH_LRE_MISC_CTL,
- val);
+ err = bcm_phy_write_exp(
+ phydev, BCM54810_EXP_BROADREACH_LRE_MISC_CTL, val);
break;
case PHY_ID_BCM54811:
err = bcm54811_config_init(phydev);
@@ -516,22 +522,27 @@ static int bcm54xx_config_init(struct phy_device *phydev)
bcm54xx_phydsp_config(phydev);
+ of_property_read_u32_array(np, "led-modes", led_modes, 2);
+
/* For non-SFP setups, encode link speed into LED1 and LED3 pair
* (green/amber).
- * Also flash these two LEDs on activity. This means configuring
- * them for MULTICOLOR and encoding link/activity into them.
* Don't do this for devices on an SFP module, since some of these
* use the LED outputs to control the SFP LOS signal, and changing
* these settings will cause LOS to malfunction.
*/
if (!phy_on_sfp(phydev)) {
val = BCM54XX_SHD_LEDS1_LED1(BCM_LED_SRC_MULTICOLOR1) |
- BCM54XX_SHD_LEDS1_LED3(BCM_LED_SRC_MULTICOLOR1);
+ BCM54XX_SHD_LEDS1_LED3(BCM_LED_SRC_MULTICOLOR1);
bcm_phy_write_shadow(phydev, BCM54XX_SHD_LEDS1, val);
+ /* BCM54210PE controls two extra LEDs with the next register.
+ * Make them shadow the first pair of LEDs - useful on CM4 which
+ * uses LED3 for ETH_LEDY instead of LED1.
+ */
+ bcm_phy_write_shadow(phydev, BCM54XX_SHD_LEDS1 + 1, val);
val = BCM_LED_MULTICOLOR_IN_PHASE |
- BCM54XX_SHD_LEDS1_LED1(BCM_LED_MULTICOLOR_LINK_ACT) |
- BCM54XX_SHD_LEDS1_LED3(BCM_LED_MULTICOLOR_LINK_ACT);
+ BCM54XX_SHD_LEDS1_LED1(led_modes[0]) |
+ BCM54XX_SHD_LEDS1_LED3(led_modes[1]);
bcm_phy_write_exp(phydev, BCM_EXP_MULTICOLOR, val);
}
@@ -664,7 +675,6 @@ static int bcm54810_write_mmd(struct phy_device *phydev, int devnum, u16 regnum,
return -EOPNOTSUPP;
}
-
/**
* bcm5481x_read_abilities - read PHY abilities from LRESR or Clause 22
* (BMSR) registers, based on whether the PHY is in BroadR-Reach or IEEE mode
@@ -715,14 +725,11 @@ static int bcm5481x_read_abilities(struct phy_device *phydev)
aneg = val & LRESR_LDSABILITY;
linkmode_mod_bit(ETHTOOL_LINK_MODE_Autoneg_BIT,
- phydev->supported,
- aneg);
+ phydev->supported, aneg);
linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT1_Full_BIT,
- phydev->supported,
- val & LRESR_100_1PAIR);
+ phydev->supported, val & LRESR_100_1PAIR);
linkmode_mod_bit(ETHTOOL_LINK_MODE_10baseT1BRR_Full_BIT,
- phydev->supported,
- val & LRESR_10_1PAIR);
+ phydev->supported, val & LRESR_10_1PAIR);
return 0;
}
@@ -738,9 +745,8 @@ static int bcm5481x_config_delay_swap(struct phy_device *phydev)
if (of_property_read_bool(np, "enet-phy-lane-swap")) {
/* Lane Swap - Undocumented register...magic! */
- int ret = bcm_phy_write_exp(phydev,
- MII_BCM54XX_EXP_SEL_ER + 0x9,
- 0x11B);
+ int ret = bcm_phy_write_exp(
+ phydev, MII_BCM54XX_EXP_SEL_ER + 0x9, 0x11B);
if (ret < 0)
return ret;
}
@@ -905,13 +911,10 @@ static int brcm_fet_config_init(struct phy_device *phydev)
/* Unmask events we are interested in and mask interrupts globally. */
if (phydev->drv->phy_id == PHY_ID_BCM5221)
- reg = MII_BRCM_FET_IR_ENABLE |
- MII_BRCM_FET_IR_MASK;
+ reg = MII_BRCM_FET_IR_ENABLE | MII_BRCM_FET_IR_MASK;
else
- reg = MII_BRCM_FET_IR_DUPLEX_EN |
- MII_BRCM_FET_IR_SPEED_EN |
- MII_BRCM_FET_IR_LINK_EN |
- MII_BRCM_FET_IR_ENABLE |
+ reg = MII_BRCM_FET_IR_DUPLEX_EN | MII_BRCM_FET_IR_SPEED_EN |
+ MII_BRCM_FET_IR_LINK_EN | MII_BRCM_FET_IR_ENABLE |
MII_BRCM_FET_IR_MASK;
err = phy_write(phydev, MII_BRCM_FET_INTREG, reg);
@@ -1095,9 +1098,9 @@ static int bcm5221_config_aneg(struct phy_device *phydev)
return 0;
}
- return phy_modify(phydev, BCM5221_AEGSR, BCM5221_AEGSR_MDIX_MAN_SWAP |
- BCM5221_AEGSR_MDIX_DIS,
- val);
+ return phy_modify(phydev, BCM5221_AEGSR,
+ BCM5221_AEGSR_MDIX_MAN_SWAP | BCM5221_AEGSR_MDIX_DIS,
+ val);
}
static int bcm5221_read_status(struct phy_device *phydev)
@@ -1316,8 +1319,7 @@ static int lre_read_lpa(struct phy_device *phydev)
phydev->lp_advertising,
lrelpa & LRELPA_PAUSE_ASYM);
linkmode_mod_bit(ETHTOOL_LINK_MODE_Pause_BIT,
- phydev->lp_advertising,
- lrelpa & LRELPA_PAUSE);
+ phydev->lp_advertising, lrelpa & LRELPA_PAUSE);
linkmode_mod_bit(ETHTOOL_LINK_MODE_100baseT1_Full_BIT,
phydev->lp_advertising,
lrelpa & LRELPA_100_1PAIR);
@@ -1416,8 +1418,7 @@ static int bcm54811_lre_read_status(struct phy_device *phydev)
return err;
/* why bother the PHY if nothing can have changed */
- if (phydev->autoneg ==
- AUTONEG_ENABLE && old_link && phydev->link)
+ if (phydev->autoneg == AUTONEG_ENABLE && old_link && phydev->link)
return 0;
phydev->speed = SPEED_UNKNOWN;
@@ -1447,304 +1448,339 @@ static int bcm54811_read_status(struct phy_device *phydev)
struct bcm54xx_phy_priv *priv = phydev->priv;
if (priv->brr_mode)
- return bcm54811_lre_read_status(phydev);
+ return bcm54811_lre_read_status(phydev);
return genphy_read_status(phydev);
}
static struct phy_driver broadcom_drivers[] = {
-{
- PHY_ID_MATCH_MODEL(PHY_ID_BCM5411),
- .name = "Broadcom BCM5411",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM5421),
- .name = "Broadcom BCM5421",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM54210E),
- .name = "Broadcom BCM54210E",
- /* PHY_GBIT_FEATURES */
- .flags = PHY_ALWAYS_CALL_SUSPEND,
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
- .suspend = bcm54xx_suspend,
- .resume = bcm54xx_resume,
- .get_wol = bcm54xx_phy_get_wol,
- .set_wol = bcm54xx_phy_set_wol,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM5461),
- .name = "Broadcom BCM5461",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM54612E),
- .name = "Broadcom BCM54612E",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
- .led_brightness_set = bcm_phy_led_brightness_set,
- .suspend = bcm54xx_suspend,
- .resume = bcm54xx_resume,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM54616S),
- .name = "Broadcom BCM54616S",
- /* PHY_GBIT_FEATURES */
- .soft_reset = genphy_soft_reset,
- .config_init = bcm54xx_config_init,
- .config_aneg = bcm54616s_config_aneg,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .read_status = bcm54616s_read_status,
- .probe = bcm54616s_probe,
- .link_change_notify = bcm54xx_link_change_notify,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM5464),
- .name = "Broadcom BCM5464",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .suspend = genphy_suspend,
- .resume = genphy_resume,
- .link_change_notify = bcm54xx_link_change_notify,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM5481),
- .name = "Broadcom BCM5481",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_aneg = bcm5481_config_aneg,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM54810),
- .name = "Broadcom BCM54810",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .read_mmd = bcm54810_read_mmd,
- .write_mmd = bcm54810_write_mmd,
- .config_init = bcm54xx_config_init,
- .config_aneg = bcm5481_config_aneg,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .suspend = bcm54xx_suspend,
- .resume = bcm54xx_resume,
- .link_change_notify = bcm54xx_link_change_notify,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM54811),
- .name = "Broadcom BCM54811",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_aneg = bcm54811_config_aneg,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .read_status = bcm54811_read_status,
- .get_features = bcm5481x_read_abilities,
- .suspend = bcm54xx_suspend,
- .resume = bcm54xx_resume,
- .link_change_notify = bcm54xx_link_change_notify,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM5482),
- .name = "Broadcom BCM5482",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM50610),
- .name = "Broadcom BCM50610",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
- .suspend = bcm54xx_suspend,
- .resume = bcm54xx_resume,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM50610M),
- .name = "Broadcom BCM50610M",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
- .suspend = bcm54xx_suspend,
- .resume = bcm54xx_resume,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM57780),
- .name = "Broadcom BCM57780",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCMAC131),
- .name = "Broadcom BCMAC131",
- /* PHY_BASIC_FEATURES */
- .config_init = brcm_fet_config_init,
- .config_intr = brcm_fet_config_intr,
- .handle_interrupt = brcm_fet_handle_interrupt,
- .suspend = brcm_fet_suspend,
- .resume = brcm_fet_config_init,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM5241),
- .name = "Broadcom BCM5241",
- /* PHY_BASIC_FEATURES */
- .config_init = brcm_fet_config_init,
- .config_intr = brcm_fet_config_intr,
- .handle_interrupt = brcm_fet_handle_interrupt,
- .suspend = brcm_fet_suspend,
- .resume = brcm_fet_config_init,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM5221),
- .name = "Broadcom BCM5221",
- /* PHY_BASIC_FEATURES */
- .config_init = brcm_fet_config_init,
- .config_intr = brcm_fet_config_intr,
- .handle_interrupt = brcm_fet_handle_interrupt,
- .suspend = brcm_fet_suspend,
- .resume = brcm_fet_config_init,
- .config_aneg = bcm5221_config_aneg,
- .read_status = bcm5221_read_status,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM5395),
- .name = "Broadcom BCM5395",
- .flags = PHY_IS_INTERNAL,
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .link_change_notify = bcm54xx_link_change_notify,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM53125),
- .name = "Broadcom BCM53125",
- .flags = PHY_IS_INTERNAL,
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM53128),
- .name = "Broadcom BCM53128",
- .flags = PHY_IS_INTERNAL,
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
- .led_brightness_set = bcm_phy_led_brightness_set,
-}, {
- PHY_ID_MATCH_MODEL(PHY_ID_BCM89610),
- .name = "Broadcom BCM89610",
- /* PHY_GBIT_FEATURES */
- .get_sset_count = bcm_phy_get_sset_count,
- .get_strings = bcm_phy_get_strings,
- .get_stats = bcm54xx_get_stats,
- .probe = bcm54xx_phy_probe,
- .config_init = bcm54xx_config_init,
- .config_intr = bcm_phy_config_intr,
- .handle_interrupt = bcm_phy_handle_interrupt,
- .link_change_notify = bcm54xx_link_change_notify,
-} };
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM5411),
+ .name = "Broadcom BCM5411",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM5421),
+ .name = "Broadcom BCM5421",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ },
+ {
+ PHY_ID_MATCH_EXACT(PHY_ID_BCM54210E),
+ .name = "Broadcom BCM54210E",
+ /* PHY_GBIT_FEATURES */
+ .flags = PHY_ALWAYS_CALL_SUSPEND,
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .suspend = bcm54xx_suspend,
+ .resume = bcm54xx_resume,
+ .get_wol = bcm54xx_phy_get_wol,
+ .set_wol = bcm54xx_phy_set_wol,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_EXACT(PHY_ID_BCM54213PE),
+ .name = "Broadcom BCM54213PE",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .suspend = bcm54xx_suspend,
+ .resume = bcm54xx_resume,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM5461),
+ .name = "Broadcom BCM5461",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM54612E),
+ .name = "Broadcom BCM54612E",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ .suspend = bcm54xx_suspend,
+ .resume = bcm54xx_resume,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM54616S),
+ .name = "Broadcom BCM54616S",
+ /* PHY_GBIT_FEATURES */
+ .soft_reset = genphy_soft_reset,
+ .config_init = bcm54xx_config_init,
+ .config_aneg = bcm54616s_config_aneg,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .read_status = bcm54616s_read_status,
+ .probe = bcm54616s_probe,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM5464),
+ .name = "Broadcom BCM5464",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .suspend = genphy_suspend,
+ .resume = genphy_resume,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM5481),
+ .name = "Broadcom BCM5481",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_aneg = bcm5481_config_aneg,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM54810),
+ .name = "Broadcom BCM54810",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .read_mmd = bcm54810_read_mmd,
+ .write_mmd = bcm54810_write_mmd,
+ .config_init = bcm54xx_config_init,
+ .config_aneg = bcm5481_config_aneg,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .suspend = bcm54xx_suspend,
+ .resume = bcm54xx_resume,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM54811),
+ .name = "Broadcom BCM54811",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_aneg = bcm54811_config_aneg,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .read_status = bcm54811_read_status,
+ .get_features = bcm5481x_read_abilities,
+ .suspend = bcm54xx_suspend,
+ .resume = bcm54xx_resume,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM5482),
+ .name = "Broadcom BCM5482",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM50610),
+ .name = "Broadcom BCM50610",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .suspend = bcm54xx_suspend,
+ .resume = bcm54xx_resume,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM50610M),
+ .name = "Broadcom BCM50610M",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .suspend = bcm54xx_suspend,
+ .resume = bcm54xx_resume,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM57780),
+ .name = "Broadcom BCM57780",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCMAC131),
+ .name = "Broadcom BCMAC131",
+ /* PHY_BASIC_FEATURES */
+ .config_init = brcm_fet_config_init,
+ .config_intr = brcm_fet_config_intr,
+ .handle_interrupt = brcm_fet_handle_interrupt,
+ .suspend = brcm_fet_suspend,
+ .resume = brcm_fet_config_init,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM5241),
+ .name = "Broadcom BCM5241",
+ /* PHY_BASIC_FEATURES */
+ .config_init = brcm_fet_config_init,
+ .config_intr = brcm_fet_config_intr,
+ .handle_interrupt = brcm_fet_handle_interrupt,
+ .suspend = brcm_fet_suspend,
+ .resume = brcm_fet_config_init,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM5221),
+ .name = "Broadcom BCM5221",
+ /* PHY_BASIC_FEATURES */
+ .config_init = brcm_fet_config_init,
+ .config_intr = brcm_fet_config_intr,
+ .handle_interrupt = brcm_fet_handle_interrupt,
+ .suspend = brcm_fet_suspend,
+ .resume = brcm_fet_config_init,
+ .config_aneg = bcm5221_config_aneg,
+ .read_status = bcm5221_read_status,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM5395),
+ .name = "Broadcom BCM5395",
+ .flags = PHY_IS_INTERNAL,
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM53125),
+ .name = "Broadcom BCM53125",
+ .flags = PHY_IS_INTERNAL,
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM53128),
+ .name = "Broadcom BCM53128",
+ .flags = PHY_IS_INTERNAL,
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ .led_brightness_set = bcm_phy_led_brightness_set,
+ },
+ {
+ PHY_ID_MATCH_MODEL(PHY_ID_BCM89610),
+ .name = "Broadcom BCM89610",
+ /* PHY_GBIT_FEATURES */
+ .get_sset_count = bcm_phy_get_sset_count,
+ .get_strings = bcm_phy_get_strings,
+ .get_stats = bcm54xx_get_stats,
+ .probe = bcm54xx_phy_probe,
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
+ .handle_interrupt = bcm_phy_handle_interrupt,
+ .link_change_notify = bcm54xx_link_change_notify,
+ }
+};
module_phy_driver(broadcom_drivers);
static const struct mdio_device_id __maybe_unused broadcom_tbl[] = {
{ PHY_ID_MATCH_MODEL(PHY_ID_BCM5411) },
{ PHY_ID_MATCH_MODEL(PHY_ID_BCM5421) },
- { PHY_ID_MATCH_MODEL(PHY_ID_BCM54210E) },
+ { PHY_ID_MATCH_EXACT(PHY_ID_BCM54210E) },
+ { PHY_ID_MATCH_EXACT(PHY_ID_BCM54213PE) },
{ PHY_ID_MATCH_MODEL(PHY_ID_BCM5461) },
{ PHY_ID_MATCH_MODEL(PHY_ID_BCM54612E) },
{ PHY_ID_MATCH_MODEL(PHY_ID_BCM54616S) },
@@ -1763,7 +1799,7 @@ static const struct mdio_device_id __maybe_unused broadcom_tbl[] = {
{ PHY_ID_MATCH_MODEL(PHY_ID_BCM53125) },
{ PHY_ID_MATCH_MODEL(PHY_ID_BCM53128) },
{ PHY_ID_MATCH_MODEL(PHY_ID_BCM89610) },
- { }
+ {}
};
MODULE_DEVICE_TABLE(mdio, broadcom_tbl);
diff --git a/drivers/net/phy/microchip.c b/drivers/net/phy/microchip.c
index dc8634e7bcbe..53f6f7c89237 100644
--- a/drivers/net/phy/microchip.c
+++ b/drivers/net/phy/microchip.c
@@ -198,6 +198,7 @@ static int lan88xx_probe(struct phy_device *phydev)
struct device *dev = &phydev->mdio.dev;
struct lan88xx_priv *priv;
u32 led_modes[4];
+ u32 downshift_after = 0;
int len;
priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
@@ -227,6 +228,32 @@ static int lan88xx_probe(struct phy_device *phydev)
return -EINVAL;
}
+ if (!of_property_read_u32(dev->of_node,
+ "microchip,downshift-after",
+ &downshift_after)) {
+ u32 mask = LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_MASK;
+ u32 val= LAN78XX_PHY_CTRL3_AUTO_DOWNSHIFT;
+
+ switch (downshift_after) {
+ case 2: val |= LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_2;
+ break;
+ case 3: val |= LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_3;
+ break;
+ case 4: val |= LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_4;
+ break;
+ case 5: val |= LAN78XX_PHY_CTRL3_DOWNSHIFT_CTRL_5;
+ break;
+ case 0: // Disable completely
+ mask = LAN78XX_PHY_CTRL3_AUTO_DOWNSHIFT;
+ val = 0;
+ break;
+ default:
+ return -EINVAL;
+ }
+ (void)phy_modify_paged(phydev, 1, LAN78XX_PHY_CTRL3,
+ mask, val);
+ }
+
/* these values can be used to identify internal PHY */
priv->chip_id = phy_read_mmd(phydev, 3, LAN88XX_MMD3_CHIP_ID);
priv->chip_rev = phy_read_mmd(phydev, 3, LAN88XX_MMD3_CHIP_REV);