Page 1 of 1

RPi4 Ethernet LED control

Posted: Wed Sep 18, 2019 1:48 pm
by satadru
Is there any way to disable the Ethernet LEDs on the RPi4?

I see various methods using dtparam or a 3rd party tool as suggested here:

https://github.com/ccrisan/motioneyeos/ ... n-Off-LEDs
# Disable the Ethernet LEDs.
dtparam=eth_led0=14
dtparam=eth_led1=14
For other Raspberry Pi models, add this command to your /data/etc/userinit.sh:

lan951x-led-ctl --fdx=0 --lnk=0 --spd=0
But this doesn't work for the VL805, right?

Re: RPi4 Ethernet LED control

Posted: Wed Sep 18, 2019 2:17 pm
by trejan
The VL805 chip is only a USB controller. Ethernet is separate on the Pi 4 with the MAC inside the SoC and an external PHY. The external PHY doesn't have any public documentation so AFAIK there is no way of turning off the LEDs yet.

The config.txt option and the utility are for the 3B+ and older model B Pi boards respectively. They don't work on the 4.

Re: RPi4 Ethernet LED control

Posted: Thu Sep 19, 2019 11:15 pm
by satadru
FYI, the PHY appears to be a BCM54213PE, mentioned here: https://github.com/rsta2/circle

The LEDs appear to be mentioned here: https://github.com/raspberrypi/linux/co ... a8575ee06b

Re: RPi4 Ethernet LED control

Posted: Mon Sep 23, 2019 3:11 pm
by Kendek
satadru wrote:
Thu Sep 19, 2019 11:15 pm
FYI, the PHY appears to be a BCM54213PE...
Thanks, I successfully disabled the ethernet LEDs in the drivers/net/phy/broadcom.c with BCM_LED_SRC_OFF:

Code: Select all

static void bcm54213pe_config_init(struct phy_device *phydev)
{
...
	val = BCM5482_SHD_LEDS1_LED1(BCM_LED_SRC_OFF) |
		BCM5482_SHD_LEDS1_LED3(BCM_LED_SRC_OFF);

Re: RPi4 Ethernet LED control

Posted: Thu Jan 23, 2020 2:37 am
by ahori0
Kendek wrote:
Mon Sep 23, 2019 3:11 pm
Thanks, I successfully disabled the ethernet LEDs in the drivers/net/phy/broadcom.c with BCM_LED_SRC_OFF:

Code: Select all

static void bcm54213pe_config_init(struct phy_device *phydev)
{
...
	val = BCM5482_SHD_LEDS1_LED1(BCM_LED_SRC_OFF) |
		BCM5482_SHD_LEDS1_LED3(BCM_LED_SRC_OFF);
Hi may I asked how you did this?
Just pull their repo, make the change, and recompile?

Re: RPi4 Ethernet LED control

Posted: Thu Jan 23, 2020 5:07 am
by Kendek
ahori0 wrote:
Thu Jan 23, 2020 2:37 am
Hi may I asked how you did this?
Just pull their repo, make the change, and recompile?
This feature has been implemented:

Code: Select all

dtparam=eth_led0=4                                                                     
dtparam=eth_led1=4