How to control LED5 on Ixora carrier board with Apalis IMX6?

I want to control LED5 (GPIO2_IO01 for green, GPIO2_IO02 for red) of Ixora carrier board with Apalis IMX6. I try with the terminal with the following command :

root@apalis-imx6:~# echo 33 > /sys/class/gpio/export

root@apalis-imx6:~# echo “out” > /sys/class/gpio/gpio33/direction

root@apalis-imx6:~# echo 1 > /sys/class/gpio/gpio33/value

root@apalis-imx6:~# cat /sys/class/gpio/gpio33/value

0

But this doesn’t work. If I change the pin description to GPIO with the “Toradex GPIO Config”, it works but this settings is discarded on next boot. How can I reconfigure theses pins ?

You will have to take care of the pin muxing as well as explained here. For Ixora you may just use the following device tree. From within U-Boot this can easily be achieved by changing the fdt_board environment variable.

Thanks, I have load the false device tree (apalis-eval). It works well with the good one (apalis-ixora)

Have you tried this:

echo 1 > /sys/class/leds/LED_4_GREEN/brightness
echo 1 > /sys/class/leds/LED_4_RED/brightness
echo 1 > /sys/class/leds/LED_5_GREEN/brightness
echo 1 > /sys/class/leds/LED_5_RED/brightness
sleep 1
echo 0 > /sys/class/leds/LED_4_GREEN/brightness
echo 0 > /sys/class/leds/LED_4_RED/brightness
echo 0 > /sys/class/leds/LED_5_GREEN/brightness
echo 0 > /sys/class/leds/LED_5_RED/brightness

Max