]> git.ipfire.org Git - thirdparty/kernel/linux.git/commit
net: phy: bcm84881: add LED framework support for BCM84891/BCM84892
authorDaniel Wagner <wagner.daniel.t@gmail.com>
Wed, 1 Apr 2026 11:49:31 +0000 (12:49 +0100)
committerJakub Kicinski <kuba@kernel.org>
Fri, 3 Apr 2026 00:59:43 +0000 (17:59 -0700)
commit7eaff1eff003dc9c5881edc37741795a5dfc5ff8
treeb81138e2378c9c6f4e41c597ae2c9eb441b5cc61
parent9b79da5d691e79de2186c36400276132d31b81a5
net: phy: bcm84881: add LED framework support for BCM84891/BCM84892

Expose LED1 and LED2 pins via the PHY LED framework. Each pin has a
source mask (MASK_LOW + MASK_EXT registers) selecting which hardware
events light it, plus a CTL field in the shared 0xA83B register
(RMW; LED4 is firmware-controlled per the datasheet).

Hardware can offload per-speed link triggers (1000/2500/5000/10000),
RX/TX activity, and force-on. LINK_100 is accepted only alongside
LINK_1000: source bit 4 lights at both speeds and 100-alone isn't
representable, so the unrepresentable case falls to software.

The chip has five LED pins; only LED1/LED2 are exposed here as those
are the only ones characterized on tested hardware. LED4 is firmware-
controlled regardless of strap configuration.

Tested on TRENDnet TEG-S750 (LED1/LED2 wired to an antiparallel
bicolor LED): brightness_set via sysfs; netdev trigger offloaded=1
with amber lit at 100M/1G/2.5G and green lit at 10G via respective
link_* modes; LED off immediately on cable unplug with no software
involvement.

Signed-off-by: Daniel Wagner <wagner.daniel.t@gmail.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Link: https://patch.msgid.link/20260401114931.3091818-1-wagner.daniel.t@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/bcm84881.c