MX8 UART
UART Overview
On VAR-SOM-MX8 UART1 - UART3 and UART5 are enabled, UART4 is disabled as it shares pins with the second Ethernet controller.
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 connected to J18 header.
Only UART2 has RTS and CTS lines.
On SPEAR-MX8 UART1-UART3 are enabled.
UART1 is used as a debug console, UART2 is connected to Bluetooth module, UART3 is connected to J26 header on SPEAR-MX8 carrier board.
On SPEAR-MX8 SoMs without WIFI/BT module UART2 is connected to J20 header.
UART naming under Linux
The Linux devices corresponding to UART1 - UART5 are /dev/ttyLP0 - /dev/ttyLP4 respectively.
Testing UART3 on VAR-SOM-MX8
Short J18.7 and J18.9 pins and run the following commands:
stty -F /dev/ttyLP2 -echo -onlcr 115200 cat /dev/ttyLP2 & echo hello > /dev/ttyLP2
For each invocation of echo command the "hello" string should appear on the terminal.
Testing UART3 on SPEAR-MX8
Short J26.17 and J26.19 pins and run the following commands:
stty -F /dev/ttyLP2 -echo -onlcr 115200 cat /dev/ttyLP2 & echo hello > /dev/ttyLP2
For each invocation of echo command the "hello" string should appear on the terminal.
Disabling UART3
To disable UART3 on VAR-SOM-MX8 edit arch/arm64/boot/dts/freescale/fsl-imx8qxp-var-som-common.dtsi under kernel source directory and modify
&lpuart2 { ... status = "okay"; };
to
&lpuart2 { ... status = "disabled"; };
On SPEAR-MX8 modify arch/arm64/boot/dts/freescale/fsl-imx8qxp-var-spear-common.dtsi in the same manner.