Merge branch 'v4.9-shared/soc-hdr' into v4.9-armsoc/dts32
[cascardo/linux.git] / arch / arm / boot / dts / kirkwood-linksys-viper.dts
1 /*
2  * kirkwood-viper.dts - Device Tree file for Linksys viper (E4200v2 / EA4500)
3  *
4  * (c) 2013 Jonas Gorski <jogo@openwrt.org>
5  * (c) 2013 Deutsche Telekom Innovation Laboratories
6  * (c) 2014 Luka Perkov <luka@openwrt.org>
7  * (c) 2014 Randy C. Will <randall.will@gmail.com>
8  *
9  * This file is licensed under the terms of the GNU General Public
10  * License version 2.  This program is licensed "as is" without any
11  * warranty of any kind, whether express or implied.
12  */
13
14 /dts-v1/;
15
16 #include "kirkwood.dtsi"
17 #include "kirkwood-6282.dtsi"
18
19 / {
20         model = "Linksys Viper (E4200v2 / EA4500)";
21         compatible = "linksys,viper", "marvell,kirkwood-88f6282", "marvell,kirkwood";
22
23         memory {
24                 device_type = "memory";
25                 reg = <0x00000000 0x8000000>;
26         };
27
28         aliases {
29                 serial0 = &uart0;
30         };
31
32         chosen {
33                 stdout-path = "serial0:115200n8";
34         };
35
36         gpio_keys {
37                 compatible = "gpio-keys";
38                 #address-cells = <1>;
39                 #size-cells = <0>;
40                 pinctrl-0 = < &pmx_btn_wps &pmx_btn_reset >;
41                 pinctrl-names = "default";
42
43                 wps {
44                         label = "WPS Button";
45                         linux,code = <KEY_WPS_BUTTON>;
46                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
47                 };
48
49                 reset {
50                         label = "Reset Button";
51                         linux,code = <KEY_RESTART>;
52                         gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
53                 };
54         };
55
56         gpio-leds {
57                 compatible = "gpio-leds";
58                 pinctrl-0 = < &pmx_led_white_health &pmx_led_white_pulse >;
59                 pinctrl-names = "default";
60
61                 white-health {
62                         label = "viper:white:health";
63                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
64                 };
65
66                 white-pulse {
67                         label = "viper:white:pulse";
68                         gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
69                 };
70         };
71
72         dsa {
73                 compatible = "marvell,dsa";
74                 #address-cells = <2>;
75                 #size-cells = <0>;
76
77                 dsa,ethernet = <&eth0port>;
78                 dsa,mii-bus = <&mdio>;
79
80                 switch@16,0 {
81                         #address-cells = <1>;
82                         #size-cells = <0>;
83                         reg = <16 0>;   /* MDIO address 16, switch 0 in tree */
84
85                         port@0 {
86                                 reg = <0>;
87                                 label = "ethernet1";
88                         };
89
90                         port@1 {
91                                 reg = <1>;
92                                 label = "ethernet2";
93                         };
94
95                         port@2 {
96                                 reg = <2>;
97                                 label = "ethernet3";
98                         };
99
100                         port@3 {
101                                 reg = <3>;
102                                 label = "ethernet4";
103                         };
104
105                         port@4 {
106                                 reg = <4>;
107                                 label = "internet";
108                         };
109
110                         port@5 {
111                                 reg = <5>;
112                                 label = "cpu";
113                         };
114                 };
115         };
116 };
117
118 &pinctrl {
119         pmx_led_white_health: pmx-led-white-health {
120                 marvell,pins = "mpp7";
121                 marvell,function = "gpo";
122         };
123         pmx_led_white_pulse: pmx-led-white-pulse {
124                 marvell,pins = "mpp14";
125                 marvell,function = "gpio";
126         };
127         pmx_btn_wps: pmx-btn-wps {
128                 marvell,pins = "mpp47";
129                 marvell,function = "gpio";
130         };
131         pmx_btn_reset: pmx-btn-reset {
132                 marvell,pins = "mpp48";
133                 marvell,function = "gpio";
134         };
135 };
136
137 &nand {
138         status = "okay";
139         pinctrl-0 = <&pmx_nand>;
140         pinctrl-names = "default";
141
142         partitions {
143                 compatible = "fixed-partitions";
144                 #address-cells = <1>;
145                 #size-cells = <1>;
146
147                 partition@0 {
148                         label = "u-boot";
149                         reg = <0x0 0x80000>;
150                         read-only;
151                 };
152
153                 partition@80000 {
154                         label = "u_env";
155                         reg = <0x80000 0x20000>;
156                 };
157
158                 partition@A0000 {
159                         label = "s_env";
160                         reg = <0xA0000 0x20000>;
161                 };
162
163                 partition@200000 {
164                         label = "kernel";
165                         reg = <0x200000 0x2A0000>;
166                 };
167
168                 partition@4A0000 {
169                         label = "rootfs";
170                         reg = <0x4A0000 0x1760000>;
171                 };
172
173                 partition@1C00000 {
174                         label = "alt_kernel";
175                         reg = <0x1C00000 0x2A0000>;
176                 };
177
178                 partition@1EA0000 {
179                         label = "alt_rootfs";
180                         reg = <0x1EA0000 0x1760000>;
181                 };
182
183                 partition@3600000 {
184                         label = "syscfg";
185                         reg = <0x3600000 0x4A00000>;
186                 };
187
188                 partition@C0000 {
189                         label = "unused";
190                         reg = <0xC0000 0x140000>;
191                 };
192
193         };
194 };
195
196 &pciec {
197         status = "okay";
198 };
199
200 &pcie0 {
201         status = "okay";
202 };
203
204 &pcie1 {
205         status = "okay";
206 };
207
208 &mdio {
209         status = "okay";
210 };
211
212 &uart0 {
213         status = "okay";
214 };
215
216 /* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
217  * fixed speed and duplex.
218  */
219 &eth0 {
220         status = "okay";
221         ethernet0-port@0 {
222                 speed = <1000>;
223                 duplex = <1>;
224         };
225 };
226
227 /* eth1 is connected to the switch at port 6. However DSA only supports a
228  * single CPU port. So leave this port disabled to avoid confusion.
229  */
230 &eth1 {
231         status = "disabled";
232 };
233
234 /* There is no battery on the board, so the RTC does not keep
235  * time when there is no power, making it useless.
236  */
237 &rtc {
238         status = "disabled";
239 };
240