aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/plat-nomadik/include/plat/pincfg.h
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/plat-nomadik/include/plat/pincfg.h')
-rw-r--r--arch/arm/plat-nomadik/include/plat/pincfg.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/plat-nomadik/include/plat/pincfg.h b/arch/arm/plat-nomadik/include/plat/pincfg.h
index 22cb97d2d8ad..c015133a7ad3 100644
--- a/arch/arm/plat-nomadik/include/plat/pincfg.h
+++ b/arch/arm/plat-nomadik/include/plat/pincfg.h
@@ -24,6 +24,7 @@
24 * bit 16..18 - SLPM pull up/down state 24 * bit 16..18 - SLPM pull up/down state
25 * bit 19..20 - SLPM direction 25 * bit 19..20 - SLPM direction
26 * bit 21..22 - SLPM Value (if output) 26 * bit 21..22 - SLPM Value (if output)
27 * bit 23..25 - PDIS value (if input)
27 * 28 *
28 * to facilitate the definition, the following macros are provided 29 * to facilitate the definition, the following macros are provided
29 * 30 *
@@ -67,6 +68,10 @@ typedef unsigned long pin_cfg_t;
67/* These two replace the above in DB8500v2+ */ 68/* These two replace the above in DB8500v2+ */
68#define PIN_SLPM_WAKEUP_ENABLE (NMK_GPIO_SLPM_WAKEUP_ENABLE << PIN_SLPM_SHIFT) 69#define PIN_SLPM_WAKEUP_ENABLE (NMK_GPIO_SLPM_WAKEUP_ENABLE << PIN_SLPM_SHIFT)
69#define PIN_SLPM_WAKEUP_DISABLE (NMK_GPIO_SLPM_WAKEUP_DISABLE << PIN_SLPM_SHIFT) 70#define PIN_SLPM_WAKEUP_DISABLE (NMK_GPIO_SLPM_WAKEUP_DISABLE << PIN_SLPM_SHIFT)
71#define PIN_SLPM_USE_MUX_SETTINGS_IN_SLEEP PIN_SLPM_WAKEUP_DISABLE
72
73#define PIN_SLPM_GPIO PIN_SLPM_WAKEUP_ENABLE /* In SLPM, pin is a gpio */
74#define PIN_SLPM_ALTFUNC PIN_SLPM_WAKEUP_DISABLE /* In SLPM, pin is altfunc */
70 75
71#define PIN_DIR_SHIFT 14 76#define PIN_DIR_SHIFT 14
72#define PIN_DIR_MASK (0x1 << PIN_DIR_SHIFT) 77#define PIN_DIR_MASK (0x1 << PIN_DIR_SHIFT)
@@ -105,6 +110,20 @@ typedef unsigned long pin_cfg_t;
105#define PIN_SLPM_VAL_LOW ((1 + 0) << PIN_SLPM_VAL_SHIFT) 110#define PIN_SLPM_VAL_LOW ((1 + 0) << PIN_SLPM_VAL_SHIFT)
106#define PIN_SLPM_VAL_HIGH ((1 + 1) << PIN_SLPM_VAL_SHIFT) 111#define PIN_SLPM_VAL_HIGH ((1 + 1) << PIN_SLPM_VAL_SHIFT)
107 112
113#define PIN_SLPM_PDIS_SHIFT 23
114#define PIN_SLPM_PDIS_MASK (0x3 << PIN_SLPM_PDIS_SHIFT)
115#define PIN_SLPM_PDIS(x) \
116 (((x) & PIN_SLPM_PDIS_MASK) >> PIN_SLPM_PDIS_SHIFT)
117#define PIN_SLPM_PDIS_NO_CHANGE (0 << PIN_SLPM_PDIS_SHIFT)
118#define PIN_SLPM_PDIS_DISABLED (1 << PIN_SLPM_PDIS_SHIFT)
119#define PIN_SLPM_PDIS_ENABLED (2 << PIN_SLPM_PDIS_SHIFT)
120
121#define PIN_LOWEMI_SHIFT 25
122#define PIN_LOWEMI_MASK (0x1 << PIN_LOWEMI_SHIFT)
123#define PIN_LOWEMI(x) (((x) & PIN_LOWEMI_MASK) >> PIN_LOWEMI_SHIFT)
124#define PIN_LOWEMI_DISABLED (0 << PIN_LOWEMI_SHIFT)
125#define PIN_LOWEMI_ENABLED (1 << PIN_LOWEMI_SHIFT)
126
108/* Shortcuts. Use these instead of separate DIR, PULL, and VAL. */ 127/* Shortcuts. Use these instead of separate DIR, PULL, and VAL. */
109#define PIN_INPUT_PULLDOWN (PIN_DIR_INPUT | PIN_PULL_DOWN) 128#define PIN_INPUT_PULLDOWN (PIN_DIR_INPUT | PIN_PULL_DOWN)
110#define PIN_INPUT_PULLUP (PIN_DIR_INPUT | PIN_PULL_UP) 129#define PIN_INPUT_PULLUP (PIN_DIR_INPUT | PIN_PULL_UP)