summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/soc/intel/apollolake/include/soc/gpio.h9
-rw-r--r--src/soc/intel/apollolake/include/soc/gpio_defs.h4
2 files changed, 10 insertions, 3 deletions
diff --git a/src/soc/intel/apollolake/include/soc/gpio.h b/src/soc/intel/apollolake/include/soc/gpio.h
index f1020f630a..85fc759bcd 100644
--- a/src/soc/intel/apollolake/include/soc/gpio.h
+++ b/src/soc/intel/apollolake/include/soc/gpio.h
@@ -48,6 +48,7 @@ int gpi_status_get(const struct gpi_status *sts, gpio_t gpi);
#define PAD_RESET(value) PAD_CFG0_RESET_##value
#define PAD_PULL(value) PAD_CFG1_PULL_##value
#define PAD_IOSSTATE(value) PAD_CFG1_IOSSTATE_##value
+#define PAD_IOSTERM(value) PAD_CFG1_IOSTERM_##value
#define PAD_IRQ_CFG(route, trig, inv) \
(PAD_CFG0_ROUTE_##route | \
PAD_CFG0_TRIG_##trig | \
@@ -62,13 +63,15 @@ int gpi_status_get(const struct gpi_status *sts, gpio_t gpi);
/* Native function configuration */
#define PAD_CFG_NF(pad, pull, rst, func) \
- _PAD_CFG_STRUCT(pad, PAD_RESET(rst) | PAD_FUNC(func), PAD_PULL(pull) | \
- PAD_IOSSTATE(TxLASTRxE))
+ PAD_CFG_NF_IOSSTATE(pad, pull, rst, func, TxLASTRxE)
/* Native function configuration for standby state */
#define PAD_CFG_NF_IOSSTATE(pad, pull, rst, func, iosstate) \
+ PAD_CFG_NF_IOSSTATE_IOSTERM(pad,pull, rst, func, iosstate, SAME)
+
+#define PAD_CFG_NF_IOSSTATE_IOSTERM(pad, pull, rst, func, iosstate, iosterm) \
_PAD_CFG_STRUCT(pad, PAD_RESET(rst) | PAD_FUNC(func), PAD_PULL(pull) | \
- PAD_IOSSTATE(iosstate))
+ PAD_IOSSTATE(iosstate) | PAD_IOSTERM(iosterm))
/* General purpose output, no pullup/down. */
#define PAD_CFG_GPO(pad, val, rst) \
diff --git a/src/soc/intel/apollolake/include/soc/gpio_defs.h b/src/soc/intel/apollolake/include/soc/gpio_defs.h
index 1694d10949..938d4148f1 100644
--- a/src/soc/intel/apollolake/include/soc/gpio_defs.h
+++ b/src/soc/intel/apollolake/include/soc/gpio_defs.h
@@ -125,6 +125,10 @@
#define PAD_CFG1_IOSSTATE_IGNORE (0xf << 0) /* Ignore Iostandby */
#define PAD_CFG1_IOSSTATE_MASK 0xf /* mask to extract Iostandby bits */
#define PAD_CFG1_IOSSTATE_SHIFT 14 /* set Iostandby bits [17:14] */
+#define PAD_CFG1_IOSTERM_SAME (0x0 << 8) /* Same as functional mode */
+#define PAD_CFG1_IOSTERM_DISPUPD (0x1 << 8) /* Disable Pull-up/Pull-down */
+#define PAD_CFG1_IOSTERM_ENPD (0x2 << 8) /* Enable Pull-down */
+#define PAD_CFG1_IOSTERM_ENPU (0x3 << 8) /* Enable Pull-up */
#define PAD_CFG_BASE 0x500
#define PAD_CFG_OFFSET(pad) (PAD_CFG_BASE + ((pad) * 8))