From: Heiner Kallweit <hkallweit1@gmail.com>
To: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Cc: Jarkko Nikula <jarkko.nikula@linux.intel.com>,
"linux-i2c@vger.kernel.org" <linux-i2c@vger.kernel.org>,
Andi Shyti <andi.shyti@kernel.org>
Subject: Re: i2c: designware: unhandled interrupt on N100 lpss channel 0
Date: Thu, 21 Mar 2024 22:00:27 +0100 [thread overview]
Message-ID: <ef403546-f696-4adb-a441-1d8c71712704@gmail.com> (raw)
In-Reply-To: <ZfxvhCRSQ-Cx_Spn@smile.fi.intel.com>
[-- Attachment #1: Type: text/plain, Size: 4056 bytes --]
On 21.03.2024 18:33, Andy Shevchenko wrote:
> On Thu, Mar 21, 2024 at 12:59:59PM +0100, Heiner Kallweit wrote:
>> On 21.03.2024 12:20, Andy Shevchenko wrote:
>>> On Wed, Mar 20, 2024 at 10:26:06PM +0100, Heiner Kallweit wrote:
>>>> On 20.03.2024 22:07, Andy Shevchenko wrote:
>>>>> On Wed, Mar 20, 2024 at 09:21:34PM +0100, Heiner Kallweit wrote:
>>>>>> On 20.03.2024 16:59, Andy Shevchenko wrote:
>>>>>>> On Wed, Mar 20, 2024 at 03:56:29PM +0100, Heiner Kallweit wrote:
>
> ...
>
>>>>>>> grep 0000001b /sys/kernel/debug/pinctrl/*/pins
>>>>>>
>>>>>> pin 3 (GPPC_B_3) 3:INTC1057:00 GPIO 0x80100102 0x0000001b 0x00000000 [LOCKED tx]
>>>>>> pin 82 (GPP_F_7_EMMC_CMD) 135:INTC1057:00 GPIO 0x44000300 0x0000001b 0x00000000 [LOCKED full, ACPI]
>>>>>> pin 182 (GPPC_C_13) 269:INTC1057:00 GPIO 0x44000300 0x0000001b 0x00000000 [LOCKED full, ACPI]
>>>>>
>>>>> I was not correct, the value to grep is '0000[0-3][0-9a-f]1b' as there pull
>>>>> up/down can be enabled.
>>>>>
>>>> Result is the same
>>>>
>>>>> Nevertheless from the above the pin 3 is one that is enabled as GPIO input with
>>>>> RTE 27 and direct IRQ. If it's a culprit, try to add in the pinctrl-intel.c at
>>>>> the end of .probe:
>>>>>
>>>>> {
>>>>> void __iomem *padcfg0;
>>>>> u32 value;
>>>>>
>>>>> padcfg0 = intel_get_padcfg(pctrl, 3, PADCFG0);
>>>>>
>>>>> value = readl(padcfg0);
>>>>> value |= PADCFG0_GPIOTXDIS;
>>>>> value |= PADCFG0_GPIORXDIS;
>>>>> writel(value, padcfg0);
>>>>> }
>>>>>
>>>>> If it helps, it will show the BIOS bug (likely).
>>>>>
>>>> Wow, this indeed fixes the issue for me. Thanks a lot!
>>>
>>> Wow! Glad to hear this.
>>> (Side note, can you test the patch against idma64 I sent yesterday?
>>> Tested-by tag will be appreciated!)
>>>
>> Done, sent the Tested-by
>
> Thank you!
>
>>> We may try to have the quirk in the kernel, but it might be (quite) tricky
>>> (see the link below).
>>>
>>> Can you share `acpidump -o n100-tables.dat` (the file) somewhere?
>>> I would like to see if this pin is anyhow being mentioned in the DSDT.
>>>
>> Attached. Compressed file isn't that big, so hope it's ok to send it
>> as an attachment.
>
> Yes, got it.
>
> Can you also share the output of
>
> 1) `dmesg` (when kernel command line has 'ignore_loglevel apic=debug');
attached
> 2) `lspci -nk -vv`;
attached
> 3) `grep -H 15 /sys/bus/acpi/devices/*/status`?
>
/sys/bus/acpi/devices/ACPI0003:00/status:15
/sys/bus/acpi/devices/ACPI000C:00/status:15
/sys/bus/acpi/devices/ACPI000E:00/status:15
/sys/bus/acpi/devices/device:4a/status:15
/sys/bus/acpi/devices/device:86/status:15
/sys/bus/acpi/devices/device:87/status:15
/sys/bus/acpi/devices/device:88/status:15
/sys/bus/acpi/devices/device:8a/status:15
/sys/bus/acpi/devices/device:8b/status:15
/sys/bus/acpi/devices/device:8c/status:15
/sys/bus/acpi/devices/INT33A1:00/status:15
/sys/bus/acpi/devices/INTC1041:00/status:15
/sys/bus/acpi/devices/INTC1048:00/status:15
/sys/bus/acpi/devices/INTC1057:00/status:15
/sys/bus/acpi/devices/INTC1070:00/status:15
/sys/bus/acpi/devices/INTC1099:00/status:15
/sys/bus/acpi/devices/MSFT0001:00/status:15
/sys/bus/acpi/devices/OVTI01AS:00/status:15
/sys/bus/acpi/devices/OVTID858:00/status:15
/sys/bus/acpi/devices/PNP0103:00/status:15
/sys/bus/acpi/devices/PNP0C09:00/status:15
/sys/bus/acpi/devices/PNP0C0C:00/status:15
/sys/bus/acpi/devices/PNP0C0D:00/status:15
/sys/bus/acpi/devices/PRP00001:00/status:15
/sys/bus/acpi/devices/TXNW3643:00/status:15
/sys/bus/acpi/devices/TXNW3643:01/status:15
>>>> For my understanding: Shall we (kernel driver) rely on the BIOS to configure
>>>> GPIO's properly?
>>>
>>> Yes, but there are bugs.
>>> You may look, e.g., https://bugzilla.kernel.org/show_bug.cgi?id=214749.
>>>
>>>> Or better assume that GPIO's are in an unknown state on
>>>> driver load and configure them for our needs?
>>>
>>> It depends. But usually (> 99% cases) we rely on the firmware.
>>>
>>>> IOW: If we assume that other systems may have similar issues, should
>>>> "some driver" use e.g. the pinctrl API to configure relevant pins?
>
[-- Attachment #2: dmesg.log.xz --]
[-- Type: application/octet-stream, Size: 17128 bytes --]
[-- Attachment #3: lspci.log.xz --]
[-- Type: application/octet-stream, Size: 4772 bytes --]
next prev parent reply other threads:[~2024-03-21 21:00 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-03-19 21:11 i2c: designware: unhandled interrupt on N100 lpss channel 0 Heiner Kallweit
2024-03-20 12:27 ` Heiner Kallweit
2024-03-20 13:37 ` Jarkko Nikula
2024-03-20 14:15 ` Andy Shevchenko
2024-03-20 14:56 ` Heiner Kallweit
2024-03-20 15:59 ` Andy Shevchenko
2024-03-20 20:21 ` Heiner Kallweit
2024-03-20 21:07 ` Andy Shevchenko
2024-03-20 21:21 ` Andy Shevchenko
2024-03-20 21:26 ` Heiner Kallweit
2024-03-20 21:28 ` Heiner Kallweit
2024-03-21 11:20 ` Andy Shevchenko
2024-03-21 11:59 ` Heiner Kallweit
2024-03-21 17:33 ` Andy Shevchenko
2024-03-21 21:00 ` Heiner Kallweit [this message]
2024-03-22 16:18 ` Andy Shevchenko
2024-03-22 19:28 ` Heiner Kallweit
2024-04-02 20:46 ` Andy Shevchenko
2024-04-05 16:01 ` Andy Shevchenko
2024-04-05 19:21 ` Heiner Kallweit
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ef403546-f696-4adb-a441-1d8c71712704@gmail.com \
--to=hkallweit1@gmail.com \
--cc=andi.shyti@kernel.org \
--cc=andriy.shevchenko@linux.intel.com \
--cc=jarkko.nikula@linux.intel.com \
--cc=linux-i2c@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox