linux/drivers
Mario Limonciello 1339559bb6 platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13
[ Upstream commit a55bdad5df ]

The Laptop 13 (AMD Ryzen 7040Series) BIOS 03.03 has a workaround
included in the EC firmware that will cause the EC to emit a "spurious"
keypress during the resume from s0i3 [1].

This series of keypress events can be observed in the kernel log on
resume.

```
atkbd serio0: Unknown key pressed (translated set 2, code 0x6b on isa0060/serio0).
atkbd serio0: Use 'setkeycodes 6b <keycode>' to make it known.
atkbd serio0: Unknown key released (translated set 2, code 0x6b on isa0060/serio0).
atkbd serio0: Use 'setkeycodes 6b <keycode>' to make it known.
```

In some user flows this is harmless, but if a user has specifically
suspended the laptop and then closed the lid it will cause the laptop
to wakeup. The laptop wakes up because the ACPI SCI triggers when
the lid is closed and when the kernel sees that IRQ1 is "also" active.
The kernel can't distinguish from a real keyboard keypress and wakes the
system.

Add the model into the list of quirks to disable keyboard wakeup source.
This is intentionally only matching the production BIOS version in hopes
that a newer EC firmware included in a newer BIOS can avoid this behavior.

Cc: Kieran Levin <ktl@framework.net>
Link: https://github.com/FrameworkComputer/EmbeddedController/blob/lotus-zephyr/zephyr/program/lotus/azalea/src/power_sequence.c#L313 [1]
Link: https://community.frame.work/t/amd-wont-sleep-properly/41755
Link: https://community.frame.work/t/tracking-framework-amd-ryzen-7040-series-lid-wakeup-behavior-feedback/39128
Signed-off-by: Mario Limonciello <mario.limonciello@amd.com>
Link: https://lore.kernel.org/r/20231212045006.97581-5-mario.limonciello@amd.com
Reviewed-by: Hans de Goede <hdegoede@redhat.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2024-01-20 11:51:45 +01:00
..
accel accel/qaic: Implement quirk for SOC_HW_VERSION 2024-01-10 17:16:47 +01:00
accessibility
acpi ACPI: thermal: Fix acpi_thermal_unregister_thermal_zone() cleanup 2024-01-10 17:16:55 +01:00
amba
android
ata scsi: sd: Fix system start for ATA devices 2023-12-08 08:52:17 +01:00
atm atm: solos-pci: Fix potential deadlock on &tx_queue_lock 2023-12-20 17:01:46 +01:00
auxdisplay
base devcoredump: Send uevent once devcd is ready 2023-12-13 18:45:33 +01:00
bcma
block nbd: pass nbd_sock to nbd_read_reply() instead of index 2023-12-20 17:01:59 +01:00
bluetooth Bluetooth: Fix deadlock in vhci_send_frame 2024-01-01 12:42:31 +00:00
bus bus: ti-sysc: Flush posted write only after srst_udelay 2024-01-01 12:42:46 +00:00
cache riscv: RISCV_NONSTANDARD_CACHE_OPS shouldn't depend on RISCV_DMA_NONCOHERENT 2023-10-26 09:42:37 +02:00
cdrom
cdx
char parisc/agp: Use 64-bit LE values in SBA IOMMU PDIR table 2023-11-28 17:20:00 +00:00
clk clk: rockchip: rk3128: Fix HCLK_OTG gate register 2024-01-20 11:51:42 +01:00
clocksource clocksource/drivers/timer-atmel-tcb: Fix initialization on SAM9 hardware 2023-11-28 17:19:36 +00:00
comedi
connector Fix NULL pointer dereference in cn_filter() 2023-10-24 10:53:45 +02:00
counter
cpufreq cpufreq/amd-pstate: Only print supported EPP values for performance governor 2023-12-08 08:52:25 +01:00
cpuidle
crypto crypto: hisilicon/qm - fix EQ/AEQ interrupt issue 2024-01-10 17:16:55 +01:00
cxl cxl/memdev: Hold region_rwsem during inject and clear poison ops 2024-01-10 17:17:02 +01:00
dax
dca
devfreq PM / devfreq: rockchip-dfi: Make pmu regmap mandatory 2023-11-20 11:59:00 +01:00
dio
dma dmaengine: fsl-edma: fix wrong pointer check in fsl_edma3_attach_pd() 2024-01-10 17:16:59 +01:00
dma-buf dma-buf: fix check in dma_resv_add_fence 2023-12-08 08:52:19 +01:00
edac
eisa
extcon
firewire firewire: ohci: suppress unexpected system reboot in AMD Ryzen machines and ASM108x/VT630x PCIe cards 2024-01-10 17:17:00 +01:00
firmware efi/loongarch: Use load address to calculate kernel entry address 2024-01-20 11:51:43 +01:00
fpga fpga: Fix memory leak for fpga_region_test_class_find() 2023-10-24 19:32:39 +02:00
fsi
gnss
gpio gpio: dwapb: mask/unmask IRQ when disable/enale it 2024-01-01 12:42:46 +00:00
gpu drm/crtc: Fix uninit-value bug in drm_mode_setcrtc 2024-01-20 11:51:43 +01:00
greybus
hid HID: nintendo: fix initializer element is not constant error 2024-01-20 11:51:45 +01:00
hsi
hte hte: tegra: Fix missing error code in tegra_hte_test_probe() 2023-11-20 11:59:08 +01:00
hv
hwmon hwmon: (corsair-psu) Fix probe when built-in 2024-01-20 11:51:42 +01:00
hwspinlock
hwtracing hwtracing: hisi_ptt: Don't try to attach a task 2024-01-20 11:51:39 +01:00
i2c i2c: core: Fix atomic xfer check for non-preempt config 2024-01-10 17:17:00 +01:00
i3c i3c: master: svc: fix random hot join failure since timeout error 2023-11-28 17:20:06 +00:00
idle
iio iio: imu: adis16475: use bit numbers in assign_bit() 2024-01-10 17:16:57 +01:00
infiniband RDMA/mlx5: Fix mkey cache WQ flush 2024-01-10 17:16:55 +01:00
input Input: xpad - add Razer Wolverine V2 support 2024-01-20 11:51:44 +01:00
interconnect interconnect: qcom: sm8250: Enable sync_state 2024-01-01 12:42:36 +00:00
iommu iommu/vt-d: Support enforce_cache_coherency only for empty domains 2024-01-10 17:16:57 +01:00
ipack
irqchip irqchip/gic-v3-its: Flush ITS tables correctly in non-coherent GIC designs 2023-12-03 07:33:02 +01:00
isdn isdn: mISDN: hfcsusb: Spelling fix in comment 2023-10-23 09:39:46 +01:00
leds leds: trigger: netdev: fix RTNL handling to prevent potential deadlock 2023-12-13 18:45:23 +01:00
macintosh
mailbox
mcb mcb: fix error handling for different scenarios when parsing 2023-11-28 17:20:05 +00:00
md dm-integrity: don't modify bio's immutable bio_vec in integrity_metadata() 2024-01-01 12:42:45 +00:00
media media: qcom: camss: Comment CSID dt_id field 2024-01-10 17:17:02 +01:00
memory memory: tegra: Set BPMP msg flags to reset IPC channels 2023-11-20 11:59:17 +01:00
memstick
message
mfd mfd: qcom-spmi-pmic: Fix revid implementation 2023-11-28 17:20:03 +00:00
misc misc: mei: client.c: fix problem of return '-EOVERFLOW' in mei_cl_write 2023-12-13 18:45:29 +01:00
mmc mmc: sdhci-sprd: Fix eMMC init failure after hw reset 2024-01-10 17:17:01 +01:00
most
mtd mtd: cfi_cmdset_0001: Byte swap OTP info 2023-11-28 17:20:06 +00:00
mux
net wifi: iwlwifi: pcie: avoid a NULL pointer dereference 2024-01-20 11:51:44 +01:00
nfc nfc: virtual_ncidev: Add variable to check if ndev is running 2023-12-20 17:01:59 +01:00
ntb
nubus
nvdimm nd_btt: Make BTT lanes preemptible 2023-11-20 11:59:19 +01:00
nvme nvme: fix deadlock between reset and scan 2024-01-20 11:51:41 +01:00
nvmem nvmem: brcm_nvram: store a copy of NVRAM content 2024-01-01 12:42:44 +00:00
of of: dynamic: Fix of_reconfig_get_state_change() return value documentation 2023-12-13 18:45:03 +01:00
opp
parisc parisc/power: Fix power soft-off when running on qemu 2023-11-28 17:20:08 +00:00
parport parport: Add support for Brainboxes IX/UC/PX parallel cards 2023-12-13 18:45:32 +01:00
pci Revert "PCI/ASPM: Remove pcie_aspm_pm_state_change()" 2024-01-10 17:16:46 +01:00
pcmcia pcmcia: ds: fix possible name leak in error path in pcmcia_device_add() 2023-11-20 11:59:31 +01:00
peci
perf drivers: perf: Check find_first_bit() return value 2023-11-28 17:19:54 +00:00
phy phy: sunplus: return negative error code in sp_usb_phy_probe 2024-01-10 17:16:57 +01:00
pinctrl pinctrl: amd: Mask non-wake source pins with interrupt enabled at suspend 2024-01-20 11:51:44 +01:00
platform platform/x86/amd/pmc: Disable keyboard wakeup on AMD Framework 13 2024-01-20 11:51:45 +01:00
pmdomain pmdomain: imx: Make imx pgc power domain also set the fwnode 2023-11-28 17:20:00 +00:00
pnp
power power: supply: core: Use blocking_notifier_call_chain to avoid RCU complaint 2023-11-08 11:56:20 +01:00
powercap powercap: DTPM: Fix missing cpufreq_cpu_put() calls 2023-12-13 18:45:25 +01:00
pps
ps3
ptp ptp: annotate data-race around q->head and q->tail 2023-11-28 17:19:51 +00:00
pwm pwm: brcmstb: Utilize appropriate clock APIs in suspend/resume 2023-11-20 11:59:34 +01:00
rapidio
ras
regulator regulator: qcom-rpmh: Fix smps4 regulator for pm8550ve 2023-11-20 11:59:07 +01:00
remoteproc
reset reset: hisilicon: hi6220: fix Wvoid-pointer-to-enum-cast warning 2024-01-20 11:51:44 +01:00
rpmsg
rtc rtc: pcf85363: fix wrong mask/val parameters in regmap_update_bits call 2023-11-20 11:59:30 +01:00
s390 s390/scm: fix virtual vs physical address confusion 2024-01-20 11:51:44 +01:00
sbus
scsi scsi: core: Always send batch on reset or error handling command 2024-01-01 12:42:45 +00:00
sh
siox
slimbus
soc soc: qcom: pmic: Fix resource leaks in a device_for_each_child_node() loop 2023-11-28 17:19:41 +00:00
soundwire soundwire: intel_ace2x: fix AC timing setting for ACE2.x 2024-01-20 11:51:42 +01:00
spi spi: cadence: revert "Add SPI transfer delays" 2024-01-01 12:42:47 +00:00
spmi
ssb
staging media: cedrus: Fix clock/reset sequence 2023-11-20 11:59:32 +01:00
target
tc
tee tee: optee: Fix supplicant based device enumeration 2023-12-13 18:45:11 +01:00
thermal thermal: intel: powerclamp: fix mismatch in get function for max_idle 2023-11-28 17:20:02 +00:00
thunderbolt thunderbolt: Fix memory leak in margining_port_remove() 2024-01-01 12:42:46 +00:00
tty serial: 8250_omap: Add earlycon support for the AM654 UART controller 2023-12-13 18:45:33 +01:00
ufs scsi: ufs: core: Let the sq_lock protect sq_tail_slot access 2024-01-01 12:42:37 +00:00
uio
usb usb: fotg210-hcd: delete an incorrect bounds test 2024-01-01 12:42:41 +00:00
vdpa pds_vdpa: set features order 2024-01-20 11:51:41 +01:00
vfio vfio/pds: Fix possible sleep while in atomic context 2023-12-08 08:52:25 +01:00
vhost vhost-vdpa: fix use after free in vhost_vdpa_probe() 2023-11-28 17:19:49 +00:00
video fbdev: fsl-diu-fb: mark wr_reg_wa() static 2023-11-20 11:59:38 +01:00
virt virt: sevguest: Fix passing a stack buffer as a scatterlist target 2023-11-20 11:59:30 +01:00
virtio virtio_ring: fix syncs DMA memory with different direction 2024-01-05 15:19:41 +01:00
vlynq
w1
watchdog sbsa_gwdt: Calculate timeout with 64-bit math 2023-11-28 17:20:11 +00:00
xen swiotlb-xen: provide the "max_mapping_size" method 2023-12-03 07:33:07 +01:00
zorro
Kconfig
Makefile