SPI detection in IMX8QXP

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

SPI detection in IMX8QXP

287 Views
Gokula_Kannan
Contributor I

Hi Team,


Board : imx8qxp
We made below dts changes for SPI. but could't get the node detection.

Cloud you please suggest solution for this issue.

&lpspi0 {
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpspi0>;
status = "okay";
};

&lpspi2 {
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpspi2>;
status = "okay";
};

&lpspi3 {
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lpspi3>;
status = "okay";
};


pinctrl_lpspi0: lpspi0grp {
fsl,pins = <
IMX8QXP_SPI0_CS0_ADMA_SPI0_CS0 0x06000021
IMX8QXP_SPI0_SCK_ADMA_SPI0_SCK 0x06000021
IMX8QXP_SPI0_SDI_ADMA_SPI0_SDI 0x00000021
IMX8QXP_SPI0_SDO_ADMA_SPI0_SDO 0x06000021
>;
};
pinctrl_lpspi2: lpspi2grp {
fsl,pins = <
IMX8QXP_SPI2_CS0_ADMA_SPI2_CS0 0x06000040
IMX8QXP_SPI2_SCK_ADMA_SPI2_SCK 0x06000021
IMX8QXP_SPI2_SDI_ADMA_SPI2_SDI 0x00000021
IMX8QXP_SPI2_SDO_ADMA_SPI2_SDO 0x06000021
>;
};
pinctrl_lpspi3: lpspi3grp {
fsl,pins = <
IMX8QXP_SPI3_CS0_ADMA_SPI3_CS0 0x00000060
IMX8QXP_SPI3_SCK_ADMA_SPI3_SCK 0x00000060
IMX8QXP_SPI3_SDI_ADMA_SPI3_SDI 0x00000060
IMX8QXP_SPI3_SDO_ADMA_SPI3_SDO 0x00000060
>;
};

 

0 Kudos
5 Replies

262 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @Gokula_Kannan 

 

Pleas try following the SPI example in device tree kernel:

https://github.com/nxp-imx/linux-imx/blob/lf-6.6.y/arch/arm64/boot/dts/freescale/imx8x-mek.dtsi#L861

I hope this can helps to you.

 

Best regards.

Salas.

0 Kudos

241 Views
ranjithkumar_kv
Contributor II

Hi Salas,

We've created the SPI nodes as per your suggestion but we're not able to see the spidev node and we're seeing errors in the dmesg logs. We are attaching the changes we've done in the dtsi file and dmesg error logs.

Regards,

Ranjith.

0 Kudos

227 Views
Alejandro_Salas
NXP TechSupport
NXP TechSupport

Hello @ranjithkumar_kv 

 

Please look this post.

 

There is explained how to add new nodes of SPI in i.MX8QXP.

 

Best regards.

Salas.

0 Kudos

193 Views
ranjithkumar_kv
Contributor II

Hi Salas,

After adding the slave to the spi nodes I'm able to see the spidev node in the /dev/ folder. But when I'm trying to transfer any data, it's showing like the image attached below. Attaching the spi node addition also below.

ranjithkumar_kv_0-1716806724566.png 

ranjithkumar_kv_2-1716806932621.png

 

Also in the dmesg logs we're getting the following error even though we followed the steps mentioned by you in the previous post.

ranjithkumar_kv_1-1716806784552.png

Please look into it and help us to resolve the issue.

 

Regards,
Ranjith Kumar.

0 Kudos

112 Views
ranjithkumar_kv
Contributor II

Hi Salas,

 

Any update on our query?

 

Regards,

Ranjith Kumar

0 Kudos