From 296994bec80d27c0dc1f155530fd495fa00bda6c Mon Sep 17 00:00:00 2001 From: Sean Rhodes Date: Thu, 14 Oct 2021 20:58:15 +0100 Subject: ec/starlabs: Add standardised ITE EC support Add EC support that supports different Q Events and EC memory. Created from the ITE IT5570E and IT8987E datasheets, all using data port 0x4e. Tested with Ubuntu 20.04.3 and Windows 10 on: * StarBook Mk V (TGL + IT5570E): * ITE Firmware 1.00 * Merlin Firmware 1.00 * LabTop Mk IV (CML + IT8987E): * ITE Firmware 1.04 * LabTop Mk III (KBL + IT8987E): * ITE Firmware 3.12 Signed-off-by: Sean Rhodes Change-Id: I8023c26de23c874c84106fda96e64dcfa0c5ba32 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58343 Reviewed-by: Angel Pons Reviewed-by: Andy Pont Tested-by: build bot (Jenkins) --- src/ec/starlabs/merlin/variants/tgl/ecdefs.h | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 src/ec/starlabs/merlin/variants/tgl/ecdefs.h (limited to 'src/ec/starlabs/merlin/variants/tgl/ecdefs.h') diff --git a/src/ec/starlabs/merlin/variants/tgl/ecdefs.h b/src/ec/starlabs/merlin/variants/tgl/ecdefs.h new file mode 100644 index 0000000000..3441bc073f --- /dev/null +++ b/src/ec/starlabs/merlin/variants/tgl/ecdefs.h @@ -0,0 +1,23 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +/* + * EC communication interface for ITE Embedded Controller + */ + +#ifndef _EC_STARLABS_TGL_EC_DEFS_H +#define _EC_STARLABS_TGL_EC_DEFS_H + +/* IT5570 chip ID byte values */ +#define ITE_CHIPID_VAL 0x5570 + +/* EC RAM offsets */ +#define ECRAM_KBL_BRIGHTNESS 0x09 +#define ECRAM_KBL_TIMEOUT 0x10 +#define ECRAM_KBL_STATE 0x0a +#define ECRAM_TRACKPAD_STATE 0x0c +#define ECRAM_FN_LOCK_STATE 0x0f +#define ECRAM_FN_CTRL_REVERSE 0x17 +#define ECRAM_MAX_CHARGE 0x1a +#define ECRAM_FAN_MODE 0x1b + +#endif -- cgit v1.2.3