aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-ux500/board-mop500-pins.c
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2012-05-06 19:33:24 -0400
committerLinus Walleij <linus.walleij@linaro.org>2012-05-11 05:14:18 -0400
commita09806607fd20bed2f8c41fe22793386790a14aa (patch)
tree92507b0f7db7a08213cd681905d8b5907b7f401f /arch/arm/mach-ux500/board-mop500-pins.c
parent3b64c09b376ae2a82cccdb25aa0c3bc3c3be9d14 (diff)
ARM: ux500: switch to using pinctrl for uart0
UART0 had a hack that enabled its pins on init and put it to sleep on the exit callback. Replace this with the pinctrl calls to do the same thing and update the runtime table with the two apropriate states for runtime/active and idle. Acked-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500-pins.c')
-rw-r--r--arch/arm/mach-ux500/board-mop500-pins.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c
index 157af7ee5cdc..dccd29d6fff6 100644
--- a/arch/arm/mach-ux500/board-mop500-pins.c
+++ b/arch/arm/mach-ux500/board-mop500-pins.c
@@ -45,6 +45,10 @@ BIAS(gpio_in_pu_slpm_gpio_nopull, PIN_INPUT_PULLUP|PIN_GPIOMODE_ENABLED|PIN_SLPM
45BIAS(gpio_in_pd_slpm_gpio_nopull, PIN_INPUT_PULLDOWN|PIN_GPIOMODE_ENABLED|PIN_SLPM_GPIO|PIN_SLPM_INPUT_NOPULL); 45BIAS(gpio_in_pd_slpm_gpio_nopull, PIN_INPUT_PULLDOWN|PIN_GPIOMODE_ENABLED|PIN_SLPM_GPIO|PIN_SLPM_INPUT_NOPULL);
46BIAS(gpio_out_hi, PIN_OUTPUT_HIGH|PIN_GPIOMODE_ENABLED); 46BIAS(gpio_out_hi, PIN_OUTPUT_HIGH|PIN_GPIOMODE_ENABLED);
47BIAS(gpio_out_lo, PIN_OUTPUT_LOW|PIN_GPIOMODE_ENABLED); 47BIAS(gpio_out_lo, PIN_OUTPUT_LOW|PIN_GPIOMODE_ENABLED);
48/* Sleep modes */
49BIAS(sleep_in_wkup_pdis, PIN_SLPM_DIR_INPUT|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED);
50BIAS(sleep_out_hi_wkup_pdis, PIN_SLPM_OUTPUT_HIGH|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED);
51BIAS(sleep_out_wkup_pdis, PIN_SLPM_DIR_OUTPUT|PIN_SLPM_WAKEUP_ENABLE|PIN_SLPM_PDIS_DISABLED);
48 52
49/* We use these to define hog settings that are always done on boot */ 53/* We use these to define hog settings that are always done on boot */
50#define DB8500_MUX_HOG(group,func) \ 54#define DB8500_MUX_HOG(group,func) \
@@ -58,6 +62,10 @@ BIAS(gpio_out_lo, PIN_OUTPUT_LOW|PIN_GPIOMODE_ENABLED);
58#define DB8500_PIN(pin,conf,dev) \ 62#define DB8500_PIN(pin,conf,dev) \
59 PIN_MAP_CONFIGS_PIN_DEFAULT(dev, "pinctrl-db8500", pin, conf) 63 PIN_MAP_CONFIGS_PIN_DEFAULT(dev, "pinctrl-db8500", pin, conf)
60 64
65#define DB8500_PIN_SLEEP(pin,conf,dev) \
66 PIN_MAP_CONFIGS_PIN(dev, PINCTRL_STATE_SLEEP, "pinctrl-db8500", \
67 pin, conf)
68
61/* Pin control settings */ 69/* Pin control settings */
62static struct pinctrl_map __initdata mop500_family_pinmap[] = { 70static struct pinctrl_map __initdata mop500_family_pinmap[] = {
63 /* 71 /*
@@ -115,6 +123,17 @@ static struct pinctrl_map __initdata mop500_family_pinmap[] = {
115 * converted to the pinctrl model. Here we model them as "default" 123 * converted to the pinctrl model. Here we model them as "default"
116 * states. 124 * states.
117 */ 125 */
126 /* Mux in UART0 after initialization */
127 DB8500_MUX("u0_a_1", "u0", "uart0"),
128 DB8500_PIN("GPIO0_AJ5", in_pu, "uart0"), /* CTS */
129 DB8500_PIN("GPIO1_AJ3", out_hi, "uart0"), /* RTS */
130 DB8500_PIN("GPIO2_AH4", in_pu, "uart0"), /* RXD */
131 DB8500_PIN("GPIO3_AH3", out_hi, "uart0"), /* TXD */
132 /* Sleep state for UART0 */
133 DB8500_PIN_SLEEP("GPIO0_AJ5", sleep_in_wkup_pdis, "uart0"),
134 DB8500_PIN_SLEEP("GPIO1_AJ3", sleep_out_hi_wkup_pdis, "uart0"),
135 DB8500_PIN_SLEEP("GPIO2_AH4", sleep_in_wkup_pdis, "uart0"),
136 DB8500_PIN_SLEEP("GPIO3_AH3", sleep_out_wkup_pdis, "uart0"),
118 /* Mux in LCD data lines 8 thru 11 and LCDA CLK for MCDE TVOUT */ 137 /* Mux in LCD data lines 8 thru 11 and LCDA CLK for MCDE TVOUT */
119 DB8500_MUX("lcd_d8_d11_a_1", "lcd", "mcde-tvout"), 138 DB8500_MUX("lcd_d8_d11_a_1", "lcd", "mcde-tvout"),
120 DB8500_MUX("lcdaclk_b_1", "lcda", "mcde-tvout"), 139 DB8500_MUX("lcdaclk_b_1", "lcda", "mcde-tvout"),