kirkwood: switch to kernel 4.9
[openwrt/staging/dedeckeh.git] / target / linux / kirkwood / patches-4.9 / 107-03-nsa310s.patch
1 --- a/arch/arm/boot/dts/Makefile
2 +++ b/arch/arm/boot/dts/Makefile
3 @@ -239,6 +239,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
4 kirkwood-nsa310.dtb \
5 kirkwood-nsa310a.dtb \
6 kirkwood-nsa310b.dtb \
7 + kirkwood-nsa310s.dtb \
8 kirkwood-nsa320.dtb \
9 kirkwood-nsa325.dtb \
10 kirkwood-openblocks_a6.dtb \
11 --- /dev/null
12 +++ b/arch/arm/boot/dts/kirkwood-nsa310s.dts
13 @@ -0,0 +1,254 @@
14 +/dts-v1/;
15 +
16 +#include "kirkwood-nsa3x0-common.dtsi"
17 +
18 +/ {
19 + model = "ZyXEL NSA310S";
20 + compatible = "zyxel,nsa320s", "marvell,kirkwood-88f6702", "marvell,kirkwood";
21 +
22 + memory {
23 + device_type = "memory";
24 + reg = <0x00000000 0x10000000>;
25 + };
26 +
27 + chosen {
28 + bootargs = "console=ttyS0,115200n8 earlyprintk";
29 + stdout-path = &uart0;
30 + };
31 +
32 + ocp@f1000000 {
33 + pinctrl: pin-controller@10000 {
34 + pinctrl-names = "default";
35 +
36 + pmx_sata0: pmx-sata0 {
37 + marvell,pins;
38 + marvell,function = "sata0";
39 + };
40 +
41 + pmx_sata1: pmx-sata1 {
42 + marvell,pins;
43 + marvell,function = "sata1";
44 + };
45 +
46 + pmx_usb_power: pmx-usb-power {
47 + marvell,pins = "mpp21";
48 + marvell,function = "gpio";
49 + };
50 +
51 + pmx_pwr_off: pmx-pwr-off {
52 + marvell,pins = "mpp27";
53 + marvell,function = "gpio";
54 + };
55 +
56 + pmx_btn_reset: pmx-btn-reset {
57 + marvell,pins = "mpp24";
58 + marvell,function = "gpio";
59 + };
60 +
61 + pmx_btn_copy: pmx-btn-copy {
62 + marvell,pins = "mpp25";
63 + marvell,function = "gpio";
64 + };
65 +
66 + pmx_btn_power: pmx-btn-power {
67 + marvell,pins = "mpp26";
68 + marvell,function = "gpio";
69 + };
70 +
71 + pmx_led_hdd2_green: pmx-led-hdd2-green {
72 + marvell,pins = "mpp34";
73 + marvell,function = "gpio";
74 + };
75 +
76 + pmx_led_hdd2_red: pmx-led-hdd2-red {
77 + marvell,pins = "mpp12";
78 + marvell,function = "gpio";
79 + };
80 +
81 + pmx_led_usb_green: pmx-led-usb-green {
82 + marvell,pins = "mpp15";
83 + marvell,function = "gpio";
84 + };
85 +
86 + pmx_led_copy_green: pmx-led-copy-green {
87 + marvell,pins = "mpp22";
88 + marvell,function = "gpio";
89 + };
90 +
91 + pmx_led_copy_red: pmx-led-copy-red {
92 + marvell,pins = "mpp23";
93 + marvell,function = "gpio";
94 + };
95 +
96 + pmx_led_sys_green: pmx-led-sys-green {
97 + marvell,pins = "mpp28";
98 + marvell,function = "gpio";
99 + };
100 +
101 + pmx_led_sys_orange: pmx-led-sys-orange {
102 + marvell,pins = "mpp29";
103 + marvell,function = "gpio";
104 + };
105 +
106 + pmx_led_hdd1_green: pmx-led-hdd1-green {
107 + marvell,pins = "mpp16";
108 + marvell,function = "gpio";
109 + };
110 +
111 + pmx_led_hdd1_red: pmx-led-hdd1-red {
112 + marvell,pins = "mpp13";
113 + marvell,function = "gpio";
114 + };
115 +
116 + pmx_pwr_sata1: pmx-pwr-sata1 {
117 + marvell,pins = "mpp33";
118 + marvell,function = "gpio";
119 + };
120 +
121 + };
122 +
123 + i2c@11000 {
124 + status = "okay";
125 +
126 + ht1382: rtc@68 {
127 + compatible = "htk,ht1382";
128 + reg = <0x68>;
129 + };
130 + };
131 + };
132 +
133 + regulators {
134 + compatible = "simple-bus";
135 + #address-cells = <1>;
136 + #size-cells = <0>;
137 + pinctrl-0 = <&pmx_pwr_sata1>;
138 + pinctrl-names = "default";
139 +
140 + usb0_power: regulator@1 {
141 + enable-active-high;
142 + };
143 +
144 + sata1_power: regulator@2 {
145 + compatible = "regulator-fixed";
146 + reg = <2>;
147 + regulator-name = "SATA1 Power";
148 + regulator-min-microvolt = <5000000>;
149 + regulator-max-microvolt = <5000000>;
150 + regulator-always-on;
151 + regulator-boot-on;
152 + enable-active-high;
153 + gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
154 + };
155 + };
156 +
157 + gpio_keys {
158 + power {
159 + gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
160 + };
161 + copy {
162 + gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
163 + };
164 + reset {
165 + gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
166 + };
167 + };
168 +
169 + gpio-leds {
170 + compatible = "gpio-leds";
171 +
172 + green-sys {
173 + label = "nsa310s:green:sys";
174 + gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
175 + };
176 + orange-sys {
177 + label = "nsa310s:orange:sys";
178 + gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
179 + };
180 + green-hdd1 {
181 + label = "nsa310s:green:hdd1";
182 + gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
183 + };
184 + red-hdd1 {
185 + label = "nsa310s:red:hdd1";
186 + gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
187 + };
188 + green-hdd2 {
189 + label = "nsa310s:green:hdd2";
190 + gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
191 + };
192 + red-hdd2 {
193 + label = "nsa310s:red:hdd2";
194 + gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
195 + };
196 + green-usb {
197 + label = "nsa310s:green:usb";
198 + gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
199 + };
200 + green-copy {
201 + label = "nsa310s:green:copy";
202 + gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
203 + };
204 + red-copy {
205 + label = "nsa310s:red:copy";
206 + gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
207 + };
208 + };
209 +
210 + gpio_poweroff {
211 + gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
212 + };
213 +};
214 +
215 +&nand {
216 + status = "okay";
217 + chip-delay = <35>;
218 +
219 + partition@0 {
220 + label = "uboot";
221 + reg = <0x0000000 0xe0000>;
222 + read-only;
223 + };
224 +
225 + partition@e0000 {
226 + label = "uboot_env";
227 + reg = <0xe0000 0x100000>;
228 + };
229 +
230 + partition@100000 {
231 + label = "second stage u-boot";
232 + reg = <0x100000 0x200000>;
233 + };
234 +
235 + partition@200000 {
236 + label = "ubi";
237 + reg = <0x200000 0x7e00000>;
238 + };
239 +};
240 +
241 +&sata {
242 + status = "okay";
243 + nr-ports = <2>;
244 +};
245 +
246 +&mdio {
247 + status = "okay";
248 + ethphy0: ethernet-phy@1 {
249 + compatible = "marvell,88e1318s";
250 + reg = <1>;
251 + marvell,reg-init = <0x1 0x16 0x0 0x3>,
252 + <0x1 0x10 0x0 0x1017>,
253 + <0x1 0x11 0x0 0x4408>,
254 + <0x1 0x16 0x0 0x0>,
255 + <0x1 0x4 0x0 0x1e1>,
256 + <0x1 0x9 0x0 0x300>,
257 + <0x1 0x10 0x0 0x3860>,
258 + <0x1 0x0 0x0 0x9140>;
259 + };
260 +};
261 +
262 +&eth0 {
263 + status = "okay";
264 + ethernet0-port@0 {
265 + phy-handle = <&ethphy0>;
266 + };
267 +};