MX8 UART: Difference between revisions
No edit summary |
No edit summary |
||
Line 7: | Line 7: | ||
{{#ifeq: {{#var:HARDWARE_NAME}} | VAR-SOM-MX8X | | {{#ifeq: {{#var:HARDWARE_NAME}} | VAR-SOM-MX8X | | ||
All 4 UARTs on {{#var:HARDWARE_NAME}} are enabled by default.<br> | All 4 UARTs on {{#var:HARDWARE_NAME}} are enabled by default.<br> | ||
UART0 is connected to Bluetooth module, UART1 and UART2 are connected to J18 header on {{#var:HARDWARE_NAME}} carrier board, UART3 is used as a debug console.<br> | |||
On {{#var:HARDWARE_NAME}} SoMs without WIFI/BT module | On {{#var:HARDWARE_NAME}} SoMs without WIFI/BT module UART0 is connected to J18 header.<br> | ||
Inspect the carrier board datasheet or schematics for the exact pinout.<br> | Inspect the carrier board datasheet or schematics for the exact pinout.<br> | ||
Only UART1 has RTS and CTS lines. | Only UART1 has RTS and CTS lines. |
Revision as of 13:52, 28 November 2019
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.
Inspect the carrier board datasheet or schematics for the exact pinout.
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.
Inspect the carrier board datasheet or schematics for the exact pinout.
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.