aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLinus Walleij <linus.walleij@linaro.org>2014-02-03 17:16:49 -0500
committerLinus Walleij <linus.walleij@linaro.org>2014-02-04 14:50:50 -0500
commit7acacfbc3d68c4d431ee44ae7db81c3f5e37b41c (patch)
tree0f9bb880918f6c0539e77a6d20cb61df198afdbc
parentd88ae11e45ed9b327ee0aa7da5d5f1837a03e590 (diff)
ARM: ux500: move AB8500 clock out pins to DT
This moves the AB8500 pin settings for the clock out pins over to the device tree. We can delete the special setup calls for the platforms only using the AB8500 and not AB8505. Cc: Patrice Chotard <patrice.chotard@st.com> Cc: Lee Jones <lee.jones@linaro.org> Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
-rw-r--r--arch/arm/boot/dts/ste-href-ab8500.dtsi51
-rw-r--r--arch/arm/mach-ux500/board-mop500-pins.c41
-rw-r--r--arch/arm/mach-ux500/board-mop500.h2
-rw-r--r--arch/arm/mach-ux500/cpu-db8500.c7
4 files changed, 51 insertions, 50 deletions
diff --git a/arch/arm/boot/dts/ste-href-ab8500.dtsi b/arch/arm/boot/dts/ste-href-ab8500.dtsi
index 333b554c0bf7..30f8601da323 100644
--- a/arch/arm/boot/dts/ste-href-ab8500.dtsi
+++ b/arch/arm/boot/dts/ste-href-ab8500.dtsi
@@ -370,6 +370,57 @@
370 }; 370 };
371 }; 371 };
372 }; 372 };
373 /*
374 * Clock output pins associated with regulators.
375 */
376 sysclkreq2 {
377 sysclkreq2_default_mode: sysclkreq2_default {
378 default_mux {
379 ste,function = "sysclkreq";
380 ste,pins = "sysclkreq2_d_1";
381 };
382 default_cfg {
383 ste,pins = "GPIO1_T10";
384 input-enable;
385 bias-disable;
386 };
387 };
388 sysclkreq2_sleep_mode: sysclkreq2_sleep {
389 default_mux {
390 ste,function = "gpio";
391 ste,pins = "gpio1_a_1";
392 };
393 default_cfg {
394 ste,pins = "GPIO1_T10";
395 input-enable;
396 bias-pull-down;
397 };
398 };
399 };
400 sysclkreq4 {
401 sysclkreq4_default_mode: sysclkreq4_default {
402 default_mux {
403 ste,function = "sysclkreq";
404 ste,pins = "sysclkreq4_d_1";
405 };
406 default_cfg {
407 ste,pins = "GPIO3_U9";
408 input-enable;
409 bias-disable;
410 };
411 };
412 sysclkreq4_sleep_mode: sysclkreq4_sleep {
413 default_mux {
414 ste,function = "gpio";
415 ste,pins = "gpio3_a_1";
416 };
417 default_cfg {
418 ste,pins = "GPIO3_U9";
419 input-enable;
420 bias-pull-down;
421 };
422 };
423 };
373 }; 424 };
374 }; 425 };
375 }; 426 };
diff --git a/arch/arm/mach-ux500/board-mop500-pins.c b/arch/arm/mach-ux500/board-mop500-pins.c
index cbe91714f57f..1597ff7538e3 100644
--- a/arch/arm/mach-ux500/board-mop500-pins.c
+++ b/arch/arm/mach-ux500/board-mop500-pins.c
@@ -21,16 +21,6 @@
21BIAS(abx500_in_pd, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 1)); 21BIAS(abx500_in_pd, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 1));
22BIAS(abx500_in_nopull, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0)); 22BIAS(abx500_in_nopull, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0));
23 23
24#define AB8500_MUX_HOG(group, func) \
25 PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-ab8500.0", group, func)
26#define AB8500_PIN_HOG(pin, conf) \
27 PIN_MAP_CONFIGS_PIN_HOG_DEFAULT("pinctrl-ab8500.0", pin, abx500_##conf)
28
29#define AB8500_MUX_STATE(group, func, dev, state) \
30 PIN_MAP_MUX_GROUP(dev, state, "pinctrl-ab8500.0", group, func)
31#define AB8500_PIN_STATE(pin, conf, dev, state) \
32 PIN_MAP_CONFIGS_PIN(dev, state, "pinctrl-ab8500.0", pin, abx500_##conf)
33
34#define AB8505_MUX_HOG(group, func) \ 24#define AB8505_MUX_HOG(group, func) \
35 PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-ab8505.0", group, func) 25 PIN_MAP_MUX_GROUP_HOG_DEFAULT("pinctrl-ab8505.0", group, func)
36#define AB8505_PIN_HOG(pin, conf) \ 26#define AB8505_PIN_HOG(pin, conf) \
@@ -41,22 +31,6 @@ BIAS(abx500_in_nopull, PIN_CONF_PACKED(PIN_CONFIG_BIAS_PULL_DOWN, 0));
41#define AB8505_PIN_STATE(pin, conf, dev, state) \ 31#define AB8505_PIN_STATE(pin, conf, dev, state) \
42 PIN_MAP_CONFIGS_PIN(dev, state, "pinctrl-ab8505.0", pin, abx500_##conf) 32 PIN_MAP_CONFIGS_PIN(dev, state, "pinctrl-ab8505.0", pin, abx500_##conf)
43 33
44static struct pinctrl_map __initdata ab8500_pinmap[] = {
45 /* Sysclkreq2 */
46 AB8500_MUX_STATE("sysclkreq2_d_1", "sysclkreq", "regulator.35", PINCTRL_STATE_DEFAULT),
47 AB8500_PIN_STATE("GPIO1_T10", in_nopull, "regulator.35", PINCTRL_STATE_DEFAULT),
48 /* sysclkreq2 disable, mux in gpio configured in input pulldown */
49 AB8500_MUX_STATE("gpio1_a_1", "gpio", "regulator.35", PINCTRL_STATE_SLEEP),
50 AB8500_PIN_STATE("GPIO1_T10", in_pd, "regulator.35", PINCTRL_STATE_SLEEP),
51
52 /* Sysclkreq4 */
53 AB8500_MUX_STATE("sysclkreq4_d_1", "sysclkreq", "regulator.36", PINCTRL_STATE_DEFAULT),
54 AB8500_PIN_STATE("GPIO3_U9", in_nopull, "regulator.36", PINCTRL_STATE_DEFAULT),
55 /* sysclkreq4 disable, mux in gpio configured in input pulldown */
56 AB8500_MUX_STATE("gpio3_a_1", "gpio", "regulator.36", PINCTRL_STATE_SLEEP),
57 AB8500_PIN_STATE("GPIO3_U9", in_pd, "regulator.36", PINCTRL_STATE_SLEEP),
58};
59
60static struct pinctrl_map __initdata ab8505_pinmap[] = { 34static struct pinctrl_map __initdata ab8505_pinmap[] = {
61 /* Sysclkreq2 */ 35 /* Sysclkreq2 */
62 AB8505_MUX_STATE("sysclkreq2_d_1", "sysclkreq", "regulator.36", PINCTRL_STATE_DEFAULT), 36 AB8505_MUX_STATE("sysclkreq2_d_1", "sysclkreq", "regulator.36", PINCTRL_STATE_DEFAULT),
@@ -116,19 +90,4 @@ void __init mop500_pinmaps_init(void)
116 if (machine_is_u8520()) 90 if (machine_is_u8520())
117 pinctrl_register_mappings(ab8505_pinmap, 91 pinctrl_register_mappings(ab8505_pinmap,
118 ARRAY_SIZE(ab8505_pinmap)); 92 ARRAY_SIZE(ab8505_pinmap));
119 else
120 pinctrl_register_mappings(ab8500_pinmap,
121 ARRAY_SIZE(ab8500_pinmap));
122}
123
124void __init snowball_pinmaps_init(void)
125{
126 pinctrl_register_mappings(ab8500_pinmap,
127 ARRAY_SIZE(ab8500_pinmap));
128}
129
130void __init hrefv60_pinmaps_init(void)
131{
132 pinctrl_register_mappings(ab8500_pinmap,
133 ARRAY_SIZE(ab8500_pinmap));
134} 93}
diff --git a/arch/arm/mach-ux500/board-mop500.h b/arch/arm/mach-ux500/board-mop500.h
index d48e8662c676..320517e17ac9 100644
--- a/arch/arm/mach-ux500/board-mop500.h
+++ b/arch/arm/mach-ux500/board-mop500.h
@@ -89,7 +89,5 @@ extern struct msp_i2s_platform_data msp2_platform_data;
89extern struct msp_i2s_platform_data msp3_platform_data; 89extern struct msp_i2s_platform_data msp3_platform_data;
90 90
91void __init mop500_pinmaps_init(void); 91void __init mop500_pinmaps_init(void);
92void __init snowball_pinmaps_init(void);
93void __init hrefv60_pinmaps_init(void);
94 92
95#endif 93#endif
diff --git a/arch/arm/mach-ux500/cpu-db8500.c b/arch/arm/mach-ux500/cpu-db8500.c
index bc8a6183560d..2e52fcba57bd 100644
--- a/arch/arm/mach-ux500/cpu-db8500.c
+++ b/arch/arm/mach-ux500/cpu-db8500.c
@@ -194,13 +194,6 @@ static void __init u8500_init_machine(void)
194 /* Pinmaps must be in place before devices register */ 194 /* Pinmaps must be in place before devices register */
195 if (of_machine_is_compatible("st-ericsson,mop500")) 195 if (of_machine_is_compatible("st-ericsson,mop500"))
196 mop500_pinmaps_init(); 196 mop500_pinmaps_init();
197 else if (of_machine_is_compatible("calaosystems,snowball-a9500")) {
198 snowball_pinmaps_init();
199 } else if (of_machine_is_compatible("st-ericsson,hrefv60+"))
200 hrefv60_pinmaps_init();
201 else if (of_machine_is_compatible("st-ericsson,ccu9540")) {}
202 /* TODO: Add pinmaps for ccu9540 board. */
203
204 /* automatically probe child nodes of dbx5x0 devices */ 197 /* automatically probe child nodes of dbx5x0 devices */
205 if (of_machine_is_compatible("st-ericsson,u8540")) 198 if (of_machine_is_compatible("st-ericsson,u8540"))
206 of_platform_populate(NULL, u8500_local_bus_nodes, 199 of_platform_populate(NULL, u8500_local_bus_nodes,