cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
rotkfrn147
Visitor
Visitor
955 Views
Registered: ‎12-04-2018

petalinux I2C enable problem

I am currently using petalinux 2017.04 on zedboard. I'm building and testing an application on linux, but I2C will not work. (The hardware configuration file is working only with the default bsp file provided by the zedboard site. The file is in use without any modification.)

Based on the information provided by https://xilinx-wiki.atlassian.net/wiki/spaces/A/pages/18841974/Linux+I2C+Driver, I have built and tested device-trees and apps. I am testing an example using the basic I2C eeprom (AT24).

By the way, when linux boots, an error occurs even in the part where I2C is set. The corresponding error is:
=============================================================================
ls i2c / dev entries driver
cdns-i2c e0004000.i2c: 400 kHz mmio e0004000 irq 23
cdns-i2c e0004000.i2c: timeout waiting on completion
pca954x 0-0074: probe failed
cdns-wdt f8005000.watchdog: Xilinx Watchdog Timer at e08aa000 with timeout 10s
==============================================================================

When the command "# i2cdecter -F 0" is executed after booting, "cdns-i2c e0004000.i2c: timeout waiting on completion" error occurs.

I have not been able to test because I have encountered such an error before I tried to run the app.
I do not know, I will upload the currently configured device-tree. I think it's because of the configuration of kernel config or device-tree, but I do not know exactly why.

============= device -tree =============

/include/ "system-conf.dtsi"
/ {

    aliases {
        i2c0 = &i2c0;
    };


};
&usb0 {
    status = "okay";
    dr_mode = "peripheral";
};

&i2c0
{
    status = "okay";
    clock-frequency = <400000>;
    pinctrl-names = "default", "gpio";

    
    i2c-switch@74 {
        compatible = "nxp,pca9541";
        #address-cells = <1>;
        #size-cells = <0>;
        reg = <0x74>;

        interrupt-parent = <0x1>;
        interrupts = <17 0>;
        interrupt-controller;
        #interrupt-cells = <2>;

        i2c@2 {
            #address-cells = <1>;
            #size-cells = <0>;
            reg = <2>;

            eeprom@54 {
                compatible = "at,24c08";
                reg = <0x54>;
            };
        };
    };

};

==============================================================

====================== kernel config ============================

1.png

 

 

 

 

 

 

22231.png

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

3.png

0 Kudos
Reply
0 Replies