MX8 UART: Difference between revisions

From Variscite Wiki
No edit summary
(Add Debian Platform Customization)
 
(12 intermediate revisions by 5 users not shown)
Line 1: Line 1:
<!-- Set release according to "release" parameter in URL and use RELEASE_SUMO_V1.0_VAR-SOM-MX8 as default
<!-- Set release according to "release" parameter in URL and use RELEASE_DUNFELL_V1.1_VAR-SOM-MX8 as default
--> {{#vardefine:RELEASE_PARAM|{{#urlget:release}}}} <!--
--> {{INIT_RELEASE_PARAM|RELEASE_DUNFELL_V1.1_VAR-SOM-MX8}} <!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM|RELEASE_SUMO_V1.0_VAR-SOM-MX8}}}} <!--
--> {{#lst:Yocto_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{PageHeader|{{#var:HARDWARE_NAME}} UART}} {{DocImage|category1=Yocto|category2={{#var:HARDWARE_NAME}}}} __toc__
--> {{#lst:Debian_Platform_Customization|{{#var:RELEASE_PARAM}}}} <!--
--> {{PageHeader|{{#var:HARDWARE_NAME}} UART}} {{DocImage|category1=Yocto|category2=Debian}} [[Category:{{#var:HARDWARE_NAME}}]] __toc__


= {{#var:HARDWARE_NAME}} UART Overview =
= {{#var:HARDWARE_NAME}} UART Overview =
{{#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>
On VAR-SOM-MX8X up to 4 UARTS can be used.<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>
All 4 UARTs are enabled by default.<br>
On {{#var:HARDWARE_NAME}} SoMs without WIFI/BT module UART0 is connected to J18 header.<br>
UART3 is used as for debug console, UART0, UART1 and UART2 are connected to J18 header on Symphony-Board.<br>
UART0 is connected to Bluetooth module on SOM, it can be used on J18 only when BT is disabled.<br>
Only UART0, UART1 have RTS and CTS lines.
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.
|
|
On VAR-SOM-MX8 UART1 - UART3 and UART5 are enabled, UART4 is disabled as it shares pins with the second Ethernet controller.<br>
'''On VAR-SOM-MX8''' up to 5 UARTS can be used.<br>
UART1 is used as a debug console, UART2 is connected to Bluetooth module, UART3 and UART5 are connected to J18 header on {{#var:HARDWARE_NAME}} carrier board.<br>
By default, UART0, UART1, UART2 and UART4 are enabled, UART3 is disabled as it shares pins with the second Ethernet controller. UART5 is not defined.<br>
On {{#var:HARDWARE_NAME}} SoMs without WIFI/BT module UART2 is connected to J18 header.<br>
UART0 is used for debug console, UART1, UART2 and UART4 are connected to J18 header on Symphony-Board. UART3 is connected to J30 header on Symphony-Board (not assembled by default).<br>
UART1 is connected to Bluetooth module on SOM, it can be used on J18 only when BT is disabled.<br>
Only UART0, UART1 and UART3 have RTS and CTS lines.<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 UART2 has RTS and CTS lines.<br>
<br>
 
'''On SPEAR-MX8''' up to 5 UARTS can be used.<br>
On SPEAR-MX8 UART1 - UART3 are enabled.<br>
By default, UART0, UART1 and UART2 are enabled, and UART3 and UART4 are not defined (UART3 shares pins with the second Ethernet controller).<br>
UART1 is used as a debug console, UART2 is connected to Bluetooth module, UART3 is connected to J26 header on SPEAR-MX8 carrier board.<br>
UART0 is used for debug console, UART0 and UART2 are connected to J26 header on SPEAR-CustomBoard. UART3 and UART4 are connected to J20 header on the SPEAR-CustomBoard.<br>
On SPEAR-MX8 SoMs without WIFI/BT module UART2 is connected to J20 header.<br>  
UART1 is connected to the Bluetooth module on the SOM. it can be used only when BT is disabled (not exported on SPEAR-CustomBoard).<br>
Only UART0, UART1 and UART3 have RTS and CTS lines.<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>  
}}
}}
= UART naming under Linux =
= UART naming under Linux =


The Linux devices corresponding to UART1 - UART5 are /dev/ttyLP0 - /dev/ttyLP4 respectively.  
The Linux devices corresponding to UART0 - UART4 are /dev/ttyLP0 - /dev/ttyLP4 respectively.  


{{#ifeq: {{#var:HARDWARE_NAME}} | VAR-SOM-MX8X |
{{#ifeq: {{#var:HARDWARE_NAME}} | VAR-SOM-MX8X |
= Testing UART2 =
= Testing UART1 =


Short J18.3 and J18.5 pins and run the following commands:
Short J18.3 and J18.5 pins and run the following commands:
<pre>
<pre>
stty -F /dev/ttyLP1 -echo -onlcr 115200
# stty -F /dev/ttyLP1 -echo -onlcr 115200
cat /dev/ttyLP1 &
# cat /dev/ttyLP1 &
echo hello > /dev/ttyLP1
# echo hello > /dev/ttyLP1
</pre>
</pre>


<br>For each invocation of echo command the "hello" string should appear on the terminal.
<br>For each invocation of echo command the "hello" string should appear on the terminal.


= Testing UART3 =
= Testing UART2 =


Short J18.7 and J18.9 pins and run the following commands:
Short J18.7 and J18.9 pins and run the following commands:
<pre>
<pre>
stty -F /dev/ttyLP2 -echo -onlcr 115200
# stty -F /dev/ttyLP2 -echo -onlcr 115200
cat /dev/ttyLP2 &
# cat /dev/ttyLP2 &
echo hello > /dev/ttyLP2
# echo hello > /dev/ttyLP2
</pre>
</pre>


<br>For each invocation of echo command the "hello" string should appear on the terminal.
<br>For each invocation of echo command the "hello" string should appear on the terminal.
|
|
= Testing UART3 on VAR-SOM-MX8 =
= Testing UART2 on VAR-SOM-MX8 =


Short J18.7 and J18.9 pins and run the following commands:
Short J18.3 and J18.5 pins and run the following commands:
<pre>
<pre>
stty -F /dev/ttyLP2 -echo -onlcr 115200
# stty -F /dev/ttyLP2 -echo -onlcr 115200
cat /dev/ttyLP2 &
# cat /dev/ttyLP2 &
echo hello > /dev/ttyLP2
# echo hello > /dev/ttyLP2
</pre>
</pre>


For each invocation of echo command the "hello" string should appear on the terminal.
For each invocation of echo command the "hello" string should appear on the terminal.


= Testing UART3 on SPEAR-MX8 =
= Testing UART4 on VAR-SOM-MX8 =
 
Short J18.7 and J18.9 pins and run the following commands:
<pre>
# stty -F /dev/ttyLP4 -echo -onlcr 115200
# cat /dev/ttyLP4 &
# echo hello > /dev/ttyLP4
</pre>
 
= Testing UART2 on SPEAR-MX8 =


Short J26.17 and J26.19 pins and run the following commands:
Short J26.17 and J26.19 pins and run the following commands:
<pre>
<pre>
stty -F /dev/ttyLP2 -echo -onlcr 115200
# stty -F /dev/ttyLP2 -echo -onlcr 115200
cat /dev/ttyLP2 &
# cat /dev/ttyLP2 &
echo hello > /dev/ttyLP2
# echo hello > /dev/ttyLP2
</pre>
</pre>


Line 75: Line 89:


{{#ifeq: {{#var:HARDWARE_NAME}} | VAR-SOM-MX8X |
{{#ifeq: {{#var:HARDWARE_NAME}} | VAR-SOM-MX8X |
= Disabling UART2 =
= Disabling UART1 =


To disable UART2 edit arch/arm64/boot/dts/freescale/fsl-imx8qxp-var-som-common.dtsi under kernel source directory and modify
To disable UART1 edit arch/arm64/boot/dts/freescale/fsl-imx8qxp-var-som-common.dtsi under kernel source directory and modify


<pre>
<pre>
Line 97: Line 111:
Other UARTs can be disabled in the similar manner.
Other UARTs can be disabled in the similar manner.
|
|
= Disabling UART3 =
= Disabling UART2 =
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
To disable UART2 '''on VAR-SOM-MX8''' edit arch/arm64/boot/dts/freescale/fsl-imx8qxp-var-som-common.dtsi under kernel source directory and modify


<pre>
<pre>
Line 115: Line 129:
};
};
</pre>
</pre>
 
<br>
<br> On SPEAR-MX8 modify arch/arm64/boot/dts/freescale/fsl-imx8qxp-var-spear-common.dtsi in the same manner.
'''On SPEAR-MX8''' modify arch/arm64/boot/dts/freescale/fsl-imx8qxp-var-spear-common.dtsi in the same manner.
}}
}}
{{#vardefine:UART_PREFIX|LP}}
<!--
= Configuring RS485 Half-Duplex =
{{#lst:Yocto_Platform_Customization|RS485_HALF_DUPLEX}}
-->

Latest revision as of 15:26, 6 June 2023

Warning: This page is designed to be used with a 'release' URL parameter.

This page is using the default release RELEASE_DUNFELL_V1.1_VAR-SOM-MX8.
To view this page for a specific Variscite SoM and software release, please follow these steps:

  1. Visit variwiki.com
  2. Select your SoM
  3. Select the software release
VAR-SOM-MX8 UART

VAR-SOM-MX8 UART Overview

On VAR-SOM-MX8 up to 5 UARTS can be used.
By default, UART0, UART1, UART2 and UART4 are enabled, UART3 is disabled as it shares pins with the second Ethernet controller. UART5 is not defined.
UART0 is used for debug console, UART1, UART2 and UART4 are connected to J18 header on Symphony-Board. UART3 is connected to J30 header on Symphony-Board (not assembled by default).
UART1 is connected to Bluetooth module on SOM, it can be used on J18 only when BT is disabled.
Only UART0, UART1 and UART3 have RTS and CTS lines.
Inspect the carrier board datasheet or schematics for the exact pinout.

On SPEAR-MX8 up to 5 UARTS can be used.
By default, UART0, UART1 and UART2 are enabled, and UART3 and UART4 are not defined (UART3 shares pins with the second Ethernet controller).
UART0 is used for debug console, UART0 and UART2 are connected to J26 header on SPEAR-CustomBoard. UART3 and UART4 are connected to J20 header on the SPEAR-CustomBoard.
UART1 is connected to the Bluetooth module on the SOM. it can be used only when BT is disabled (not exported on SPEAR-CustomBoard).
Only UART0, UART1 and UART3 have RTS and CTS lines.
Inspect the carrier board datasheet or schematics for the exact pinout.

UART naming under Linux

The Linux devices corresponding to UART0 - UART4 are /dev/ttyLP0 - /dev/ttyLP4 respectively.

Testing UART2 on VAR-SOM-MX8

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 invocation of echo command the "hello" string should appear on the terminal.

Testing UART4 on VAR-SOM-MX8

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

Testing UART2 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 UART2

To disable UART2 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.