How to enable UART7 (D8, D5) as normal UART like other UART (uartc@C280000)

Hi JerryChang,

The kernel related failure messages are as below

serial-tegra c290000.serial: Failed to add uart port, err -22
serial-tegra: probe of c290000.serial failed with error -22

The whole log is attachement

Thanks

1113.log (90.1 KB)

hello JasonFan,

according to your kernel message, here are all tty devices being detected.
seems you did not add UART(serial@c290000) correctly.

[    3.027817] 3110000.serial: ttyTHS1 at MMIO 0x3110000 (irq = 37, base_baud = 0) is a TEGRA_UART
[    3.029079] c280000.serial: ttyTHS2 at MMIO 0xc280000 (irq = 38, base_baud = 0) is a TEGRA_UART
[    3.030399] 3130000.serial: ttyTHS3 at MMIO 0x3130000 (irq = 39, base_baud = 0) is a TEGRA_UART

Hi JerryChang,

Yes. I know ttyTHS1~THS3 can work so I add UART7(serial@c290000) like them. (you can see my previous post)
The problem is UART7 can’t be added or fail to prob after I add it in device tree.

According to “TX2_Parker_TRM_DP07821001p.pdf” it describes UART7 as following.

UART7/UARTG: Primary debug of all subsystems
As such, a new debug UART, interface name UART7 with only the TXD/RXD pins is added in Paker under the control of the dedicated new UART controller (separate from all functional UARTs)

It looks like UART7 is used for another purpose of TX2 original design?
So my question is how to modify/enable UART7 to a normal uart like other uarts (for example: uartc@C280000)
Or UART7 can’t be used for normal UART function?

I found another topic that also dusscuss UART7
[url]UART7 unusable because of strange debugging console - Jetson TX2 - NVIDIA Developer Forums

Thanks

any update? Thanks.

hello JasonFan,

we’re investigating this internally,
will get back to you, thanks

hello JasonFan,

please convert below BPMP DTB file with the dtc tool, and please changing the port number to 255 and converted it back to DTB. thanks
tegra186-a02-bpmp-quill-p3310-1000-c01-00-te770d-ucm2.dtb

Hi JerryChang,

Do you mean modify as the following?

serial{
       port = <0xff>;
       has_input;
};

I did it as above and re-flash by “sudo ./flash.sh jetson-tx2 mmcblk0p1” but still got the same error messages

serial-tegra c290000.serial: Failed to add uart port, err -22
serial-tegra: probe of c290000.serial failed with error -22

Thanks

hello JasonFan,

UART7 device is added successfully just by changing the DT status even without disabling in BPMP DTB.
please make sure your serial@c290000 serial port status has changed from ‘disabled’ to ‘okay’.
thanks

serial@c290000 {
...
    status = "okay";

Hi JerryChang,

I try to change status = “disable” to “okay” in tegra186-soc-uart.dtsi.

And also try to add the following codes in tegra186-quill-p3310-c03-00-base.dts

serial@c290000{
   compatible = "nvidia, tegra186-hsuart"
   status = "okay"
}

Both ways are failed to add uart port.

I also try to add the other serial (serial@3140000) in tegra186-quill-p3310-c03-00-base.dts and ttyTHS4 is added successfully.
Please check the log.

serial@3140000{
   compatible = "nvidia, tegra186-hsuart"
   status = "okay"
}

serial@3150000 has the same issue to serial@c290000(uart7/uartg) so I think serial@3150000 and serial@c290000(uart7/uartg) should be occupied by other functions.

PS: I can’t find any information in doc for uartf (serial@3150000) but it doesn’t matter.

Thanks
uart_1211.log (90.5 KB)

hello JasonFan,

had you compile the device tree correctly?
i’m able to saw the UART7 device is added successfully just by changing the DT status,
share the diff for your reference.

--- a/kernel-dts/t18x-common-platforms/tegra186-quill-common.dtsi
+++ b/kernel-dts/t18x-common-platforms/tegra186-quill-common.dtsi
@@ -56,6 +56,11 @@
                status = "okay";
        };
 
+       serial@c290000 {
+               compatible = "nvidia,tegra186-hsuart";
+               status = "okay";
+       };

before,

