summaryrefslogtreecommitdiff
path: root/chip/g/registers.h
diff options
context:
space:
mode:
Diffstat (limited to 'chip/g/registers.h')
-rw-r--r--chip/g/registers.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/chip/g/registers.h b/chip/g/registers.h
index 0d8d8a097e..8841da9ba6 100644
--- a/chip/g/registers.h
+++ b/chip/g/registers.h
@@ -176,10 +176,19 @@ static inline int x_uart_addr(int ch, int offset)
*/
/* Flags to indicate the direction and type of the signal-to-pin connection */
-#define DIO_INPUT 0x0001
-#define DIO_OUTPUT 0x0002
+#define DIO_INPUT 0x0001
+#define DIO_OUTPUT 0x0002
#define DIO_ENABLE_DIRECT_INPUT 0x0004
-#define DIO_TO_PERIPHERAL 0x0008
+#define DIO_TO_PERIPHERAL 0x0008
+/* Bits to indicate pinmux wake-from-sleep controls */
+#define DIO_WAKE_EN0 0x0040
+#define DIO_WAKE_EDGE0 0x0020
+#define DIO_WAKE_INV0 0x0010
+/* Use these combinations in gpio.inc for clarity */
+#define DIO_WAKE_HIGH (DIO_WAKE_EN0)
+#define DIO_WAKE_LOW (DIO_WAKE_EN0 | DIO_WAKE_INV0)
+#define DIO_WAKE_RISING (DIO_WAKE_EN0 | DIO_WAKE_EDG0)
+#define DIO_WAKE_FALLING (DIO_WAKE_EN0 | DIO_WAKE_EDG0 | DIO_WAKE_INV0)
/* Generate the MUX selector register address for the DIO */
#define DIO_SEL_REG(offset) REG32(GC_PINMUX_BASE_ADDR + offset)