phy: broadcom: split out the BCM54213PE from the BCM54210E IDs
authorJonathan Bell <jonathan@raspberrypi.org>
Tue, 14 May 2019 16:00:41 +0000 (17:00 +0100)
committerpopcornmix <popcornmix@gmail.com>
Wed, 1 Jul 2020 15:32:56 +0000 (16:32 +0100)
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>
drivers/net/phy/broadcom.c
include/linux/brcmphy.h

index 5e95608..e7a4cbb 100644 (file)
@@ -213,7 +213,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);
@@ -619,13 +620,21 @@ 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",
        /* 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,
        .name           = "Broadcom BCM5461",
@@ -752,7 +761,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 },
index 6db2d9a..bfb3721 100644 (file)
@@ -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