public inbox for linux-acpi@vger.kernel.org
 help / color / mirror / Atom feed
From: Mario Limonciello <mario.limonciello@amd.com>
To: Baochen Qiang <quic_bqiang@quicinc.com>,
	rafael@kernel.org, mika.westerberg@linux.intel.com,
	ulf.hansson@linaro.org, bhelgaas@google.com,
	Basavaraj.Natikar@amd.com, Shyam-sundar.S-k@amd.com,
	mpearson@lenovo.com, markpearson@lenovo.com,
	Kalle Valo <kvalo@kernel.org>,
	Jeff Johnson <quic_jjohnson@quicinc.com>
Cc: linux-acpi@vger.kernel.org, linux-gpio@vger.kernel.org,
	linux-pm@vger.kernel.org, linux-pci@vger.kernel.org,
	platform-driver-x86@vger.kernel.org
Subject: Re: unexptect ACPI GPE wakeup on Lenovo platforms
Date: Tue, 24 Sep 2024 23:08:58 -0500	[thread overview]
Message-ID: <8a218293-e2d7-4a1c-9a7d-f113a68f1449@amd.com> (raw)
In-Reply-To: <f3e31284-09d0-4a30-be74-34d33efe8535@quicinc.com>

On 9/24/2024 23:02, Baochen Qiang wrote:
> 
> 
> On 9/25/2024 11:46 AM, Mario Limonciello wrote:
>> On 9/24/2024 21:18, Baochen Qiang wrote:
>>>>
>>>> Yeah that's what it looks like to me too.  The easiest way to confirm this (without a schematic that is) is to look at the _AEI / _EVT in the SSDT and see what is notified when this is active.
>>> seems GPP6 is notified, does this mean GPIO18 is NOT bound to WLAN wakeup pin? but instead it is bound to the PCIe root port?
>>
>> There is a concept in AMD machines called "GPIO mirroring" where the status of a GPIO pin is mirrored into a GPE.
>>
>> Particularly GPE 0xE is often mirroring AMD GPIO 18.  This can be changed by BIOS though, so Lenovo would have to confirm it is the case or not.
> this does not make sense to me because in the test where ath11k kernel module is removed, the GPE 0xE is active but GPIO 18 is not. if GPE 0xE mirrors GPIO 18, should I expect GPIO 18 and GPE 0xE to be in same status? I mean both active or both inactive?
> 

Hmm, good point.  🤷 for now.

>>
>> But it could explain why you see GPE active.
>>
>>
>>>>
>>>>> [  899.306089] ACPI: GPE event 0x0e //GPE 0x0e triggered for the 2nd time
>>>>> [  899.333158] ath11k_pci 0000:03:00.0: chip_id 0x12 chip_family 0xb board_id 0xff soc_id 0x400c1211
>>>>> [  899.333190] ath11k_pci 0000:03:00.0: fw_version 0x1106196e fw_build_timestamp 2024-01-12 11:30 fw_build_id WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.37
>>>>> ...
>>>>> [  899.826378] PM: suspend exit
>>>>>
>>>>>
>>>>> But I don;t think it is the wakeup source, it is just toggled during WLAN reinitialize AFTER system wakeup. actually even with ath11k module removed I can also see this GPE wakeup, but without GPIO 18 toggled:
>>>>
>>>> I don't believe that just removing the kernel module is enough.  Can you physically remove the hardware?
>>> not possible, it is soldered, not a M.2 module
>>
>> Ah this makes it a lot harder for a debugging.  Is there option in BIOS to disable it?
> I will check that. But to make it clear, by 'disable' you are meaning disable wakeup function of WLAN?

I'm meaning disable WLAN all together from BIOS.  It will drop off PCI bus.

I don't know if Lenovo BIOS exposes this, I've seen it on some platforms.

> 
>>
>>>>
>>>>>
>>>>> [ 2640.849342] PM: suspend entry (s2idle)
>>>>> ...
>>>>> [ 2650.806234] PM: Triggering wakeup from IRQ 9
>>>>> ...
>>>>> [ 2651.467653] PM: noirq resume of devices complete after 558.943 msecs
>>>>> [ 2651.467880] ACPI: GPE event 0x07
>>>>> [ 2651.467961] ACPI: GPE event 0x0e
>>>>> ...
>>>>> [ 2651.848848] PM: suspend exit
>>>>>
>>>>>
>>>>>
>>>>> [1] https://bugzilla.kernel.org/show_bug.cgi?id=219286
>>>>>
>>>>
>>>> Is it possible for you to put a scope on the GPIO and/or PCIe analzyer on the bus?
>>> it is hard to me -- for the GPIO I need the schematic which is not available, and for the PCIe analyzer we need hardware rework for that, but I will try.
>>
>> At least from WLAN perspective, it should be well known pin for GPIO even without board schematic, right?  So should be relatively easy to look at with a scope.
> Ah, you remind me. We can check it with WLAN wakeup pin.
> OK, so seems I have no option but to scope the GPIO.

Yeah; unless some other guys on this D/L have any ideas here.

  reply	other threads:[~2024-09-25  4:09 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-23 10:07 unexptect ACPI GPE wakeup on Lenovo platforms Baochen Qiang
2024-09-23 13:37 ` Mario Limonciello
2024-09-24  5:52   ` Baochen Qiang
2024-09-24 17:55     ` Mario Limonciello
2024-09-25  2:18       ` Baochen Qiang
2024-09-25  3:46         ` Mario Limonciello
2024-09-25  4:02           ` Baochen Qiang
2024-09-25  4:08             ` Mario Limonciello [this message]
2024-09-25  5:14               ` Baochen Qiang

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=8a218293-e2d7-4a1c-9a7d-f113a68f1449@amd.com \
    --to=mario.limonciello@amd.com \
    --cc=Basavaraj.Natikar@amd.com \
    --cc=Shyam-sundar.S-k@amd.com \
    --cc=bhelgaas@google.com \
    --cc=kvalo@kernel.org \
    --cc=linux-acpi@vger.kernel.org \
    --cc=linux-gpio@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=markpearson@lenovo.com \
    --cc=mika.westerberg@linux.intel.com \
    --cc=mpearson@lenovo.com \
    --cc=platform-driver-x86@vger.kernel.org \
    --cc=quic_bqiang@quicinc.com \
    --cc=quic_jjohnson@quicinc.com \
    --cc=rafael@kernel.org \
    --cc=ulf.hansson@linaro.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