UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Explorer
Explorer
3,665 Views
Registered: ‎10-29-2007

PL IIC Got unexpected IRQ

Jump to solution

I was able to get PS I2C working fine. Now i'm trying to get the PL one working. I enabled it in the driver and can see it in /dev. I can also open the device fine. But, when I try to write to it it just returns with an incorrect number of bytes written (255).

 

Has anyone tried the PL I2C driver? Does this device tree entry look ok?

 

axi_iic_0: i2c@41600000 {
compatible = "xlnx,axi-iic-1.02.a", "xlnx,xps-iic-2.00.a";
interrupt-parent = <&ps7_scugic_0>;
interrupts = <0 59 4>;
reg = <0x41600000 0x10000>;
xlnx,gpo-width = <0x1>;
xlnx,iic-freq = <0x186a0>;
xlnx,instance = "axi_iic_0";
xlnx,scl-inertial-delay = <0x0>;
xlnx,sda-inertial-delay = <0x0>;
xlnx,sda-level = <0x1>;
xlnx,ten-bit-adr = <0x0>;
} ;

 

Any other ideas on how to debug this? Note this is on a Zynq fwiw.

 

0 Kudos
1 Solution

Accepted Solutions
Explorer
Explorer
4,805 Views
Registered: ‎10-29-2007

Re: PL IIC Got unexpected IRQ

Jump to solution
if it helps, this is the device tree I ended up using
axi_iic_0: i2c@41600000 {
compatible = "xlnx,axi-iic-1.01.b", "xlnx,xps-iic-2.00.a";
interrupt-parent = <&ps7_scugic_0>;
reg = <0x41600000 0x10000>;
interrupts = <0 59 0>;
xlnx,ten-bit-adr = <0x0>;
xlnx,gpo-width = <0x1>;

#address-cells = <1>;
#size-cells = <0>;
} ;

0 Kudos
3 Replies
Explorer
Explorer
4,806 Views
Registered: ‎10-29-2007

Re: PL IIC Got unexpected IRQ

Jump to solution
if it helps, this is the device tree I ended up using
axi_iic_0: i2c@41600000 {
compatible = "xlnx,axi-iic-1.01.b", "xlnx,xps-iic-2.00.a";
interrupt-parent = <&ps7_scugic_0>;
reg = <0x41600000 0x10000>;
interrupts = <0 59 0>;
xlnx,ten-bit-adr = <0x0>;
xlnx,gpo-width = <0x1>;

#address-cells = <1>;
#size-cells = <0>;
} ;

0 Kudos
Visitor snehaputhani
Visitor
3,251 Views
Registered: ‎09-17-2014

Re: PL IIC Got unexpected IRQ

Jump to solution

Even I am facing the same issue with PL I2C driver.

My device tree looks like this:

axi_iic:i2c@41600000 {
                        compatible = "xlnx,xps-iic-2.00.a";
            reg = < 0x41600000 0x10000 >;
            interrupt-parent = <&ps7_scugic_0>;
            interrupts = <0 59 4>;
            xlnx,ten-bit-adr = <0x0>;
            xlnx,gpo-width = <0x1>;
            #size-cells = <0>;
            #address-cells = <1>;
                };

 

When I try to test the driver by typing the following on console:

 

echo 1 >> i2c-0

 

I get the following error:

xiic-i2c 41600000.i2c: xiic_process Got unexpected IRQ

 

Any suggestion regarding this, am I doing something wrong?

 

Tags (1)
0 Kudos
Visitor snehaputhani
Visitor
3,096 Views
Registered: ‎09-17-2014

Re: PL IIC Got unexpected IRQ

Jump to solution

The issue of unexpected IRQ got resolved. The problem was with the interrupt number. It is supposed to be 32 and not 59 (91-32=59). The final device tree node looks like as shown below:

 

axi_iic:i2c@41600000 {
            compatible = "xlnx,xps-iic-2.00.a";
            reg = < 0x41600000 0x10000 >;
            interrupt-parent = <&ps7_scugic_0>;
            interrupts = <0 32 4>;
            xlnx,ten-bit-adr = <0x0>;
            xlnx,gpo-width = <0x1>;
            #size-cells = <0>;
            #address-cells = <1>;

};

 

Another issue which I am facing now is whenever I read or write to the device, I get "Error no 110" which is -ETIMEDOUT error. I am trying to resolve this issue , any hints on this would be welcome.

0 Kudos