summaryrefslogtreecommitdiff
path: root/sys/dev/acpi
AgeCommit message (Collapse)Author
2022-07-05Missing header change that should have gone with xhci_acpi.c r1.8Theo Buehler
from kettenis via patrick
2022-07-04Add support for the dual role controllers integrated on the QualcommMark Kettenis
Snapdragon 8cx gen 3 SoC. ok patrick@
2022-06-29match on Alder Lake-PJonathan Gray
ok deraadt@ kettenis@
2022-06-28Add support for the Synopsys DesignWare UART found on the Ryzen EmbeddedMark Kettenis
V1000 SoCs. ok anton@
2022-06-28A com_acpi_softc pointer is used as the interrupt callback cookie whichAnton Lindqvist
is later on interpreted as a com_softc pointer. This is not a problem in practice as a com_softc structure is the first member of the com_acpi_softc structure. Using the actual types consistently yields a better symmetry in my opinion between registering the interrupt and the corresponding interrupt handler. ok deraadt@ kettenis@
2022-06-28Add hardware ID for EHCI-compliant USB controller with standard debug.Mark Kettenis
ok jsg@
2022-06-28Add hardware ID for XHCI-compliant USB controller without standard debug.Mark Kettenis
ok jsg@
2022-06-27Whitespace/KNFMike Larkin
2022-06-27amdgpio(4): restore pin configuration on resumeMike Larkin
Save/restore the pin configuration on suspend/resume for amdgpio(4). This fixes missing interrupts after resume for trackpads on some machines, including the ROG Zephyrus 14 and the HP DevOne (and probably others). Code based on pchgpio(4). ok deraadt, kettenis
2022-06-11Bring back PL011 UART FIFO support to pluart(4). This time with workingAnton Lindqvist
tx interrupts. Special treatment of Server Base System Architecture (SBSA) generic UART devices is required as presence of the interrupt trigger level register is not guaranteed. Therefore treat such devices of having a 1-byte FIFO. ok visa@
2022-05-29pwr_action isn't used in this file, zap pointless decl.Jeremie Courreges-Anglas
2022-04-06constify struct cfattachChristian Weisgerber
2022-04-04As a hack, use CD_SKIPHIBERNATE. For 2.0, our TPM lifecycle managementTheo de Raadt
is improper, and some chips are more sensitive to this than others. In an unhibernate situation, /bsd.booted will 'suspend' the TPM, then jump directly into unhib /bsd, which 'resumes' it. This is wrong because the lifecycle is supposed to be more like suspend->BIOS->resume. This is a hack until we figure out how to fix the lifecycle. from claudio, ok dv
2022-03-21Update hw.power whenever we refresh the AC state. This makes sure the stateMark Kettenis
doesn't get out of sync with what apm(8) reports if power is plugged or unplugged when a machine is suspended. Which in turn makes sure the machine properly goes into a low CPU P-state when requested. ok deraadt@, florian@
2022-03-13Revert previous commit. It breaks the serial console on my rpi4.Mark Kettenis
2022-03-11Enable PL011 UART FIF0 support in pluart(4). The FIFO depth depends onAnton Lindqvist
the revision and ranges from 16 to 32 bytes. Special treatment of Server Base System Architecture (SBSA) generic UART devices is required as presence of the interrupt trigger level register is not guaranteed. Therefore treat such devices of having a 1-byte FIFO. With help from kettenis@ and ok visa@
2022-03-10Add support for Sunrisepoint-H and Sunrisepoint-LP platforms.hastings
Also mask unhandled interrupts like we do in amdgpio(4). ok kettenis@, deraadt@
2022-03-06oops, typo, spotted by MikhailTheo de Raadt
2022-03-05Improve wording for trying S5 instead of S4Theo de Raadt
2022-02-17If S4 is not available, use S5 for the ACPI-transitions in hibernate support.Theo de Raadt
A bunch of servers work now. Really close to a 3-line diff... ok kettenis
2022-02-17remove unused definesJonathan Gray
2022-02-17reduce includesJonathan Gray
2022-02-17reduce includesJonathan Gray
ok deraadt@
2022-02-16rev 1.4 was wrong to put potential IO operations after _GTS.Theo de Raadt
re-creating the original (2 weeks ago) order of last-minute-disk-parking needs a different approach, hmm.
2022-02-16if the lids indicate we are not supposed to wakeup, return EAGAIN ratherTheo de Raadt
than scheduling an acpi thread
2022-02-16change MD gosleep() and sleep_finish() to return int, the MI code will beTheo de Raadt
able to react to this suitably.
2022-02-15Since acpitoshiba brightness button processing no longer plays gamesTheo de Raadt
with AML parsing outside the acpi thread, the locking-release dance around wsdisplay_{suspend,resume} can be removed ok kettenis
2022-02-15Defer the actual setting of the display brightness to the acpi thread.Mark Kettenis
ok deraadt@
2022-02-15when the MI suspend code encounters problems, we need a way toTheo de Raadt
reset the MD state before bailing out. New MD function sleep_abort() does that.
2022-02-15com at acpi like com at isa needs com_active() for suspend/resume support.Claudio Jeker
Fixes my com0 issues after zzz and ZZZ. OK kettenis@ miod@
2022-02-15MI disable_lid_wakeups() is not needed, x86 systems can do thisTheo de Raadt
in sleep_resume(), which seems sensible for other future systems also
2022-02-15The DVACT_POWERDOWN step was accidentally moved in relation to some MDTheo de Raadt
steps, so shuffle the MD steps to reinforce the order.
2022-02-14Make sure we call acpi_resume_cpu() with the right ACPI state. This wasMark Kettenis
accidentally broken with the reorganization of the suspend/resume code that was committed a few days ago. ok deraadt@
2022-02-14acpi_indicator() can take the softc*, instead of void*Theo de Raadt
2022-02-14test the correct pointer for acpi_intr_establish() resultJonathan Gray
ok deraadt@ gnezdo@
2022-02-10Embed klist head in acpi_softc to avoid explicit malloc.Visa Hankala
OK kettenis@
2022-02-09Move x86-only stubs used by kern/subr_suspend.c into dev/acpi/acpi_x86.cTheo de Raadt
for sharing between i386 and amd64. ok mlarkin kettenis
2022-02-09add Surface Go 3 hid to acpibat(4)Dave Voutila
Microsoft decided to break with basic ACPI standards with the Go 3. In this case, they don't expose the battery in a standard way, so acpibat(4) needs to look for the special Microsoft hid. From mlarkin@, ok kettenis@
2022-02-09add newline to acpitz(4) attach conditionDave Voutila
ok miod@
2022-02-08The suspend/resume code is a sticky mess of MI, MD, and ACPI sequencing.Theo de Raadt
This splits out the MI sequencing, backing it with per-architecture helper functions. Further steps will be neccesary because ACPI and MD are too tightly coupled, but soon we'll be able to use this code for more architectures (which depends on figuring out the lowest-level cpu sleeping method) ok kettenis
2022-02-04set the APM_BATT_CHARGING state if the battery is being charged and tryRobert Nagy
to calculate the remaining time to be fully charged ok jca@
2022-02-02acpi_addtask() calls malloc() w/ M_NOWAIT (because some calls come fromTheo de Raadt
interrupt context), this however means occasional resource shortage will result in callbacks registration failing, and unknown consequences for the task-submitting caller. Changing this to use pools with a low water mark, decreases the odds of that problem occuring. ok kettenis
2022-02-01GPE_DIRECT is calling the AML parser from interrupt context, which isTheo de Raadt
not permitted. Luckily nothing is using GPE_DIRECT anymore, so this code can be deleted. ok kettenis
2022-01-26An ACPI device needs to be both present and enabled for it to function.Mark Kettenis
So only attempt to attach hardware that has both bits enabled. This fixes an issue where com(4) would attach for a disabled serial port leading to misdetection of the hardware variant and a subsequent hang when /etc/rc runs ttyflags -a. ok anton@, deraadt@
2022-01-18Improve how quirks are handled on sdhc(4)-compatible drivers. So farPatrick Wildt
we have passed a modified version of the contents in the capabilities register if we wanted to override what sdhc(4) would otherwise read. Unfortunately there's a second capabilities register that we did not yet take into consideration, which is why to disable DDR50 support we created a quirk flag in the softc. The sdhc(4) ACPI nodes have a way to mask and set bits in both of the capabilities register, which is a flexible approach to solving that issue and using that for our sdhc(4) drivers even improves readability. ok kettenis@
2022-01-12Make acpi_getpropint() return uint64_t, as ACPI integers are in fact thatPatrick Wildt
wide and some _DSD properties depend on it. ok kettenis@
2022-01-09spellingJonathan Gray
feedback and ok tb@ jmc@ ok ratchov@
2022-01-04acpi_getprop() needs to actually make sure that we're looking at thePatrick Wildt
correct property. While there adjust acpi_getpropint() as well to increase similarity with acpi_getprop(). ok kettenis@
2022-01-02preferense -> preferenceJonathan Gray
2021-12-29Allow ohci(4) and ehci(4) to attach to acpi(4).Patrick Wildt
ok kettenis@