AnsweredAssumed Answered

Enabling spidev on iMX6

Question asked by Anooja S on Sep 21, 2017
Latest reply on Sep 22, 2017 by igorpadykov

I am working on a custom board based on IMX6Q6AVT10AC and it runs linux kernel version 3.14.28.

I have 3 SPI devices connected to ECSPI1( RTC, SPI Flash and PIC ). Initially only RTC and SPI Flash was enabled in the device tree and both were working fine. Now I have enabled PIC  too. Now rtc does not recieve chip select. But the other two chipselects are asserted correctly.

 

'dmesg | grep rtc'  gives the following error

rtc-pcf2123 spi0.2: chip not found
drivers/rtc/hctosys.c: unable to open rtc device (rtc0)

 

device tree entry for ecspi1:

&ecspi1 {
fsl,spi-num-chipselects = <3>;
cs-gpios = <&gpio4 9 0>, <&gpio3 24 0>, <&gpio3 25 0>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1>;
status = "okay";

#if 1
flash: m25p80@0 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "sst25vf016b";
spi-max-frequency = <10000000>;
reg = <0>;
};
#endif
#if 1
rtc: rtc-pcf2123@2 {
compatible = "rtc-pcf2123";
spi-cs-high;
spi-max-frequency = <2450000>;
reg = <2>;
};
#endif

#if 1
spidev: spidev@1 {
compatible = "spidev";
spi-cs-high;
spi-max-frequency = <100000>;
reg = <1>;
};
#endif
};

Outcomes