Jetson Orin Nano JP6 - SPI Slave Mode + LSM6DSO IMU Setup help

Hi,

I am working with a Jetson Orin Nano Developer Kit 8GB running JetPack 6.2.1 (fresh flash, L4T R36.4.4).

Background / What I tried before:

I faced the GPIO/SPI padctl register bit[10] issue described in this thread: https://forums.developer.nvidia.com/t/40hdr-spi1-gpio-padctl-register-bit-10-effect-by-gpiod-tools-in-jp6/301171

I attempted to apply the suggested kernel patch for the sfsel bit fix. I also modified the DTB to set SPI3 (3230000.spi) as slave mode and successfully ran the single loopback test on spidev1.0 (master). However when attempting the SPI master/slave test between the two SPI buses, something went wrong — after reboot the WiFi was missing and the kernel was not working properly. I ended up reflashing JP6.2.1 fresh( before that i was working on jp6.2.

What I want to do now (starting fresh):

I want to use SPI1 as master to communicate with an LSM6DSO IMU sensor. Before doing anything I want to make sure I do it correctly this time.

Specifically I need help with:

  1. Should I apply the sfsel kernel patch first? If yes, what is the safest way to do it on JP6.2.1?

  2. Do I need to modify the DTB for SPI master mode to work with an external SPI device, or is SPI1 master ready to use out of the box?

  3. Is there a recommended Python or C example for reading LSM6DSO data over SPI on Jetson?

I want to do this step by step without breaking anything. Any guidance is appreciated!

System info:

  • Board: Jetson Orin Nano Developer Kit 8GB

  • JetPack: 6.2.1 (fresh flash)

Thank you!

i also performed a loop test (connecting pin 19 to pin 21 ) by the following method :
sudo modprobe spidev
git clone GitHub - rm-hull/spidev-test · GitHub
cd spidev-test/
gcc spidev_test.c -o spidev_test

Run the test program and specify spidev0.0 (corresponding to SPI1):
./spidev_test -v -D /dev/spidev0.0 -p “Test”
and got this :sdp_ab@sdp:~/spidev-test$ ./spidev_test -v -D /dev/spidev0.0 -p “Test”
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)
TX | 54 65 73 74 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ | Test
RX | 54 65 73 74 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ | Test

Hi

Please check your pinmux setting in Linux_for_Tegra/bootloader is correct.

1)tegra234-mb1-bct-gpio….dtsi

2)tegra234-mb1-bct-pinmux-p3767……dtsi

Hi abdullahcoc2020,

Have you also updated the OOT kernel modules correctly?

This patch is used to fix the SFIO bit been set issue when you want to use the pin as GPIO.
It seems not relating to your current requirement to port LSM6DSO IMU on SPI bus.

You have to configure its pinmux first. For the devkit, you can simply use the jetson-io tool to enable SPI.

You need to get the sample code/application from your vendor to work with LSM6DSO.
We could help to verify SPI loopback test for the the SPI functionality.

before doing that
i have done the spi connection using rfid-rc522 on 10 mhz and it worked fine as well so do i need to do this thing you said about ?

yes now i did that

yes i have done that as well

sorry i didnt understant this one
but the same lsm6ds3( sorry i typed the wrong name lsm6ds3 is the one iam using ) worked fine with the spi using esp and also its working right now with the i2c but not responding with the spi and retureing oxff

If you have verified SPI function on Orin Nano working as expected with other SPI device, then it should be fine w/o doing SPI loopback test.

I don’t mean that there’s the HW broken with your lsm6ds3 module.
You may need custom driver for lsm6ds3 module to work.

Can you give me some advice and some useful links if available how it’s done because I never did such thing before

Yeah it’s also worked it’s just not working with the imu ,if there any possible way to check out using oscilloscope?

For your lsm6ds3 module, you may need to use the drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_core.c driver. Since this is not the module devloped from us, we do not have the hardware to perform local verification. We recommend requesting further technical details from your vendor.

thanks mr kevin for your reply i did that and still no response
any way to debug the exact problem ?

