diff options
Diffstat (limited to 'arch')
-rw-r--r-- | arch/arm/mach-ux500/board-mop500-pins.c | 27 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.c | 17 | ||||
-rw-r--r-- | arch/arm/mach-ux500/board-mop500.h | 25 |
3 files changed, 36 insertions, 33 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c index 3d32e9b059e..276305ebb33 100644 --- a/arch/arm/mach-ux500/board-mop500-pins.c +++ b/arch/arm/mach-ux500/board-mop500-pins.c @@ -207,6 +207,12 @@ static pin_cfg_t snowball_pins[] = { /* MMC0: MicroSD card */ GPIO21_MC0_DAT31DIR | PIN_OUTPUT_HIGH, + /* Snowball buttons */ + GPIO32_GPIO | PIN_INPUT_PULLUP, /* User PB */ + GPIO151_GPIO | PIN_INPUT_PULLUP, /* J1 pin 8 */ + GPIO152_GPIO | PIN_INPUT_PULLUP, /* J1 pin 9 */ + GPIO162_GPIO | PIN_INPUT_PULLUP, /* J1 pin 14 */ + /* MMC2: LAN */ GPIO86_SM_ADQ0, GPIO87_SM_ADQ1, @@ -243,6 +249,7 @@ static pin_cfg_t snowball_pins[] = { /* WLAN/GBF */ GPIO171_GPIO | PIN_OUTPUT_HIGH,/* GBF_ENA */ + GPIO161_GPIO | PIN_OUTPUT_LOW, /* WLAN_PMU_EN */ GPIO215_GPIO | PIN_OUTPUT_LOW,/* WLAN_ENA */ GPIO216_GPIO | PIN_INPUT_PULLUP,/* WLAN_IRQ */ }; @@ -933,16 +940,6 @@ void __init mop500_pins_init(void) ux500_pins_add(mop500_pins, ARRAY_SIZE(mop500_pins)); - if (machine_is_hrefv60()) - nmk_config_pins(mop500_pins_hrefv60, - ARRAY_SIZE(mop500_pins_hrefv60)); - else if (machine_is_snowball()) - nmk_config_pins(snowball_pins, - ARRAY_SIZE(snowball_pins)); - else - nmk_config_pins(mop500_pins_default, - ARRAY_SIZE(mop500_pins_default)); - switch (pinsfor) { case PINS_FOR_U9500: nmk_config_pins(u9500_pins, ARRAY_SIZE(u9500_pins)); @@ -954,6 +951,16 @@ void __init mop500_pins_init(void) break; } + if (machine_is_hrefv60()) + nmk_config_pins(mop500_pins_hrefv60, + ARRAY_SIZE(mop500_pins_hrefv60)); + else if (machine_is_snowball()) + nmk_config_pins(snowball_pins, + ARRAY_SIZE(snowball_pins)); + else + nmk_config_pins(mop500_pins_default, + ARRAY_SIZE(mop500_pins_default)); + suspend_set_pins_force_fn(mop500_pins_suspend_force, mop500_pins_suspend_force_mux); } diff --git a/arch/arm/mach-ux500/board-mop500.c b/arch/arm/mach-ux500/board-mop500.c index 7d2eea57d9e..76211404481 100644 --- a/arch/arm/mach-ux500/board-mop500.c +++ b/arch/arm/mach-ux500/board-mop500.c @@ -160,7 +160,7 @@ static struct abx500_accdet_platform_data ab8500_accdet_pdata = { static struct gpio_keys_button snowball_key_array[] = { { - .gpio = 32, + .gpio = SNOWBALL_USER_PB_GPIO, .type = EV_KEY, .code = KEY_1, .desc = "userpb", @@ -169,7 +169,7 @@ static struct gpio_keys_button snowball_key_array[] = { .wakeup = 1, }, { - .gpio = 151, + .gpio = SNOWBALL_J1_PIN_8_GPIO, .type = EV_KEY, .code = KEY_2, .desc = "extkb1", @@ -178,7 +178,7 @@ static struct gpio_keys_button snowball_key_array[] = { .wakeup = 1, }, { - .gpio = 152, + .gpio = SNOWBALL_J1_PIN_9_GPIO, .type = EV_KEY, .code = KEY_3, .desc = "extkb2", @@ -187,16 +187,7 @@ static struct gpio_keys_button snowball_key_array[] = { .wakeup = 1, }, { - .gpio = 161, - .type = EV_KEY, - .code = KEY_4, - .desc = "extkb3", - .active_low = 1, - .debounce_interval = 50, - .wakeup = 1, - }, - { - .gpio = 162, + .gpio = SNOWBALL_J1_PIN_14_GPIO, .type = EV_KEY, .code = KEY_5, .desc = "extkb4", diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h index 829a7bece6e..1f65e4de60a 100644 --- a/arch/arm/mach-ux500/board-mop500.h +++ b/arch/arm/mach-ux500/board-mop500.h @@ -11,16 +11,6 @@ #include <linux/mfd/ab8500/gpio.h> #include <mach/gpio.h> -/* Snowball GPIO for MMC card */ -#define SNOWBALL_SDMMC_EN_GPIO 217 -#define SNOWBALL_SDMMC_1V8_3V_GPIO 228 -#define SNOWBALL_SDMMC_CD_GPIO 218 - -/* Snowball specific GPIO assignments, this board has no GPIO expander */ -#define SNOWBALL_ACCEL_INT1_GPIO 163 -#define SNOWBALL_ACCEL_INT2_GPIO 164 -#define SNOWBALL_MAGNET_DRDY_GPIO 165 - /* HREFv60-specific GPIO assignments, this board has no GPIO expander */ #define HREFV60_TOUCH_RST_GPIO 143 #define HREFV60_PROX_SENSE_GPIO 217 @@ -61,6 +51,16 @@ #define GPIO_SDMMC_EN MOP500_EGPIO(17) #define GPIO_SDMMC_1V8_3V_SEL MOP500_EGPIO(18) +/* Snowball GPIO for MMC card */ +#define SNOWBALL_SDMMC_EN_GPIO 217 +#define SNOWBALL_SDMMC_1V8_3V_GPIO 228 +#define SNOWBALL_SDMMC_CD_GPIO 218 + +/* Snowball specific GPIO assignments, this board has no GPIO expander */ +#define SNOWBALL_ACCEL_INT1_GPIO 163 +#define SNOWBALL_ACCEL_INT2_GPIO 164 +#define SNOWBALL_MAGNET_DRDY_GPIO 165 + /*Snowball AB8500 GPIO */ #define SNOWBALL_VSMPS2_1V8_GPIO AB8500_PIN_GPIO1 /* SYSCLKREQ2/GPIO1 */ #define SNOWBALL_PM_GPIO1_GPIO AB8500_PIN_GPIO2 /* SYSCLKREQ3/GPIO2 */ @@ -70,6 +70,11 @@ #define SNOWBALL_PME_ETH_GPIO AB8500_PIN_GPIO24 /* SYSCLKREQ7/GPIO24 */ #define SNOWBALL_EN_3V3_ETH_GPIO AB8500_PIN_GPIO26 /* GPIO26 */ +/*Snowball buttons GPIO */ +#define SNOWBALL_USER_PB_GPIO 32 +#define SNOWBALL_J1_PIN_8_GPIO 151 /* AP_GPIO151 */ +#define SNOWBALL_J1_PIN_9_GPIO 152 /* AP_GPIO152 */ +#define SNOWBALL_J1_PIN_14_GPIO 162 /* AP_GPIO162 */ struct i2c_board_info; |