Controlling Status LED from Linux
The NAVQ Plus SOM board features an optional Status LED. The color of the LED is green.
1. Controlling Status LED in Software
The Status LED is turned on by default after the system start up.
To turn the LED off, the following command must be issued in the Linux shell:
sudo sh -c "echo 0 > /sys/class/leds/status/brightness"
The LED is turned on using the following command:
sudo sh -c "echo 1 > /sys/class/leds/status/brightness"
2. Status LED Kernel Device Tree Configuration
The Status LED is driven by a i.MX8M Plus GPIO pin in the SOM hardware. The GPIO pin is described as follows in arch/arm64/boot/dts/freescale/imx8mp-navq.dts
in the Linux kernel source code:
...
pinctrl_gpio_led: gpioledgrp {
fsl,pins = <
MX8MP_IOMUXC_NAND_READY_B__GPIO3_IO16 0x19
>;
};
...
The gpio-leds
driver is used to provide software control to the Status LED. The gpio-leds
driver's node in arch/arm64/boot/dts/freescale/imx8mp-navq.dts
in the Linux kernel source code is as follows: