summaryrefslogtreecommitdiff
path: root/src/soc/intel/apollolake/include/soc/gpio.h
diff options
context:
space:
mode:
authorJagadish Krishnamoorthy <jagadish.krishnamoorthy@intel.com>2016-07-25 13:59:44 -0700
committerAaron Durbin <adurbin@chromium.org>2016-08-04 16:13:34 +0200
commitb6739d1b5666267a1c536bf8635e174436b836ae (patch)
treeed555f54b7004710d43a0e6cc6e3f490e7b91762 /src/soc/intel/apollolake/include/soc/gpio.h
parentfec95be8b6e222ce73890577c0ecd32793d0df43 (diff)
downloadcoreboot-b6739d1b5666267a1c536bf8635e174436b836ae.tar.xz
soc/intel/apollolake: Configure gpio ownership
For the gpio based irq to work, the ownership of the pad should be changed to GPIO_DRIVER. Provide an option in the gpio defs to configure the PAD onwership. BUG=chrome-os-partner:54371 TEST=none Change-Id: I26d242d25d2034049340adf526045308fcdebbc0 Signed-off-by: Jagadish Krishnamoorthy <jagadish.krishnamoorthy@intel.com> Reviewed-on: https://review.coreboot.org/15871 Reviewed-by: Aaron Durbin <adurbin@chromium.org> Tested-by: build bot (Jenkins)
Diffstat (limited to 'src/soc/intel/apollolake/include/soc/gpio.h')
-rw-r--r--src/soc/intel/apollolake/include/soc/gpio.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/soc/intel/apollolake/include/soc/gpio.h b/src/soc/intel/apollolake/include/soc/gpio.h
index fc2401d165..8ef74bb70a 100644
--- a/src/soc/intel/apollolake/include/soc/gpio.h
+++ b/src/soc/intel/apollolake/include/soc/gpio.h
@@ -63,6 +63,14 @@ typedef uint32_t gpio_t;
PAD_FUNC(GPIO) | PAD_RESET(rst) | PAD_CFG0_TX_DISABLE, \
PAD_PULL(pull) | PAD_IOSSTATE(TxLASTRxE))
+/* General purpose input. The following macro sets the
+ * Host Software Pad Ownership to GPIO Driver mode.
+ */
+#define PAD_CFG_GPI_GPIO_DRIVER(pad, pull, rst) \
+ _PAD_CFG_STRUCT(pad, \
+ PAD_FUNC(GPIO) | PAD_RESET(rst) | PAD_CFG0_TX_DISABLE, \
+ PAD_PULL(pull) | PAD_CFG1_GPIO_DRIVER | PAD_IOSSTATE(TxLASTRxE))
+
/* No Connect configuration for unused pad.
* NC should be GPI with Term as PU20K, PD20K, NONE depending upon default Term
*/