coreboot/src/ec
Kapil Porwal 490dba2a8b ec/google/chromeec: Implement host command to read lid state
On non-LPC platforms (such as those using I2C or SPI for EC comms),
the EC memory map is not directly accessible via memory-mapped I/O.
Instead, these platforms must use the EC_CMD_READ_MEMMAP host command
to retrieve system information.

Implement google_chromeec_get_switches() using this host command for
non-LPC systems. This enables get_lid_switch() to function correctly
on eSPI-based and other non-LPC mainboards, allowing them to support
lid-controlled logic.

BUG=none
TEST=Verify the LID state using get_lid_switch() on Google/Quartz.

Change-Id: Ic7dbe1bcf6b528dfefc168e2f0de0357430dc84d
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91008
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2026-02-03 18:19:20 +00:00
..
51nb/npce985la0dx include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
acpi ec/acpi/ec.c: Promote timeout messages to errors 2025-01-22 20:20:44 +00:00
apple/acpi
clevo/it5570e Remove <swab.h> and swabXX() functions 2025-12-12 07:09:45 +00:00
compal/ene932 ec, lib, security, sb: Add SPDX license headers to Kconfig files 2024-02-18 02:00:21 +00:00
dasharo/ec ec/dasharo/ec: Add DTT power and battery participants 2025-06-06 13:13:59 +00:00
dell/mec5035 ec/dell/mec5035: Route power button event to host 2025-11-19 13:59:08 +00:00
google ec/google/chromeec: Implement host command to read lid state 2026-02-03 18:19:20 +00:00
hp/kbc1126 ec/hp/kbc1126/acpi: Drop unnecessary _STA methods 2024-03-16 15:20:04 +00:00
intel ec/intel: read board ID one time from EC per stage 2025-04-29 18:53:04 +00:00
kontron ec, lib, security, sb: Add SPDX license headers to Kconfig files 2024-02-18 02:00:21 +00:00
lenovo ec/lenovo/h8: Properly advertised used I/O 2026-01-25 19:23:22 +00:00
purism tree: Remove unused <stddef.h> 2024-05-29 02:51:20 +00:00
quanta ec, lib, security, sb: Add SPDX license headers to Kconfig files 2024-02-18 02:00:21 +00:00
roda/it8518 include/device/device.h: Remove CHIP_NAME() macro 2024-01-31 09:51:58 +00:00
smsc/mec1308 ec, lib, security, sb: Add SPDX license headers to Kconfig files 2024-02-18 02:00:21 +00:00
starlabs/merlin Revert "ec/starlabs/merlin: Add retry to get_ec_version()" 2026-01-29 09:00:38 +00:00
system76/ec ec/system76/ec: Add config for 2nd fan without GPU 2025-05-14 18:08:44 +00:00
ec.h