Merge tag 'drm/panel/for-4.6-rc1' of http://anongit.freedesktop.org/git/tegra/linux...
[cascardo/linux.git] / arch / arm / boot / dts / kirkwood-lswxl.dts
1 /*
2  * Device Tree file for Buffalo Linkstation LS-WXL/WSXL
3  *
4  * Copyright (C) 2015, 2016
5  * Roger Shimizu <rogershimizu@gmail.com>
6  *
7  * This program is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version
10  * 2 of the License, or (at your option) any later version.
11  */
12
13 /dts-v1/;
14
15 #include "kirkwood.dtsi"
16 #include "kirkwood-6281.dtsi"
17
18 / {
19         model = "Buffalo Linkstation LS-WXL/WSXL";
20         compatible = "buffalo,lswxl", "marvell,kirkwood-88f6281", "marvell,kirkwood";
21
22         memory { /* 128 MB */
23                 device_type = "memory";
24                 reg = <0x00000000 0x8000000>;
25         };
26
27         chosen {
28                 bootargs = "console=ttyS0,115200n8 earlyprintk";
29                 stdout-path = &uart0;
30         };
31
32         mbus {
33                 pcie-controller {
34                         status = "okay";
35                         pcie@1,0 {
36                                 status = "okay";
37                         };
38                 };
39         };
40
41         ocp@f1000000 {
42                 pinctrl: pin-controller@10000 {
43                         pmx_power_hdd0: pmx-power-hdd0 {
44                                 marvell,pins = "mpp28";
45                                 marvell,function = "gpio";
46                         };
47                         pmx_power_hdd1: pmx-power-hdd1 {
48                                 marvell,pins = "mpp29";
49                                 marvell,function = "gpio";
50                         };
51                         pmx_usb_vbus: pmx-usb-vbus {
52                                 marvell,pins = "mpp37";
53                                 marvell,function = "gpio";
54                         };
55                         pmx_fan_high: pmx-fan-high {
56                                 marvell,pins = "mpp47";
57                                 marvell,function = "gpio";
58                         };
59                         pmx_fan_low: pmx-fan-low {
60                                 marvell,pins = "mpp48";
61                                 marvell,function = "gpio";
62                         };
63                         pmx_led_hdderr0: pmx-led-hdderr0 {
64                                 marvell,pins = "mpp8";
65                                 marvell,function = "gpio";
66                         };
67                         pmx_led_hdderr1: pmx-led-hdderr1 {
68                                 marvell,pins = "mpp46";
69                                 marvell,function = "gpio";
70                         };
71                         pmx_led_alarm: pmx-led-alarm {
72                                 marvell,pins = "mpp49";
73                                 marvell,function = "gpio";
74                         };
75                         pmx_led_function_red: pmx-led-function-red {
76                                 marvell,pins = "mpp34";
77                                 marvell,function = "gpio";
78                         };
79                         pmx_led_function_blue: pmx-led-function-blue {
80                                 marvell,pins = "mpp36";
81                                 marvell,function = "gpio";
82                         };
83                         pmx_led_info: pmx-led-info {
84                                 marvell,pins = "mpp38";
85                                 marvell,function = "gpio";
86                         };
87                         pmx_led_power: pmx-led-power {
88                                 marvell,pins = "mpp39";
89                                 marvell,function = "gpio";
90                         };
91                         pmx_fan_lock: pmx-fan-lock {
92                                 marvell,pins = "mpp40";
93                                 marvell,function = "gpio";
94                         };
95                         pmx_button_function: pmx-button-function {
96                                 marvell,pins = "mpp41";
97                                 marvell,function = "gpio";
98                         };
99                         pmx_power_switch: pmx-power-switch {
100                                 marvell,pins = "mpp42";
101                                 marvell,function = "gpio";
102                         };
103                         pmx_power_auto_switch: pmx-power-auto-switch {
104                                 marvell,pins = "mpp43";
105                                 marvell,function = "gpio";
106                         };
107                 };
108
109                 serial@12000 {
110                         status = "okay";
111                 };
112
113                 sata@80000 {
114                         status = "okay";
115                         nr-ports = <2>;
116                 };
117
118                 spi@10600 {
119                         status = "okay";
120
121                         m25p40@0 {
122                                 #address-cells = <1>;
123                                 #size-cells = <1>;
124                                 compatible = "st,m25p40", "jedec,spi-nor";
125                                 reg = <0>;
126                                 spi-max-frequency = <25000000>;
127                                 mode = <0>;
128
129                                 partition@0 {
130                                         reg = <0x0 0x60000>;
131                                         label = "uboot";
132                                         read-only;
133                                 };
134
135                                 partition@60000 {
136                                         reg = <0x60000 0x10000>;
137                                         label = "dtb";
138                                         read-only;
139                                 };
140
141                                 partition@70000 {
142                                         reg = <0x70000 0x10000>;
143                                         label = "uboot_env";
144                                 };
145                         };
146                 };
147         };
148
149         gpio_keys {
150                 compatible = "gpio-keys";
151                 #address-cells = <1>;
152                 #size-cells = <0>;
153                 pinctrl-0 = <&pmx_button_function &pmx_power_switch
154                              &pmx_power_auto_switch>;
155                 pinctrl-names = "default";
156
157                 button@1 {
158                         label = "Function Button";
159                         linux,code = <KEY_OPTION>;
160                         gpios = <&gpio1 9 GPIO_ACTIVE_LOW>;
161                 };
162
163                 button@2 {
164                         label = "Power-on Switch";
165                         linux,code = <KEY_RESERVED>;
166                         linux,input-type = <5>;
167                         gpios = <&gpio1 10 GPIO_ACTIVE_LOW>;
168                 };
169
170                 button@3 {
171                         label = "Power-auto Switch";
172                         linux,code = <KEY_ESC>;
173                         linux,input-type = <5>;
174                         gpios = <&gpio1 11 GPIO_ACTIVE_LOW>;
175                 };
176         };
177
178         gpio_leds {
179                 compatible = "gpio-leds";
180                 pinctrl-0 = <&pmx_led_function_red &pmx_led_alarm
181                              &pmx_led_info &pmx_led_power
182                              &pmx_led_function_blue
183                              &pmx_led_hdderr0
184                              &pmx_led_hdderr1>;
185                 pinctrl-names = "default";
186
187                 led@1 {
188                         label = "lswxl:blue:func";
189                         gpios = <&gpio1 4 GPIO_ACTIVE_LOW>;
190                 };
191
192                 led@2 {
193                         label = "lswxl:red:alarm";
194                         gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
195                 };
196
197                 led@3 {
198                         label = "lswxl:amber:info";
199                         gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
200                 };
201
202                 led@4 {
203                         label = "lswxl:blue:power";
204                         gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
205                         default-state = "keep";
206                 };
207
208                 led@5 {
209                         label = "lswxl:red:func";
210                         gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
211                 };
212
213                 led@6 {
214                         label = "lswxl:red:hdderr0";
215                         gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
216                 };
217
218                 led@7 {
219                         label = "lswxl:red:hdderr1";
220                         gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
221                 };
222         };
223
224         gpio_fan {
225                 compatible = "gpio-fan";
226                 pinctrl-0 = <&pmx_fan_low &pmx_fan_high &pmx_fan_lock>;
227                 pinctrl-names = "default";
228
229                 gpios = <&gpio1 16 GPIO_ACTIVE_LOW
230                          &gpio1 15 GPIO_ACTIVE_LOW>;
231
232                 gpio-fan,speed-map = <0 3
233                                 1500 2
234                                 3250 1
235                                 5000 0>;
236
237                 alarm-gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
238         };
239
240         restart_poweroff {
241                 compatible = "restart-poweroff";
242         };
243
244         regulators {
245                 compatible = "simple-bus";
246                 #address-cells = <1>;
247                 #size-cells = <0>;
248                 pinctrl-0 = <&pmx_power_hdd0 &pmx_power_hdd1 &pmx_usb_vbus>;
249                 pinctrl-names = "default";
250
251                 usb_power: regulator@1 {
252                         compatible = "regulator-fixed";
253                         reg = <1>;
254                         regulator-name = "USB Power";
255                         regulator-min-microvolt = <5000000>;
256                         regulator-max-microvolt = <5000000>;
257                         enable-active-high;
258                         regulator-always-on;
259                         regulator-boot-on;
260                         gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>;
261                 };
262                 hdd_power0: regulator@2 {
263                         compatible = "regulator-fixed";
264                         reg = <2>;
265                         regulator-name = "HDD0 Power";
266                         regulator-min-microvolt = <5000000>;
267                         regulator-max-microvolt = <5000000>;
268                         enable-active-high;
269                         regulator-always-on;
270                         regulator-boot-on;
271                         gpio = <&gpio0 28 GPIO_ACTIVE_HIGH>;
272                 };
273                 hdd_power1: regulator@3 {
274                         compatible = "regulator-fixed";
275                         reg = <3>;
276                         regulator-name = "HDD1 Power";
277                         regulator-min-microvolt = <5000000>;
278                         regulator-max-microvolt = <5000000>;
279                         enable-active-high;
280                         regulator-always-on;
281                         regulator-boot-on;
282                         gpio = <&gpio0 29 GPIO_ACTIVE_HIGH>;
283                 };
284         };
285 };
286
287 &mdio {
288         status = "okay";
289
290         ethphy1: ethernet-phy@8 {
291                 device_type = "ethernet-phy";
292                 reg = <8>;
293         };
294 };
295
296 &eth1 {
297         status = "okay";
298
299         ethernet1-port@0 {
300                 phy-handle = <&ethphy1>;
301         };
302 };