TX2 UART: Exposing alternate functionality through J21/J26

My goal is have two sets of serial(uart) connections that I can use through /dev/tty*.

Short story is that I think uart supports more throughput than i2c or spi. So I’m trying to switch the i2c pins over to one of the unused uarts.

According to the pinmux microsoft excel spreadsheet, it looks like there are alot of uarts in this SoC. The Parker TRM says there are 7, cool that’s more than enough. But how do I get two free uarts exposed through J21 or J26 headers.

So far, I think I can trace pin names from this graphical layout http://www.jetsonhacks.com/nvidia-jetson-tx2-j21-header-pinout/ names corresponding to column A of the pinmux spreadsheet GPIO pin names in one of column G or C to kernel source files (old) gpio-names.h or pinctrl-tegra186.c respectively. Finally the name from column C is what comes out in the pinmux file generated by the spreadsheet.

Ok so I replace the nvidia,pins in uart7 with the pin names for the i2c pins in the generated file…

                        uart7_tx_pw6 {
                                nvidia,pins = "gen1_i2c_scl_pc5";
                                nvidia,function = "uartg";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_DISABLE>;
                                nvidia,lpdr = <TEGRA_PIN_DISABLE>;

                        uart7_rx_pw7 {
                                nvidia,pins = "gen1_i2c_sda_pc6";
                                nvidia,function = "uartg";
                                nvidia,pull = <TEGRA_PIN_PULL_UP>;
                                nvidia,tristate = <TEGRA_PIN_ENABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;
                                nvidia,lpdr = <TEGRA_PIN_DISABLE>;

Then run pinmux-dts2cfg.py commands for both pinmux and pad.
Then comment out the rest of the pinmux. commands for the pins of that i2c controller.

Now I come to realize I’m supposed to recompile the kernel with the generated cfg files…

This seems avoidable.

So I’m taking break now, but is there any reason I can’t create a device tree overlay file like I did in the past for my raspberry pi when I was swapping pins between functionalities?

I followed the post of dpslwk, here https://www.raspberrypi.org/forums/viewtopic.php?f=98&t=80472&sid=eba1c835555a841556fefb5c45067b0e&start=25#p779867

Is there a way to get jetson to to use overlays like this?


I can’t answer your question, but you might be interested to know that J26 J17 is already set up by default as “/dev/ttyTHS2”. This same TTL level (3.3V) connector routes to the camera module…so long as you are not using this with the camera there is nothing you need to do to use this. This port seems to default to 115200 8N1 without flow control.

I dont know… J26 does not have any UART pin. “/dev/ttyTHS2” is the default serial for the J17.

Oops, sorry…you are right. I was looking at J17 not J26. J17 is “/dev/ttyTHS2”.

I do not know how you would get access to one of the UARTs not going to a specific connector on the carrier board. Not all functionality can be transferred to all pins…I do not know if this particular change is even possible. You would probably want to start with the PINMUX spreadsheet and see if this is available.