Showing results for 
Show  only  | Search instead for 
Did you mean: 
Registered: ‎12-19-2017

PicoZed I2C u-boot

I am using the avnet FMC Board 2 with a PicoZed as a devkit. My Vivado and petalinux suite is the 2016.3 version.


I can compile u-boot and petalinux and boot both.

While using the max44000 as a standard i2c device i get the following. error:

U-Boot-PetaLinux> i2c bus
Bus -1: i2c@e0004000
U-Boot-PetaLinux> i2c dev 0
Setting bus to 0
Failure changing bus number (-19)
U-Boot-PetaLinux> i2c probe 0
No I2C bus selected
U-Boot-PetaLinux> i2c bus 0
Invalid bus 0: err=-19

The Cadence driver is enabled.




Is the device tree my problem?

Where and what should i change?




As my testing continues, i think my problem lies inside the device tree.

The best way to adjust it would probably be inside the file because this file.


What settings should i adjust here for a correctly working i2c interface?

0 Kudos
1 Reply
Registered: ‎12-19-2017

I could not fix the u-boot error.
But i could fix accessing the device via Linux.


When using PetaLinux, enable the gpio pin 0 of the multiplexer. After that sweeping the i2c bus shows you a device.


The commands for the Picozed board are as follows:

echo 906 > /sys/class/gpio/export
echo out > /sys/class/gpio/gpio906/direction
echo 1 > /sys/class/gpio/gpio906/value

following this tutorial:


after that an i2cdetect -r 0 shows the needed device on the bus.


parts of my device tree:(adjust the zynq7000.dtsi)

// zynq-7000.dtsi
i2c0: i2c@e0004000 {
			compatible = "cdns,i2c-r1p10";
			status = "disabled";
			clocks = <&clkc 38>;
			interrupt-parent = <&intc>;
			interrupts = <0 25 4>;
			reg = <0xe0004000 0x1000>;
			#address-cells = <1>;
			#size-cells = <0>;
			i2c5@4a {
				#address-cells = <0x1>;
				#size-cells = <0x0>;
				compatible = "maxim,max44000";
				reg = <0x4a>;


I still have no fix for this problem under u-boot.
And newer versions of petalinux just don't compile u-boot with the cadence driver enabled.

And setting pin 0 as an output pin with value 1 does not change anything under u-boot

0 Kudos