TX2 UART - Enabling /dev/ttyTHS2

Hi,

Currently, I don’t see the ttyTHS2 port in the TX2.

A path is suggested in the following post.

https://devtalk.nvidia.com/default/topic/1001264/jetson-tx2/tx2-uarts/post/5125115/#

I ran through the post but couldn’t figure out how to build the patch.

Appreciate if somebody could shed some light.

Thanks.

PS- I have already removed the camera module from the TX2.

This thread will be of interest (there is a patch):
https://devtalk.nvidia.com/default/topic/1001264/jetson-tx2/tx2-uarts/post/5125115/#5125115

This post shows how to hand edit the dtb file:
https://devtalk.nvidia.com/default/topic/1001264/jetson-tx2/tx2-uarts/post/5125725/#5125725

Thanks, linuxdev.
This worked.

One more question.

When I run, ls dev/ttyTHS* now, I get the following results,

/dev/ttyTHS1
/dev/ttyTHS2
/dev/ttyTHS3

Do these correspond to UART1,UART2 and UART3 on the development board, respectively?

Thanks.

Just found out that J17 is connected to UART1 which in turn is connected to /dev/ttyTHS2.

I’ll figure the rest out.

Thanks for the help so far.

Numbering is a bit of research and testing :)

Hi linuxdev,

I have running on kernel 28.1 version and it look like UART3 has been enabled as default. I could see /dev/ttyTHS2 as well.

But I could not read any data from GPS module that was plugged into this UART port. On UART2 (B15, B16) port (/dev/ttyTHS1) I could read GPS data as well.

Do I have to modify any pin configuration for UART3 (H9, H10)?

Thanks and Best Regards,
Vu Nguyen

I’m not sure if I’m using the same label as you since sometimes the TRM and schematics use different numbering. UART3 in the schematic does go through the level shifter (and I think I’m seeing the same one you are looking at since I see BGA pins H9 and H10 associated), so first verify J24 is in the 3.3V position if this is what your I/O level is.

Something which might interfere is that I see UART3 (schematic label) is connected to the audio processing engine. The APE itself is its own Cortex A-9 embedded in the SoC, so let me ask first where you are accessing UART3 at (physically), and is this the developer carrier board?

Hi linuxdev,

Thank for your reply. I found out the solution at this thread
https://devtalk.nvidia.com/default/topic/1021563/jetson-tx2/how-to-use-uart4-which-pinmux-with-wifi-bt-/post/5240878/?offset=17#5241049

How do you removed the camera module? Is it a physical removal of camera from TX2 or you just unloaded the camera drivers?
If later, is it possible to share the instructions for removing camera module?

Before removing the camera make sure it is off and the capacitors discharged (I hold the power button down for a few seconds). Then it is just a case of two phillips head screws and pulling straight up.

I am a newer, I would like to know how to make the patch so that the J17 can work as /dev/ttyTHS2?
Please give more details.Thank you!

Duplicate question…but R28.1 and R28.2 L4T already work with “/dev/ttyTHS2” on J17.

I use this method:

dtc -I dtb -o dts extracted.dts /boot/tegra186-quill-p3310-1000-c03-00-base.dtb

but give an error ----- error:missing files

I don’t konw how to slove it

The command isn’t valid with that combination of options. Note that you shouldn’t attempt to write to the existing “/proc/device-tree/”…this is a reflection of the kernel’s state…there are other methods to change state during boot.

To extract current state as a dts:

dtc -I fs -O dts -o extracted.dts /proc/device-tree

To convert this to a dtb (perhaps after editing):

dtc -I dts -O dtb -o modifed_from_extracted.dtb extracted.dts

To convert a dtb to dts:

dtc -I dtb -O dts -o converted.dts a_binary_device_tree.dtb

“-I” is your starting input format. “-O” is your output format. “-o” is the file name of the output. The final argument is the actual input source.

Input formats include “dts” (source), “dtb” (binary), “fs” (file system).

Thank you very much! I know my problems.

But when it’s come to the last step----FDT /boot/modified_tegra186-quill-p3310-1000-c03-00-base.dtb

it occurs the error— bash:FDT:command not found

How to solve it?

“FDT” is a key which starts a line in the extlinux.conf file. This is no longer used in current releases (perhaps it will be used in the future…it was very convenient when it was). So it was never a command to enter at a prompt…it was always a file edit of “/boot/extlinux/extlinux.conf” and cannot be used at all now (it won’t do what is expected).

Before I mention the actual device tree flash command keep in mind that using ttyTHS2 on J17 should not involve touching the device tree…this is already correct on R28.2. A patch related to this was only on a prior release. If you are on R28.2 and changing device tree for use with J17 you are breaking something instead of fixing it.

If you were to flash just the device tree it would be something like this with the command being from the driver package installed on the PC host while the Jetson is plugged in via micro-B USB and in recovery mode:

sudo ./flash.sh -r -k DTB -d /where/ever/it/is/tegra186-quill-p3310-1000-c03-00-base.dtb jetson-tx2 mmcblk0p1

Note that the “-k DTB” is because the name of the GPT partition label used for device tree is “DTB”. This can be seen via “sudo gdisk -l /dev/mmcblk0”.

I had solved this problem.Thank you very much!May you have a good day!