summaryrefslogtreecommitdiff
path: root/src/ec/starlabs/merlin/variants/adl/ecdefs.h
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2022-09-07 11:36:30 +0100
committerMartin Roth <martin.roth@amd.corp-partner.google.com>2022-10-07 22:09:59 +0000
commit8956b1af59002e37fab3926145bff4d66f22042e (patch)
treede25833ade11c93cf6a1f8f45108d3e921e67ce9 /src/ec/starlabs/merlin/variants/adl/ecdefs.h
parentb9af5133dd2d1be972b9157e8a6860eedd13a766 (diff)
ec/starlabs/merlin: Add EC related files for Alder Lake boards
Add EC memory layout and Q events for Intel Alder Lake based boards, the "StarBook Mk VI" and "StarFighter Mk I", which both use the ITE 5570E. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: I8cea386ba91d076084002738fe7041834deea311 Reviewed-on: https://review.coreboot.org/c/coreboot/+/67398 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Diffstat (limited to 'src/ec/starlabs/merlin/variants/adl/ecdefs.h')
-rw-r--r--src/ec/starlabs/merlin/variants/adl/ecdefs.h27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/ec/starlabs/merlin/variants/adl/ecdefs.h b/src/ec/starlabs/merlin/variants/adl/ecdefs.h
new file mode 100644
index 0000000000..28f7e4b84f
--- /dev/null
+++ b/src/ec/starlabs/merlin/variants/adl/ecdefs.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
+
+#include <assert.h>
+#include <stdint.h>
+
+/*
+ * EC communication interface for ITE Embedded Controller
+ */
+
+#ifndef _EC_STARLABS_ADL_EC_DEFS_H
+#define _EC_STARLABS_ADL_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
+#define ECRAM_FAST_CHARGE dead_code_t(uint8_t)
+
+#endif