summaryrefslogtreecommitdiff
path: root/src/soc/intel/fsp_baytrail
diff options
context:
space:
mode:
authorWerner Zeh <werner.zeh@siemens.com>2015-02-10 13:32:51 +0100
committerPatrick Georgi <pgeorgi@google.com>2015-02-13 09:29:28 +0100
commit2a8444574889ecd97fdf9bddd864d38d2f5bc46a (patch)
treefee97aafd44e96e1f4fc6844ce78d494250cc0fd /src/soc/intel/fsp_baytrail
parent1e9336e89c779d531a2c1882e37f3e46ad55d01a (diff)
fsp_baytrail: Add macros to define 20K pull-up and down
Add two macros to gpio.h which allow to setup 20K pull-up or pull-down resistor for a given GPIO. Change-Id: Ie3bc4d40df588ed682cc692e2a80527b9e62a483 Signed-off-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-on: http://review.coreboot.org/8402 Reviewed-by: Martin Roth <gaumless@gmail.com> Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Diffstat (limited to 'src/soc/intel/fsp_baytrail')
-rw-r--r--src/soc/intel/fsp_baytrail/baytrail/gpio.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/soc/intel/fsp_baytrail/baytrail/gpio.h b/src/soc/intel/fsp_baytrail/baytrail/gpio.h
index e13b663273..a45254a8af 100644
--- a/src/soc/intel/fsp_baytrail/baytrail/gpio.h
+++ b/src/soc/intel/fsp_baytrail/baytrail/gpio.h
@@ -170,6 +170,20 @@
.use_sel = GPIO_USE_MMIO, \
.is_gpio = 1 }
+#define GPIO_INPUT_PU_20K \
+ { .pad_conf0 = PAD_PU_20K | PAD_PULL_UP | PAD_CONFIG0_DEFAULT, \
+ .pad_conf1 = PAD_CONFIG1_DEFAULT, \
+ .pad_val = PAD_VAL_INPUT, \
+ .use_sel = GPIO_USE_MMIO, \
+ .is_gpio = 1 }
+
+#define GPIO_INPUT_PD_20K \
+ { .pad_conf0 = PAD_PU_20K | PAD_PULL_DOWN | PAD_CONFIG0_DEFAULT, \
+ .pad_conf1 = PAD_CONFIG1_DEFAULT, \
+ .pad_val = PAD_VAL_INPUT, \
+ .use_sel = GPIO_USE_MMIO, \
+ .is_gpio = 1 }
+
#define GPIO_INPUT_NOPU \
{ .pad_conf0 = PAD_PU_10K | PAD_PULL_DISABLE | PAD_CONFIG0_DEFAULT, \
.pad_conf1 = PAD_CONFIG1_DEFAULT, \