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

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
https://developer.nvidia.com/embedded/downloads#?search=jetpack%203.2

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:
https://devtalk.nvidia.com/default/topic/1025993/uart7-unusable-because-of-strange-debugging-console/

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

hello morganziy3j,

since you’re able to get UART7 works with R28.2 DP.
could you please file another new topic with appropriate subjects and let us track specific issue there.
thanks

Thanks, I apologize for changing the topic of this thread; I agree that we can mark this thread’s issue as resolved, since UART7 is working now in R28.2 DP. I will create another thread with my follow-up question. Cheers

Does the UART7 can use as a common serial port now ?

Hello!
I’m use my custom carrier board for Jetson TX2 and I have enable UART7 (D5, D8 pins).
In DTS I apply this changes:
serial@c290000 {

status = “okay”;
};
but UART7 don’t work, in dmesg I see:
serial-tegra c290000.serial: Failed to add uart port, err -22

I’m use R28.2.1 DP. That do need for UART7 steel working?
Thanks in advance.