Disabling GPIO4 in devicetree

Hey,

I am trying to make the GPIO demo working while Linux is running. I found out, that:

“The interrupt part of the demo only works as long as Linux is not running. The reason for that is that Linux uses the same GPIO bank too, and reconfigures interrupts. The easiest way to use GPIO in interrupt mode on FreeRTOS while using Linux is to assign a complete GPIO bank to FreeRTOS and disabling the GPIO bank in Linux’ device tree.”

After a little struggle I finally can compile device trees. Now I want to ask how exactly can I disable the GPIO4 bank?

I tried:

**gpio4: gpio@30230000 {status = "disabled";}**

and

**&gpio4{
	status = "disabled";
}**

both give me an error like:

~/linux-toradex$ make imx7d-colibri-emmc-eval-v3.dtb ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf-
  CHK     scripts/mod/devicetable-offsets.h
  DTC     arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dtb

Error: arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dts:25.8-21 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:313: arch/arm/boot/dts/imx7d-colibri-emmc-eval-v3.dtb] Error 1
make: *** [arch/arm/Makefile:336: imx7d-colibri-emmc-eval-v3.dtb] Error 2

I hope you can help me

Thanks in advance

Oh thanks it was the ;!

So I tested the new device tree with the disabled gpio4, but the blinking_imx_demo.elf won’t work anyways, when linux is started.

Do I need to disable something else to get the demo running?

Thanks in advance!

Could you try &gpio4{ status = "disabled"; };
But be aware - many other peripherals use GPIO4 bank as well.

Hi @Zimart

Perfect that your issue with gpio4 is solved.
For the blinking_imx_demo issue could you ask a new Question?

Thanks and best regards,
Jaski