UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor psocbee
Visitor
520 Views
Registered: ‎07-24-2018

petalinux-2018.3 on ZCU104 fails to access the GPIO expander

Jump to solution

Hi,

when i switched my ZCU104 project from petalinux-2018.2 to petalinux-2018.3 the following error message appeared during Linux boot:

"[    6.593450] pca953x 0-0021: failed reading register"

Actually the GPIO expander chip U97 on the ZCU104 is not detected and the on-board GPIOs are not not available. With petalinux-2018.2 it works correctly. Further investigation showed that the GPIO expander chip on the ZCU104 board is hard wired to I2C address 0-0020 but petalinux-2018.3 probes the GPIO chip at I2C address 0-0021. This seems to be an issue of the ZCU104 petalinux-2018.3 board support package.

Any idea how to reconfigure the correct address for the ZCU104 GPIO expander chip when using the petalinux-2018.3 bsp?

0 Kudos
1 Solution

Accepted Solutions
Visitor psocbee
Visitor
413 Views
Registered: ‎07-24-2018

Re: petalinux-2018.3 on ZCU104 fails to access the GPIO expander

Jump to solution

There is a bug in the device tree description file zcu104-revc.dtsi (petalinux 2018.3):

...

&i2c1 {

...

    tca6416_u97: gpio@21 {          /* bug: this should be gpio@20 */
        compatible = "ti,tca6416";
        reg = <0x21>;               /* bug: this sould be <0x20> */
        gpio-controller;
        #gpio-cells = <2>;
    };

...

};

...

 

This can be fixed with the following entry in

<project-dir>/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

/*
   bug-fix: wrong i2c address for tca6416_u97
   petalinux 2018.3 defines i2c address 0x21 in file zcu104-revc.dtsi
   but it should be 0x20
*/
&i2c1 {
    tca6416_u97: gpio@20 {
        compatible = "ti,tca6416";
        reg = <0x20>;
        gpio-controller;
        #gpio-cells = <2>;
    };
    /delete-node/ gpio@21;
};

 

0 Kudos
1 Reply
Visitor psocbee
Visitor
414 Views
Registered: ‎07-24-2018

Re: petalinux-2018.3 on ZCU104 fails to access the GPIO expander

Jump to solution

There is a bug in the device tree description file zcu104-revc.dtsi (petalinux 2018.3):

...

&i2c1 {

...

    tca6416_u97: gpio@21 {          /* bug: this should be gpio@20 */
        compatible = "ti,tca6416";
        reg = <0x21>;               /* bug: this sould be <0x20> */
        gpio-controller;
        #gpio-cells = <2>;
    };

...

};

...

 

This can be fixed with the following entry in

<project-dir>/project-spec/meta-user/recipes-bsp/device-tree/files/system-user.dtsi

/*
   bug-fix: wrong i2c address for tca6416_u97
   petalinux 2018.3 defines i2c address 0x21 in file zcu104-revc.dtsi
   but it should be 0x20
*/
&i2c1 {
    tca6416_u97: gpio@20 {
        compatible = "ti,tca6416";
        reg = <0x20>;
        gpio-controller;
        #gpio-cells = <2>;
    };
    /delete-node/ gpio@21;
};

 

0 Kudos