cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
Highlighted
Participant
Participant
1,782 Views
Registered: ‎11-27-2018

I2C-detect error: cdns-i2c e0004000.i2c: timeout waiting on completion

I've a custom Zynq7020 board, with petalinux 2018.2 installed.

I routed the i2c0 port (in ARM) signals to EMIO, and in zynq7020.dtsi, the i2c0 section is listed:

i2c0: i2c@e0004000 {
	compatible = "cdns,i2c-r1p10";
	status = "disabled";
	clocks = <&clkc 38>;
	interrupt-parent = <&intc>;
	interrupts = <0 25 4>;
	reg = <0xe0004000 0x1000>;
	#address-cells = <1>;
	#size-cells = <0>;
};

In pcw.dtsi:

&i2c0 {
	clock-frequency = <400000>;
	status = "okay";
};

In system-user.dtsi, I added a section for RTC chip PCF85063:

&i2c0 {
	clock-frequency = <400000>;
	status = "okay";
	rtc@51{
		compatible = "nxp,pcf85063";
		#address-cells = <1>;
		#size-cells = <0>;
		reg = <0x51>;
	};
};

After booting, I can see the device file: /dev/i2c-0, but when I use i2cdetect to test it, timeout messages are printed:

root@zynq7020:~# i2cdetect -y -r 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: cdns-i2c e0004000.i2c: timeout waiting on completion
-- cdns-i2c e0004000.i2c: timeout waiting on completion
-- cdns-i2c e0004000.i2c: timeout waiting on completion
-- cdns-i2c e0004000.i2c: timeout waiting on completion
-- cdns-i2c e0004000.i2c: timeout waiting on completion
...

I test the SCL,SDA signal with oscilloscope, but see no level change.

I noticed that, in some posts the compatible string is like:

compatible = "xlnx,ps7-i2c-1.00.a";

What's difference between "xlnx,ps7-i2c-1.00.a" and "cdns,i2c-r1p10"? What should I do next?

Thanks.

0 Kudos
4 Replies
Highlighted
Visitor
Visitor
1,598 Views
Registered: ‎06-18-2019

I have the same problem. Did you solved your problem?

0 Kudos
Highlighted
Participant
Participant
1,578 Views
Registered: ‎11-27-2018

Maybe you have not added the "IOBUF" cells to each scl and sda pins?

0 Kudos
Highlighted
Moderator
Moderator
1,562 Views
Registered: ‎06-27-2017

Hi @jhon ,

 

Compatible name is "cdns,i2c-r1p10".

Did you get chance to test your slave on bare-metal or u-boot? to check whether communication is fine or not

Try using any of examples for slave to check at bare-metal.

https://github.com/Xilinx/embeddedsw/tree/master/XilinxProcessorIPLib/drivers/iicps/examples

 

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Participant
Participant
1,549 Views
Registered: ‎11-27-2018

Thank you  

0 Kudos