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