kirkwood: add ZyXEL NSA325 device
[openwrt/openwrt.git] / target / linux / kirkwood / patches-4.4 / 194-nsa325.patch
1 --- a/arch/arm/boot/dts/Makefile
2 +++ b/arch/arm/boot/dts/Makefile
3 @@ -205,6 +205,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
4 kirkwood-nsa310a.dtb \
5 kirkwood-nsa310b.dtb \
6 kirkwood-nsa310s.dtb \
7 + kirkwood-nsa325.dtb \
8 kirkwood-openblocks_a6.dtb \
9 kirkwood-openblocks_a7.dtb \
10 kirkwood-openrd-base.dtb \
11 --- /dev/null
12 +++ b/arch/arm/boot/dts/kirkwood-nsa325.dts
13 @@ -0,0 +1,225 @@
14 +/*
15 + * Device tree file for Zyxel NSA325 and NSA325v2 NAS
16 + */
17 +/dts-v1/;
18 +#include "kirkwood-nsa3x0-common.dtsi"
19 +
20 +/ {
21 + model = "ZyXEL NSA325";
22 + compatible = "zyxel,nsa325", "marvell,kirkwood-88f6282", "marvell,kirkwood";
23 +
24 + memory {
25 + device_type = "memory";
26 + reg = <0x00000000 0x20000000>;
27 + };
28 +
29 + chosen {
30 + bootargs = "console=ttyS0,115200";
31 + stdout-path = &uart0;
32 + };
33 +
34 + mbus {
35 + pcie-controller {
36 + status = "okay";
37 +
38 + pcie@1,0 {
39 + status = "okay";
40 + };
41 + };
42 + };
43 +
44 + ocp@f1000000 {
45 + pinctrl: pin-controller@10000 {
46 + pinctrl-names = "default";
47 +
48 + pmx_led_sata2_green: pmx-led-sata2-green {
49 + marvell,pins = "mpp12";
50 + marvell,function = "gpio";
51 + };
52 +
53 + pmx_led_sata2_red: pmx-led-sata2-red {
54 + marvell,pins = "mpp13";
55 + marvell,function = "gpio";
56 + };
57 +
58 + pmx_mcu_data: pmx-mcu-data {
59 + marvell,pins = "mpp14";
60 + marvell,function = "gpio";
61 + };
62 +
63 + pmx_led_usb_green: pmx-led-usb-green {
64 + marvell,pins = "mpp15";
65 + marvell,function = "gpio";
66 + };
67 +
68 + pmx_mcu_clk: pmx-mcu-clk {
69 + marvell,pins = "mpp16";
70 + marvell,function = "gpio";
71 + };
72 +
73 + pmx_mcu_act: pmx-mcu-act {
74 + marvell,pins = "mpp17";
75 + marvell,function = "gpio";
76 + };
77 +
78 + pmx_usb_power_off: pmx-usb-power-off {
79 + marvell,pins = "mpp21";
80 + marvell,function = "gpio";
81 + };
82 +
83 + pmx_led_sys_green: pmx-led-sys-green {
84 + marvell,pins = "mpp28";
85 + marvell,function = "gpio";
86 + };
87 +
88 + pmx_led_sys_orange: pmx-led-sys-orange {
89 + marvell,pins = "mpp29";
90 + marvell,function = "gpio";
91 + };
92 +
93 + pmx_led_sata1_green: pmx-led-sata1-green {
94 + marvell,pins = "mpp41";
95 + marvell,function = "gpio";
96 + };
97 +
98 + pmx_led_sata1_red: pmx-led-sata1-red {
99 + marvell,pins = "mpp42";
100 + marvell,function = "gpio";
101 + };
102 +
103 + pmx_beeper: pmx-beeper {
104 + marvell,pins = "mpp44";
105 + marvell,function = "gpio";
106 + };
107 +
108 + pmx_pwr_sata1: pmx-pwr-sata1 {
109 + marvell,pins = "mpp47";
110 + marvell,function = "gpio";
111 + };
112 +
113 + };
114 +
115 + /* This board uses the pcf8563 RTC instead of the SoC RTC */
116 + rtc@10300 {
117 + status = "disabled";
118 + };
119 +
120 + i2c@11000 {
121 + status = "okay";
122 +
123 + pcf8563: pcf8563@51 {
124 + compatible = "nxp,pcf8563";
125 + reg = <0x51>;
126 + };
127 + };
128 +
129 + };
130 +
131 + gpio-leds {
132 + compatible = "gpio-leds";
133 + pinctrl-0 = <&pmx_led_sata1_green &pmx_led_sata1_red
134 + &pmx_led_sata2_green &pmx_led_sata2_red
135 + &pmx_led_sys_green &pmx_led_sys_orange
136 + &pmx_led_copy_green &pmx_led_copy_red
137 + &pmx_led_usb_green>;
138 + pinctrl-names = "default";
139 +
140 + green-sata2 {
141 + label = "nsa325:green:sata2";
142 + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
143 + linux,default-trigger = "ide-disk2";
144 + };
145 +
146 + red-sata2 {
147 + label = "nsa325:red:sata2";
148 + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
149 + };
150 +
151 + green-usb {
152 + label = "nsa325:green:usb";
153 + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
154 + linux,default-trigger = "usb-host";
155 + };
156 +
157 + green-sys {
158 + label = "nsa325:green:sys";
159 + gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
160 + linux,default-trigger = "default-on";
161 + };
162 +
163 + orange-sys {
164 + label = "nsa325:orange:sys";
165 + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
166 + linux,default-trigger = "cpu0";
167 + };
168 +
169 + green-copy {
170 + label = "nsa325:green:copy";
171 + gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
172 + };
173 +
174 + red-copy {
175 + label = "nsa325:red:copy";
176 + gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
177 + };
178 +
179 + green-sata1 {
180 + label = "nsa325:green:sata1";
181 + gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
182 + linux,default-trigger = "ide-disk1";
183 + };
184 +
185 + red-sata1 {
186 + label = "nsa325:red:sata1";
187 + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
188 + };
189 + };
190 +
191 + regulators {
192 + compatible = "simple-bus";
193 + #address-cells = <1>;
194 + #size-cells = <0>;
195 + pinctrl-0 = <&pmx_usb_power_off &pmx_pwr_sata1>;
196 + pinctrl-names = "default";
197 +
198 + usb_power: regulator@1 {
199 + compatible = "regulator-fixed";
200 + reg = <1>;
201 + regulator-name = "USB Power";
202 + regulator-min-microvolt = <5000000>;
203 + regulator-max-microvolt = <5000000>;
204 + regulator-always-on;
205 + regulator-boot-on;
206 + enable-active-high;
207 + gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
208 + };
209 +
210 + sata1_power: regulator@2 {
211 + compatible = "regulator-fixed";
212 + reg = <2>;
213 + regulator-name = "SATA Power";
214 + regulator-min-microvolt = <5000000>;
215 + regulator-max-microvolt = <5000000>;
216 + regulator-always-on;
217 + regulator-boot-on;
218 + enable-active-high;
219 + gpio = <&gpio1 15 GPIO_ACTIVE_HIGH>;
220 + };
221 + };
222 +};
223 +
224 +&mdio {
225 + status = "okay";
226 +
227 + ethphy0: ethernet-phy@1 {
228 + reg = <1>;
229 + };
230 +};
231 +
232 +&eth0 {
233 + status = "okay";
234 +
235 + ethernet0-port@0 {
236 + phy-handle = <&ethphy0>;
237 + };
238 +};