aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2013-11-17 05:52:32 -0500
committerLinus Walleij <linus.walleij@linaro.org>2013-11-26 15:01:57 -0500
commit4d4629fcc264ff532801f4fb66032ff3c4df48f0 (patch)
treee1c571ae24b9f7e2ab08f53d9a43294c5847d2a6 /arch
parent2f4b84f8ecd2e4680a2e205e78d5ccdf56bd87d7 (diff)
ARM: ux500: move snowball pin configs to device tree
Move the few remaining snowball pin configurations to the device tree, reference these as hogs to the pin controller until there are real devices that can make use of them. Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/ste-snowball.dts59
-rw-r--r--arch/arm/mach-ux500/board-mop500-pins.c19
2 files changed, 59 insertions, 19 deletions
diff --git a/arch/arm/boot/dts/ste-snowball.dts b/arch/arm/boot/dts/ste-snowball.dts
index 605188ba30cd..9070c3701c89 100644
--- a/arch/arm/boot/dts/ste-snowball.dts
+++ b/arch/arm/boot/dts/ste-snowball.dts
@@ -357,6 +357,16 @@
357 }; 357 };
358 358
359 pinctrl { 359 pinctrl {
360 /*
361 * Set this up using hogs, as time goes by and as seems fit, these
362 * can be moved over to being controlled by respective device.
363 */
364 pinctrl-names = "default";
365 pinctrl-0 = <&accel_snowball_mode>,
366 <&magneto_snowball_mode>,
367 <&gbf_snowball_mode>,
368 <&wlan_snowball_mode>;
369
360 ethernet { 370 ethernet {
361 /* 371 /*
362 * Mux in "SM" which is used for the 372 * Mux in "SM" which is used for the
@@ -425,6 +435,55 @@
425 435
426 }; 436 };
427 }; 437 };
438 accelerometer {
439 accel_snowball_mode: accel_snowball {
440 /* Accelerometer lines */
441 snowball_cfg1 {
442 ste,pins =
443 "GPIO163_C20", /* ACCEL_IRQ1 */
444 "GPIO164_B21"; /* ACCEL_IRQ2 */
445 ste,config = <&gpio_in_pu>;
446 };
447 };
448 };
449 magnetometer {
450 magneto_snowball_mode: magneto_snowball {
451 snowball_cfg1 {
452 ste,pins = "GPIO165_C21"; /* MAG_DRDY */
453 ste,config = <&gpio_in_pu>;
454 };
455 };
456 };
457 gbf {
458 gbf_snowball_mode: gbf_snowball {
459 /*
460 * GBF (GPS, Bluetooth, FM-radio) interface,
461 * pull low to reset state
462 */
463 snowball_cfg1 {
464 ste,pins = "GPIO171_D23"; /* GBF_ENA_RESET */
465 ste,config = <&gpio_out_lo>;
466 };
467 };
468 };
469 wlan {
470 wlan_snowball_mode: wlan_snowball {
471 /*
472 * Activate this mode with the WLAN chip.
473 * These are plain GPIO pins used by WLAN
474 */
475 snowball_cfg1 {
476 ste,pins =
477 "GPIO161_D21", /* WLAN_PMU_EN */
478 "GPIO215_AH13"; /* WLAN_ENA */
479 ste,config = <&gpio_out_lo>;
480 };
481 snowball_cfg2 {
482 ste,pins = "GPIO216_AG12"; /* WLAN_IRQ */
483 ste,config = <&gpio_in_pu>;
484 };
485 };
486 };
428 }; 487 };
429 488
430 mcde@a0350000 { 489 mcde@a0350000 {
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c
index aae9cfcfd56a..ff532ba30610 100644
--- a/arch/arm/mach-ux500/board-mop500-pins.c
+++ b/arch/arm/mach-ux500/board-mop500-pins.c
@@ -23,11 +23,6 @@ BIAS(abx500_out_lo, PIN_CONF_PACKED(PIN_CONFIG_OUTPUT, 0));
23BIAS(abx500_in_pd, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 1)); 23BIAS(abx500_in_pd, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 1));
24BIAS(abx500_in_nopull, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0)); 24BIAS(abx500_in_nopull, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0));
25 25
26/* These also force them into GPIO mode */
27BIAS(gpio_in_pu, PIN_INPUT_PULLUP|PIN_GPIOMODE_ENABLED);
28BIAS(gpio_out_hi, PIN_OUTPUT_HIGH|PIN_GPIOMODE_ENABLED);
29BIAS(gpio_out_lo, PIN_OUTPUT_LOW|PIN_GPIOMODE_ENABLED);
30
31/* We use these to define hog settings that are always done on boot */ 26/* We use these to define hog settings that are always done on boot */
32#define DB8500_MUX_HOG(group,func) \ 27#define DB8500_MUX_HOG(group,func) \
33 PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-db8500", group, func) 28 PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-db8500", group, func)
@@ -296,18 +291,6 @@ static struct pinctrl_map __initdata ab8505_pinmap[] = {
296 AB8505_PIN_HOG("GPIO53_D15", in_pd), 291 AB8505_PIN_HOG("GPIO53_D15", in_pd),
297}; 292};
298 293
299static struct pinctrl_map __initdata snowball_pinmap[] = {
300 /* Accelerometer/Magnetometer */
301 DB8500_PIN_HOG("GPIO163_C20", gpio_in_pu), /* ACCEL_IRQ1 */
302 DB8500_PIN_HOG("GPIO164_B21", gpio_in_pu), /* ACCEL_IRQ2 */
303 DB8500_PIN_HOG("GPIO165_C21", gpio_in_pu), /* MAG_DRDY */
304 /* WLAN/GBF */
305 DB8500_PIN_HOG("GPIO161_D21", gpio_out_lo), /* WLAN_PMU_EN */
306 DB8500_PIN_HOG("GPIO171_D23", gpio_out_hi), /* GBF_ENA */
307 DB8500_PIN_HOG("GPIO215_AH13", gpio_out_lo), /* WLAN_ENA */
308 DB8500_PIN_HOG("GPIO216_AG12", gpio_in_pu), /* WLAN_IRQ */
309};
310
311void __init mop500_pinmaps_init(void) 294void __init mop500_pinmaps_init(void)
312{ 295{
313 if (machine_is_u8520()) 296 if (machine_is_u8520())
@@ -320,8 +303,6 @@ void __init mop500_pinmaps_init(void)
320 303
321void __init snowball_pinmaps_init(void) 304void __init snowball_pinmaps_init(void)
322{ 305{
323 pinctrl_register_mappings(snowball_pinmap,
324 ARRAY_SIZE(snowball_pinmap));
325 pinctrl_register_mappings(ab8500_pinmap, 306 pinctrl_register_mappings(ab8500_pinmap,
326 ARRAY_SIZE(ab8500_pinmap)); 307 ARRAY_SIZE(ab8500_pinmap));
327} 308}