Enabling spidev on iMX6

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Enabling spidev on iMX6

1,384 次查看
anooja_s1
Contributor I

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
};

标签 (1)
0 项奖励
回复
1 回复

980 次查看
igorpadykov
NXP Employee
NXP Employee

Hi Anooja

could you try to add #size-cells,#address-cells  properties to pic and rtc entries.

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

0 项奖励
回复