Hi Team, We are using Orin AGX ( 5.10.104-tegra / L4TR35.2.1). In our customized carrier board we re using UART2 as nomal serial port.
Default this UART port is mapped with debug console.
How we can disable debug port and use as just serial port.
Hi 1113088687,
Please update to latest JP5.1.1(R35.3.1).
You could refer to the following thread for UART usage on AGX Orin.
Unable to correspond to "func" and "uart_tx" - #3 by KevinFFF
UART3 seems be used as the debug console.
You could use UART2 as normal serial port for your custom usage through /dev/ttyTHS4
.
Hi,
I updated the OS to 35.3.1 But still no ttyTHS4 found in /dev. ttyTHS0, ttyTHS1 and ttyTHS3 can be found
Do you enable the following node in device tree for UART2?
serial@3140000 {
You could provide the full serial console log and flash log for further check.
AGX-ORIN_MY_BASEBOARD_LOG.txt (455.3 KB)
Attachment is the complete startup log of my AGX-ORIN base board .
By the way, Please tell me which device tree file including the uart2 "serial@3140000{… "
I have searched all the tree file but no found.
AGX-ORIN_MY_BASEBOARD_LOG.txt (455.3 KB)
Attachment is the complete startup log of my AGX ORIN base board.
By the way, I searched all the device tree file ,but no uart2 “serial@3140000 {” content found. Which file includes the option setting ?
Please provide the flash log instead of serial console log to check which dtb in use.
[ 0.003712] DTS File Name: /dvs/git/dirty/git-master_linux/kernel/kernel-5.10/arch/arm64/boot/dts/../../../../../../hardware/nvidia/platform/t23x/concord/kernel-dts/tegra234-p3701-0004-p3737-0000.dts
[ 0.003723] DTB Build time: Mar 19 2023 08:08:40
It seems you are using tegra234-p3701-0004-p3737-0000.dtb as dtb file, please also provide this dtb file(kernel/dtb/tegra234-p3701-0004-p3737-0000.dtb).
my_r3531_flash_log.txt (473.1 KB)
tegra234-p3701-0004-p3737-0000.dtb (411.0 KB)
[ 2.6219 ] Kernel DTB used: kernel_tegra234-p3701-0004-p3737-0000.dtb
Yes, you are using this dtb file.
You could use the following command to dissemble it.
dtc -I dtb -O dts -o tegra234-p3701-0004-p3737-0000.dts tegra234-p3701-0004-p3737-0000.dtb
and you could find the following, please enable it through modify status to okay
serial@3140000 {
compatible = "nvidia,tegra194-hsuart";
iommus = <0x3 0x4>;
dma-coherent;
reg = <0x0 0x3140000 0x0 0x10000>;
reg-shift = <0x2>;
interrupts = <0x0 0x74 0x4>;
nvidia,memory-clients = <0xe>;
dmas = <0x5 0x14 0x5 0x14>;
dma-names = "rx", "tx";
clocks = <0x2 0x9f 0x2 0x66>;
clock-names = "serial", "parent";
resets = <0x2 0x68>;
reset-names = "serial";
- status = "disabled";
+ status = "okay";
phandle = <0x366>;
};
and then using the following command to assemble it back to dtb
dtc -I dts -O dtb -o tegra234-p3701-0004-p3737-0000.dtb tegra234-p3701-0004-p3737-0000.dts
Hi,
We have made corresponding modifications to the DTB file, but we have not found any changes in the number of serial devices. TtyTHS4 has not been found yet. The attachment is our modified DTB file and corresponding DTS file
tegra234-p3701-0004-p3737-0000.dtb (411.0 KB)
tegra234-p3701-0004-p3737-0000.dts (528.3 KB)
Do you flash the whole baord after modification?
Could you also share the serial console log ?
Could you share the result of the following command on your board?
$sudo su
#cat /proc/device-tree/serial\@3140000/status
Hi,
The ttyTHS4 can be found when I re-flash the whole board after modfication.
But it does not work normally, as same as ttyTHS0. The physical UART2 still occupied by the system. When I send data to that physical serial port, I always return the sent data.
After executing two commands, there is no return content.
Use : sudo cat /proc/device-tree/serial@3140000/status
return: okayagx@agx:$
Attachment is the serial console log
modfy_dtb_log.txt (90.6 KB)
[ 8.867552] serial-tegra 3100000.serial: Adding to iommu group 2
[ 8.874908] 3100000.serial: ttyTHS0 at MMIO 0x3100000 (irq = 26, base_baud = 0) is a TEGRA_UART
[ 8.885025] serial-tegra 3110000.serial: Adding to iommu group 2
[ 8.892298] 3110000.serial: ttyTHS1 at MMIO 0x3110000 (irq = 78, base_baud = 0) is a TEGRA_UART
[ 8.902257] serial-tegra 3130000.serial: Adding to iommu group 2
[ 8.909507] 3130000.serial: ttyTHS3 at MMIO 0x3130000 (irq = 79, base_baud = 0) is a TEGRA_UART
[ 8.919480] serial-tegra 3140000.serial: Adding to iommu group 2
[ 8.926670] 3140000.serial: ttyTHS4 at MMIO 0x3140000 (irq = 80, base_baud = 0) is a TEGRA_UART
It seems /dev/ttyTHS4
has been enabled correctly.
What do you mean here?
Have you tried with UART loopback test?
UART2, also known as TTYTHS4, is still not available. Still occupied by a thread in the system. Because tests have shown that when sending data to UART2,it always returns the sent data.
Which thread is using this UART interface (/dev/ttyTHS4
)?
What do you mean here? Are you doing the loopback test?
Could you try to disable nvgetty with the following command and test again?
sudo systemctl stop nvgetty.service
sudo systemctl disable nvgetty.service
I have the loopback test, but the uart2 port still no response.
I connected uart2 port to other PC’s uart, When the PC send data to the uart2 of test board, the uart2 of the test board always response and send the same data to the PC.
sudo systemctl stop nvgetty.service
sudo systemctl disable nvgetty.service
After the execution of the above two instructions, there is no change in the test results
Do you mean UART2 can send/receive data but the content sent from the board is the same as the data send from your host PC?
Do you know who is using /dev/ttyTHS4
?
Yes, UART2 can send/receive data but the content sent from the board is the same as the data send from my host
PC.
I don’t know which system program or process is occupying UART2, causing it to be unusable