aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/kirkwood-dnskw.dtsi105
-rw-r--r--arch/arm/mach-kirkwood/board-dnskw.c37
2 files changed, 105 insertions, 37 deletions
diff --git a/arch/arm/boot/dts/kirkwood-dnskw.dtsi b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
index d11054f538de..6875ac00c174 100644
--- a/arch/arm/boot/dts/kirkwood-dnskw.dtsi
+++ b/arch/arm/boot/dts/kirkwood-dnskw.dtsi
@@ -1,4 +1,5 @@
1/include/ "kirkwood.dtsi" 1/include/ "kirkwood.dtsi"
2/include/ "kirkwood-6281.dtsi"
2 3
3/ { 4/ {
4 model = "D-Link DNS NASes (kirkwood-based)"; 5 model = "D-Link DNS NASes (kirkwood-based)";
@@ -41,6 +42,110 @@
41 }; 42 };
42 43
43 ocp@f1000000 { 44 ocp@f1000000 {
45 pinctrl: pinctrl@10000 {
46
47 pinctrl-0 = < &pmx_nand &pmx_uart1
48 &pmx_sata0 &pmx_sata1
49 &pmx_led_power
50 &pmx_led_red_right_hdd
51 &pmx_led_red_left_hdd
52 &pmx_led_red_usb_325
53 &pmx_button_power
54 &pmx_led_red_usb_320
55 &pmx_power_off &pmx_power_back_on
56 &pmx_power_sata0 &pmx_power_sata1
57 &pmx_present_sata0 &pmx_present_sata1
58 &pmx_led_white_usb &pmx_fan_tacho
59 &pmx_fan_high_speed &pmx_fan_low_speed
60 &pmx_button_unmount &pmx_button_reset
61 &pmx_temp_alarm >;
62 pinctrl-names = "default";
63
64 pmx_sata0: pmx-sata0 {
65 marvell,pins = "mpp20";
66 marvell,function = "sata1";
67 };
68 pmx_sata1: pmx-sata1 {
69 marvell,pins = "mpp21";
70 marvell,function = "sata0";
71 };
72 pmx_led_power: pmx-led-power {
73 marvell,pins = "mpp26";
74 marvell,function = "gpio";
75 };
76 pmx_led_red_right_hdd: pmx-led-red-right-hdd {
77 marvell,pins = "mpp27";
78 marvell,function = "gpio";
79 };
80 pmx_led_red_left_hdd: pmx-led-red-left-hdd {
81 marvell,pins = "mpp28";
82 marvell,function = "gpio";
83 };
84 pmx_led_red_usb_325: pmx-led-red-usb-325 {
85 marvell,pins = "mpp29";
86 marvell,function = "gpio";
87 };
88 pmx_button_power: pmx-button-power {
89 marvell,pins = "mpp34";
90 marvell,function = "gpio";
91 };
92 pmx_led_red_usb_320: pmx-led-red-usb-320 {
93 marvell,pins = "mpp35";
94 marvell,function = "gpio";
95 };
96 pmx_power_off: pmx-power-off {
97 marvell,pins = "mpp36";
98 marvell,function = "gpio";
99 };
100 pmx_power_back_on: pmx-power-back-on {
101 marvell,pins = "mpp37";
102 marvell,function = "gpio";
103 };
104 pmx_power_sata0: pmx-power-sata0 {
105 marvell,pins = "mpp39";
106 marvell,function = "gpio";
107 };
108 pmx_power_sata1: pmx-power-sata1 {
109 marvell,pins = "mpp40";
110 marvell,function = "gpio";
111 };
112 pmx_present_sata0: pmx-present-sata0 {
113 marvell,pins = "mpp41";
114 marvell,function = "gpio";
115 };
116 pmx_present_sata1: pmx-present-sata1 {
117 marvell,pins = "mpp42";
118 marvell,function = "gpio";
119 };
120 pmx_led_white_usb: pmx-led-white-usb {
121 marvell,pins = "mpp43";
122 marvell,function = "gpio";
123 };
124 pmx_fan_tacho: pmx-fan-tacho {
125 marvell,pins = "mpp44";
126 marvell,function = "gpio";
127 };
128 pmx_fan_high_speed: pmx-fan-high-speed {
129 marvell,pins = "mpp45";
130 marvell,function = "gpio";
131 };
132 pmx_fan_low_speed: pmx-fan-low-speed {
133 marvell,pins = "mpp46";
134 marvell,function = "gpio";
135 };
136 pmx_button_unmount: pmx-button-unmount {
137 marvell,pins = "mpp47";
138 marvell,function = "gpio";
139 };
140 pmx_button_reset: pmx-button-reset {
141 marvell,pins = "mpp48";
142 marvell,function = "gpio";
143 };
144 pmx_temp_alarm: pmx-temp-alarm {
145 marvell,pins = "mpp49";
146 marvell,function = "gpio";
147 };
148 };
44 sata@80000 { 149 sata@80000 {
45 status = "okay"; 150 status = "okay";
46 nr-ports = <2>; 151 nr-ports = <2>;
diff --git a/arch/arm/mach-kirkwood/board-dnskw.c b/arch/arm/mach-kirkwood/board-dnskw.c
index 6c4028c9c3b7..a1aa87f09180 100644
--- a/arch/arm/mach-kirkwood/board-dnskw.c
+++ b/arch/arm/mach-kirkwood/board-dnskw.c
@@ -17,46 +17,11 @@
17#include <linux/mv643xx_eth.h> 17#include <linux/mv643xx_eth.h>
18#include <linux/gpio.h> 18#include <linux/gpio.h>
19#include "common.h" 19#include "common.h"
20#include "mpp.h"
21 20
22static struct mv643xx_eth_platform_data dnskw_ge00_data = { 21static struct mv643xx_eth_platform_data dnskw_ge00_data = {
23 .phy_addr = MV643XX_ETH_PHY_ADDR(8), 22 .phy_addr = MV643XX_ETH_PHY_ADDR(8),
24}; 23};
25 24
26static unsigned int dnskw_mpp_config[] __initdata = {
27 MPP13_UART1_TXD, /* Custom ... */
28 MPP14_UART1_RXD, /* ... Controller (DNS-320 only) */
29 MPP20_SATA1_ACTn, /* LED: White Right HDD */
30 MPP21_SATA0_ACTn, /* LED: White Left HDD */
31 MPP24_GPIO,
32 MPP25_GPIO,
33 MPP26_GPIO, /* LED: Power */
34 MPP27_GPIO, /* LED: Red Right HDD */
35 MPP28_GPIO, /* LED: Red Left HDD */
36 MPP29_GPIO, /* LED: Red USB (DNS-325 only) */
37 MPP30_GPIO,
38 MPP31_GPIO,
39 MPP32_GPIO,
40 MPP33_GPO,
41 MPP34_GPIO, /* Button: Front power */
42 MPP35_GPIO, /* LED: Red USB (DNS-320 only) */
43 MPP36_GPIO, /* Power: Turn off board */
44 MPP37_GPIO, /* Power: Turn back on after power failure */
45 MPP38_GPIO,
46 MPP39_GPIO, /* Power: SATA0 */
47 MPP40_GPIO, /* Power: SATA1 */
48 MPP41_GPIO, /* SATA0 present */
49 MPP42_GPIO, /* SATA1 present */
50 MPP43_GPIO, /* LED: White USB */
51 MPP44_GPIO, /* Fan: Tachometer Pin */
52 MPP45_GPIO, /* Fan: high speed */
53 MPP46_GPIO, /* Fan: low speed */
54 MPP47_GPIO, /* Button: Back unmount */
55 MPP48_GPIO, /* Button: Back reset */
56 MPP49_GPIO, /* Temp Alarm (DNS-325) Pin of U5 (DNS-320) */
57 0
58};
59
60/* Register any GPIO for output and set the value */ 25/* Register any GPIO for output and set the value */
61static void __init dnskw_gpio_register(unsigned gpio, char *name, int def) 26static void __init dnskw_gpio_register(unsigned gpio, char *name, int def)
62{ 27{
@@ -71,8 +36,6 @@ static void __init dnskw_gpio_register(unsigned gpio, char *name, int def)
71 36
72void __init dnskw_init(void) 37void __init dnskw_init(void)
73{ 38{
74 kirkwood_mpp_conf(dnskw_mpp_config);
75
76 kirkwood_ge00_init(&dnskw_ge00_data); 39 kirkwood_ge00_init(&dnskw_ge00_data);
77 40
78 /* Set NAS to turn back on after a power failure */ 41 /* Set NAS to turn back on after a power failure */