Increase number of UART connections

Hello,

I have a Jetson Agx Orin 64 gb Developer Kit.
From 40 pin header, I see that I can connect 1 UART device through pins 8 and 10.
How can I connect two more devices which use UART communication?
I found some advices to change device tree. Is this the only way to increase number of UART connections?

Hi,
On Jetson platforms, we support using peripherals like CAN, SPI, I2C, UART… etc. for the user.
For CAN usage:
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/HR/ControllerAreaNetworkCan.html
For the connection of peripheral on the devkit, please refer to expansion-headers guide and carrier board specification:
https://docs.nvidia.com/jetson/archives/r36.3/DeveloperGuide/HR/ConfiguringTheJetsonExpansionHeaders.html

For pin configuration, please refer to pinmux spreadsheet:
https://developer.nvidia.com/embedded/secure/jetson/agx_orin/jetson_agx_orin_pinmux_config_template.xlsm

By default, the configuration is used for the devkit. If you are using the custom carrier board, please configure it according to your custom board design.

There are also several examples which have been verified from us, please check
https://elinux.org/Jetson/L4T/peripheral/
Please share the full dmesg and device tree for us to check your status in detail.

Thanks!

Hi,

Thanks for sharing the links.

I don’t have problem with CAN communication, it works well.

I need to connect 3 devices which use UART communication to Jetson Agx Orin 64 gb developer kit. I have connected one device with pins 8 and 10 on 40 pin header.
Since Jetson can have 4 uart communication, what should I do in order to activate remaining 3 uart communication?

Please check and confirm if below should be added to dtb file in order to have 2 more UART communication.

// adding UART3
serial@c280000 {
compatible = “nvidia,tegra194-hsuart”;
reg = <0x00 0xc280000 0x00 0x10000>;
interrupts = <0x00 0x72 0x04>;
clocks = <0x03 0x9b>;
resets = <0x03 0x66>;
status = “okay”;
reset-names = “serial”;
clock-names = “serial”;
phandle = <0x207>;
};

// adding UART4
serial@3130000 {
compatible = “nvidia,tegra194-hsuart”;
reg = <0x00 0x3130000 0x00 0x10000>;
interrupts = <0x00 0x73 0x04>;
clocks = <0x03 0x9b>;
resets = <0x03 0x67>;
status = “okay”;
reset-names = “serial”;
clock-names = “serial”;
phandle = <0x208>;
};

Here are results which might be useful to you

ls -l /dev/ttyTHS* result:
crw-rw---- 1 root dialout 240, 0 Dec 18 08:52 /dev/ttyTHS0
crw-rw---- 1 root dialout 240, 1 Dec 18 08:52 /dev/ttyTHS1

sudo dmesg | grep tty result:

[ 0.000000] Kernel command line: root=PARTUUID=22e3b2c3-6234-4a91-9f08-e88200b8e024 rw rootwait rootfstype=ext4 mminit_loglevel=4 console=ttyTCU0,115200 console=ttyAMA0,115200 firmware_class.path=/etc/firmware fbcon=map:0 net.ifnames=0 nospectre_bhb video=efifb:off console=tty0 nv-auto-config bl_prof_dataptr=2031616@0x102C610000 bl_prof_ro_ptr=65536@0x102C600000
[ 0.000637] printk: console [tty0] enabled
[ 0.144025] 31d0000.serial: ttyAMA0 at MMIO 0x31d0000 (irq = 118, base_baud = 0) is a SBSA
[ 0.144064] printk: console [ttyAMA0] enabled
[ 0.279136] printk: console [ttyTCU0] enabled
[ 3.913207] printk: console [tty0]: printing thread started
[ 3.913631] printk: console [ttyTCU0]: printing thread started
[ 3.914469] printk: console [ttyAMA0]: printing thread started
[ 4.051887] 3140000.serial: ttyS2 at MMIO 0x3140000 (irq = 207, base_baud = 4250000) is a Tegra
[ 4.052434] 3100000.serial: ttyTHS0 at MMIO 0x3100000 (irq = 112, base_baud = 0) is a TEGRA_UART
[ 4.052800] 3110000.serial: ttyTHS1 at MMIO 0x3110000 (irq = 206, base_baud = 0) is a TEGRA_UART
[ 8.910164] systemd[1]: Created slice Slice /system/serial-getty.

When I entered dtb file on location /boot/dtb I found this:
serial@3140000 {
compatible = “nvidia,tegra234-uart\0nvidia,tegra20-uart”;
reg = <0x00 0x3140000 0x00 0x10000>;
interrupts = <0x00 0x74 0x04>;
clocks = <0x03 0x9f>;
clock-names = “serial”;
resets = <0x03 0x68>;
reset-names = “serial”;
status = “disabled”;
};

Why is status set as disable? is there a mistake under compatible for 3140000, since for 3100000 and 3110000 compatible is same “nvidia,tegra194-hsuart”.

Hi marinkovicivan,

What’s the Jetpack version in use?

If you are using JP5.x, you can refer to Jetson/L4T/peripheral/ - eLinux.org for the UART mapping.

May I know which UART interface(i.e. address?) you want to enable?
You have to enable them from device tree.

You can also refer to How to enable UART? - #7 by KevinFFF if you are using JP6.x.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.