IMX8M Mini evk How to configure 3 wire spi config in device tree

cancel
Showing results for 
Search instead for 
Did you mean: 

IMX8M Mini evk How to configure 3 wire spi config in device tree

91 Views
Dhevan
Contributor III

Hi,

    We are using imx8mmini evk board for our development.

    We want to configure 3 wire spi communication.

    What are the changes needs to be done in device tree file ?

Thanks & Regards,

       Vasu

Labels (1)
0 Kudos
3 Replies

87 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Vasu

 

one can look at ecspi1 example below

https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8mm-ddr3l...

 

Best regards
igor

0 Kudos

80 Views
Dhevan
Contributor III

Hi @igorpadykov ,

      Thanks for your reply.

      We want to communicate AD7940 adc module to imx8m mini evk board.

      Sensor pin contains CS, CLK, DATA.

      How to configure DATA pin in device tree file and which pin we need to use mosi (or) miso ?

Thanks & Regards,

      Vasu

0 Kudos

69 Views
igorpadykov
NXP TechSupport
NXP TechSupport

Hi Vasu

 

pin usage depends on mode : master or slave, described in

sect.10.1.1.2 Modes and Operations

i.MX 8M Mini Applications Processor Reference Manual

 

1.jpg

 

SCLK <--- ECSPI1_SCLK
SDATA ---> ECSPI1_MISO
CS <--- GPIO5_IO9

 

another dts example :

https://github.com/varigit/linux-imx/blob/imx_4.19.35_1.1.0_var01/arch/arm64/boot/dts/freescale/fsl-...


pinctrl_ecspi1: ecspi1grp {

fsl,pins = <

MX8MM_IOMUXC_ECSPI1_SCLK_ECSPI1_SCLK 0x13
MX8MM_IOMUXC_ECSPI1_MOSI_ECSPI1_MOSI 0x13
MX8MM_IOMUXC_ECSPI1_MISO_ECSPI1_MISO 0x13

MX8MM_IOMUXC_ECSPI1_SS0_GPIO5_IO9 0x13

MX8MM_IOMUXC_GPIO1_IO12_GPIO1_IO12 0x13

>;  };

 

Best regards
igor

0 Kudos