Go to the documentation of this file.
15 #define OMAP_MUX_TERMINATOR 0xffff
18 #define OMAP_MUX_MODE0 0
19 #define OMAP_MUX_MODE1 1
20 #define OMAP_MUX_MODE2 2
21 #define OMAP_MUX_MODE3 3
22 #define OMAP_MUX_MODE4 4
23 #define OMAP_MUX_MODE5 5
24 #define OMAP_MUX_MODE6 6
25 #define OMAP_MUX_MODE7 7
28 #define OMAP_PULL_ENA (1 << 3)
29 #define OMAP_PULL_UP (1 << 4)
30 #define OMAP_ALTELECTRICALSEL (1 << 5)
33 #define OMAP_INPUT_EN (1 << 8)
34 #define OMAP_OFF_EN (1 << 9)
35 #define OMAP_OFFOUT_EN (1 << 10)
36 #define OMAP_OFFOUT_VAL (1 << 11)
37 #define OMAP_OFF_PULL_EN (1 << 12)
38 #define OMAP_OFF_PULL_UP (1 << 13)
39 #define OMAP_WAKEUP_EN (1 << 14)
42 #define OMAP_WAKEUP_EVENT (1 << 15)
45 #define OMAP_PIN_OUTPUT 0
46 #define OMAP_PIN_INPUT OMAP_INPUT_EN
47 #define OMAP_PIN_INPUT_PULLUP (OMAP_PULL_ENA | OMAP_INPUT_EN \
49 #define OMAP_PIN_INPUT_PULLDOWN (OMAP_PULL_ENA | OMAP_INPUT_EN)
52 #define OMAP_PIN_OFF_NONE 0
53 #define OMAP_PIN_OFF_OUTPUT_HIGH (OMAP_OFF_EN | OMAP_OFFOUT_EN \
55 #define OMAP_PIN_OFF_OUTPUT_LOW (OMAP_OFF_EN | OMAP_OFFOUT_EN)
56 #define OMAP_PIN_OFF_INPUT_PULLUP (OMAP_OFF_EN | OMAP_OFF_PULL_EN \
58 #define OMAP_PIN_OFF_INPUT_PULLDOWN (OMAP_OFF_EN | OMAP_OFF_PULL_EN)
59 #define OMAP_PIN_OFF_WAKEUPENABLE OMAP_WAKEUP_EN
61 #define OMAP_MODE_GPIO(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE4)
62 #define OMAP_MODE_UART(x) (((x) & OMAP_MUX_MODE7) == OMAP_MUX_MODE0)
65 #define OMAP_PACKAGE_MASK 0xffff
66 #define OMAP_PACKAGE_CBS 8
67 #define OMAP_PACKAGE_CBL 7
68 #define OMAP_PACKAGE_CBP 6
69 #define OMAP_PACKAGE_CUS 5
70 #define OMAP_PACKAGE_CBB 4
71 #define OMAP_PACKAGE_CBC 3
72 #define OMAP_PACKAGE_ZAC 2
73 #define OMAP_PACKAGE_ZAF 1
76 #define OMAP_MUX_NR_MODES 8
77 #define OMAP_MUX_NR_SIDES 2
87 #define OMAP_MUX_REG_8BIT (1 << 0)
88 #define OMAP_MUX_GPIO_IN_MODE3 (1 << 1)
134 #ifdef CONFIG_OMAP_MUX
136 #ifdef CONFIG_DEBUG_FS
162 #define OMAP_DEVICE_PAD_REMUX BIT(1)
165 #define OMAP_DEVICE_PAD_WAKEUP BIT(0)
189 #define OMAP_MUX_STATIC(signal, mode) \
195 #if defined(CONFIG_OMAP_MUX)
202 int omap_mux_init_gpio(
int gpio,
int val);
209 int omap_mux_init_signal(
const char *muxname,
int val);
228 int omap_mux_get_by_name(
const char *muxname,
233 static inline int omap_mux_get_by_name(
const char *muxname,
240 static inline int omap_mux_init_gpio(
int gpio,
int val)
244 static inline int omap_mux_init_signal(
char *muxname,
int val)
347 u32 mux_pbase,
u32 mux_size,