kirkwood: switch from swconfig to dsa
[oweals/openwrt.git] / target / linux / kirkwood / files-4.14 / arch / arm / boot / dts / kirkwood-linksys-audi.dts
1 /*
2  * kirkwood-linksys-audi.dts - Device Tree file for Linksys EA3500
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 Dan Walters <dan@walters.io>
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 Audi (EA3500)";
21         compatible = "linksys,audi", "marvell,kirkwood-88f6282", "marvell,kirkwood";
22
23         memory {
24                 device_type = "memory";
25                 reg = <0x00000000 0x4000000>;
26         };
27
28         aliases {
29                 led-boot = &led_power;
30                 led-failsafe = &led_power;
31                 led-running = &led_power;
32                 led-upgrade = &led_power;
33                 serial0 = &uart0;
34         };
35
36         chosen {
37                 stdout-path = "serial0:115200n8";
38         };
39
40         gpio_keys {
41                 compatible = "gpio-keys";
42                 #address-cells = <1>;
43                 #size-cells = <0>;
44                 pinctrl-0 = < &pmx_btn_wps &pmx_btn_reset >;
45                 pinctrl-names = "default";
46
47                 wps {
48                         label = "WPS Button";
49                         linux,code = <KEY_WPS_BUTTON>;
50                         gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
51                 };
52
53                 reset {
54                         label = "Reset Button";
55                         linux,code = <KEY_RESTART>;
56                         gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
57                 };
58         };
59
60         gpio-leds {
61                 compatible = "gpio-leds";
62                 pinctrl-0 = < &pmx_led_green_power >;
63                 pinctrl-names = "default";
64
65                 led_power: power {
66                         label = "audi:green:power";
67                         gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
68                         default-state = "on";
69                 };
70         };
71
72         mvsw61xx {
73                 compatible = "marvell,88e6171";
74                 status = "okay";
75                 reg = <0x10>;
76
77                 mii-bus = <&mdio>;
78                 cpu-port-0 = <5>;
79                 cpu-port-1 = <6>;
80                 is-indirect;
81         };
82
83         dsa {
84                 compatible = "marvell,dsa";
85                 #address-cells = <2>;
86                 #size-cells = <0>;
87
88                 dsa,ethernet = <&eth0port>;
89                 dsa,mii-bus = <&mdio>;
90
91                 switch@16,0 {
92                         #address-cells = <1>;
93                         #size-cells = <0>;
94                         reg = <16 0>;   /* MDIO address 16, switch 0 in tree */
95
96                         port@0 {
97                                 reg = <0>;
98                                 label = "ethernet1";
99                         };
100
101                         port@1 {
102                                 reg = <1>;
103                                 label = "ethernet2";
104                         };
105
106                         port@2 {
107                                 reg = <2>;
108                                 label = "ethernet3";
109                         };
110
111                         port@3 {
112                                 reg = <3>;
113                                 label = "ethernet4";
114                         };
115
116                         port@4 {
117                                 reg = <4>;
118                                 label = "internet";
119                         };
120
121                         port@5 {
122                                 reg = <5>;
123                                 label = "cpu";
124                         };
125                 };
126         };
127 };
128
129 &pinctrl {
130         pmx_led_green_power: pmx-led-green-power {
131                 marvell,pins = "mpp7";
132                 marvell,function = "gpo";
133         };
134         pmx_btn_wps: pmx-btn-wps {
135                 marvell,pins = "mpp47";
136                 marvell,function = "gpio";
137         };
138         pmx_btn_reset: pmx-btn-reset {
139                 marvell,pins = "mpp48";
140                 marvell,function = "gpio";
141         };
142 };
143
144 &nand {
145         status = "okay";
146         pinctrl-0 = <&pmx_nand>;
147         pinctrl-names = "default";
148
149         partitions {
150                 compatible = "fixed-partitions";
151                 #address-cells = <1>;
152                 #size-cells = <1>;
153
154                 partition@0 {
155                         label = "u-boot";
156                         reg = <0x0 0x80000>;
157                         read-only;
158                 };
159
160                 partition@80000 {
161                         label = "u_env";
162                         reg = <0x80000 0x4000>;
163                 };
164
165                 partition@84000 {
166                         label = "s_env";
167                         reg = <0x84000 0x4000>;
168                 };
169
170                 partition@200000 {
171                         label = "kernel1";
172                         reg = <0x200000 0x290000>;
173                 };
174
175                 partition@490000 {
176                         label = "rootfs1";
177                         reg = <0x490000 0x1170000>;
178                 };
179
180                 partition@1600000 {
181                         label = "kernel2";
182                         reg = <0x1600000 0x290000>;
183                 };
184
185                 partition@1890000 {
186                         label = "rootfs2";
187                         reg = <0x1890000 0x1170000>;
188                 };
189
190                 partition@2a00000 {
191                         label = "syscfg";
192                         reg = <0x2a00000  0x1600000>;
193                 };
194
195                 partition@88000 {
196                         label = "unused";
197                         reg = <0x88000 0x178000>;
198                 };
199
200         };
201 };
202
203 &pciec {
204         status = "okay";
205 };
206
207 &pcie0 {
208         status = "okay";
209 };
210
211 &pcie1 {
212         status = "okay";
213 };
214
215 &mdio {
216         status = "okay";
217 };
218
219 &uart0 {
220         status = "okay";
221 };
222
223 /* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
224  * fixed speed and duplex.
225  */
226 &eth0 {
227         status = "okay";
228         ethernet0-port@0 {
229                 speed = <1000>;
230                 duplex = <1>;
231         };
232 };
233
234 /* eth1 is connected to the switch at port 6. However DSA only supports a
235  * single CPU port. Upstream uses DSA so they disable this port to avoid confusion.
236  */
237 &eth1 {
238         status = "okay";
239         ethernet1-port@0 {
240                 speed = <1000>;
241                 duplex = <1>;
242         };
243 };
244
245 /* There is no battery on the board, so the RTC does not keep
246  * time when there is no power, making it useless.
247  */
248 &rtc {
249         status = "disabled";
250 };