HI i have enabled the spi1 and sp3 using jetsion-io.py and ebale to do spi loop test on spi0.0 0.1 1.0 1.1 successfully .but when i try to connect the bmi270 spi based sensor and load the driver for read chip id with /* SPI1, 40pin header, Pin 19(MOSI), Pin 21(MISO), Pin 23(CLK), Pin 24(CS) */
spi@3210000 {
status = “okay”;
pinctrl-names = “default”;
//pinctrl-0 = <&jetson_io_pinmux>;
// pinctrl-names = “default”;
//pinctrl-0 = <&spi1_sck_pin &spi1_miso_pin &spi1_mosi_pin &spi1_cs0_pin>;
bmi270@0 {
compatible = “bosch,bmi270”;
reg = <0x0>;
spi-max-frequency = <5000000>;
interrupt-parent = <&gpio>;
interrupts = <97 IRQ_TYPE_EDGE_RISING>; // Using pin 97
spi-cpha;
spi-cpol;
};
tis driver is getting loaded ,but unable to see any signals in cs miso mosi of 40 oin connector and chip read fails can some one help me on this ,i an doing this on jetson orin nx
to verify my board is working
i have used PZ.07 as gpio which is sudo gpioset gpiochip0 137=0 137=1 its is not toggled while this time PZ.07 is not claimed as spi1
Have you used the scope to check if the signal output is correct? i did not get anything
dmesg: i am dynamically instering bmi270.ko
spidev 0.0 BMI270 SPI probe started
spidev 0.0unexpected chipid 0x00 thiis is i am getting
[ 17.867858] r8168: enP8p1s0: link up
[ 17.867953] IPv6: ADDRCONF(NETDEV_CHANGE): enP8p1s0: link becomes ready
[ 53.765498] bmi270 spi0.0: BMI270 SPI probe started
[ 53.765521] bmi270 spi0.0: Failed to get CS GPIO
[ 53.766592] bmi270 spi0.0: BMI270 Chip ID: 0x00
[ 53.766598] bmi270 spi0.0: Unexpected chip ID: 0x00
[ 53.766644] bmi270 spi0.1: BMI270 SPI probe started
[ 53.766659] bmi270 spi0.1: Failed to get CS GPIO
[ 53.767515] bmi270 spi0.1: BMI270 Chip ID: 0x00
[ 53.767518] bmi270 spi0.1: Unexpected chip ID: 0x00
[ 53.767553] bmi270 spi1.0: BMI270 SPI probe started
[ 53.767562] bmi270 spi1.0: Failed to get CS GPIO
[ 53.768508] bmi270 spi1.0: BMI270 Chip ID: 0x00
[ 53.768511] bmi270 spi1.0: Unexpected chip ID: 0x00
[ 53.768529] bmi270 spi1.1: BMI270 SPI probe started
[ 53.768534] bmi270 spi1.1: Failed to get CS GPIO
[ 53.768876] bmi270 spi1.1: BMI270 Chip ID: 0x00
[ 53.768878] bmi270 spi1.1: Unexpected chip ID: 0x00
do we need to bind the 40 pin connector to the soc pins or bmi270@0 {
compatible = “bosch,bmi270”;
reg = <0x0>;
spi-max-frequency = <5000000>;
interrupt-parent = <&gpio>;
interrupts = <97 IRQ_TYPE_EDGE_RISING>; // Using pin 97
spi-cpha;
spi-cpol;
controller-data {
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x10>;
nvidia,tx-clk-tap-delay = <0x0>;
};
};
bmi270@1 {
compatible = "bosch,bmi270";
reg = <0x1>;
spi-max-frequency = <5000000>;
interrupt-parent = <&gpio>;
interrupts = <97 IRQ_TYPE_EDGE_RISING>;
controller-data {
nvidia,enable-hw-based-cs;
nvidia,rx-clk-tap-delay = <0x10>;
nvidia,tx-clk-tap-delay = <0x0>;
};
};
``` in this we are setting status =okay this itself fine ??
For the custom carrier board, I would suggest you using the pinmux spreadsheet to configure the pins for SPI.
If you have the similar design as the devkit, Jetson-IO may also work on your board as you’ve verified SPI loopback test.
It seems the CS not working as exepected.
Are you using SPI0_CS1 for BMI270 module?
Please share the block diagram of your connections with us to know your setup.
I would also like the check the full dmesg and device tree.
Please share them as file here.