AnsweredAssumed Answered

i.mx8m how to configure ecspi2 pins as ecspi function

Question asked by coin du on Sep 13, 2018
Latest reply on Sep 13, 2018 by igorpadykov

Hi anyone:

    I want to pull out the ECSPI2_SCLK ECSPI2_MOSI ECSPI2_MISO ECSPI2_SCLK pins to the SPI function。 configure device tree as follows

 

pinctrl_ecspi2: ecspi2grp {
fsl.pins = <
MX8MQ_IOMUXC_ECSPI2_SCLK_GPIO5_IO10 0x16
MX8MQ_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x16
MX8MQ_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x16
MX8MQ_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x1816
>;
}; 

 

&ecspi1{
fsl,spi-num-chipselects= < 1 >;
cs-gpios = <&gpio5 10 0 > ;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2 >;
status = "okay";
#address-cells=<1>;
#size-cells=<0>;
spidev@0x00{
#address-cellss=<1>;
#size-cells=<1>;
compatible = "spidev";
spi-max-frequency = <20000000>;
reg = <0>;
};


};

while the ecspi1 in fsl-imx8mq.dtsi "compatible = "fsl,imx6ul-ecspi", "fsl,imx51-ecspi";"

Then i search the compatible in kernel code , the file is drivers/spi/spi-imx.c

but make menuconfig in kernel , can`t choose the configure.

 

can anybody to tell me how to deal with it.

 

Outcomes