VAR-SOM-MX8 UART

From Variscite Wiki
Revision as of 15:00, 6 June 2023 by Alex (talk | contribs) (Update init release param (var-som-mx8 sumo v1.0 does not exists))
VAR-SOM-MX8 UART

VAR-SOM-MX8 UART Overview

All 5 UARTs on VAR-SOM-MX8 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 VAR-SOM-MX8 carrier board.
On VAR-SOM-MX8 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.