Enabling ecspi4 on iMX6ULL 14x14 evk

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

Enabling ecspi4 on iMX6ULL 14x14 evk

Jump to solution
1,944 Views
mannsikchung
Contributor III

How can I enable ecspi4 on iMX6ULL 14x14 evk?

I enabled IMX_SPI feature in menuconfig and add below in device tree file

&ecspi4 {
   pinctrl-names = "default";
   pinctrl-0 = <&pinctrl_ecspi4>;
   num-chipselects = <1>;
   status = "okay";
};

But, kernel log shows below error 

spi_imx: probe of 2014000.ecspi failed with error -22

Please help me to enable ecspi4 in the evk.

Labels (1)
Tags (2)
1 Solution
1,049 Views
mannsikchung
Contributor III

Self Answer.

num-chipselects = <1>;

is not correct. this should be 

fsl,spi-num-chipselects = <1>;

Let me sum-up to enable ECSPI4 in iMX6ULL-14x14 evk.

In file imx6ull-14x14-evk.dts, add below

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

And add below in &iomuxc node

pinctrl_ecspi4: ecspi4grp {
   fsl,pins = <
      MX6UL_PAD_ENET2_TX_CLK__ECSPI4_MISO 0x4001b031
      MX6UL_PAD_ENET2_TX_EN__ECSPI4_MOSI 0x1b0b0
      MX6UL_PAD_ENET2_TX_DATA1__ECSPI4_SCLK 0x1b0b0
      MX6UL_PAD_ENET2_RX_ER__ECSPI4_SS0 0x1b0b0
   >;
};

 

Best Regards

View solution in original post

3 Replies
1,050 Views
mannsikchung
Contributor III

Self Answer.

num-chipselects = <1>;

is not correct. this should be 

fsl,spi-num-chipselects = <1>;

Let me sum-up to enable ECSPI4 in iMX6ULL-14x14 evk.

In file imx6ull-14x14-evk.dts, add below

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

And add below in &iomuxc node

pinctrl_ecspi4: ecspi4grp {
   fsl,pins = <
      MX6UL_PAD_ENET2_TX_CLK__ECSPI4_MISO 0x4001b031
      MX6UL_PAD_ENET2_TX_EN__ECSPI4_MOSI 0x1b0b0
      MX6UL_PAD_ENET2_TX_DATA1__ECSPI4_SCLK 0x1b0b0
      MX6UL_PAD_ENET2_RX_ER__ECSPI4_SS0 0x1b0b0
   >;
};

 

Best Regards

1,049 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi Mannsik,

you need also to enable the pins in the iomux node on dts.

You can see next document for reference.

Basic Device Tree for the Udoo Board 

And the post below explains what the parameters on this node are:

32Khz clock on CCM_CLKO2 (SD1_WP) 


Best regards,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

1,049 Views
mannsikchung
Contributor III

I added below in iomuxc node, but result is same as before. 

pinctrl_ecspi4: ecspi4grp {

            fsl,pins = <

                MX6UL_PAD_ENET2_TX_CLK__ECSPI4_MISO   0x70a1

                MX6UL_PAD_ENET2_TX_EN__ECSPI4_MOSI    0x70a1

                MX6UL_PAD_ENET2_TX_DATA1__ECSPI4_SCLK 0x70a1

                MX6UL_PAD_ENET2_RX_ER__ECSPI4_SS0     0x70a1

            >;

        };

Please, let me know what I'm missing.

0 Kudos