summaryrefslogtreecommitdiff
path: root/src/ec/starlabs/merlin/ec.h
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2022-03-09 08:23:29 +0000
committerFelix Held <felix-coreboot@felixheld.de>2022-03-30 14:22:08 +0000
commit78342989c48619accf2d3f1a175876fa91cb15ac (patch)
treee2d6f3983d8d081b6bf9c9bc1a0f926b823ced7a /src/ec/starlabs/merlin/ec.h
parent6082ee5281bdf0c3f3d6981873efcd93a94b9330 (diff)
ec/starlabs/merlin: Add support for Nuvoton EC's
Support was created for the NPCE9m5x series, using version 1.1 of the datasheet. The specific model tested was the NPCE985P/G, on the StarLite Mk IV with version 1.00 of the EC firmware. Signed-off-by: Sean Rhodes <sean@starlabs.systems> Change-Id: Ib66baf1e88f5d548ce955dffa00c9b88255b2f95 Reviewed-on: https://review.coreboot.org/c/coreboot/+/62702 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Angel Pons <th3fanbus@gmail.com> Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Diffstat (limited to 'src/ec/starlabs/merlin/ec.h')
-rw-r--r--src/ec/starlabs/merlin/ec.h21
1 files changed, 17 insertions, 4 deletions
diff --git a/src/ec/starlabs/merlin/ec.h b/src/ec/starlabs/merlin/ec.h
index 1e7607d8fc..6a6cda5ee1 100644
--- a/src/ec/starlabs/merlin/ec.h
+++ b/src/ec/starlabs/merlin/ec.h
@@ -1,19 +1,20 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
- * EC communication interface for ITE Embedded Controller.
+ * EC communication interface for Embedded Controller.
*/
-#ifndef _EC_STARLABS_ITE_H
-#define _EC_STARLABS_ITE_H
+#ifndef _EC_STARLABS_EC_H
+#define _EC_STARLABS_EC_H
/*
* Define the expected value of the PNP base address that is fixed through
* the BADRSEL register controlled within the EC domain by the EC Firmware.
*/
#define ITE_FIXED_ADDR 0x4e
+#define NUVOTON_FIXED_ADDR 0x4e
-/* Logical device number (LDN) assignments. */
+/* Logical device number (LDN) assignments for ITE. */
#define ITE_SP1 0x01 /* Serial Port 1 (UART) */
#define ITE_SP2 0x02 /* Serial Port 2 (UART) */
#define ITE_SWUC 0x04 /* System Wake-Up Control (SWUC) */
@@ -30,9 +31,21 @@
#define ITE_PMC4 0x18 /* Power Management I/F Channel 4 (PMC4) */
#define ITE_PMC5 0x19 /* Power Management I/F Channel 5 (PMC5) */
+/* Logical device number (LDN) assignments for Nuvoton. */
+#define NUVOTON_MSWC 0x04 /* Mobile System Wake-Up Control (MSWC) */
+#define NUVOTON_KBCM 0x05 /* KBC / Mouse Interface */
+#define NUVOTON_KBCK 0x06 /* KBC / Keyboard Interface */
+#define NUVOTON_SHM 0x0f /* Shared Memory (SHM) */
+#define NUVOTON_PM1 0x11 /* Power Management I/F Channel 1 (PM1) */
+#define NUVOTON_PM2 0x12 /* Power Management I/F Channel 2 (PM2) */
+#define NUVOTON_PM3 0x17 /* Power Management I/F Channel 3 (PM3) */
+#define NUVOTON_ESHM 0x1d /* Extended Shared Memory (ESHM) */
+#define NUVOTON_PM4 0x1e /* Power Management I/F Channel 3 (PM4) */
+
/* Host domain registers. */
#define ITE_CHIPID1 0x20 /* Device ID register 1 */
#define ITE_CHIPID2 0x21 /* Device ID register 2 */
+#define NUVOTON_CHIPID 0x27 /* Device ID register */
/* EC RAM common offsets */
#define ECRAM_MAJOR_VERSION 0x00