Skip to content

Commit

Permalink
phy: broadcom: split out the BCM54213PE from the BCM54210E IDs
Browse files Browse the repository at this point in the history
The last nibble is a revision ID, and the 54213pe is a later rev
than the 54210e. Running the 54210e setup code on a 54213pe results
in a broken RGMII interface.

Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
  • Loading branch information
Jonathan Bell authored and Phil Elwell committed Jun 26, 2019
1 parent cce5eb7 commit baa2c3b
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
16 changes: 13 additions & 3 deletions drivers/net/phy/broadcom.c
Expand Up @@ -218,7 +218,8 @@ static void bcm54xx_adjust_rxrefclk(struct phy_device *phydev)
/* Abort if we are using an untested phy. */
if (BRCM_PHY_MODEL(phydev) != PHY_ID_BCM57780 &&
BRCM_PHY_MODEL(phydev) != PHY_ID_BCM50610 &&
BRCM_PHY_MODEL(phydev) != PHY_ID_BCM50610M)
BRCM_PHY_MODEL(phydev) != PHY_ID_BCM50610M &&
BRCM_PHY_MODEL(phydev) != PHY_ID_BCM54213PE)
return;

val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_SCR3);
Expand Down Expand Up @@ -624,12 +625,20 @@ static struct phy_driver broadcom_drivers[] = {
.config_intr = bcm_phy_config_intr,
}, {
.phy_id = PHY_ID_BCM54210E,
.phy_id_mask = 0xfffffff0,
.phy_id_mask = 0xffffffff,
.name = "Broadcom BCM54210E",
.features = PHY_GBIT_FEATURES,
.config_init = bcm54xx_config_init,
.ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr,
}, {
.phy_id = PHY_ID_BCM54213PE,
.phy_id_mask = 0xffffffff,
.name = "Broadcom BCM54213PE",
.features = PHY_GBIT_FEATURES,
.config_init = bcm54xx_config_init,
.ack_interrupt = bcm_phy_ack_intr,
.config_intr = bcm_phy_config_intr,
}, {
.phy_id = PHY_ID_BCM5461,
.phy_id_mask = 0xfffffff0,
Expand Down Expand Up @@ -755,7 +764,8 @@ module_phy_driver(broadcom_drivers);
static struct mdio_device_id __maybe_unused broadcom_tbl[] = {
{ PHY_ID_BCM5411, 0xfffffff0 },
{ PHY_ID_BCM5421, 0xfffffff0 },
{ PHY_ID_BCM54210E, 0xfffffff0 },
{ PHY_ID_BCM54210E, 0xffffffff },
{ PHY_ID_BCM54213PE, 0xffffffff },
{ PHY_ID_BCM5461, 0xfffffff0 },
{ PHY_ID_BCM54612E, 0xfffffff0 },
{ PHY_ID_BCM54616S, 0xfffffff0 },
Expand Down
1 change: 1 addition & 0 deletions include/linux/brcmphy.h
Expand Up @@ -20,6 +20,7 @@
#define PHY_ID_BCM5411 0x00206070
#define PHY_ID_BCM5421 0x002060e0
#define PHY_ID_BCM54210E 0x600d84a0
#define PHY_ID_BCM54213PE 0x600d84a2
#define PHY_ID_BCM5464 0x002060b0
#define PHY_ID_BCM5461 0x002060c0
#define PHY_ID_BCM54612E 0x03625e60
Expand Down

0 comments on commit baa2c3b

Please sign in to comment.