summaryrefslogtreecommitdiff
path: root/src/superio/ite/it8659e/it8659e.h
diff options
context:
space:
mode:
authorMichał Żygowski <michal.zygowski@3mdeb.com>2024-02-14 12:39:08 +0100
committerNico Huber <nico.h@gmx.de>2024-06-09 11:14:25 +0000
commit3f56bd2394d6992b26e2d893f15333590149abd0 (patch)
tree2159ed7f060e7b8628b02aea33d4a5ecf0d6a81e /src/superio/ite/it8659e/it8659e.h
parente80b4c7f1a914c396cca0b76c60ca57c6587da95 (diff)
superio/ite/it8659e: Add driver for ITE IT8659E
Based on the non-public "ITE IT8659E-I Preliminary Specification V0.7.2 (For H Version)". TEST=Initialize IT8659E on the new Protectli platform Change-Id: I11657ec6e1c880f0cee247071486a904a92bb7a1 Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/80497 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Nico Huber <nico.h@gmx.de>
Diffstat (limited to 'src/superio/ite/it8659e/it8659e.h')
-rw-r--r--src/superio/ite/it8659e/it8659e.h34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/superio/ite/it8659e/it8659e.h b/src/superio/ite/it8659e/it8659e.h
new file mode 100644
index 0000000000..4fa91e9cfb
--- /dev/null
+++ b/src/superio/ite/it8659e/it8659e.h
@@ -0,0 +1,34 @@
+/* SPDX-License-Identifier: GPL-2.0-or-later */
+
+#ifndef SUPERIO_ITE_IT8659E_H
+#define SUPERIO_ITE_IT8659E_H
+
+#define IT8659E_SP1 0x01 /* Com1 */
+#define IT8659E_SP2 0x02 /* Com2 */
+#define IT8659E_EC 0x04 /* Environment controller */
+#define IT8659E_KBCK 0x05 /* PS/2 keyboard */
+#define IT8659E_KBCM 0x06 /* PS/2 mouse */
+#define IT8659E_GPIO 0x07 /* GPIO */
+#define IT8659E_CIR 0x0A /* CIR */
+
+/* GPIO Polarity Select: 1: Inverting, 0: Non-inverting */
+#define GPIO_REG_POLARITY(x) (0xb0 + (x))
+#define GPIO_POL_NO_INVERT 0
+#define GPIO_POL_INVERT 1
+
+/* GPIO Internal Pull-up: 1: Enable, 0: Disable */
+#define GPIO_REG_PULLUP(x) (0xb8 + (x))
+#define GPIO_PULLUP_DIS 0
+#define GPIO_PULLUP_EN 1
+
+/* GPIO Function Select: 1: Simple I/O, 0: Alternate function */
+#define GPIO_REG_ENABLE(x) (0xc0 + (x))
+#define GPIO_ALT_FN 0
+#define GPIO_SIMPLE_IO 1
+
+/* GPIO Mode: 0: input mode, 1: output mode */
+#define GPIO_REG_OUTPUT(x) (0xc8 + (x))
+#define GPIO_INPUT_MODE 0
+#define GPIO_OUTPUT_MODE 1
+
+#endif /* SUPERIO_ITE_IT8659E_H */