cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
dimatodor
Visitor
Visitor
819 Views
Registered: ‎09-05-2018

after add the second I2C systems prints message: failed to add to PM domain pd-i2c

 

Hardware: Enclustra Mercury+ XU1

   https://www.enclustra.com/en/products/system-on-chip-modules/mercury-xu1/

Software:

  Petalinux 2018.2

 

  I need to add the second I2C.

  I for this modify device tree - add in zynqmp.dtsi and zynqmp-enclustra-xu1.dts the next:

i2c1: i2c@ff030000 {

compatible = "cdns,i2c-r1p14", "cdns,i2c-r1p10";

          status = "disabled";

          interrupt-parent = <&gic>;

          interrupts = <0 18 4>;

          reg = <0x0 0xff030000 0x0 0x1000>;

          #address-cells = <1>;

          #size-cells = <0>;

          power-domains = <&pd_i2c1>;

};

&i2c1 {

          status = "okay";

          clock-frequency = <400000>;

          pinctrl-names = "default", "gpio";

          pinctrl-0 = <&pinctrl_i2c1_default>;

          pinctrl-1 = <&pinctrl_i2c1_gpio>;

          scl-gpios = <&gpio 8 GPIO_ACTIVE_HIGH>;

          sda-gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;

};

 

I build environment followed https://enclustra.github.io/ebe-docs/user-doc-xilinx/index_xilinx.html for SD Card (MMC)

 

  Build environment was successful. 

  After successful boot i2c1 device was not added.

The operating systems prints the next message

[    2.904464] cdns-i2c ff030000.i2c: failed to add to PM domain pd-i2c1: -13

[    3.918697] cdns-i2c ff020000.i2c: 400 kHz mmio ff020000 irq 25

[    3.958737] cdns-i2c ff030000.i2c: failed to add to PM domain pd-i2c1: -13

 

 Pls advise how to fix this error and add device i2c-1 in Enclustra Mercury+ XU1

 

Best regards

0 Kudos
1 Reply
w.helsby@dl.ac.uk
Participant
Participant
98 Views
Registered: ‎10-15-2015

I have just had the same problem with an Enclustra Mercury XU7+.

In the block diagram I opened the properties on the Zynq UltraScale and checked that the second I2C was enabled and connected to the correct pins.

I performed "Export hardware"

In Vitis I used the "Update hardware specification" .. however this does not work.

I looked at ./xxxx_eg15/zynqmp_pmufw/zynqmp_pmufw_bsp/psu_pmu_0/include/xparameters.h   and noticed that  there was still only 1 of IICPS mentioned:

/* Definitions for driver IICPS */
#define XPAR_XIICPS_NUM_INSTANCES 1

I deleted my vitis hardware platform project and started from scratch:

This time the xparamater file mentioned both IICPS:

/* Definitions for driver IICPS */
#define XPAR_XIICPS_NUM_INSTANCES 2

/* Definitions for peripheral PSU_I2C_0 */
#define XPAR_PSU_I2C_0_DEVICE_ID 0
#define XPAR_PSU_I2C_0_BASEADDR 0xFF020000
#define XPAR_PSU_I2C_0_HIGHADDR 0xFF02FFFF
#define XPAR_PSU_I2C_0_I2C_CLK_FREQ_HZ 99999001


/* Definitions for peripheral PSU_I2C_1 */
#define XPAR_PSU_I2C_1_DEVICE_ID 1
#define XPAR_PSU_I2C_1_BASEADDR 0xFF030000
#define XPAR_PSU_I2C_1_HIGHADDR 0xFF03FFFF
#define XPAR_PSU_I2C_1_I2C_CLK_FREQ_HZ 99999001

I built at new boot image using the new FSBL, PMUFW etc.

# dmesg | grep i2c
[ 4.455761] i2c /dev entries driver
[ 6.622036] cdns-i2c ff020000.i2c: 400 kHz mmio ff020000 irq 24
[ 6.628574] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 25

 

Seem OK now.

William.

 

 

 

0 Kudos