Hi NXP team,
I have created the node and pin settings for the spi3 in dts but I am unable the see the spidev_test data tx/rx as shown in the logs I have connected the MOSI and MISO pins also for loopback but no rx data I am getting pls check :
dts :
&lpspi3 {
#address-cells = <1>;
#size-cells = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpspi3>;
cs-gpios = <&gpio2 8 GPIO_ACTIVE_LOW>;
fsl,spi-num-chipselects = <1>;
status = "okay";
spidev0: spi@0 {
compatible = "rohm,dh2228fv";
spi-max-frequency = <1000000>;
reg = <0>; /* Chip select 0 */
};
};
pinctrl_lpspi3: lpspi3grp {
fsl,pins = <
MX93_PAD_GPIO_IO08__LPSPI3_PCS0 0x3fe
MX93_PAD_GPIO_IO08__GPIO2_IO8 0x3fe
MX93_PAD_GPIO_IO09__LPSPI3_SIN 0x3fe
MX93_PAD_GPIO_IO10__LPSPI3_SOUT 0x3fe
MX93_PAD_GPIO_IO11__LPSPI3_SCK 0x3fe
>;
};
spidev_test logs :
spidev_test -D /dev/spidev0.0 -v -p "hello"
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 kHz)
TX | 68 65 6C 6C 6F __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ |hello|
RX | FF FF FF FF FF __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ |.....|
spidev_test -D /dev/spidev0.0 -v
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 kHz)
TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D |......@.........................|
RX | FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF |................................|
please help me to resolve this.
thanks.
Hi,
Any suggestions on this I want to validate the spi interface please help in this.
Thanks.
Hello @sbmd_1234
I hope you are doing very well.
Please refer to the imx93-11x11-evk-lpspi.dts.
Then, you should be able to get it working:
Without connection between SIN and SOUT:
With connection between SIN and SOUT:
FYI: tested on imx93evk and 6.6.23 bsp
Best regards,
Salas.
HI @Manuel_Salas
Thanks for your support!
Do I need to add the lpspi3 node in imx93-11x11-evk.dts file, or can we work with the DTS files "imx93-11x11-evk-lpspi.dts and imx93-11x11-evk-lpspi-slave.dts" as the spi configuration is already done?
Also, I cannot see the /dev/spidev interface if I am not adding the node in imx93-11x11-evk.dts file. Please help in this what configurations actually I need to validate the spi.
Thanks.
Hello @sbmd_1234
You can use imx93-11x11-evk-lpspi.dts directly and then you will be able to use the lpspi interface.
Best regards,
Salas.