Hello,
I’m trying to implement the solution suggested here on the Toradex Community regarding keeping the UART3 RS-232 transceiver disabled during boot by adding a GPIO-hog to force the “RS232 Force-Off” line high at startup.
I had the exact same problem described in the original thread, so I tried to reproduce the recommended approach.
On the Ixora V1.2A with Apalis iMX8, the RS-232 transceiver’s Force-Off line is connected to pin 180, so in my overlay I also need something like:
{
gpio-hog-uart3-rs232-forceoff {
gpio-hog;
gpios = <&gpioX N GPIO_ACTIVE_HIGH>;
output-high;
line-name = “uart3-rs232-forceoff”;
};
};
The objective is the same: keep the RS-232 driver in high-impedance during boot, and then pull the line low from userspace when needed.
What I already did
Following your documentation, I installed and cloned exactly the kernel branch recommended for Device Tree modifications:
git clone -b toradex_6.6-2.2.x-imx git://git.toradex.com/linux-toradex.git
Inside an Ubuntu virtual machine (to avoid Windows-related issues), I successfully tested that overlays build and work: for example, I modified the LVDS overlay and confirmed it loads correctly on my Apalis iMX8 + Ixora board.
The issue: Overlay fails as soon as I add any include
However, when I try to build the overlay for UART3 Force-Off, I always get a DTC syntax error only when an include is present, even the simplest header:
Example:
/dts-v1/;
/plugin/;
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/pinctrl/pads-imx8qm.h>
/ {
compatible = “toradex,apalis-imx8”;
};
Build command:
dtc -@ -I dts -O dtb
-o apalis-test-overlay.dtbo
-i ~/linux-toradex/include
-i ~/linux-toradex/include/dt-bindings
apalis-test-overlay.dts
Error:
Error: apalis-test-overlay.dts:5.1-9 syntax error
FATAL ERROR: Unable to parse input tree
I double-checked:
If I remove all #include, the overlay compiles — but obviously I need the macros (GPIO_ACTIVE_HIGH, pad control macros, etc.).
Since I already have another overlay for my LVDS display configuration, I would also like to know whether:
This GPIO-hog configuration can be safely included in the same overlay where I modify the LVDS panel,
or
It is recommended to keep them as two separate overlays (e.g., lvds-overlay.dtbo and uart3-forceoff.dtbo) and load both through overlays.txt.