We have a custom carrier board for Verdin iMX8M-Plus SoM and use linux-toradex_5.4.193.
And the carrier board has a LED on PWM_1 pin of the SOM (SODIMM 15). What we want to get is that during booting, the led to be faded in and out periodically.
For that, first I enabled CONFIG_LEDS_TRIGGER_PATTERN=y in toradex_defconfig file.
And second I defined the LED in the device tree:
But I never get the LED turned on or any special effect with above device tree. It simply stays turned off during boot time.
On the other side I get expected effect at runtime if I type following line in the terminal: echo "0 500 255 500" > /sys/class/leds/power/pattern
Also, if I change following line in device tree with timer instead of pattern : linux,default-trigger = "timer"; then I start seeing the led blinking every half seconds during boot time. So something seems wrong with pattern setting. Have anyone tested this feature before?
I could reproduce the behavior that you are facing.
Also, interestingly, the led just don’t appear at /sys/class/leds if this pwm-led node is applied via device tree overlay (instead of recompiling the whole device tree - the dtb file)
I am trying to understand why it isn’t working during boot.
Thank you for the confirmation. Since this requirement is pretty standard among our products, I can say that same pattern configuration works fine under Colibri VF50 with Linux Kernel 4.4. And we don’t use device tree overlay mechanism, we have one complete device tree per products.
Looking forward to hearing from you for a solution.
I tried to find out how the LED pattern works on kernel 4.4 (specifically on linux-toradex, branch toradex_vf_4.4), but seems like there is no support for it (or maybe it had another name…).
Did you/your team implement it on kernel 4.4 by yourselves?