aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Cooper <jason@lakedaemon.net>2013-01-26 15:50:11 -0500
committerArnd Bergmann <arnd@arndb.de>2013-02-28 12:57:15 -0500
commit15989543d45505ed32e70505c2fce0907e5af161 (patch)
treea739b1ba2e63568b231d5624a12f5cb7b1e2f2a6
parent8be7a962e86ac47b5ee2b339e08cca1e5c063c15 (diff)
ARM: kirkwood: topkick: convert to pinctrl
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
-rw-r--r--arch/arm/boot/dts/kirkwood-topkick.dts90
-rw-r--r--arch/arm/mach-kirkwood/board-usi_topkick.c42
2 files changed, 90 insertions, 42 deletions
diff --git a/arch/arm/boot/dts/kirkwood-topkick.dts b/arch/arm/boot/dts/kirkwood-topkick.dts
index cd15452a52a6..bb1d4df5c690 100644
--- a/arch/arm/boot/dts/kirkwood-topkick.dts
+++ b/arch/arm/boot/dts/kirkwood-topkick.dts
@@ -1,6 +1,7 @@
1/dts-v1/; 1/dts-v1/;
2 2
3/include/ "kirkwood.dtsi" 3/include/ "kirkwood.dtsi"
4/include/ "kirkwood-6282.dtsi"
4 5
5/ { 6/ {
6 model = "Univeral Scientific Industrial Co. Topkick-1281P2"; 7 model = "Univeral Scientific Industrial Co. Topkick-1281P2";
@@ -16,6 +17,95 @@
16 }; 17 };
17 18
18 ocp@f1000000 { 19 ocp@f1000000 {
20 pinctrl: pinctrl@10000 {
21 /*
22 * GPIO LED layout
23 *
24 * /-SYS_LED(2)
25 * |
26 * | /-DISK_LED
27 * | |
28 * | | /-WLAN_LED(2)
29 * | | |
30 * [SW] [*] [*] [*]
31 */
32
33 /*
34 * Switch positions
35 *
36 * /-SW_LEFT(2)
37 * |
38 * | /-SW_IDLE
39 * | |
40 * | | /-SW_RIGHT
41 * | | |
42 * PS [L] [I] [R] LEDS
43 */
44 pinctrl-0 = < &pmx_led_disk_yellow
45 &pmx_sata0_pwr_enable
46 &pmx_led_sys_red
47 &pmx_led_sys_blue
48 &pmx_led_wifi_green
49 &pmx_sw_left
50 &pmx_sw_right
51 &pmx_sw_idle
52 &pmx_sw_left2
53 &pmx_led_wifi_yellow
54 &pmx_uart0
55 &pmx_nand >;
56 pinctrl-names = "default";
57
58 pmx_led_disk_yellow: pmx-led-disk-yellow {
59 marvell,pins = "mpp21";
60 marvell,function = "gpio";
61 };
62
63 pmx_sata0_pwr_enable: pmx-sata0-pwr-enable {
64 marvell,pins = "mpp36";
65 marvell,function = "gpio";
66 };
67
68 pmx_led_sys_red: pmx-led-sys-red {
69 marvell,pins = "mpp37";
70 marvell,function = "gpio";
71 };
72
73 pmx_led_sys_blue: pmx-led-sys-blue {
74 marvell,pins = "mpp38";
75 marvell,function = "gpio";
76 };
77
78 pmx_led_wifi_green: pmx-led-wifi-green {
79 marvell,pins = "mpp39";
80 marvell,function = "gpio";
81 };
82
83 pmx_sw_left: pmx-sw-left {
84 marvell,pins = "mpp43";
85 marvell,function = "gpio";
86 };
87
88 pmx_sw_right: pmx-sw-right {
89 marvell,pins = "mpp44";
90 marvell,function = "gpio";
91 };
92
93 pmx_sw_idle: pmx-sw-idle {
94 marvell,pins = "mpp45";
95 marvell,function = "gpio";
96 };
97
98 pmx_sw_left2: pmx-sw-left2 {
99 marvell,pins = "mpp46";
100 marvell,function = "gpio";
101 };
102
103 pmx_led_wifi_yellow: pmx-led-wifi-yellow {
104 marvell,pins = "mpp48";
105 marvell,function = "gpio";
106 };
107 };
108
19 serial@12000 { 109 serial@12000 {
20 clock-frequency = <200000000>; 110 clock-frequency = <200000000>;
21 status = "ok"; 111 status = "ok";
diff --git a/arch/arm/mach-kirkwood/board-usi_topkick.c b/arch/arm/mach-kirkwood/board-usi_topkick.c
index 23d2dd1b1b1e..3fce1d018966 100644
--- a/arch/arm/mach-kirkwood/board-usi_topkick.c
+++ b/arch/arm/mach-kirkwood/board-usi_topkick.c
@@ -16,7 +16,6 @@
16#include <linux/gpio.h> 16#include <linux/gpio.h>
17#include <linux/platform_data/mmc-mvsdio.h> 17#include <linux/platform_data/mmc-mvsdio.h>
18#include "common.h" 18#include "common.h"
19#include "mpp.h"
20 19
21static struct mv643xx_eth_platform_data topkick_ge00_data = { 20static struct mv643xx_eth_platform_data topkick_ge00_data = {
22 .phy_addr = MV643XX_ETH_PHY_ADDR(0), 21 .phy_addr = MV643XX_ETH_PHY_ADDR(0),
@@ -26,52 +25,11 @@ static struct mvsdio_platform_data topkick_mvsdio_data = {
26 /* unfortunately the CD signal has not been connected */ 25 /* unfortunately the CD signal has not been connected */
27}; 26};
28 27
29/*
30 * GPIO LED layout
31 *
32 * /-SYS_LED(2)
33 * |
34 * | /-DISK_LED
35 * | |
36 * | | /-WLAN_LED(2)
37 * | | |
38 * [SW] [*] [*] [*]
39 */
40
41/*
42 * Switch positions
43 *
44 * /-SW_LEFT
45 * |
46 * | /-SW_IDLE
47 * | |
48 * | | /-SW_RIGHT
49 * | | |
50 * PS [L] [I] [R] LEDS
51 */
52
53static unsigned int topkick_mpp_config[] __initdata = {
54 MPP21_GPIO, /* DISK_LED (low active) - yellow */
55 MPP36_GPIO, /* SATA0 power enable (high active) */
56 MPP37_GPIO, /* SYS_LED2 (low active) - red */
57 MPP38_GPIO, /* SYS_LED (low active) - blue */
58 MPP39_GPIO, /* WLAN_LED (low active) - green */
59 MPP43_GPIO, /* SW_LEFT (low active) */
60 MPP44_GPIO, /* SW_RIGHT (low active) */
61 MPP45_GPIO, /* SW_IDLE (low active) */
62 MPP46_GPIO, /* SW_LEFT (low active) */
63 MPP48_GPIO, /* WLAN_LED2 (low active) - yellow */
64 0
65};
66
67void __init usi_topkick_init(void) 28void __init usi_topkick_init(void)
68{ 29{
69 /* 30 /*
70 * Basic setup. Needs to be called early. 31 * Basic setup. Needs to be called early.
71 */ 32 */
72 kirkwood_mpp_conf(topkick_mpp_config);
73
74
75 kirkwood_ge00_init(&topkick_ge00_data); 33 kirkwood_ge00_init(&topkick_ge00_data);
76 kirkwood_sdio_init(&topkick_mvsdio_data); 34 kirkwood_sdio_init(&topkick_mvsdio_data);
77} 35}