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

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

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.

Problem may be solved by this way:

in file: /sources/kernel/kernel-4.4/drivers/tty/serial/serial-tegra.c

need change : #define TEGRA_UART_MAXIMUM 5
to: #define TEGRA_UART_MAXIMUM 7

After that ttyTHS6 added and work fine!

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

Yes, after change define in sources and change tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2.dtb in this place: (after decompiling)

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

and load flash:
sudo ./flash.sh jetson-tx2 mmcblk0p1

UART7 work fine! Can check transmit:

echo “123456” > /dev/ttyTHS6

and recive:

cat -v < /dev/ttyTHS6

then type in terminal (I’m use Putty) any characters.

I’m use Tegra186_Linux_R28.2.1_aarch64

Hi ksv198:

 I still get some strange info when doing loop testing
OPTIONS: I18n                                                                
Compiled on Feb  7 2016, 13:35:57.                                           
Port /dev/ttyTHS6, 03:04:48                                                  
                                                                             
Press CTRL-A Z for help on special keys                                      
                                                                             
f                                                                            
error: line too long                                                         
command not found                                                            
]                                                                            
command not found                                                            
] ]                                     
error: line too long                    
command not found                       
] ]                                     
error: line too long                    
command not found                       
] ] 
error: line too long

Here is what I had done

1 First, I use

JetPack-L4T-3.3-linux-x64_b39.run

to flash a new image to the TX2 with official board;

2 Then, convert the DTB to DTS using dtc tool in Linux_for_Tegra with the dtb file

tegra186-quill-p3310-1000-c03-00-base.dtb

, modify the

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

Then rebuild the dtb file and flash to the TX2;

3 Third, to ensure the

kernel/kernel-4.4/drivers/tty/serial/serial-tegra.c

need change : #define TEGRA_UART_MAXIMUM 5
to: #define TEGRA_UART_MAXIMUM 7

I rebuild the kernel.

4 Last I find the ttyTHS6 in /dev/, I short circuit the UART4_RX and UART4_TX in the office board, and done test, but get wrong messages.

What other things I should do?

I recommend testing under gtkterm. An example command line for 115200 8N1 to ttyTHS6 on a TX2:

# Use "sudo" if your user isn't a member of group "dialout".
gtkterm -b 8 -t 1 -s 115200 -p /dev/ttyTHS6

Minicom was designed to initialize modems using the AT command set. Gtkterm is simpler if you aren’t using a modem.

The result is same as the minicom!!!

Hello!
I think you need disconnect uart7 from internal debugger.
See thread: Internal TX2 traffic on UART7 ? - Jetson TX2 - NVIDIA Developer Forums

You need decompile tegra186-a02-bpmp-quill-p3310-1000-c04-00-te770d-ucm2.dtb and change this:

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

then compile, run apply_binaries.sh and flash:

sudo ./flash.sh jetson-tx2 mmcblk0p1

Good luck!

1 Like

Yes, I make it, thanks!

I make it, thanks!

Hello JerryChang,
I used your setting of UART7 on my custom board. It didn’t work. There some error message will shown on console when booted. The kernel message as below:

[ 1.181133] OF: /serial@c290000: could not get #clock-cells for /cpus/l2-cache0
[ 1.188613] ERROR: could not get clock /serial@c290000:serial(0)
[ 1.194704] serial-tegra c290000.serial: Couldn’t get the clock

By the way, I used L4T 32.3.1.