* Pinctrl-amd interrupt states on boot
@ 2021-09-24 13:53 Sachi King
0 siblings, 0 replies; only message in thread
From: Sachi King @ 2021-09-24 13:53 UTC (permalink / raw)
To: linux-gpio, basavaraj.natikar
I've been working on getting Linux running on the AMD variant of the Microsoft
Surface Laptop 4, and have tracked down high power consumption and spurious
wakes in the s2idle state to the interrupt states configured on the AMD GPIO
chip under pinctrl-amd, in this case an AMDI0031.
I don't think pinctrl-amd has has been used as a wakeup source yet, as it
never called enable_irq_wake until this[0] patch, which has not hit mainline
yet.
I read the gpio state before allowing pinctrl-amd to setup, there's 183 pins,
and there are a number configured. Pin 6 and 11 for example are configured
with.
6: 0x00c50000: Driver Strength 2, Output enabled, Output high
11: 0x00052800: Interrupt Enabled, Wake in Si03, Driver Strength 2, Input high
My understanding is that on boot Linux expects interrupts to be disabled and
masked on boot, and I have found that on boot, on this device, the interrupts
are in various states of configuration. I'm not sure if this is a quirk of the
firmware of the Surface Laptop 4 and if I should add a quirk for this device,
or if the pinctrl-amd driver needs to loop over the pins and disable, mask,
and clear the wakeup flags in general. In either case I'm assuming output pins
should be left alone. I'm hoping for some thoughts on this.
[0]: https://lore.kernel.org/linux-gpio/20210831120613.1514899-1-Basavaraj.Natikar@amd.com/
Thanks,
Sachi
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2021-09-24 13:53 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-09-24 13:53 Pinctrl-amd interrupt states on boot Sachi King
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).