Add LED configuration for iot-gate-imx8


I’m trying to add some LED configuration for the front led on the iot-gate-imx8.
So far I found where to put the gpio configuration in the dts file (see here).
As you can see this is a patch file and since is just one of a long series of patches, one small change leads to break every other patch.
The code that I’m trying to add is the following:

gpio-leds {
    compatible = "gpio-leds";
    led-green {
        label = "led-green";
        gpios = <&gpio2 25 GPIO_ACTIVE_LOW>;
        default-state = "off";
    led-yellow {
        label = "led-yellow";
        gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
        default-state = "off";

What should I do?
Thank you!

Hi! Can you clarify whether you are running Balena OS and if so, what version are you running?

Hi, yes I’m running balenaOS
balenaOS 2.82.10+rev1

I figured it out, the patch is correct but gpio is gpio3 and GPIO_ACTIVE_HIGH

Should I make a PR in the repository?

About the device tree I have another question, I can’t understand for the iot-gate-imx8 which version of the device tree (dtb) is loaded, there are a few in the boot folder.


Hey @federicod, we normally encourage users to PR device-tree overlays so they can be included in base images going forward.

However I don’t know which specific device trees are loaded by default except for this list here: