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.
- Configure I2C in XPS. Double click on system.xmp in the "boot image creation kit"\system. In my case MIO 10..11.
Zynq configuration
- 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.
- 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.
- Recompile the kernel.
- Download sources.
$ git clone https://github.com/Digilent/linux-3.3-digilent.git
- Apply patches from "/usr/src/xillinux/kernel-patches".
- Edit ".config". Set CONFIG_I2C_CHARDEV option to y.
-
$ make
- Copy arch/arm/boot/zImage to the first partition of the SD card.
- Edit DTS.
- Decompile a DTB.
$ dtc -I dtb -O dts -o devicetree.dts devicetree.dtb
- 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>;
};
- Compile DTB.
$ dtc -I dts -O dtb -o devicetree.dtb devicetree.dts
- Reboot ZedBoard.
- In /dev exists i2c-0.
- Type
$ I2cdetect-l
i2c-0 i2c XILINX I2C I2C adapter at e0004000
I2C
9bb5e986-dabe-49b1-8d5d-7074a453dc65|0|.0|96d5b379-7e1d-4dac-a6ba-1e50db561b04
Tags: en
ZedBoard