Skip to content
This repository has been archived by the owner on Aug 15, 2024. It is now read-only.

kernel: i2c: pca9555 fails to probe #48

Open
leiyu-bytedance opened this issue Sep 8, 2020 · 3 comments
Open

kernel: i2c: pca9555 fails to probe #48

leiyu-bytedance opened this issue Sep 8, 2020 · 3 comments

Comments

@leiyu-bytedance
Copy link
Contributor

If we add pca9555 in dts, it fails to probe with below errors:

[    2.561952] pca953x 8-0024: failed writing register
[    2.567061] pca953x: probe of 8-0024 failed with error -110
[    3.601837] pca953x 8-0025: failed writing register
[    3.606933] pca953x: probe of 8-0025 failed with error -110

The example dts is:

&i2c8 {
    multi-master;
    aspeed,dma-buf-size = <4095>;
    aspeed,hw-timeout-ms = <300>;
    status = "okay";
    pca0:pca9555@24 {
        compatible = "nxp,pca9555";
        reg = <0x24>;
        #address-cells = <1>;
        #size-cells = <0>;
        gpio-controller;
        #gpio-cells = <2>;
        ...

If we revert the patch https://github.com/Intel-BMC/openbmc/blob/intel/meta-openbmc-mods/meta-common/recipes-kernel/linux/linux-aspeed/0075-Refine-initialization-flow-in-I2C-driver.patch, the issue is gone.

So it looks like something is wrong with the patch.

@yongli3
Copy link
Contributor

yongli3 commented Sep 9, 2020

@leiyu-bytedance I did not find the I2C-8 whith "i2cdetect -l" command. Let us perform these steps to narrow down this issue:

  1. Do not revert the 0075 patch
  2. Do not Add pca9555 into the dts file
    Boot into shell, run "i2cdetect -y 8" to check if the pca9555 is persist
    cd /sys/bus/i2c/devices/i2c-8
    echo pca9555 SlaveAddr > new_device

Check if you can load the driver manually

@leiyu-bytedance
Copy link
Contributor Author

@leiyu-bytedance I did not find the I2C-8 whith "i2cdetect -l" command. Let us perform these steps to narrow down this issue:

  1. Do not revert the 0075 patch
  2. Do not Add pca9555 into the dts file
    Boot into shell, run "i2cdetect -y 8" to check if the pca9555 is persist
    cd /sys/bus/i2c/devices/i2c-8
    echo pca9555 SlaveAddr > new_device

Check if you can load the driver manually

Yup, if I do not add the device in dts and load the driver after BMC is booted, it's OK.
The issue only occurs when the device is in dts.

Please be noted that the device has to be in dts, because it exposes the GPIOs for other devices (e.g. gpio-keys-polled)

@yongli3
Copy link
Contributor

yongli3 commented Sep 16, 2020

Some release information in mail list: https://lists.ozlabs.org/pipermail/openbmc/2020-September/023039.html

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants