UART issue on Thor with JP7.2

Hi @KevinFFF,

I’ve moved this discussion over from Thread Jp7.2 thor ttyAMA10 error . Let me summarize the issues I’m currently experiencing.

I use uart5: serial@810c510000(ttyAMA5) and uart9: serial@810c530000(ttyAMA9) on JP7.2 with Thor. and I using the custom board.

In JetPack 7.1, I only needed to change the status property of UART5 and UART9 to "okay" in tegra264.dtsi, and both UARTs worked correctly.

However, in JetPack 7.2, applying the same modification only enables UART5 to function properly, while UART9 still does not work.

Then I applied the patch you provided to UART9, but it still does not function correctly.

Below are my dtsi setting:

tegra264.dtsi

uart5: serial@810c510000 {
			compatible = "arm,pl011", "arm,primecell";
			reg = <0x81 0x0c510000 0x0 0x10000>;
			interrupts = <GIC_SPI 171 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&bpmp TEGRA264_CLK_UART5>,
				 <&bpmp TEGRA264_CLK_PLLP_OUT0>;
			clock-names = "uartclk", "apb_pclk";
			assigned-clocks = <&bpmp TEGRA264_CLK_UART5>;
			assigned-clock-parents = <&bpmp TEGRA264_CLK_PLLP_OUT0>;
			dmas = <&gpcdma 11 11 TEGRA264_GPCDMA_SID_UART5>,
			       <&gpcdma 11 21 TEGRA264_GPCDMA_SID_UART5>;
			dma-names = "rx", "tx";
			iommus = <&smmu1_mmu TEGRA264_GPCDMA_SID_UART5>;
			dma-coherent;
			arm,primecell-periphid = <0x00051011>;
			resets = <&bpmp TEGRA264_RESET_UART5>;
			reset-names = "serial";
			status = "disabled";
		};

uart9: serial@810c530000 {
			compatible = "arm,pl011", "arm,primecell";
			reg = <0x81 0x0c530000 0x0 0x10000>;
			interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&bpmp TEGRA264_CLK_UART9>,
				 <&bpmp TEGRA264_CLK_PLLP_OUT0>;
			clock-names = "uartclk", "apb_pclk";
			assigned-clocks = <&bpmp TEGRA264_CLK_UART9>;
			assigned-clock-parents = <&bpmp TEGRA264_CLK_PLLP_OUT0>;
			dmas = <&gpcdma 10 10 TEGRA264_GPCDMA_SID_UART9>,
			       <&gpcdma 10 20 TEGRA264_GPCDMA_SID_UART9>;
			dma-names = "rx", "tx";
			iommus = <&smmu1_mmu TEGRA264_GPCDMA_SID_UART9>;
			dma-coherent;
			arm,primecell-periphid = <0x00051011>;
			resets = <&bpmp TEGRA264_RESET_UART9>;
			reset-names = "serial";
			status = "disabled";
		};

JP7.1:
dmesg_jp71.txt (130.0 KB)
tegra264.dtsi_jp71.txt (283.2 KB)

JP7.2:
dmesg_jp72.txt (130.0 KB)
tegra264.dtsi_jp72.txt (279.7 KB)

And I found a discussion where someone face the same issue with the UART 9 loopback test.
[Link]

Thanks!!

Hi SamM11,

Thanks for creating the new topic to track this issue.
Could you run the following command on your board with JP7.2 and share extracted_proc.dts file for further check?

$ sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree

Hi @KevinFFF ,

Thanks for reply,

Here are the
extracted_proc.dts.txt (332.6 KB)

Thanks!!

Your device tree configuration looks good to me.

Have you configured the pinmux as following before use?

Hi @KevinFFF ,

below are my pinmux setting:
tegra264-mb1-bct-pinmux-p3834-xxxx-p4071-0008.dtsi.txt (89.4 KB)

but still can’t use UART 9 to test.

Thanks!!

Do you update the pinmux DTSI manually instead of using pinmux spreadsheet?

I found the wrong configuration about the nvidia,function for uart9_rx_pm3.

			uart9_rx_pm3 {
				nvidia,pins = "uart9_rx_pm3";
-				nvidia,function = "uart9_rx_pm3";
+				nvidia,function = "uartj_rxd";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_ENABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;
				nvidia,drv-type = <TEGRA_PIN_1X_DRIVER>;
				nvidia,e-io-od = <TEGRA_PIN_DISABLE>;
				nvidia,e-lpbk = <TEGRA_PIN_DISABLE>;
			};

Hi @KevinFFF ,

Sorry about that, I’m update the pinmux DTSI manually instead of using pinmux spreadsheet.

So, this time I currently use pinmux spreadsheet to replace tegra264-mb1-bct-gpio-p3834-xxxx-p4071-0008.dtsi and tegra264-mb1-bct-pinmux-p3834-xxxx-p4071-0008.dtsi under bootloader.

After flash the image, the UART9 still can’t worked correctly.

tegra264-mb1-bct-gpio-p3834-xxxx-p4071-0008.dtsi.txt (3.4 KB)
tegra264-mb1-bct-pinmux-p3834-xxxx-p4071-0008.dtsi.txt (92.2 KB)

