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?
Thanks!