kirkwood: convert DTS patches into plain DTS files
[openwrt/staging/jogo.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 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_green_power >;
59 pinctrl-names = "default";
60
61 led_power: power {
62 label = "audi:green:power";
63 gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
64 default-state = "on";
65 };
66 };
67
68 switches {
69 #address-cells = <1>;
70 #size-cells = <0>;
71
72 mvsw61xx@10 {
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
84 dsa {
85 compatible = "marvell,dsa";
86 #address-cells = <2>;
87 #size-cells = <0>;
88
89 dsa,ethernet = <&eth0port>;
90 dsa,mii-bus = <&mdio>;
91
92 switch@16,0 {
93 #address-cells = <1>;
94 #size-cells = <0>;
95 reg = <16 0>; /* MDIO address 16, switch 0 in tree */
96
97 port@0 {
98 reg = <0>;
99 label = "ethernet1";
100 };
101
102 port@1 {
103 reg = <1>;
104 label = "ethernet2";
105 };
106
107 port@2 {
108 reg = <2>;
109 label = "ethernet3";
110 };
111
112 port@3 {
113 reg = <3>;
114 label = "ethernet4";
115 };
116
117 port@4 {
118 reg = <4>;
119 label = "internet";
120 };
121
122 port@5 {
123 reg = <5>;
124 label = "cpu";
125 };
126 };
127 };
128 };
129
130 &pinctrl {
131 pmx_led_green_power: pmx-led-green-power {
132 marvell,pins = "mpp7";
133 marvell,function = "gpo";
134 };
135 pmx_btn_wps: pmx-btn-wps {
136 marvell,pins = "mpp47";
137 marvell,function = "gpio";
138 };
139 pmx_btn_reset: pmx-btn-reset {
140 marvell,pins = "mpp48";
141 marvell,function = "gpio";
142 };
143 };
144
145 &nand {
146 status = "okay";
147 pinctrl-0 = <&pmx_nand>;
148 pinctrl-names = "default";
149
150 partitions {
151 compatible = "fixed-partitions";
152 #address-cells = <1>;
153 #size-cells = <1>;
154
155 partition@0 {
156 label = "u-boot";
157 reg = <0x0 0x80000>;
158 read-only;
159 };
160
161 partition@80000 {
162 label = "u_env";
163 reg = <0x80000 0x4000>;
164 };
165
166 partition@84000 {
167 label = "s_env";
168 reg = <0x84000 0x4000>;
169 };
170
171 partition@200000 {
172 label = "kernel1";
173 reg = <0x200000 0x290000>;
174 };
175
176 partition@490000 {
177 label = "rootfs1";
178 reg = <0x490000 0x1170000>;
179 };
180
181 partition@1600000 {
182 label = "kernel2";
183 reg = <0x1600000 0x290000>;
184 };
185
186 partition@1890000 {
187 label = "rootfs2";
188 reg = <0x1890000 0x1170000>;
189 };
190
191 partition@2a00000 {
192 label = "syscfg";
193 reg = <0x2a00000 0x1600000>;
194 };
195
196 partition@88000 {
197 label = "unused";
198 reg = <0x88000 0x178000>;
199 };
200
201 };
202 };
203
204 &pciec {
205 status = "okay";
206 };
207
208 &pcie0 {
209 status = "okay";
210 };
211
212 &pcie1 {
213 status = "okay";
214 };
215
216 &mdio {
217 status = "okay";
218 };
219
220 &uart0 {
221 status = "okay";
222 };
223
224 /* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
225 * fixed speed and duplex.
226 */
227 &eth0 {
228 status = "okay";
229 ethernet0-port@0 {
230 speed = <1000>;
231 duplex = <1>;
232 };
233 };
234
235 /* eth1 is connected to the switch at port 6. However DSA only supports a
236 * single CPU port. Upstream uses DSA so they disable this port to avoid confusion.
237 */
238 &eth1 {
239 status = "okay";
240 ethernet1-port@0 {
241 speed = <1000>;
242 duplex = <1>;
243 };
244 };
245
246 /* There is no battery on the board, so the RTC does not keep
247 * time when there is no power, making it useless.
248 */
249 &rtc {
250 status = "disabled";
251 };