Thanks!!

Could you short UART TX/RX to verify the loopback test with the following commands?

$ sudo su
# stty -F /dev/ttyAMA9 115200 raw -echo
# cat /dev/ttyAMA9 &
# echo "test1" > /dev/ttyAMA9

Hi @KevinFFF ,

Thanks for reply,

$ sudo su
# stty -F /dev/ttyAMA9 115200 raw -echo
# cat /dev/ttyAMA9 &
-->[1] 5730

# echo "test1" > /dev/ttyAMA9
--> doesn't show up test 1

dmesg.txt (130.0 KB)

Thanks!!

Could you measure the signal from scope to check if the issue is from UART TX or RX?

Hi @KevinFFF ,

Sorry for the late reply,

Based on the oscilloscope measurements, I observed that the TX pin of UART 9 shows no response at all when running the test using the command you provided .

$ sudo su
# stty -F /dev/ttyAMA9 115200 raw -echo
# cat /dev/ttyAMA9 &
# echo "test1" > /dev/ttyAMA9

In contrast, the TX pin of UART 5 exhibits clear signal activity on the scope upon executing the same command.

Thanks!!

Will the UART9 work with PIO mode? (i.e. removing dma related properties in device tree)

Could you also verify with the latest JP 7.2.1(r39.2.1)?

Hi @KevinFFF ,

Thanks for your reply.

Will the UART9 work with PIO mode? (i.e. removing DMA-related properties in the device tree)

→ I followed the steps described in [Link] and [Link] to remove the DMA-related properties from the device tree.

tegra264.dtsi

uart9: serial@810c530000 {
			compatible = "arm,pl011", "arm,primecell";
			reg = <0x81 0x0c530000 0x0 0x10000>;
			interrupts = <GIC_SPI 172 IRQ_TYPE_LEVEL_HIGH>;
			clocks = <&bpmp TEGRA264_CLK_UART9>,
				 <&bpmp TEGRA264_CLK_PLLP_OUT0>;
			clock-names = "uartclk", "apb_pclk";
			assigned-clocks = <&bpmp TEGRA264_CLK_UART9>;
			assigned-clock-parents = <&bpmp TEGRA264_CLK_PLLP_OUT0>;
			arm,primecell-periphid = <0x00051011>;
			resets = <&bpmp TEGRA264_RESET_UART9>;
			reset-names = "serial";
			status = "disabled";
		};

However, after flashing the image, I still found the following DMA messages in dmesg when testing UART9 with putty, as I did previously:

[  168.848664] uart-pl011 810c530000.serial: DMA channel TX dma0chan19
[  168.848691] uart-pl011 810c530000.serial: DMA channel RX dma0chan9

Could you also verify this behavior with the latest JP 7.2.1 (R39.2.1)?

→ I used the same approach to modify the device tree and pinmux configuration, but observed the same result.

Thanks!!

It is not the expected result to me.

Could you run the following command on your board and share extracted_proc.dts for further check?

$ sudo dtc -I fs -O dts -o extracted_proc.dts /proc/device-tree

Hi @KevinFFF ,

Thanks for reply,

Sorry about that. I had configured the FDT entry in extlinux to point to the wrong DTB. I re-flashed the image with the correct DTB to make sure the correct device tree was being used.

extracted_proc.dts.txt (332.7 KB)

$ sudo dmesg | grep 810c5
[    5.145629] uart-pl011 810c510000.serial: Adding to iommu group 0
[    5.147915] 810c510000.serial: ttyAMA5 at MMIO 0x810c510000 (irq = 72, base_baud = 0) is a PL011 rev0
[    5.152078] 810c530000.serial: ttyAMA9 at MMIO 0x810c530000 (irq = 73, base_baud = 0) is a PL011 rev0
[    5.160049] uart-pl011 810c540000.serial: Adding to iommu group 1
[    5.167350] 810c540000.serial: ttyAMA10 at MMIO 0x810c540000 (irq = 74, base_baud = 0) is a PL011 rev0
[   12.018013] spi-tegra114 810c590000.spi: Adding to iommu group 72

Thanks!!

Okay, is UART9 working as expected with PIO mode?

Hi @KevinFFF ,

Thanks for reply,

No, UART9 is not work as expect with PIO mode.

running the test using the command you provided .

$ sudo su
# stty -F /dev/ttyAMA9 115200 raw -echo
# cat /dev/ttyAMA9 &
# echo "test1" > /dev/ttyAMA9
--> doesn't show up test 1

and dmesg doesn’t show up anything about UART9 when I run the command.

Thanks!!

Could you get the scope to check the signal again at this moment?

Have you confirmed that you measured the correct pins?

Do you have custom design for UART9 on your board different from the devkit?

Hi @KevinFFF ,

Thanks for reply,

I’m measure the TXD1 when I running the command you provide before, but nothing happen.

Below are UART 5 (still use DMA):

Thanks!!

TXD1 is the signal after RS-232 transceiver(U29).
Could you also measure the signal at UART1_TXD?

Please short UART1_TXD and UART1_RXD to verify UART loopback test first.