Hi
We use TX2 internal GBE PHY connect to RJ45, but LED state is difference for our behaviors,
Could you help how to modify the BSP to meet our behaviors, thanks.
Hi
We use TX2 internal GBE PHY connect to RJ45, but LED state is difference for our behaviors,
Could you help how to modify the BSP to meet our behaviors, thanks.
Now the LED state is below
1000M : left link led : yellow
right speed led : green ,but flashing
100M : left link led : OFF
right speed led : green
Please try to use below patch and see if it can work.
diff --git a/drivers/net/phy/broadcom.c b/drivers/net/phy/broadcom.c
index dbcfa1b..b965df8 100644
--- a/drivers/net/phy/broadcom.c
+++ b/drivers/net/phy/broadcom.c
@@ -307,6 +307,19 @@ static int bcm54xx_config_init(struct phy_device *phydev)
return err;
}
+ bcm_phy_write_shadow(phydev, BCM89610_SHD_LEDS1,
+ BCM89610_SHD_LEDS1_LED2(BCM_LED_SRC_LINKSPD1) |
+ BCM89610_SHD_LEDS1_LED1(BCM_LED_SRC_ACTIVITYLED));
+
+ bcm_phy_write_shadow(phydev, BCM89610_SHD_LEDS2,
+ BCM89610_SHD_LEDS2_LED4(BCM_LED_SRC_ACTIVITYLED) |
+ BCM89610_SHD_LEDS2_LED3(BCM_LED_SRC_LINKSPD2));
+
bcm54xx_phydsp_config(phydev);
return 0;
diff --git a/include/linux/brcmphy.h b/include/linux/brcmphy.h
index 38f8648..a430c35 100644
--- a/include/linux/brcmphy.h
+++ b/include/linux/brcmphy.h
@@ -175,6 +175,17 @@
+#define BCM89610_SHD_LEDS1 0x0d
+#define BCM89610_SHD_LEDS1_LED2(src) ((src & 0xf) << 4)
+#define BCM89610_SHD_LEDS1_LED1(src) ((src & 0xf) << 0)
+
+#define BCM89610_SHD_LEDS2 0x0e
+#define BCM89610_SHD_LEDS2_LED4(src) ((src & 0xf) << 4)
+#define BCM89610_SHD_LEDS2_LED3(src) ((src & 0xf) << 0)