# TX2 UART - Enabling /dev/ttyTHS2

**URL:** <https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173>\
**Category:** Jetson TX2\
**Created:** [May 22, 2017, 12:54pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173 "2017-05-22T12:54:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![NipunaVega](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nipunavega/32/11122_2.png) [@NipunaVega](https://forums.developer.nvidia.com/u/NipunaVega)\
**Post date:** [May 22, 2017, 12:54pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/1 "2017-05-22T12:54:29Z")

</div>

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/#](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.

---

<div class="post-metadata">

**Author:** ![NipunaVega](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nipunavega/32/11122_2.png) [@NipunaVega](https://forums.developer.nvidia.com/u/NipunaVega)\
**Post date:** [May 22, 2017, 12:54pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/2 "2017-05-22T12:54:59Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [May 22, 2017, 5:10pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/3 "2017-05-22T17:10:14Z")

</div>

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

This post shows how to hand edit the dtb file:  
[url][https://devtalk.nvidia.com/default/topic/1001264/jetson-tx2/tx2-uarts/post/5125725/#5125725[/url]](https://devtalk.nvidia.com/default/topic/1001264/jetson-tx2/tx2-uarts/post/5125725/#5125725%5B/url%5D)

---

<div class="post-metadata">

**Author:** ![NipunaVega](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nipunavega/32/11122_2.png) [@NipunaVega](https://forums.developer.nvidia.com/u/NipunaVega)\
**Post date:** [May 24, 2017, 4:44am UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/4 "2017-05-24T04:44:15Z")

</div>

Thanks, linuxdev.  
This worked.

---

<div class="post-metadata">

**Author:** ![NipunaVega](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nipunavega/32/11122_2.png) [@NipunaVega](https://forums.developer.nvidia.com/u/NipunaVega)\
**Post date:** [May 24, 2017, 6:30am UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/5 "2017-05-24T06:30:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![NipunaVega](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nipunavega/32/11122_2.png) [@NipunaVega](https://forums.developer.nvidia.com/u/NipunaVega)\
**Post date:** [May 24, 2017, 10:04am UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/6 "2017-05-24T10:04:34Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [May 24, 2017, 5:40pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/7 "2017-05-24T17:40:13Z")

</div>

Numbering is a bit of research and testing :)

---

<div class="post-metadata">

**Author:** ![forever3000](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/forever3000/32/11004_2.png) [@forever3000](https://forums.developer.nvidia.com/u/forever3000)\
**Post date:** [February 22, 2018, 2:25am UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/8 "2018-02-22T02:25:37Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [February 22, 2018, 6:22pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/9 "2018-02-22T18:22:36Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![forever3000](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/forever3000/32/11004_2.png) [@forever3000](https://forums.developer.nvidia.com/u/forever3000)\
**Post date:** [February 23, 2018, 2:30am UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/10 "2018-02-23T02:30:49Z")

</div>

Hi linuxdev,

Thank for your reply. I found out the solution at this thread

> **[How to use UART4 which pinmux with WIFI/BT?](https://forums.developer.nvidia.com/default/topic/1021563/jetson-tx2/how-to-use-uart4-which-pinmux-with-wifi-bt-/post/5240878/?offset=17)**
>
> Hi,everyone! I encounter a problem when I develop my own carrier board: I want to use UART4 port which pinmux with WIFI/BT. The default setting is connect to WIFI/BT, but how to mux these pin to normal uart?

---

<div class="post-metadata">

**Author:** ![ramkrishna.jangale](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ramkrishna.jangale](https://forums.developer.nvidia.com/u/ramkrishna.jangale)\
**Post date:** [March 2, 2018, 6:16pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/11 "2018-03-02T18:16:39Z")

</div>

> [@](#):
>
> PS- I have already removed the camera module from the TX2.

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?

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [March 2, 2018, 9:49pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/12 "2018-03-02T21:49:49Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![wangyazhao001](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@wangyazhao001](https://forums.developer.nvidia.com/u/wangyazhao001)\
**Post date:** [April 19, 2018, 4:39pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/13 "2018-04-19T16:39:30Z")

</div>

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!

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [April 19, 2018, 10:18pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/14 "2018-04-19T22:18:58Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![wangyazhao001](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@wangyazhao001](https://forums.developer.nvidia.com/u/wangyazhao001)\
**Post date:** [April 20, 2018, 4:47am UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/15 "2018-04-20T04:47:03Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [April 20, 2018, 5:40pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/16 "2018-04-20T17:40:44Z")

</div>

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:

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

```

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

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

```

To convert a dtb to dts:

```auto
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).

---

<div class="post-metadata">

**Author:** ![wangyazhao001](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@wangyazhao001](https://forums.developer.nvidia.com/u/wangyazhao001)\
**Post date:** [April 21, 2018, 9:49am UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/17 "2018-04-21T09:49:52Z")

</div>

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?

---

<div class="post-metadata">

**Author:** ![linuxdev](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/linuxdev/32/10243_2.png) [@linuxdev](https://forums.developer.nvidia.com/u/linuxdev)\
**Post date:** [April 21, 2018, 6:26pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/18 "2018-04-21T18:26:26Z")

</div>

“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:

```auto
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”.

---

<div class="post-metadata">

**Author:** ![wangyazhao001](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@wangyazhao001](https://forums.developer.nvidia.com/u/wangyazhao001)\
**Post date:** [April 23, 2018, 3:18pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/19 "2018-04-23T15:18:06Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![nadeemm](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/nadeemm/32/367020_2.png) [@nadeemm](https://forums.developer.nvidia.com/u/nadeemm)\
**Post date:** [October 18, 2021, 6:28pm UTC](https://forums.developer.nvidia.com/t/tx2-uart-enabling-dev-ttyths2/50173/20 "2021-10-18T18:28:53Z")

</div>

Closed on October 18, 2021, 6:28pm UTC


