kernel: b53: update the BCM5365 UID
authorDaniel González Cabanelas <dgcbueu@gmail.com>
Fri, 26 Feb 2021 19:49:00 +0000 (20:49 +0100)
committerÁlvaro Fernández Rojas <noltari@gmail.com>
Fri, 5 Mar 2021 11:23:25 +0000 (12:23 +0100)
BCM63XX internal PHYs and BCM5365 SoC internal switch are both using the
same phy_driver->phy_id, causing conflicts and unnecessary probes. E.g
the BCM63XX phy internal IRQ is lost on the first probe.

The full BCM5365 UID is 0x00406370.

Use an additional byte to mask the BCM5365 UID to avoid duplicate driver
phy_id's. This will fix the IRQ issue in internal BCM63XX PHYs and avoid
more conflicts in the future.

Signed-off-by: Daniel González Cabanelas <dgcbueu@gmail.com>
(merge both cherry-picked commits)
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
(cherry-picked from commits cbcac4fde8 and cfa43f8119)

target/linux/generic/files/drivers/net/phy/b53/b53_mdio.c
target/linux/generic/files/drivers/net/phy/b53/b53_phy_fixup.c

index afe2187cd6c21d2fe3bbcdee1cc6279229ebe8e6..98cdbffe73c7354f4401389dfcc96014bff62588 100644 (file)
@@ -417,9 +417,9 @@ static struct phy_driver b53_phy_driver_id2 = {
 
 /* BCM5365 */
 static struct phy_driver b53_phy_driver_id3 = {
-       .phy_id         = 0x00406000,
+       .phy_id         = 0x00406300,
        .name           = "Broadcom B53 (3)",
-       .phy_id_mask    = 0x1ffffc00,
+       .phy_id_mask    = 0x1fffff00,
        .features       = 0,
        .probe          = b53_phy_probe,
        .remove         = b53_phy_remove,
index e2f8a39ab658cf3433f662c3e021a8405b19364e..a19eccefd14c5bb96d1054f60396cba90e0ea23a 100644 (file)
@@ -24,7 +24,7 @@
 
 #define B53_BRCM_OUI_1 0x0143bc00
 #define B53_BRCM_OUI_2 0x03625c00
-#define B53_BRCM_OUI_3 0x00406000
+#define B53_BRCM_OUI_3 0x00406300
 
 static int b53_phy_fixup(struct phy_device *dev)
 {
@@ -40,7 +40,7 @@ static int b53_phy_fixup(struct phy_device *dev)
 
        if ((phy_id & 0xfffffc00) == B53_BRCM_OUI_1 ||
            (phy_id & 0xfffffc00) == B53_BRCM_OUI_2 ||
-           (phy_id & 0xfffffc00) == B53_BRCM_OUI_3) {
+           (phy_id & 0xffffff00) == B53_BRCM_OUI_3) {
                dev->phy_id = phy_id;
        }