Bug 177111 - i2c_designware: Unmet (power) dependencies
Summary: i2c_designware: Unmet (power) dependencies
Status: CLOSED DOCUMENTED
Alias: None
Product: ACPI
Classification: Unclassified
Component: Config-Other (show other bugs)
Hardware: Intel Linux
: P1 normal
Assignee: Mika Westerberg
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-10-09 12:02 UTC by Jonas Aaberg
Modified: 2016-11-30 01:47 UTC (History)
2 users (show)

See Also:
Kernel Version: 4.8
Subsystem:
Regression: No
Bisected commit-id:


Attachments
DSDT (45.72 KB, application/x-bzip)
2016-10-09 12:02 UTC, Jonas Aaberg
Details
dmesg output (44.04 KB, text/plain)
2016-10-09 12:02 UTC, Jonas Aaberg
Details
My .config (44.26 KB, application/gzip)
2016-10-09 12:03 UTC, Jonas Aaberg
Details

Description Jonas Aaberg 2016-10-09 12:02:37 UTC
Created attachment 241231 [details]
DSDT

On my Asus T100HAN, cherry trail based computer, running
i2cdetect on all i2c busses works, except on bus 4.

i2cdetect results in several:
--
i2c_designware 808622C1:04: controller timed out
..
--
until I press ctrl-c.

I think it has something to do with that bus 4 has different
(power?) dependencies than the other buses.
From DSDT:

The other i2c busses:
--
          Name (_DEP, Package (0x01)  // _DEP: Dependencies
            {
                PEPD
            })
--

Bus 4:
--
            Name (_DEP, Package (0x02)  // _DEP: Dependencies
            {
                PEPD, 
                GPO0
            })
--

Device (GPI0) is:
--
Name (_HID, "INT33FF")  // _HID: Hardware ID
General Purpose Input/Output (GPIO) controller - SOUTHWEST
--

It looks like not just powering GPO0 is enough, but some fiddling with gpios
is needed in both power state 0 and 3.

See attached dsdt
Comment 1 Jonas Aaberg 2016-10-09 12:02:54 UTC
Created attachment 241241 [details]
dmesg output
Comment 2 Jonas Aaberg 2016-10-09 12:03:13 UTC
Created attachment 241251 [details]
My .config
Comment 3 Zhang Rui 2016-10-12 02:40:58 UTC
This looks more dangerous to me
[    0.000089] ACPI: Core revision 20160422
[    0.062990] ACPI Error: [BDLI] Namespace lookup failure, AE_ALREADY_EXISTS (20160422/dswload-378)
[    0.063024] ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog (20160422/psobject-227)
[    0.063118] ACPI Exception: AE_ALREADY_EXISTS, (SSDT: DptfTab) while loading table (20160422/tbxfload-227)
[    0.063160] ACPI Error: [PNIT] Namespace lookup failure, AE_ALREADY_EXISTS (20160422/dswload-378)
[    0.063185] ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog (20160422/psobject-227)
[    0.063277] ACPI Exception: AE_ALREADY_EXISTS, (SSDT: CpuDptf) while loading table (20160422/tbxfload-227)
[    0.063310] ACPI Error: [LPSP] Namespace lookup failure, AE_ALREADY_EXISTS (20160422/dswload-378)
[    0.063354] ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog (20160422/psobject-227)
[    0.063446] ACPI Exception: AE_ALREADY_EXISTS, (SSDT: LowPwrM) while loading table (20160422/tbxfload-227)
[    0.063468] ACPI Error: 3 table load failures, 8 successful (20160422/tbxfload-247)
Comment 4 Zhang Rui 2016-10-12 02:42:25 UTC
[    2.370378] sdhci-acpi 80860F14:03: GPIO lookup for consumer 80860F14:03 cd
[    2.370390] sdhci-acpi 80860F14:03: using ACPI for GPIO lookup
[    2.370404] acpi 80860F14:03: GPIO: looking up 80860F14:03 cd-gpios
[    2.370416] acpi 80860F14:03: GPIO: looking up 80860F14:03 cd-gpio
[    2.370432] acpi 80860F14:03: GPIO: looking up 0 in _CRS
[    2.371059] sdhci-acpi 80860F14:03: lookup for GPIO 80860F14:03 cd failed
[    2.371070] sdhci-acpi 80860F14:03: failed to setup card detect gpio

