Hello !!
I am working with the Jetson Orin Nano development kit with Jetpack 6.2.1. Please see the device tree I used to connect a external device.
/dts-v1/;
/plugin/;
/ {
jetson-header-name = “Jetson 40pin Header”;
overlay-name = “external-peripheral”;
compatible = “nvidia,p3768-0000+p3767-0005”;
fragment@0 {
target = <&pinmux>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&jetson_io_pinmux>;
jetson_io_pinmux: exp-header-pinmux {
hdr40-pin13 {
nvidia,pins= "spi3_sck_py0";
nvidia,function = "spi3";
nvidia,tristate= <0x00>;
nvidia,enable-input = <0x01>;
};
hdr40-pin16 {
nvidia,pins= "spi3_cs1_py4";
nvidia,function = "spi3";
nvidia,tristate= <0x00>;
nvidia,enable-input = <0x01>;
};
hdr40-pin18 {
nvidia,pins= "spi3_cs0_py3";
nvidia,function = "spi3";
nvidia,tristate= <0x00>;
nvidia,enable-input = <0x01>;
};
hdr40-pin22 {
nvidia,pins= "spi3_miso_py1";
nvidia,function = "spi3";
nvidia,tristate= <0x00>;
nvidia,enable-input = <0x01>;
};
hdr40-pin37 {
nvidia,pins= "spi3_mosi_py2";
nvidia,function = "spi3";
nvidia,tristate= <0x00>;
nvidia,enable-input = <0x01>;
};
};
};
};
fragment@1 {
target = <&spi3>;
__overlay__ {
#address-cells = <1>;
#size-cells = <0>;
mm6108:mm6108@0{
compatible=“morse,mm610x-spi”;
reg=<0>;
spi-max-frequency = <50000000>;
spi-irq-gpios = <&gpio 105 0x0>;
reset-gpios = <&gpio 41 0x0>;
power-gpios = <&gpio 144 0x0>,<&gpio 0x0>;
status = “okay”;
};
};
};
};
After compiling the .dts file to a .dtbo file, I moved it into the /boot directory. Then jetson-io.py is used to reconfigure the Jetson 40pin Header. But, when I checked the compatible property from /sys/firmware/devicetree/base/bus@0/spi@3230000/spi@0/compatible, it was not updated.
-
What step would I be missing here?
-
Do I need to add pinmux settings for each GPIOs configured inside SPI such as power-gpio, reset-gpio etc.
If so what nvidia,property I need to give to the GPIOs ? gp?
- I couldn’t figure out spi3 node from /hardware/nvidia/t23x/nv-public files. If the node I used in device tree is not correct, how can I find out the exact node for spi@3230000 (Spi3) , so that I can overlay compatible property?
The references I used are Device tree overlay help for SPI <> CAN driver and Configuring the Jetson Expansion Headers — Jetson Linux Developer Guide documentation
Thanks,

