Comment 0 for bug 1808366

Revision history for this message
Paolo Pisati (p-pisati) wrote :

Impact:

People are reporting that the green led (the one next to the red power led) is not working on the RaspberryPi 3B+ board.

After debugging the issue, this is what i found:

1) in reality, it's not the green led that is not working, but is the power led that "fails":

...
[ 2.299216] leds-gpio: probe of soc:leds failed with error -2
...

what happens is that, since all leds are initialized in a loop, if one of them fail to init properly, the loop tears down all the initialized leds in that loop - one can easily proof that by adding debug to drivers/leds/leds-gpio.c::gpio_leds_create() and drivers/leds/leds-gpio.c::gpio_led_probe(), or simply commenting out the pwr_led block in arch/arm/boot/dts/bcm2710-rpi-3-b-plus.dts - the board will boot up, the above leds-gpio error will disappear and act_led will work properly.

2) the pwr_led in all rpi3 boards (rpi3 a/b classic or b+) are not available direcly by the OS, instead only the Bradcom firmware can manipulate its gpio, thus a new mechanism that used the bcm firmware as a middleman was developed - the exgpio driver: using a mailbox mechanism, messages are sent from the Linux kernel to the Broadcom firmware to query the status of the led GPIO or set it, this was it's possible for the linux led trigger to make it work.

Fix:

The original

Regression: