This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LED status got reset during kernel boot

Other Parts Discussed in Thread: AM3351

Hi,

We have our AM3351 based custom board and I'm using processor-sdk-03.00.00.04.  As per our requirement, we to need glow  tri color led(connected to three different gpio pins) continuously until board boots complete. Here leds are connected in common anode method(i.e) If gpio is driven low led will be ON.

 In u-boot, i'm making all three leds ON(driving gpio low) and keeping the same state in kernel using led gpio driver. Below is the my kernel dtb configuration.

leds {

compatible = "gpio-leds";

led@1 {
label = "red";
gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};

led@2 {
label = "blue";
gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};

led@3 {
label = "green";
gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
default-state = "keep";
};

};

The problem is when boot process switch from u-boot to kernel, all three leds are goes OFF for a second and it is again ON once gpio led driver is up.

        u-boot --> led ON

        u-boot to kernel  -->  leds are OFF for fraction of second ---> LED is ON

How to avoid this glitch during boot process. Also tried  configuring pinmux for led gpios in kernel devicetree as same as uboot led gpio pinmux, but the result is same. Is it not possible to retaining the same state from uboot to kernel for led gpios.