I’m setting pins on the Orin Nano devkit running on JetPack 5.1.1. I generated the .dtsi files via spreadsheet, placed them in the right folders, set the pinmux/padvoltage environmental variables in the .conf file to point to the generated .dtsi files, and flashed the Orin Nano.
After flashing, I updated the .dtb file and the extlinux.conf file to configure the pins:
pinmux@2430000 {
pinctrl-0 = <0x499>;
pinctrl-names = "default";
compatible = "nvidia,tegra234-pinmux";
reg = <0x00 0x2430000 0x00 0x19100 0x00 0xc300000 0x00 0x4000>;
#gpio-range-cells = <0x03>;
status = "okay";
phandle = <0x2b2>;
exp-header-pinmux {
phandle = <0x499>;
hdr40-pin37 {
nvidia,enable-input = <0x01>;
nvidia,tristate = <0x00>;
nvidia,function = "spi3";
nvidia,pins = "spi3_mosi_py2";
};
hdr40-pin22 {
nvidia,enable-input = <0x01>;
nvidia,tristate = <0x00>;
nvidia,function = "spi3";
nvidia,pins = "spi3_miso_py1";
};
hdr40-pin18 {
nvidia,enable-input = <0x01>;
nvidia,tristate = <0x00>;
nvidia,function = "spi3";
nvidia,pins = "spi3_cs0_py3";
};
hdr40-pin16 {
nvidia,enable-input = <0x01>;
nvidia,tristate = <0x00>;
nvidia,function = "spi3";
nvidia,pins = "spi3_cs1_py4";
};
hdr40-pin13 {
nvidia,enable-input = <0x01>;
nvidia,tristate = <0x00>;
nvidia,function = "spi3";
nvidia,pins = "spi3_sck_py0";
};
hdr40-pin36 {
nvidia,pins = "uart1_cts_pr5";
nvidia,function = "rsvd1";
nvidia,tristate = <0x00>;
nvidia,enable-input = <0x01>;
nvidia,pull = <0x00>;
nvidia,lpdr = <0x00>;
};
};
And I set pin 36 as a GPIO input (see gpio-default):
gpio@2200000 {
compatible = "nvidia,tegra234-gpio";
reg-names = "security\0gpio";
reg = <0x00 0x2200000 0x00 0x10000 0x00 0x2210000 0x00 0x10000>;
interrupts = <0x00 0x120 0x04 0x00 0x121 0x04 0x00 0x122 0x04 0x00 0x123 0x04 0x00 0x124 0x04 0x00 0x125 0x04 0x00 0x126 0x04 0x00 0x127 0x04 0x00 0x128 0x04 0x00 0x129 0x04 0x00 0x12a 0x04 0x00 0x12b 0x04 0x00 0x12c 0x04 0x00 0x12d 0x04 0x00 0x12e 0x04 0x00 0x12f 0x04 0x00 0x130 0x04 0x00 0x131 0x04 0x00 0x132 0x04 0x00 0x133 0x04 0x00 0x134 0x04 0x00 0x135 0x04 0x00 0x136 0x04 0x00 0x137 0x04 0x00 0x138 0x04 0x00 0x139 0x04 0x00 0x13a 0x04 0x00 0x13b 0x04 0x00 0x13c 0x04 0x00 0x13d 0x04 0x00 0x13e 0x04 0x00 0x13f 0x04 0x00 0x140 0x04 0x00 0x141 0x04 0x00 0x142 0x04 0x00 0x143 0x04 0x00 0x144 0x04 0x00 0x145 0x04 0x00 0x146 0x04 0x00 0x147 0x04 0x00 0x148 0x04 0x00 0x149 0x04 0x00 0x14a 0x04 0x00 0x14b 0x04 0x00 0x14c 0x04 0x00 0x14d 0x04 0x00 0x14e 0x04 0x00 0x14f 0x04>;
gpio-controller;
#gpio-cells = <0x02>;
interrupt-controller;
#interrupt-cells = <0x02>;
gpio-ranges = <0x2b2 0x00 0x00 0x8a 0x2b2 0x8a 0x92 0x1a>;
status = "okay";
phandle = <0x5a>;
gpio-default {
gpio-input = <0x85>;
};
camera-control-output-low {
gpio-hog;
output-low;
gpios = <0x3e 0x00 0xa0 0x00>;
label = "cam0-pwdn\0cam1-pwdn";
};
};
However, only the SPI3 pins are configured, not the GPIO pin when I list the pin states using Jetson-IO config-by-pin.py.
Can you please inform what additional steps need to be taken to configure GPIO on the Jetson using the dtsi/dts/dtb files? I am not interested in using command line tools like SYSFS or busybox for pinmux configuration.
Thanks.