VAR-SOM-MX8 UART
UART Overview
All 5 UARTs on except UART4 are enabled by default.
UART1 is used as a debug console, UART2 is connected to Bluetooth module, UART3 and UART5 are connected to J18 header on carrier board.
On SOMs without WIFI/BT module UART2 is also connected to J18 header.
UART4 pins are multiplexed with Ethernet PHY on the carrier board.
Inspect the carrier board datasheet or schematics for the exact pinout.
Only UART2 has RTS and CTS lines.
UART naming under Linux
The Linux devices corresponding to UART1 - UART5 are /dev/ttyLP0 - /dev/ttyLP4 respectively.
Testing UART3
Short J18.3 and J18.5 pins and run the following commands:
stty -F /dev/ttyLP2 -echo -onlcr 115200 cat /dev/ttyLP2 & echo hello > /dev/ttyLP2
For each time you run this echo command the "hello" string should appear on the terminal.
Testing UART5
Short J18.7 and J18.9 pins and run the following commands:
stty -F /dev/ttyLP4 -echo -onlcr 115200 cat /dev/ttyLP4 & echo hello > /dev/ttyLP4
For each invocation of echo command the "hello" string should appear on the terminal.
Disabling UART3
To disable UART2 edit arch/arm64/boot/dts/freescale/fsl-imx8qm-var-som.dts under kernel source directory and modify
&lpuart2 { ... status = "okay"; };
to
&lpuart2 { ... status = "disabled"; };
Other UARTs can be disabled in the similar manner.