Skip to content

Commit aa6ba77

Browse files
committed
net: phy: broadcom: Preserve LED4 settings
On CM4/CM5, LED3 is used for ETH_LEDY, while LED4 may be unused or serve as INT_N. Previously, both LEDs 3 and 4 were mirrored from LED1, which overwrote the INT_N configuration on CM5. Fix this by only shadowing LED1 to LED3, preserving the setting for LED4/INT. Fixes: 9704fab ("net: phy: broadcom: Make LEDs 3+4 shadow LEDs 1+2") Signed-off-by: Nicolai Buchwitz <[email protected]>
1 parent 33a7b4a commit aa6ba77

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

drivers/net/phy/broadcom.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -516,10 +516,14 @@ static int bcm54xx_config_init(struct phy_device *phydev)
516516
BCM54XX_SHD_LEDS1_LED3(BCM_LED_SRC_MULTICOLOR1);
517517
bcm_phy_write_shadow(phydev, BCM54XX_SHD_LEDS1, val);
518518
/* BCM54210PE controls two extra LEDs with the next register.
519-
* Make them shadow the first pair of LEDs - useful on CM4 which
520-
* uses LED3 for ETH_LEDY instead of LED1.
519+
* Make LED3 shadow LED1, but preserve LED4 as is - useful on
520+
* CM4/CM5 which use LED3 for ETH_LEDY instead of LED1. LED4
521+
* is either unused or configured as INT pin on CM5.
521522
*/
522-
bcm_phy_write_shadow(phydev, BCM54XX_SHD_LEDS1 + 1, val);
523+
reg = bcm_phy_read_shadow(phydev, BCM54XX_SHD_LEDS2);
524+
reg &= ~(0xf << 0);
525+
reg |= BCM54XX_SHD_LEDS1_LED1(BCM_LED_SRC_MULTICOLOR1);
526+
bcm_phy_write_shadow(phydev, BCM54XX_SHD_LEDS2, reg);
523527

524528
val = BCM_LED_MULTICOLOR_IN_PHASE |
525529
BCM54XX_SHD_LEDS1_LED1(led_modes[0]) |

0 commit comments

Comments
 (0)