this is another issue.
Comment 5 Zhang Rui 2016-10-12 02:43:03 UTC
have you tried any earlier kernel version?
does the problem exist in all the kernels that you've tried?
Comment 6 Zhang Rui 2016-10-12 02:43:36 UTC
(In reply to Zhang Rui from comment #4)
> [    2.370378] sdhci-acpi 80860F14:03: GPIO lookup for consumer 80860F14:03
> cd
> [    2.370390] sdhci-acpi 80860F14:03: using ACPI for GPIO lookup
> [    2.370404] acpi 80860F14:03: GPIO: looking up 80860F14:03 cd-gpios
> [    2.370416] acpi 80860F14:03: GPIO: looking up 80860F14:03 cd-gpio
> [    2.370432] acpi 80860F14:03: GPIO: looking up 0 in _CRS
> [    2.371059] sdhci-acpi 80860F14:03: lookup for GPIO 80860F14:03 cd failed
> [    2.371070] sdhci-acpi 80860F14:03: failed to setup card detect gpio
> 
> this is another issue.

right, this is the bug reported at https://bugzilla.kernel.org/show_bug.cgi?id=177101
Comment 7 Jonas Aaberg 2016-10-12 11:15:24 UTC
(In reply to Zhang Rui from comment #3)
> This looks more dangerous to me
> [    0.000089] ACPI: Core revision 20160422
> [    0.062990] ACPI Error: [BDLI] Namespace lookup failure,
> AE_ALREADY_EXISTS (20160422/dswload-378)
> [    0.063024] ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog
> (20160422/psobject-227)
> [    0.063118] ACPI Exception: AE_ALREADY_EXISTS, (SSDT: DptfTab) while
> loading table (20160422/tbxfload-227)
> [    0.063160] ACPI Error: [PNIT] Namespace lookup failure,
> AE_ALREADY_EXISTS (20160422/dswload-378)
> [    0.063185] ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog
> (20160422/psobject-227)
> [    0.063277] ACPI Exception: AE_ALREADY_EXISTS, (SSDT: CpuDptf) while
> loading table (20160422/tbxfload-227)
> [    0.063310] ACPI Error: [LPSP] Namespace lookup failure,
> AE_ALREADY_EXISTS (20160422/dswload-378)
> [    0.063354] ACPI Exception: AE_ALREADY_EXISTS, During name lookup/catalog
> (20160422/psobject-227)
> [    0.063446] ACPI Exception: AE_ALREADY_EXISTS, (SSDT: LowPwrM) while
> loading table (20160422/tbxfload-227)
> [    0.063468] ACPI Error: 3 table load failures, 8 successful
> (20160422/tbxfload-247)

Yes, I thought so too, therefore I started with filing a bug report on that, https://bugzilla.kernel.org/show_bug.cgi?id=155631
but it turned out that these three tables are just redundant.
Comment 8 Jonas Aaberg 2016-10-12 11:17:34 UTC
(In reply to Zhang Rui from comment #5)
> have you tried any earlier kernel version?
> does the problem exist in all the kernels that you've tried?

I've tried 4.7.2, 4.7.4 and a few 4.8-rcs as well. And the bug is still there.
Would you like me to test some specific version?
Comment 9 Jonas Aaberg 2016-10-16 16:42:21 UTC
Bug still present in v4.9-rc1
Comment 10 Mika Westerberg 2016-11-29 09:57:12 UTC
Is there any device connected to that I2C bus? The system might keep the bus in non-powered state if there is nothing connected. And even if there is something connected we typically power on devices only when they are being used. Pinging random I2C addresses when the bus is powered down results timeouts you are seeing.
Comment 11 Jonas Aaberg 2016-11-29 18:02:24 UTC
In the DSDT, it looks like there should be a camera attached to I2C4. (Search in the DSDT for HM2051.) Windows 10 thinks that as well.
But AFAIK, there is no kernel driver for HM2051. So yes, maybe everything is working correctly from the i2c_designware driver point of view, since a HM2051 driver is missing.

Note You need to log in before you can comment on or make changes to this bug.