ls -la /sys/bus/spi/devices/
cat /sys/bus/spi/devices/spi1.0/modalias 2>/dev/null
cat /sys/bus/spi/devices/spi0.1/modalias 2>/dev/null
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-pin19 {
                                    nvidia,pins = "spi1_mosi_pz5";
                                    nvidia,function = "spi1";
                                    nvidia,tristate = <0x00>;
                                    nvidia,enable-input = <0x01>;
                                    nvidia,pull-up-strength = <0x1f>;
                                    nvidia,pull-down-strength = <0x1f>;
                            };

nvidia,pins = “spi1_miso_pz4”;
nvidia,function = “spi1”;
nvidia,tristate = <0x00>;
nvidia,enable-input = <0x01>;
nvidia,pull-up-strength = <0x1f>;
nvidia,pull-down-strength = <0x1f>;
};

                                    nvidia,pins = "spi1_sck_pz3";
                                    nvidia,function = "spi1";
                                    nvidia,tristate = <0x00>;
                                    nvidia,enable-input = <0x01>;
                                    nvidia,pull-up-strength = <0x1f>;
                                    nvidia,pull-down-strength = <0x1f>;
                            };

nvidia,pins = “spi1_cs0_pz6”;
nvidia,function = “spi1”;
nvidia,tristate = <0x00>;
nvidia,enable-input = <0x01>;
nvidia,pull-up-strength = <0x1f>;
nvidia,pull-down-strength = <0x1f>;
};

                                    nvidia,pins = "spi1_cs1_pz7";
                                    nvidia,function = "spi1";
                                    nvidia,tristate = <0x00>;
                                    nvidia,enable-input = <0x01>;
                                    nvidia,pull-up-strength = <0x1f>;
                                    nvidia,pull-down-strength = <0x1f>;
                            };


