SPI detection in IMX8QXP
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
>;
};

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello @ranjithkumar_kv
Please look this post.
There is explained how to add new nodes of SPI in i.MX8QXP.
Best regards.
Salas.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
Also in the dmesg logs we're getting the following error even though we followed the steps mentioned by you in the previous post.
Please look into it and help us to resolve the issue.
Regards,
Ranjith Kumar.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Salas,
Any update on our query?
Regards,
Ranjith Kumar
