cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gcwang
Observer
Observer
3,709 Views
Registered: ‎07-10-2012

Why the i2c driver of linux-xlnx can not work?

I got the linux-xlnx from the Xilinx web site and config the hw platform supporting the i2c0 and i2c1,but the linux seemed not to work and stop in i2c driver, as follows.

 

xqspips e000d000.spi: at 0xE000D000 mapped to 0xE0862000, irq=51
GEM: BASEADDRESS hw: e000b000 virt: e0864000
XEMACPS mii bus: probed
eth0, pdev->id -1, baseaddr 0xe000b000, irq 54
GEM: BASEADDRESS hw: e000c000 virt: e0866000
XEMACPS mii bus: probed
mdio_bus e000c000: /amba@0/eth@e000c000/phy@23 PHY address 35 is too large
xemacps e000c000.eth: invalid address, use assigned
MAC updated a2:a6:e6:04:8f:f2
eth1, pdev->id -1, baseaddr 0xe000c000, irq 77
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
xusbps-ehci xusbps-ehci.0: Xilinx PS USB EHCI Host Controller
xusbps-ehci xusbps-ehci.0: new USB bus registered, assigned bus number 1
xusbps-ehci xusbps-ehci.0: irq 53, io mem 0x00000000
xusbps-ehci xusbps-ehci.0: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
Xilinx PS USB Device Controller driver (Apr 01, 2011)
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
at24 0-0050: 256 byte 24c02 EEPROM, writable, 1 bytes/write

xi2cps e0005000.i2c: 100 kHz mmio e0005000 irq 80

 

The dts file as follows:

 

 i2c0: i2c@e0005000 {
   compatible = "xlnx,ps7-i2c-1.00.a";
   reg = <0xE0005000 0x1000>;
   interrupts = <0 48 0>;
   interrupt-parent = <&gic>;
   bus-id = <0>;
   input-clk = <111111115>;
   i2c-clk = <100000>;
   
   #address-cells = <1>;
   #size-cells = <0>;
   
   m24c02_eeprom@50 {
    compatible = "at,24c02";
    reg = <0x50>;
   };
  };
              
                i2c1: i2c@e0004000 {
   compatible = "xlnx,ps7-i2c-1.00.a";
   reg = <0xE0004000 0x1000>;
   interrupts = <0 25 0>;
   interrupt-parent = <&gic>;
   bus-id = <1>;
   input-clk = <111111115>;
   i2c-clk = <100000>;
   
   #address-cells = <1>;
   #size-cells = <0>;
   m24c02_eeprom@50 {
    compatible = "at,24c02";
    reg = <0x50>;
   };

   rtc8564@51 {
    compatible = "rtc8564";
    reg = <0x51>;
   };
  };

 

I don't know  why the i2c module not to work, when removing the i2c config from dts file ,then it work well.

Can someone give me some suggestion?why?the i2c driver is error or the dts file about i2c is Inappropriate

0 Kudos
2 Replies
linnj
Xilinx Employee
Xilinx Employee
3,700 Views
Registered: ‎09-10-2008

Hi,

 

You don't give many details about what release of Linux you are running, or what board?

 

The ZC702 early revisions had some i2c issues (rev a and b I believe) where the clock and data were reversed.  I was thinking there is a thread about that on the forum.

 

We do use the i2c eeprom in our testing and it's working on the later 702 boards.

 

Thanks.

0 Kudos
gcwang
Observer
Observer
3,687 Views
Registered: ‎07-10-2012

The version of linux-xlnx is 3.3.0 14.2 from http://git.xilinx.com/ and  used for zedboard.

The zedboard and zc702 use the same zynq chip, I think the i2c driver can be used for zedboard.  

0 Kudos