ARGroup Aleš Ruda

How to get working PS I2C in Xillinux

by Administrator 14. November 2012 12:31

I would like to join camera Aptina MT9V034 to the ZedBoard. The camera is configured via I2C bus and video data will be processed using the PL. To save PL resources I want to use PS I2C.

  1. Configure I2C in XPS. Double click on system.xmp in the "boot image creation kit"\system. In my case MIO 10..11.
    Zynq configuration
    Zynq configuration
  2. It is necessary to rebuild FSBL. From XPS export a project to the SDK and add new standalone project Zynq FSBL. Select Release configuration and rebuildit project. Copy compiled ... \Release\FSBL.elf to "boot image creation kit"\boot.
  3. Regenerate boot.bin. Run the makeboot.bat In the folder "boot image creation kit"\boot and resulting boot.bit copy to first partition of the SD card.
  4. Recompile the kernel.
    1. Download sources.
      $ git clone
    2. Apply patches from "/usr/src/xillinux/kernel-patches".
    3. Edit ".config". Set CONFIG_I2C_CHARDEV option to y.
    4. $ make
    5. Copy arch/arm/boot/zImage to the first partition of the SD card.
  5. Edit DTS.
    1. Decompile a DTB.
      $ dtc -I dtb -O dts -o devicetree.dts devicetree.dtb
    2. To node ax@0 in devicetree.dts supplement.
      i2c0: i2c @ e0004000 
         compatible = "xlnx, PS7-i2c-1.00.a";
         reg = <0x1000 0xE0004000>;
         interrupts = <0 25 0>;
         interrupt-parent = <1>;
         bus-id = <0>;
         input-clk = <111111111>;
         i2c-clk = <100000>;
         # address-cells = <1>;
         # size-cells = <0>;
    3. Compile DTB.
      $ dtc -I dts -O dtb -o devicetree.dtb devicetree.dts
  6. Reboot ZedBoard.
  7. In /dev exists i2c-0.
  8. Type
    $ I2cdetect-l
    i2c-0 i2c XILINX I2C I2C adapter at e0004000



Month List