aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bcm27xx/patches-4.19/950-0473-phy-bcm54213pe-configure-the-LED-outputs-to-be-more-.patch
diff options
context:
space:
mode:
authorAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-08 21:58:55 +0100
committerAdrian Schmutzler <freifunk@adrianschmutzler.de>2020-02-14 14:10:51 +0100
commit7d7aa2fd924c27829ec25f825481554dd81bce97 (patch)
tree658b87b89331670266163e522ea5fb52535633cb /target/linux/bcm27xx/patches-4.19/950-0473-phy-bcm54213pe-configure-the-LED-outputs-to-be-more-.patch
parente7bfda2c243e66a75ff966ba04c28b1590b5d24c (diff)
downloadupstream-7d7aa2fd924c27829ec25f825481554dd81bce97.tar.gz
upstream-7d7aa2fd924c27829ec25f825481554dd81bce97.tar.bz2
upstream-7d7aa2fd924c27829ec25f825481554dd81bce97.zip
brcm2708: rename target to bcm27xx
This change makes the names of Broadcom targets consistent by using the common notation based on SoC/CPU ID (which is used internally anyway), bcmXXXX instead of brcmXXXX. This is even used for target TITLE in make menuconfig already, only the short target name used brcm so far. Despite, since subtargets range from bcm2708 to bcm2711, it seems appropriate to use bcm27xx instead of bcm2708 (again, as already done for BOARDNAME). This also renames the packages brcm2708-userland and brcm2708-gpu-fw. Signed-off-by: Adrian Schmutzler <freifunk@adrianschmutzler.de> Acked-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bcm27xx/patches-4.19/950-0473-phy-bcm54213pe-configure-the-LED-outputs-to-be-more-.patch')
-rw-r--r--target/linux/bcm27xx/patches-4.19/950-0473-phy-bcm54213pe-configure-the-LED-outputs-to-be-more-.patch64
1 files changed, 64 insertions, 0 deletions
diff --git a/target/linux/bcm27xx/patches-4.19/950-0473-phy-bcm54213pe-configure-the-LED-outputs-to-be-more-.patch b/target/linux/bcm27xx/patches-4.19/950-0473-phy-bcm54213pe-configure-the-LED-outputs-to-be-more-.patch
new file mode 100644
index 0000000000..15af5a7ca4
--- /dev/null
+++ b/target/linux/bcm27xx/patches-4.19/950-0473-phy-bcm54213pe-configure-the-LED-outputs-to-be-more-.patch
@@ -0,0 +1,64 @@
+From dc2550fdfd0a46c3ec67e5003b3d69c29141406b Mon Sep 17 00:00:00 2001
+From: Jonathan Bell <jonathan@raspberrypi.org>
+Date: Fri, 17 May 2019 13:31:21 +0100
+Subject: [PATCH] phy: bcm54213pe: configure the LED outputs to be more
+ user-friendly
+
+The default state was both LEDs indicating link speed.
+
+Change the default configuration to
+- Amber: 1000/100 link speed indication
+- Green: link present + activity indication
+
+Signed-off-by: Jonathan Bell <jonathan@raspberrypi.org>
+---
+ drivers/net/phy/broadcom.c | 17 +++++++++++++++++
+ include/linux/brcmphy.h | 4 ++++
+ 2 files changed, 21 insertions(+)
+
+--- a/drivers/net/phy/broadcom.c
++++ b/drivers/net/phy/broadcom.c
+@@ -52,6 +52,21 @@ static int bcm54210e_config_init(struct
+ return 0;
+ }
+
++static void bcm54213pe_config_init(struct phy_device *phydev)
++{
++ u16 val;
++
++ /* Enable ACT+LINK indication on ACTIVITY trigger */
++ val = bcm_phy_read_shadow(phydev, BCM54XX_SHD_LEDCTL);
++ val |= BCM54XX_SHD_LEDCTL_ACTLINK_EN;
++ bcm_phy_write_shadow(phydev, BCM54XX_SHD_LEDCTL, val);
++
++ /* Set ACTIVITY on LED "1" output, LINKSPD[1] on LED "3" output */
++ val = BCM5482_SHD_LEDS1_LED1(BCM_LED_SRC_ACTIVITYLED) |
++ BCM5482_SHD_LEDS1_LED3(BCM_LED_SRC_LINKSPD1);
++ bcm_phy_write_shadow(phydev, BCM5482_SHD_LEDS1, val);
++}
++
+ static int bcm54612e_config_init(struct phy_device *phydev)
+ {
+ int reg;
+@@ -310,6 +325,8 @@ static int bcm54xx_config_init(struct ph
+ err = bcm54210e_config_init(phydev);
+ if (err)
+ return err;
++ } else if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM54213PE) {
++ bcm54213pe_config_init(phydev);
+ } else if (BRCM_PHY_MODEL(phydev) == PHY_ID_BCM54612E) {
+ err = bcm54612e_config_init(phydev);
+ if (err)
+--- a/include/linux/brcmphy.h
++++ b/include/linux/brcmphy.h
+@@ -168,6 +168,10 @@
+ #define BCM54XX_SHD_SCR3_DLLAPD_DIS 0x0002
+ #define BCM54XX_SHD_SCR3_TRDDAPD 0x0004
+
++/* 01001: Additional LED trigger options */
++#define BCM54XX_SHD_LEDCTL 0x09
++#define BCM54XX_SHD_LEDCTL_ACTLINK_EN 0x0010
++
+ /* 01010: Auto Power-Down */
+ #define BCM54XX_SHD_APD 0x0a
+ #define BCM_APD_CLR_MASK 0xFE9F /* clear bits 5, 6 & 8 */