summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristophe Guibout <christophe.guibout@stericsson.com>2011-09-02 16:02:13 +0530
committerUlf Hansson <ulf.hansson@stericsson.com>2011-09-19 16:05:59 +0200
commitb0601f1cd535e501155d7b070848f8ea0b3b2afb (patch)
tree485b909ea1b1470995bd929543b7f5b60d3ead8a
parent1e3e2a9dc117de29216cd6318d998f95ebfa4041 (diff)
u9500: GPIO conflicts with external modem
On 8500, GPIO226 is used to set WLAN_PMU_EN for startup. More details in CR 326583. On 9500, GPIO226 is reserved for HSIT_CAWAKE0, and WLAN_PMU_EN is mapped on AB_GPIO11. WLAN_IRQ has been moved from GPIO04 on 8500 to GPIO144 on 9500 because GPIO04 is used for UART1 RX. ST-Ericsson ID: 354110 ST-Ericsson FOSS-OUT ID: Trivial ST-Ericsson Linux next: NA Change-Id: Ia76f1a5a611a1929c12589a48c3e0774e891880a Signed-off-by: Christophe Guibout <christophe.guibout@stericsson.com> Reviewed-on: http://gerrit.lud.stericsson.com/gerrit/30041 Reviewed-by: Virupax SADASHIVPETIMATH <virupax.sadashivpetimath@stericsson.com> Tested-by: Virupax SADASHIVPETIMATH <virupax.sadashivpetimath@stericsson.com>
-rw-r--r--arch/arm/mach-ux500/board-mop500-pins.c29
-rw-r--r--arch/arm/mach-ux500/pins.h1
-rw-r--r--drivers/staging/cg2900/board-mop500-cg2900.c31
3 files changed, 52 insertions, 9 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c
index 887d3004e77..4fa8adf9e4b 100644
--- a/arch/arm/mach-ux500/board-mop500-pins.c
+++ b/arch/arm/mach-ux500/board-mop500-pins.c
@@ -24,10 +24,10 @@
enum custom_pin_cfg_t {
PINS_FOR_DEFAULT,
- PINS_FOR_U9500_21,
+ PINS_FOR_U9500,
};
-static enum custom_pin_cfg_t pinsfor = PINS_FOR_DEFAULT;
+static enum custom_pin_cfg_t pinsfor;
static pin_cfg_t mop500_pins_common[] = {
/* MSP0 */
@@ -103,7 +103,6 @@ static pin_cfg_t mop500_pins_default[] = {
static pin_cfg_t mop500_pins_hrefv60[] = {
/* WLAN */
- GPIO4_GPIO | PIN_INPUT_PULLUP,/* WLAN_IRQ */
GPIO85_GPIO | PIN_OUTPUT_LOW,/* WLAN_ENA */
/* XENON Flashgun INTERFACE */
@@ -184,9 +183,16 @@ static pin_cfg_t mop500_pins_hrefv60[] = {
GPIO95_GPIO | PIN_INPUT_PULLUP,
};
-static pin_cfg_t u9500_21_pins[] = {
+static pin_cfg_t u9500_pins[] = {
GPIO4_U1_RXD | PIN_INPUT_PULLUP,
GPIO5_U1_TXD | PIN_OUTPUT_HIGH,
+ GPIO144_GPIO | PIN_INPUT_PULLUP,/* WLAN_IRQ */
+ GPIO226_GPIO | PIN_OUTPUT_HIGH, /* HSI AC_WAKE0 */
+};
+
+static pin_cfg_t u8500_pins[] = {
+ GPIO226_GPIO | PIN_OUTPUT_LOW, /* WLAN_PMU_EN */
+ GPIO4_GPIO | PIN_INPUT_PULLUP,/* WLAN_IRQ */
};
static pin_cfg_t snowball_pins[] = {
@@ -895,12 +901,20 @@ static int __init early_pinsfor(char *p)
pinsfor = PINS_FOR_DEFAULT;
if (strcmp(p, "u9500-21") == 0)
- pinsfor = PINS_FOR_U9500_21;
+ pinsfor = PINS_FOR_U9500;
return 0;
}
early_param("pinsfor", early_pinsfor);
+int pins_for_u9500(void)
+{
+ if (pinsfor == PINS_FOR_U9500)
+ return 1;
+
+ return 0;
+}
+
void __init mop500_pins_init(void)
{
nmk_config_pins(mop500_pins_common,
@@ -919,11 +933,12 @@ void __init mop500_pins_init(void)
ARRAY_SIZE(mop500_pins_default));
switch (pinsfor) {
- case PINS_FOR_U9500_21:
- nmk_config_pins(u9500_21_pins, ARRAY_SIZE(u9500_21_pins));
+ case PINS_FOR_U9500:
+ nmk_config_pins(u9500_pins, ARRAY_SIZE(u9500_pins));
break;
case PINS_FOR_DEFAULT:
+ nmk_config_pins(u8500_pins, ARRAY_SIZE(u8500_pins));
default:
break;
}
diff --git a/arch/arm/mach-ux500/pins.h b/arch/arm/mach-ux500/pins.h
index 52e123963f1..4c16c195a44 100644
--- a/arch/arm/mach-ux500/pins.h
+++ b/arch/arm/mach-ux500/pins.h
@@ -39,5 +39,6 @@ struct ux500_pins *ux500_pins_get(const char *name);
int ux500_pins_enable(struct ux500_pins *pins);
int ux500_pins_disable(struct ux500_pins *pins);
void ux500_pins_put(struct ux500_pins *pins);
+int pins_for_u9500(void);
#endif
diff --git a/drivers/staging/cg2900/board-mop500-cg2900.c b/drivers/staging/cg2900/board-mop500-cg2900.c
index 4c010a1287e..b8fa3e98fa2 100644
--- a/drivers/staging/cg2900/board-mop500-cg2900.c
+++ b/drivers/staging/cg2900/board-mop500-cg2900.c
@@ -20,11 +20,12 @@
#include <net/bluetooth/hci.h>
#include <plat/pincfg.h>
+#include <mach/gpio.h>
#include "cg2900.h"
#include "devices-cg2900.h"
#include "pins-db8500.h"
-
+#include "pins.h"
#define CG2900_BT_ENABLE_GPIO 170
#define CG2900_GBF_ENA_RESET_GPIO 171
@@ -140,6 +141,27 @@ static struct resource cg2900_uart_resources[] = {
},
};
+static struct resource cg2900_uart_resources_u9500[] = {
+ {
+ .start = CG2900_GBF_ENA_RESET_GPIO,
+ .end = CG2900_GBF_ENA_RESET_GPIO,
+ .flags = IORESOURCE_IO,
+ .name = "gbf_ena_reset",
+ },
+ {
+ .start = CG2900_BT_CTS_GPIO,
+ .end = CG2900_BT_CTS_GPIO,
+ .flags = IORESOURCE_IO,
+ .name = "cts_gpio",
+ },
+ {
+ .start = NOMADIK_GPIO_TO_IRQ(CG2900_BT_CTS_GPIO),
+ .end = NOMADIK_GPIO_TO_IRQ(CG2900_BT_CTS_GPIO),
+ .flags = IORESOURCE_IRQ,
+ .name = "cts_irq",
+ },
+};
+
static pin_cfg_t cg2900_uart_enabled[] = {
GPIO0_U0_CTSn | PIN_INPUT_PULLUP,
GPIO1_U0_RTSn | PIN_OUTPUT_HIGH,
@@ -195,7 +217,12 @@ static int __init board_cg2900_init(void)
dcg2900_init_platdata(&cg2900_test_platform_data);
dcg2900_init_platdata(&cg2900_uart_platform_data);
- if (machine_is_hrefv60()) {
+ if (pins_for_u9500()) {
+ ux500_cg2900_uart_device.num_resources =
+ ARRAY_SIZE(cg2900_uart_resources_u9500);
+ ux500_cg2900_uart_device.resource =
+ cg2900_uart_resources_u9500;
+ } else if (machine_is_hrefv60()) {
ux500_cg2900_uart_device.num_resources =
ARRAY_SIZE(cg2900_uart_resources);
ux500_cg2900_uart_device.resource =