TS-7970 LEDs: Difference between revisions
m (Links auto-updated for 2022 re-branding ( https://github.com/embeddedarm/linux-3.10.17-imx6/blob/master/Documentation/leds/ledtrig-transient.txt → https://github.com/embeddedTS/linux-3.10.17-imx6/blob/master/Documentation/leds/ledtrig-transient.txt https://github.com/embeddedarm/linux-3.10.17-imx6/blob/master/Documentation/leds/ledtrig-oneshot.txt → https://github.com/embeddedTS/linux-3.10.17-imx6/blob/master/Documentation/leds/ledtrig-oneshot.txt)) |
No edit summary |
||
Line 1: | Line 1: | ||
The TS-7970 has 4 user controllable LEDs. | |||
On startup, the red LED turns on while the system is in u-boot. When execution switches to the Linux kernel, the green LED turns on, and red turns off (controlled by the default state in the device tree). | |||
The blue LED is also driven by the supervisory microcontroller. By default this will turn on the LEDs when connected. When the system is in sleep mode it will turn off the led but blink on briefly on occasion to show activity. If USB has power, but VIN has been removed or is below the minimum threshold, the blue led will blink rapidly. | |||
After startup, users can take over the LED behavior by writing to the files in /sys/class/leds/<name>/brightness. These include: | |||
* blue-led | |||
* green-led | |||
* red-led | |||
* yellow-led | |||
The kernel provides access to control the LEDs using the sysfs: | The kernel provides access to control the LEDs using the sysfs: | ||
<source lang=bash> | <source lang=bash> |
Revision as of 17:16, 18 August 2022
The TS-7970 has 4 user controllable LEDs.
On startup, the red LED turns on while the system is in u-boot. When execution switches to the Linux kernel, the green LED turns on, and red turns off (controlled by the default state in the device tree).
The blue LED is also driven by the supervisory microcontroller. By default this will turn on the LEDs when connected. When the system is in sleep mode it will turn off the led but blink on briefly on occasion to show activity. If USB has power, but VIN has been removed or is below the minimum threshold, the blue led will blink rapidly.
After startup, users can take over the LED behavior by writing to the files in /sys/class/leds/<name>/brightness. These include:
- blue-led
- green-led
- red-led
- yellow-led
The kernel provides access to control the LEDs using the sysfs:
# Set Red led on
echo 1 > /sys/class/leds/red-led/brightness
# Set Red led off
echo 0 > /sys/class/leds/red-led/brightness
# Set Green led on
echo 1 > /sys/class/leds/green-led/brightness
# Set Green led off
echo 0 > /sys/class/leds/green-led/brightness
The kernel provides various triggers that can be useful for debugging purposes. The trigger for a given LED is in its directory:
echo "heartbeat" > /sys/class/leds/red-led/trigger
Trigger value | LED toggles on |
---|---|
none | Default, no action |
mmc0 | MicroSD card activity |
mmc1 | eMMC activity |
mmc2 | WIFI SDIO activity |
timer | 2hz blink |
oneshot | Blinks after delay. [1] |
heartbeat | Similar to timer, but varies the period based on system load |
backlight | Toggles on FB_BLANK |
gpio | Toggle based on a specified gpio. [2] |
cpu0 | Blink on CPU core 0 activity |
cpu1 | Blink on CPU core 1 activity |
cpu2 | Blink on CPU core 2 activity |
cpu3 | Blink on CPU core 3 activity |
default-on | Only turns on by default. Only useful for device tree. |
transient | Specify on/off with time to turn off. [3] |
flash/torch | Toggle on Camera activation. Not currently used. |
- ↑ See the Kernel documentation for more details
- ↑ When this trigger is set, a "gpio" file appears in the same directory which can be used to specify what GPIO to follow when it blinks
- ↑ See the Kernel documentation for more details