IMX6Q adding ECSPI1 driver

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

IMX6Q adding ECSPI1 driver

558 Views
yongggg
Contributor I

Hi all,

Recently I am trying to get Linux Kernel SPI driver working with ECSPI1 on IMX6Q. I have successfully implemented the driver on ECSPI3 and passed the close-loop SPI test. The driver and device tree are matching well with a character device node at /dev/spidev32766.0. However when I am adding a new SPI device node in file <imx6qdl-sabreauto.dtsi> with the following modification:

&ecspi1 {
fsl,spi-num-chipselects = <1>;
cs-gpios = <&gpio3 19 0>;
//cs-gpios = <0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1_1 &pinctrl_ecspi1_cs_1>;
//pinctrl-0 = <&pinctrl_ecspi1_1>;
status = "okay";
spidev1: spi@0 {
compatible = "spidev";
reg = <0>;
spi-max-frequency = <1000000>;
};
};

I am able to create a new character device node at /dev/spidev32765.0. But there is data sending out when doing the close-loop test. 

What could I possibly miss? Any help would be appreciated. Thanks!

Labels (1)
0 Kudos
1 Reply

301 Views
Carlos_Musich
NXP Employee
NXP Employee

Hi yong,

the commented lines are the ones that you are adding and the ones that causes the problem?

 If this is the case then how are you handling the CS? I can see that you are commenting out the pin that works as chip select.

Regards,

Carlos

0 Kudos