1
0
Fork 0
mirror of https://github.com/Ysurac/openmptcprouter.git synced 2025-02-15 04:42:02 +00:00
openmptcprouter/6.6/target/linux/bcm27xx/patches-6.6/0260-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch

79 lines
2.8 KiB
Diff
Raw Normal View History

2024-04-05 18:55:33 +00:00
From 11573d65302d3c3dd4d681b0f1e683caf2d08176 Mon Sep 17 00:00:00 2001
From: Jonathan Bell <jonathan@raspberrypi.org>
Date: Tue, 14 May 2019 17:00:41 +0100
Subject: [PATCH 0260/1002] phy: broadcom: split out the BCM54213PE from the
BCM54210E IDs
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 | 15 ++++++++++++---
include/linux/brcmphy.h | 1 +
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index 13487d084a57..b79b46e32962 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -272,7 +272,8 @@ static void bcm54xx_adjust_rxrefclk(struct phy_device *phydev)
BRCM_PHY_MODEL(phydev) != PHY_ID_BCM50610M &&
BRCM_PHY_MODEL(phydev) != PHY_ID_BCM54210E &&
BRCM_PHY_MODEL(phydev) != PHY_ID_BCM54810 &&
- BRCM_PHY_MODEL(phydev) != PHY_ID_BCM54811)
+ BRCM_PHY_MODEL(phydev) != PHY_ID_BCM54811 &&
+ BRCM_PHY_MODEL(phydev) != PHY_ID_BCM54213PE)
return;
val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_SCR3);
@@ -1018,7 +1019,7 @@ static struct phy_driver broadcom_drivers[] = {
.link_change_notify = bcm54xx_link_change_notify,
}, {
.phy_id = PHY_ID_BCM54210E,
- .phy_id_mask = 0xfffffff0,
+ .phy_id_mask = 0xffffffff,
.name = "Broadcom BCM54210E",
/* PHY_GBIT_FEATURES */
.flags = PHY_ALWAYS_CALL_SUSPEND,
@@ -1035,6 +1036,13 @@ static struct phy_driver broadcom_drivers[] = {
.get_wol = bcm54xx_phy_get_wol,
.set_wol = bcm54xx_phy_set_wol,
.led_brightness_set = bcm_phy_led_brightness_set,
+}, {
+ .phy_id = PHY_ID_BCM54213PE,
+ .phy_id_mask = 0xffffffff,
+ .name = "Broadcom BCM54213PE",
+ /* PHY_GBIT_FEATURES */
+ .config_init = bcm54xx_config_init,
+ .config_intr = bcm_phy_config_intr,
}, {
.phy_id = PHY_ID_BCM5461,
.phy_id_mask = 0xfffffff0,
@@ -1286,7 +1294,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 },
diff --git a/include/linux/brcmphy.h b/include/linux/brcmphy.h
index c55810a43541..c5e6adc35cc9 100644
--- a/include/linux/brcmphy.h
+++ b/include/linux/brcmphy.h
@@ -23,6 +23,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
--
2.44.0