diff options
author | Andrew Lunn <andrew@lunn.ch> | 2012-11-17 11:00:51 -0500 |
---|---|---|
committer | Jason Cooper <jason@lakedaemon.net> | 2012-11-23 21:58:18 -0500 |
commit | 5d183ef9100ca6005b4bb250db75bc006110b18a (patch) | |
tree | 2f544a15663f83c133c2dab5e8fa51cc459488b1 | |
parent | 56942287bea45afdc331f95975fbafab37dfd595 (diff) |
ARM: Kirkwood: Convert GoFlex Net to pinctrl.
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Tested-by: Joshua Coombs <josh.coombs@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r-- | arch/arm/boot/dts/kirkwood-goflexnet.dts | 56 | ||||
-rw-r--r-- | arch/arm/mach-kirkwood/board-goflexnet.c | 18 |
2 files changed, 56 insertions, 18 deletions
diff --git a/arch/arm/boot/dts/kirkwood-goflexnet.dts b/arch/arm/boot/dts/kirkwood-goflexnet.dts index 84de887620ec..1b133e0c566e 100644 --- a/arch/arm/boot/dts/kirkwood-goflexnet.dts +++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts | |||
@@ -1,6 +1,7 @@ | |||
1 | /dts-v1/; | 1 | /dts-v1/; |
2 | 2 | ||
3 | /include/ "kirkwood.dtsi" | 3 | /include/ "kirkwood.dtsi" |
4 | /include/ "kirkwood-6281.dtsi" | ||
4 | 5 | ||
5 | / { | 6 | / { |
6 | model = "Seagate GoFlex Net"; | 7 | model = "Seagate GoFlex Net"; |
@@ -16,6 +17,61 @@ | |||
16 | }; | 17 | }; |
17 | 18 | ||
18 | ocp@f1000000 { | 19 | ocp@f1000000 { |
20 | pinctrl: pinctrl@10000 { | ||
21 | |||
22 | pinctrl-0 = < &pmx_usb_power_enable &pmx_led_orange | ||
23 | &pmx_led_left_cap_0 &pmx_led_left_cap_1 | ||
24 | &pmx_led_left_cap_2 &pmx_led_left_cap_3 | ||
25 | &pmx_led_right_cap_0 &pmx_led_right_cap_1 | ||
26 | &pmx_led_right_cap_2 &pmx_led_right_cap_3 | ||
27 | >; | ||
28 | pinctrl-names = "default"; | ||
29 | |||
30 | pmx_usb_power_enable: pmx-usb-power-enable { | ||
31 | marvell,pins = "mpp29"; | ||
32 | marvell,function = "gpio"; | ||
33 | }; | ||
34 | pmx_led_right_cap_0: pmx-led_right_cap_0 { | ||
35 | marvell,pins = "mpp38"; | ||
36 | marvell,function = "gpio"; | ||
37 | }; | ||
38 | pmx_led_right_cap_1: pmx-led_right_cap_1 { | ||
39 | marvell,pins = "mpp39"; | ||
40 | marvell,function = "gpio"; | ||
41 | }; | ||
42 | pmx_led_right_cap_2: pmx-led_right_cap_2 { | ||
43 | marvell,pins = "mpp40"; | ||
44 | marvell,function = "gpio"; | ||
45 | }; | ||
46 | pmx_led_right_cap_3: pmx-led_right_cap_3 { | ||
47 | marvell,pins = "mpp41"; | ||
48 | marvell,function = "gpio"; | ||
49 | }; | ||
50 | pmx_led_left_cap_0: pmx-led_left_cap_0 { | ||
51 | marvell,pins = "mpp42"; | ||
52 | marvell,function = "gpio"; | ||
53 | }; | ||
54 | pmx_led_left_cap_1: pmx-led_left_cap_1 { | ||
55 | marvell,pins = "mpp43"; | ||
56 | marvell,function = "gpio"; | ||
57 | }; | ||
58 | pmx_led_left_cap_2: pmx-led_left_cap_2 { | ||
59 | marvell,pins = "mpp44"; | ||
60 | marvell,function = "gpio"; | ||
61 | }; | ||
62 | pmx_led_left_cap_3: pmx-led_left_cap_3 { | ||
63 | marvell,pins = "mpp45"; | ||
64 | marvell,function = "gpio"; | ||
65 | }; | ||
66 | pmx_led_green: pmx-led_green { | ||
67 | marvell,pins = "mpp46"; | ||
68 | marvell,function = "gpio"; | ||
69 | }; | ||
70 | pmx_led_orange: pmx-led_orange { | ||
71 | marvell,pins = "mpp47"; | ||
72 | marvell,function = "gpio"; | ||
73 | }; | ||
74 | }; | ||
19 | serial@12000 { | 75 | serial@12000 { |
20 | clock-frequency = <200000000>; | 76 | clock-frequency = <200000000>; |
21 | status = "ok"; | 77 | status = "ok"; |
diff --git a/arch/arm/mach-kirkwood/board-goflexnet.c b/arch/arm/mach-kirkwood/board-goflexnet.c index 5ff439231567..3b9661802f8c 100644 --- a/arch/arm/mach-kirkwood/board-goflexnet.c +++ b/arch/arm/mach-kirkwood/board-goflexnet.c | |||
@@ -33,33 +33,15 @@ | |||
33 | #include <mach/bridge-regs.h> | 33 | #include <mach/bridge-regs.h> |
34 | #include <linux/platform_data/mmc-mvsdio.h> | 34 | #include <linux/platform_data/mmc-mvsdio.h> |
35 | #include "common.h" | 35 | #include "common.h" |
36 | #include "mpp.h" | ||
37 | 36 | ||
38 | static struct mv643xx_eth_platform_data goflexnet_ge00_data = { | 37 | static struct mv643xx_eth_platform_data goflexnet_ge00_data = { |
39 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), | 38 | .phy_addr = MV643XX_ETH_PHY_ADDR(0), |
40 | }; | 39 | }; |
41 | 40 | ||
42 | static unsigned int goflexnet_mpp_config[] __initdata = { | ||
43 | MPP29_GPIO, /* USB Power Enable */ | ||
44 | MPP47_GPIO, /* LED Orange */ | ||
45 | MPP46_GPIO, /* LED Green */ | ||
46 | MPP45_GPIO, /* LED Left Capacity 3 */ | ||
47 | MPP44_GPIO, /* LED Left Capacity 2 */ | ||
48 | MPP43_GPIO, /* LED Left Capacity 1 */ | ||
49 | MPP42_GPIO, /* LED Left Capacity 0 */ | ||
50 | MPP41_GPIO, /* LED Right Capacity 3 */ | ||
51 | MPP40_GPIO, /* LED Right Capacity 2 */ | ||
52 | MPP39_GPIO, /* LED Right Capacity 1 */ | ||
53 | MPP38_GPIO, /* LED Right Capacity 0 */ | ||
54 | 0 | ||
55 | }; | ||
56 | |||
57 | void __init goflexnet_init(void) | 41 | void __init goflexnet_init(void) |
58 | { | 42 | { |
59 | /* | 43 | /* |
60 | * Basic setup. Needs to be called early. | 44 | * Basic setup. Needs to be called early. |
61 | */ | 45 | */ |
62 | kirkwood_mpp_conf(goflexnet_mpp_config); | ||
63 | |||
64 | kirkwood_ge00_init(&goflexnet_ge00_data); | 46 | kirkwood_ge00_init(&goflexnet_ge00_data); |
65 | } | 47 | } |