12-19-2017 02:06 AM
I am using the PicoZed Board FMC2 version.
I want to boot this board into u-Boot and use the i2c interface here, to access multiple i2c devices. (the FMC2 Board will in the future be replaced, this is for a test run).
My current way of building u-Boot follows this example.
1. Create a Vivado 2017.2 project, (following the tutorial 8 http://picozed.org/support/design/13076/106
with ps i2c, enable it an mio 14 mio 15). Create hdl wrapper, build bitstream, export hardware with bitstream. to create a .hdl file.
2. Create a petalinux project:
$ petalinux-create --type project --template zynq --name <plnx-proj-root> $ cd <Vivado Folder>/<Vivado Folder>.sdk/ $ petalinux-config --get-hw-description -p <plnx-proj-root> $ cd <plnx-proj-root> $ petalinux-build
just use standard settings
After that i would create a u-Boot BOOT.bin
petalinux-package --boot --format BIN --fsbl ./images/linux/zynq_fsbl.elf --u-boot --force
and put it onto the sd-card and boot up into u-boot and open it in a terminal like MobaXTerm.
(even flashing the fpga via the sdk to include the i2c tutorial from picozed, does not change anything, for the following situation)
I have 3 resulting problems:
1) Is my way of doing things correct?
2) If i do these steps with the 2017.2 toolchain u-boot never includes a i2c executable which i could run from the shell.
But if i use the 2017.3 toolchain i can use the i2c tool/program/executable.
3) if i run the i2c program from the 2017.3 toolchain generated version, i can not see anything if i use i2c probe to check if the max44000 is available on the i2c bus.
What i just want to do is use the u-boot to communicate with my i2c devices. The question is, how?
12-19-2017 07:03 AM
You would need to review the devicetree, to make sure that the i2c nodes are added.
For example, if you are using a PicoZed, then you would be using the zynq_picozed_defconfig in the uboot settings in Petalinux.
This points to the zynq-picozed.dts. However, here it doesnt look like there are any i2c nodes added. So, you would have to add these manually to the system-user.dtsi in Petalinux project.
12-21-2017 01:30 AM
I have 2 new problems with this solution.
1. Which settings should i add into the dtsi file?
Copying the info from here: https://github.com/Xilinx/linux-xlnx/blob/master/arch/arm/boot/dts/zynq-zc702.dts line 111- 138 (plus closing braces)
brought me just a compilation error for the device tree.
I mean i am just want to see my i2c devices through u-boot, with picozed and the fmc 2 board.
2. Because of decisions i could not influence, i had to change to the 2016.3 version.
How could i activate i2c here? because i can't find the necessary dtsi file. And also don't know what to input.
12-21-2017 02:42 AM
You would need to add the nodes for your I2C devices in the system-user.dtsi.
I cant tell what the content would be, as I dont know what HW you have on the FMC.
Could be eeprom, an osc? ect..
Have a look at the zcu102 devicetree as a reference
12-21-2017 05:32 AM
Well i am using this development board:
And which file is the equivalent dtsi file for petalinux 2016.3?