summaryrefslogtreecommitdiff
path: root/src/ec/starlabs/merlin/variants/tgl/ecdefs.h
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2021-10-14 20:58:15 +0100
committerFelix Held <felix-coreboot@felixheld.de>2021-11-22 14:46:20 +0000
commit296994bec80d27c0dc1f155530fd495fa00bda6c (patch)
tree94049a26b84e3c92e32ece723f0291f21fc29542 /src/ec/starlabs/merlin/variants/tgl/ecdefs.h
parent6973a3e7c481efc89845ecc3c78d7994a3e48b3c (diff)
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 <sean@starlabs.systems> Change-Id: I8023c26de23c874c84106fda96e64dcfa0c5ba32 Reviewed-on: https://review.coreboot.org/c/coreboot/+/58343 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Andy Pont <andy.pont@sdcsystems.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/ec/starlabs/merlin/variants/tgl/ecdefs.h')
-rw-r--r--src/ec/starlabs/merlin/variants/tgl/ecdefs.h23
1 files changed, 23 insertions, 0 deletions
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