serial@c290000 {
		compatible = "nvidia,tegra186-hsuart";
		#stream-id-cells = <0x1>;
		reg = <0x0 0xc290000 0x0 0x40>;
		reg-shift = <0x2>;
		interrupts = <0x0 0x76 0x4>;
		nvidia,memory-clients = <0xe>;
		dmas = <0x19 0x2 0x19 0x2>;
		dma-names = "rx", "tx";
		clocks = <0xd 0xd8 0xd 0x10d>;
		clock-names = "serial", "parent";
		resets = <0xd 0x70>;
		reset-names = "serial";
		status = "disabled";
		nvidia,adjust-baud-rates = <0x1c200 0x1c200 0x64>;
		linux,phandle = <0x89>;
		phandle = <0x89>;
	};

after,

serial@c290000 {
		compatible = "nvidia,tegra186-hsuart";
		#stream-id-cells = <0x1>;
		reg = <0x0 0xc290000 0x0 0x40>;
		reg-shift = <0x2>;
		interrupts = <0x0 0x76 0x4>;
		nvidia,memory-clients = <0xe>;
		dmas = <0x19 0x2 0x19 0x2>;
		dma-names = "rx", "tx";
		clocks = <0xd 0xd8 0xd 0x10d>;
		clock-names = "serial", "parent";
		resets = <0xd 0x70>;
		reset-names = "serial";
		status = "okay";
		nvidia,adjust-baud-rates = <0x1c200 0x1c200 0x64>;
		linux,phandle = <0x89>;
		phandle = <0x89>;
	};

Hi JerryChang,

I can make sure I compile the dtb and update correctly because I can add serial@3140000 successfully.

I found we have different source base.
In my “kernel-dts/t18x-common-platforms/tegra186-quill-common.dtsi”, I don’t have serial@c290000{…

Previously, I only add the following codes in tegra186-quill-common.dtsi but got failure

serial@c290000{
   compatible = "nvidia, tegra186-hsuart"
   status = "okay"
}

Now I add all codes you show in previous post in tegra186-quill-common.dtsi but still got “serial-tegra c290000.serial: Failed to add uart port, err -22”

serial@c290000 {
		compatible = "nvidia,tegra186-hsuart";
		#stream-id-cells = <0x1>;
		reg = <0x0 0xc290000 0x0 0x40>;
		reg-shift = <0x2>;
		interrupts = <0x0 0x76 0x4>;
		nvidia,memory-clients = <0xe>;
		dmas = <0x19 0x2 0x19 0x2>;
		dma-names = "rx", "tx";
		clocks = <0xd 0xd8 0xd 0x10d>;
		clock-names = "serial", "parent";
		resets = <0xd 0x70>;
		reset-names = "serial";
		status = "okay";
		nvidia,adjust-baud-rates = <0x1c200 0x1c200 0x64>;
		linux,phandle = <0x89>;
		phandle = <0x89>;
	};

Is anything I miss or does nVidia has new release for TX2?

Thank you

hello JasonFan,

we’re able to reproduce the serial-tegra c290000.serial: Failed to add uart port, err -22 from our side.
will look into this and get back to you.
thanks

hello JasonFan,

confirmed we had fix “serial-tegra c290000.serial: Failed to add uart port, err -22” issue.
the fix will be include in the next JetPack release.
thanks

hello JasonFan,

confirmed we had included the uart failure fix in JetPack-3.2 DP
[url]https://developer.nvidia.com/embedded/downloads#?search=jetpack%203.2[/url]

please have a development with this JetPack release.
thanks

Hi JerryChang,

I’ll try it. Thank you

hello JasonFan,

may i have your status update,
is this still an issue with JetPack-3.2 DP ?
thanks

Hi JerryCHang,

I have downloaded R28.2 but will not move r28.1 to r28.2 soon.
You can close this issue first.

Thank you

Hi JerryChang,

Can you post the patch(es) needed to the R28.1 device tree sources to solve this issue:

serial-tegra c290000.serial: Failed to add uart port, err -22

I’d like to use UART7 without upgrading (yet) to 28.2.

Cheers,
Morgan

Hi morganziy3j,

There are relevant changes required to make it work, please move to 28.2 directly.

Thanks

Thanks kayccc, I just upgraded to 28.2, and by modifying the device tree it is possible to get UART7 to show up as /dev/ttyTHS6. However, as noted in another thread, there is some other traffic on that UART which seems to make it difficult/impossible to use for a custom application:

It seems that sometimes that other controller responds with error messages to traffic on that UART, which get interleaved with our traffic, and therefore UART7 is not really usable for bidirectional communications… though I suppose maybe some unidirectional use cases might find a use for it.

Is there some way to tell that “other” (internal) device on UART7 to “stop talking”?

Cheers