nvidia,pins = “spi3_mosi_py2”;
nvidia,function = “spi3”;
nvidia,tristate = <0x00>;
nvidia,enable-input = <0x01>;
};

                            hdr40-pin38 {

/dts-v1/;

/ {
jetson-header-name = “Jetson 40pin Header”;
overlay-name = “User Custom [2026-03-08-044819]”;
compatible = “nvidia,p3768-0000+p3767-0000\0nvidia,p3768-0000+p3767-0001\0nvidia,p3768-0000+p3767-0003\0nvidia,p3768-0000+p3767-0004\0nvidia,p3768-0000+p3767-0005\0nvidia,p3768-0000+p3767-0000-super\0nvidia,p3768-0000+p3767-0001-super\0nvidia,p3768-0000+p3767-0003-super\0nvidia,p3768-0000+p3767-0004-super\0nvidia,p3768-0000+p3767-0005-super\0nvidia,p3509-0000+p3767-0000\0nvidia,p3509-0000+p3767-0001\0nvidia,p3509-0000+p3767-0003\0nvidia,p3509-0000+p3767-0004\0nvidia,p3509-0000+p3767-0005”;

    fragment@0 {
            target = <0xffffffff>;

            __overlay__ {
                    pinctrl-names = "default";
                    pinctrl-0 = <0x01>;

                    exp-header-pinmux {
                            phandle = <0x01>;

                            hdr40-pin12 {
                                    nvidia,pins = "soc_gpio41_ph7";
                                    nvidia,function = "i2s2";
                                    nvidia,tristate = <0x00>;
                                    nvidia,enable-input = <0x01>;
                            };

                            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-pin19 {
                                    nvidia,pins = "spi1_mosi_pz5";
                                    nvidia,function = "spi1";
                                    nvidia,tristate = <0x00>;
                                    nvidia,enable-input = <0x01>;
                                    nvidia,pull-up-strength = <0x1f>;
                                    nvidia,pull-down-strength = <0x1f>;
                            };

                            hdr40-pin21 {
                                    nvidia,pins = "spi1_miso_pz4";
                                    nvidia,function = "spi1";
                                    nvidia,tristate = <0x00>;
                                    nvidia,enable-input = <0x01>;
                                    nvidia,pull-up-strength = <0x1f>;
                                    nvidia,pull-down-strength = <0x1f>;
                            };

                            hdr40-pin23 {
                                    nvidia,pins = "spi1_sck_pz3";
                                    nvidia,function = "spi1";
                                    nvidia,tristate = <0x00>;
                                    nvidia,enable-input = <0x01>;
                                    nvidia,pull-up-strength = <0x1f>;
                                    nvidia,pull-down-strength = <0x1f>;
                            };

                            hdr40-pin24 {
                                    nvidia,pins = "spi1_cs0_pz6";
                                    nvidia,function = "spi1";
                                    nvidia,tristate = <0x00>;
                                    nvidia,enable-input = <0x01>;
                                    nvidia,pull-up-strength = <0x1f>;
                                    nvidia,pull-down-strength = <0x1f>;
                            };

                            hdr40-pin26 {
                                    nvidia,pins = "spi1_cs1_pz7";
                                    nvidia,function = "spi1";
                                    nvidia,tristate = <0x00>;
                                    nvidia,enable-input = <0x01>;
                                    nvidia,pull-up-strength = <0x1f>;
                                    nvidia,pull-down-strength = <0x1f>;
                            };

                            hdr40-pin35 {
                                    nvidia,pins = "soc_gpio44_pi2";
                                    nvidia,function = "i2s2";
                                    nvidia,tristate = <0x00>;
                                    nvidia,enable-input = <0x01>;
                            };

                            hdr40-pin37 {
                                    nvidia,pins = "spi3_mosi_py2";
                                    nvidia,function = "spi3";
                                    nvidia,tristate = <0x00>;
                                    nvidia,enable-input = <0x01>;
                            };

                            hdr40-pin38 {
                                    nvidia,pins = "soc_gpio43_pi1";
                                    nvidia,function = "i2s2";
                                    nvidia,tristate = <0x01>;
                                    nvidia,enable-input = <0x01>;
                            };

                            hdr40-pin40 {
                                    nvidia,pins = "soc_gpio42_pi0";
                                    nvidia,function = "i2s2";
                                    nvidia,tristate = <0x00>;
                                    nvidia,enable-input = <0x00>;
                            };
                    };
            };
    };

    fragment@1 {
            target = <0xffffffff>;

            __overlay__ {
                    pinctrl-names = "default";
                    pinctrl-0 = <0x02>;

                    exp-header-pinmux {
                            phandle = <0x02>;
                    };
            };
    };

    __symbols__ {
            jetson_io_pinmux = "/fragment@0/__overlay__/exp-header-pinmux";
            jetson_io_pinmux_aon = "/fragment@1/__overlay__/exp-header-pinmux";
    };

    __fixups__ {
            pinmux = "/fragment@0:target:0";
            pinmux_aon = "/fragment@1:target:0";
    };

    __local_fixups__ {

            fragment@0 {

                    __overlay__ {
                            pinctrl-0 = <0x00>;
                    };
            };

            fragment@1 {

                    __overlay__ {
                            pinctrl-0 = <0x00>;
                    };
            };
    };

};
total 0
drwxr-xr-x 2 root root 0 أغسطس 26 2025 .
drwxr-xr-x 4 root root 0 أغسطس 26 2025 ..
lrwxrwxrwx 1 root root 0 أغسطس 26 2025 spi0.0 → ../../../devices/platform/bus@0/3210000.spi/spi_master/spi0/spi0.0
lrwxrwxrwx 1 root root 0 مارس 10 21:00 spi0.1 → ../../../devices/platform/bus@0/3210000.spi/spi_master/spi0/spi0.1
lrwxrwxrwx 1 root root 0 مارس 10 21:00 spi1.0 → ../../../devices/platform/bus@0/3230000.spi/spi_master/spi1/spi1.0
lrwxrwxrwx 1 root root 0 مارس 10 21:00 spi1.1 → ../../../devices/platform/bus@0/3230000.spi/spi_master/spi1/spi1.1
spi:tegra-spidev
spi:tegra-spidev
maybe these could help ? or if you want any thing else ?

The pinmux looks good to me for using them as SPI.

As you have verified SPI loopback test working, I think SPI configuration should be fine.

Please request your vendor for the porting guide of LSM6DSO IMU module.
I would expect that you to update the device tree to use that custom driver.

Thanks for your response, actually I buy it from a Chinese market so it’s kinda hard to get this information.

1-shouldnt be this available on the internet?

2-is there any official guide to how to update the device tree to use a coustem driver ?

Also iam using lsm6ds3 not lsm6dso

Not that I also used rc522 card reader on spi and it worked fine so either the problem be the level shifter or a software based if you can help me Mr Kevin iam close to my deadline of the project

Your vendor should give you some resources for this module and related driver.

As we don’t have this module to verify, I cannot give you the exact steps to port this module on Jetson device.

Do you want to build it into kernel image or build it as kernel module to load it?
Please refer to Kernel Customization — NVIDIA Jetson Linux Developer Guide to build kernel.

tahnks mr kevin for your reply
sdp_ab@sdp:~$ find /lib/modules/$(uname -r) -name ‘st_lsm6dsx*’
/lib/modules/5.15.148-tegra/kernel/drivers/iio/imu/st_lsm6dsx
/lib/modules/5.15.148-tegra/kernel/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.ko
/lib/modules/5.15.148-tegra/kernel/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.ko
/lib/modules/5.15.148-tegra/kernel/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.ko
sdp_ab@sdp:~$ modinfo st_lsm6dsx
filename: /lib/modules/5.15.148-tegra/kernel/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.ko
license: GPL v2
description: STMicroelectronics st_lsm6dsx driver
author: Denis Ciocca denis.ciocca@st.com
author: Lorenzo Bianconi lorenzo.bianconi@st.com
depends: kfifo_buf
intree: Y
name: st_lsm6dsx
vermagic: 5.15.148-tegra SMP preempt mod_unload modversions aarch64
sig_id: PKCS#7
signer: Build time autogenerated kernel key
sig_key: 35:55:30:35:93:F3:85:1B:E8:86:DD:32:BD:3D:9B:A1:0D:6E:29:AE
sig_hashalgo: sha512
signature: 31:AC:19:AB:AF:81:4A:79:3E:B1:2B:34:D1:E7:3B:3E:86:20:98:96:
83:2B:E1:0A:8D:14:3B:FD:90:65:01:73:E6:E8:9D:8E:16:F7:5A:25:
26:63:FA:45:84:18:E8:43:39:70:62:72:6A:EE:56:B1:F0:8D:B7:99:
BA:63:99:1B:DA:9E:15:BC:F0:D5:E1:AE:04:AA:10:D1:DE:E4:05:EB:
81:55:03:CD:A7:04:9B:A4:5E:84:4D:BE:9A:01:2E:50:65:B2:49:A4:
67:7F:B0:4A:B0:9B:A9:6C:B6:B6:42:97:4F:78:EA:10:08:4F:20:E0:
7D:E5:F5:91:7C:85:90:82:F7:72:82:19:C3:3E:B8:53:7A:C7:2F:03:
0B:BD:FD:FD:E7:AD:21:2E:11:F6:8F:EE:7C:49:71:3C:75:50:E1:69:
70:6D:FE:15:57:CB:83:76:39:53:79:2A:EF:B0:FA:C4:9C:27:62:7E:
36:A2:C4:3F:D6:23:8F:A9:09:58:93:92:8D:98:66:98:9E:2F:AB:92:
6E:62:AD:B5:75:72:C5:4F:A9:8F:04:6E:32:85:07:82:07:EB:9D:6E:
B8:F3:B7:A8:98:3C:F4:37:FE:BA:76:29:3D:56:B8:DB:E3:77:B8:83:
72:B7:C8:E4:14:9D:11:DF:4A:28:A8:8A:63:74:E2:C1:09:70:C9:00:
7C:68:B6:BB:E1:D4:BD:CE:FE:E7:FA:E5:B1:BF:BE:7B:04:7B:57:99:
71:04:9C:09:F9:98:71:56:E7:91:D1:6A:08:68:97:CB:A8:BC:EB:53:
FC:0C:0A:20:14:2C:A8:D3:00:AF:28:48:0F:89:51:BA:82:18:CC:22:
81:A4:0D:9F:12:D5:E0:DD:EA:2D:59:BE:39:CC:9E:A4:1F:06:8C:5A:
DA:0D:F7:B1:7A:48:62:23:8F:9B:07:65:6E:7A:83:79:4B:0F:1F:8E:
88:71:17:5C:D8:03:C3:0F:02:29:BC:30:B4:E2:4F:39:00:43:F3:40:
F9:A5:F8:FA:09:0D:4F:4B:58:AD:9E:6E:BC:6B:9B:08:9A:83:B0:F6:
74:F4:6A:1E:A7:D8:96:1A:12:79:4F:81:0D:A8:CB:B5:AB:F7:AD:2B:
F3:A6:6F:29:37:CE:CD:28:C2:CA:59:1C:87:7D:B6:40:55:2A:2F:90:
C0:40:DF:C1:8C:6E:A6:6A:A5:B6:3B:B9:83:44:5B:C1:28:A0:77:89:
55:92:89:79:F9:03:C3:EB:2E:7E:9E:0C:97:83:B4:95:18:EA:2A:6E:
56:CA:A8:9F:F3:30:ED:29:36:74:52:04:E2:B9:9C:CE:F9:DE:8E:0B:
63:D0:2A:9D:57:87:FD:B1:26:5B:D6:57
sdp_ab@sdp:~$ modinfo st_lsm6dsx_spi
filename: /lib/modules/5.15.148-tegra/kernel/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.ko
license: GPL v2
description: STMicroelectronics st_lsm6dsx spi driver
author: Denis Ciocca denis.ciocca@st.com
author: Lorenzo Bianconi lorenzo.bianconi@st.com
alias: of:NTCst,lsm6dsopC*
alias: of:NTCst,lsm6dsop
alias: of:NTCst,lsm6dstC*
alias: of:NTCst,lsm6dst
alias: of:NTCst,lsm6dsrxC*
alias: of:NTCst,lsm6dsrx
alias: of:NTCst,lsm6ds0C*
alias: of:NTCst,lsm6ds0
alias: of:NTCst,lsm9ds1-imuC*
alias: of:NTCst,lsm9ds1-imu
alias: of:NTCst,ism330dhcxC*
alias: of:NTCst,ism330dhcx
alias: of:NTCst,lsm6ds3tr-cC*
alias: of:NTCst,lsm6ds3tr-c
alias: of:NTCst,lsm6dsrC*
alias: of:NTCst,lsm6dsr
alias: of:NTCst,lsm6dsoxC*
alias: of:NTCst,lsm6dsox
alias: of:NTCst,asm330lhhC*
alias: of:NTCst,asm330lhh
alias: of:NTCst,lsm6dsoC*
alias: of:NTCst,lsm6dso
alias: of:NTCst,ism330dlcC*
alias: of:NTCst,ism330dlc
alias: of:NTCst,lsm6dsmC*
alias: of:NTCst,lsm6dsm
alias: of:NTCst,lsm6dslC*
alias: of:NTCst,lsm6dsl
alias: of:NTCst,lsm6ds3hC*
alias: of:NTCst,lsm6ds3h
alias: of:NTCst,lsm6ds3C*
alias: of:NTCst,lsm6ds3
alias: spi:lsm6dsop
alias: spi:lsm6dst
alias: spi:lsm6dsrx
alias: spi:lsm6ds0
alias: spi:lsm9ds1-imu
alias: spi:ism330dhcx
alias: spi:lsm6ds3tr-c
alias: spi:lsm6dsr
alias: spi:lsm6dsox
alias: spi:asm330lhh
alias: spi:lsm6dso
alias: spi:ism330dlc
alias: spi:lsm6dsm
alias: spi:lsm6dsl
alias: spi:lsm6ds3h
alias: spi:lsm6ds3
depends: st_lsm6dsx
intree: Y
name: st_lsm6dsx_spi
vermagic: 5.15.148-tegra SMP preempt mod_unload modversions aarch64
sig_id: PKCS#7
signer: Build time autogenerated kernel key
sig_key: 35:55:30:35:93:F3:85:1B:E8:86:DD:32:BD:3D:9B:A1:0D:6E:29:AE
sig_hashalgo: sha512
signature: 11:86:D0:5D:9C:CC:66:F0:7A:33:DD:31:CA:82:83:E8:DF:1D:F1:D9:
EB:5F:61:49:DE:D7:D7:C3:01:A5:29:18:E0:C5:F4:AF:9C:6F:8C:CA:
63:7C:F5:32:DD:99:CB:0E:B5:EE:E5:B9:20:78:19:B7:2C:53:E6:E8:
86:F1:84:E6:E5:F3:F5:38:44:0F:3A:10:AA:BB:35:82:94:A1:CE:97:
C7:E3:E6:70:85:A1:8E:4F:CF:80:DE:43:DA:BE:E9:CB:AA:CE:30:02:
B6:6F:A3:6F:19:CE:8C:97:44:1C:E2:79:29:09:0F:F6:14:16:41:00:
3D:01:0F:16:56:8E:93:32:42:71:F9:9F:65:32:38:81:BD:DA:7A:38:
10:5F:4A:1B:CA:4A:A4:83:B0:B2:E5:56:94:ED:D5:C7:40:6C:67:DB:
64:74:37:DD:6F:B0:68:F2:77:71:FA:16:63:BD:BB:DA:48:CE:23:98:
54:46:5A:19:59:76:93:17:94:BC:D0:0B:11:5F:40:DE:5B:87:7E:0A:
32:B0:EE:FE:6A:0C:65:85:9E:C1:86:69:57:7A:D1:4B:B9:16:4C:1E:
D0:6A:C9:11:E7:85:95:DF:37:E7:86:86:BD:26:A4:08:C0:63:8B:F6:
7F:A2:19:26:18:4C:06:BF:6C:08:4A:FF:C0:CC:6E:54:53:E3:57:03:
30:E6:2A:79:DF:85:08:3C:36:9A:14:A0:03:0F:4A:4B:BE:FE:CD:59:
D7:A7:45:5E:E8:65:44:7B:1F:EC:B4:52:19:C6:26:96:88:30:C1:D0:
B8:E1:72:83:97:E8:55:BC:C6:44:CE:B0:26:01:7B:CF:4D:9E:08:EE:
12:17:E6:5F:FB:D8:8C:6D:80:0B:16:5F:48:3E:24:F4:5D:75:B5:31:
FB:AE:F7:44:0D:D7:40:1E:EB:BC:D0:A8:0F:07:46:2C:92:67:5F:44:
C8:37:F6:65:0D:CB:B8:C2:EA:86:EB:92:74:0D:35:FC:B7:5A:F3:B1:
1B:E3:18:E2:1C:50:85:A9:F1:1D:F9:85:11:1A:CB:1A:62:F8:08:9B:
88:AF:FE:83:B5:37:D6:15:3E:CD:0B:AF:5D:65:ED:9C:37:DF:98:08:
0D:F5:8D:44:A6:6D:68:02:7B:0D:19:D9:B9:CA:14:7C:7B:53:45:F0:
C9:93:E5:EF:42:AB:A1:85:70:A5:AA:22:AF:C8:EA:35:12:C5:DD:AB:
D9:D3:FB:B8:4F:29:14:92:88:73:7B:C3:B1:7C:B7:4E:70:FB:84:3B:
8E:68:5E:36:C4:9D:4A:EB:6F:AA:D1:E1:B2:77:37:38:7C:C6:D6:4F:
EB:B0:EF:44:52:51:27:30:D0:12:0F:F3
sdp_ab@sdp:~$ modinfo st_lsm6dsx_i2c
filename: /lib/modules/5.15.148-tegra/kernel/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.ko
license: GPL v2
description: STMicroelectronics st_lsm6dsx i2c driver
author: Denis Ciocca denis.ciocca@st.com
author: Lorenzo Bianconi lorenzo.bianconi@st.com
alias: of:NTCst,lsm6dsopC*
alias: of:NTCst,lsm6dsop
alias: of:NTCst,lsm6dstC*
alias: of:NTCst,lsm6dst
alias: of:NTCst,lsm6dsrxC*
alias: of:NTCst,lsm6dsrx
alias: of:NTCst,lsm6ds0C*
alias: of:NTCst,lsm6ds0
alias: of:NTCst,lsm9ds1-imuC*
alias: of:NTCst,lsm9ds1-imu
alias: of:NTCst,ism330dhcxC*
alias: of:NTCst,ism330dhcx
alias: of:NTCst,lsm6ds3tr-cC*
alias: of:NTCst,lsm6ds3tr-c
alias: of:NTCst,lsm6dsrC*
alias: of:NTCst,lsm6dsr
alias: of:NTCst,lsm6dsoxC*
alias: of:NTCst,lsm6dsox
alias: of:NTCst,asm330lhhC*
alias: of:NTCst,asm330lhh
alias: of:NTCst,lsm6dsoC*
alias: of:NTCst,lsm6dso
alias: of:NTCst,ism330dlcC*
alias: of:NTCst,ism330dlc
alias: of:NTCst,lsm6dsmC*
alias: of:NTCst,lsm6dsm
alias: of:NTCst,lsm6dslC*
alias: of:NTCst,lsm6dsl
alias: of:NTCst,lsm6ds3hC*
alias: of:NTCst,lsm6ds3h
alias: of:NTCst,lsm6ds3C*
alias: of:NTCst,lsm6ds3
alias: i2c:lsm6dsop
alias: i2c:lsm6dst
alias: i2c:lsm6dsrx
alias: i2c:lsm6ds0
alias: i2c:lsm9ds1-imu
alias: i2c:ism330dhcx
alias: i2c:lsm6ds3tr-c
alias: i2c:lsm6dsr
alias: i2c:lsm6dsox
alias: i2c:asm330lhh
alias: i2c:lsm6dso
alias: i2c:ism330dlc
alias: i2c:lsm6dsm
alias: i2c:lsm6dsl
alias: i2c:lsm6ds3h
alias: i2c:lsm6ds3
depends: st_lsm6dsx
intree: Y
name: st_lsm6dsx_i2c
vermagic: 5.15.148-tegra SMP preempt mod_unload modversions aarch64
sig_id: PKCS#7
signer: Build time autogenerated kernel key
sig_key: 35:55:30:35:93:F3:85:1B:E8:86:DD:32:BD:3D:9B:A1:0D:6E:29:AE
sig_hashalgo: sha512
signature: 48:C7:F2:3B:47:C7:32:26:19:9A:17:4F:91:CC:6E:8C:1B:AA:EB:90:
DA:B7:F8:18:D2:BC:C4:1D:6C:41:FA:37:AA:9E:4D:82:1A:10:17:35:
DB:79:D2:96:A0:26:87:AC:DD:35:AF:25:00:57:7B:EB:FB:97:A7:19:
E2:98:1A:C6:4B:DD:F9:55:0A:DD:98:F9:B6:EC:8F:DD:73:79:04:64:
E8:07:35:FD:7D:80:47:91:C2:28:B3:66:DD:89:05:11:F9:23:78:9C:
BA:75:BB:61:97:9A:B8:EE:B1:83:BC:A0:6E:DF:9F:F2:0B:79:84:5F:
4E:DD:E6:24:68:FB:F2:44:EF:4E:D0:F1:FD:02:43:1C:A4:A5:7A:B3:
9A:09:3B:E9:23:42:86:E7:EB:84:B0:EF:E8:3D:BE:6C:C8:89:3E:56:
6D:D5:54:04:66:6E:1E:0D:C8:C9:F5:8C:B1:EB:F0:EC:98:DA:3D:43:
EA:3C:66:1A:51:32:72:3C:E1:E1:C6:F5:1A:3A:6B:F3:AA:EF:81:5D:
78:57:06:66:81:37:69:2B:4E:BD:22:11:51:1F:53:B1:81:80:0E:D3:
38:D6:66:3F:3B:09:A3:BD:32:D2:A8:E6:DF:F3:7B:9C:50:2D:36:44:
3A:19:61:A0:F7:6E:3E:17:08:B3:33:82:D9:EE:1A:EB:35:1D:53:01:
E1:E1:DC:8D:19:CC:2C:31:AB:02:12:E1:2A:C3:C1:16:A0:B2:0C:5C:
97:B7:AA:F2:86:EC:90:E2:73:A1:01:CB:1F:DB:99:EE:CF:4D:0A:B0:
08:25:5F:E4:77:8B:BE:CB:1D:63:CB:7B:DE:9D:E4:E5:C4:F3:97:DB:
BD:CE:2A:14:2D:77:B5:56:6C:CF:10:E4:45:84:24:3E:BF:BD:DB:9B:
9E:4B:A9:8B:FA:36:C5:08:8E:49:C1:1E:05:8B:73:EA:4F:BE:53:76:
7C:00:D6:91:C6:91:09:EC:DD:2E:A2:92:FC:7B:5C:1D:18:47:14:04:
5F:D3:B9:F3:61:DA:57:FB:DC:77:82:70:F6:6A:BF:E9:2E:76:F6:6F:
79:1F:00:1C:3E:87:7D:60:33:13:E2:71:60:9C:A3:70:87:32:67:B6:
93:D7:26:3B:2D:C3:B2:AB:AF:43:AC:A1:2F:C5:FA:C2:69:0C:71:8B:
97:94:D7:8D:EC:FF:C1:ED:38:B4:67:D8:67:1E:63:1D:45:48:8B:EF:
79:7D:B9:C3:3E:D5:F8:05:94:3D:E2:EC:C8:FE:DD:72:57:1B:F4:39:
C4:91:56:62:CD:79:E9:93:93:91:80:28:39:8D:E7:1C:9C:E0:A6:C7:
E1:A0:30:39:75:CD:71:91:DB:D2:78:49
isnt alredy provived by the jetspack 6.1
what you are asking me to ask the vendor ?

iam bit confused here

It seems this driver exists in upstream kernel by default.

You may ask the vendor for the required Device Tree configurations for the st_lsm6dsx_spi.ko driver.
I can help identify the specific Device Tree files on the Orin Nano that need updating.

Hi Kevin,

Thank you for your help. I found the required Device Tree configuration from STMicroelectronics. It’s all publicly available:

  1. Kernel DT binding: https://www.kernel.org/doc/Documentation/devicetree/bindings/iio/imu/st_lsm6dsx.txt

  2. ST’s own DT binding with SPI example: https://github.com/STMicroelectronics/st-mems-android-linux-drivers-iio/blob/master/Documentation/devicetree/bindings/iio/stm/imu/st_lsm6ds3.txt

The st_lsm6dsx_spi.ko driver is already compiled as a module in JetPack 6.1:


/lib/modules/5.15.148-tegra/kernel/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx.ko

/lib/modules/5.15.148-tegra/kernel/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_spi.ko

/lib/modules/5.15.148-tegra/kernel/drivers/iio/imu/st_lsm6dsx/st_lsm6dsx_i2c.ko

I applied a DT overlay via eMMC partition patching with:


compatible = "st,lsm6ds3";

reg = <0x0>;

spi-max-frequency = <1000000>;

spi-cpol;

spi-cpha;

Plus Tegra controller-data (nvidia,enable-hw-based-cs, nvidia,rx-clk-tap-delay).

Result: The driver probed and bound to spi0.0 correctly, but reads WHO_AM_I = 0x00 instead of the expected 0x69.

I also did a raw SPI test using spidev with all 4 SPI modes and speeds from 100 kHz to 10 MHz — every single read returns 0xFF. This confirms the IMU is not responding at all on MISO.

Note that SPI loopback works, and RFID-RC522 works on the same SPI bus at 10 MHz. The LSM6DS3 also works fine over I2C on this same Jetson. So the IMU hardware is not broken.

I believe this is a signal integrity issue on the MISO line caused by the TXB0108 level shifter on the 40-pin header. The same issue is documented here: https://forums.developer.nvidia.com/t/spi-bus-voltage-level-issue-miso/188682

The TXB0108 has weak output drivers (~4kΩ) which cannot overcome the Jetson’s internal pull-down on MISO. The RC522 works because it has much stronger MISO output drivers (~20mA) than the LSM6DS3 (~4mA).

My question: Is there a known hardware workaround for this on the Orin Nano, or is using I2C the recommended path for SPI devices with weak MISO drive strength?

Thank you for your support.

Could you also check the signal from scope or LA?

Could you help to confirm if it is the root cause in your case?
Maybe you can try to remove the Int PD for MISO in the pinmux spreadsheet as WAR?