94697866dc32cd27a5bf9d14c388870fe01c6bd4
[openwrt/openwrt.git] / target / linux / kirkwood / files / arch / arm / boot / dts / kirkwood-ea3500.dts
1 // SPDX-License-Identifier: GPL-2.0-only
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 EA3500 (Audi)";
19 compatible = "linksys,ea3500", "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
71 &pinctrl {
72 pmx_led_green_power: pmx-led-green-power {
73 marvell,pins = "mpp7";
74 marvell,function = "gpo";
75 };
76
77 pmx_btn_wps: pmx-btn-wps {
78 marvell,pins = "mpp47";
79 marvell,function = "gpio";
80 };
81
82 pmx_btn_reset: pmx-btn-reset {
83 marvell,pins = "mpp48";
84 marvell,function = "gpio";
85 };
86 };
87
88 &mdio {
89 status = "okay";
90
91 switch@10 {
92 compatible = "marvell,mv88e6085";
93 #address-cells = <1>;
94 #size-cells = <0>;
95 reg = <16>;
96
97 ports {
98 #address-cells = <1>;
99 #size-cells = <0>;
100
101 port@0 {
102 reg = <0>;
103 label = "ethernet1";
104 };
105
106 port@1 {
107 reg = <1>;
108 label = "ethernet2";
109 };
110
111 port@2 {
112 reg = <2>;
113 label = "ethernet3";
114 };
115
116 port@3 {
117 reg = <3>;
118 label = "ethernet4";
119 };
120
121 port@4 {
122 reg = <4>;
123 label = "internet";
124 };
125
126 port@5 {
127 reg = <5>;
128 phy-mode = "rgmii-id";
129 ethernet = <&eth0port>;
130 fixed-link {
131 speed = <1000>;
132 full-duplex;
133 };
134 };
135 };
136 };
137 };
138
139 &nand {
140 status = "okay";
141
142 pinctrl-0 = <&pmx_nand>;
143 pinctrl-names = "default";
144
145 partitions {
146 compatible = "fixed-partitions";
147 #address-cells = <1>;
148 #size-cells = <1>;
149
150 partition@0 {
151 label = "u-boot";
152 reg = <0x0 0x80000>;
153 read-only;
154 };
155
156 partition@80000 {
157 label = "u_env";
158 reg = <0x80000 0x4000>;
159 };
160
161 partition@84000 {
162 label = "s_env";
163 reg = <0x84000 0x4000>;
164 };
165
166 partition@200000 {
167 label = "kernel1";
168 reg = <0x200000 0x1400000>;
169 };
170
171 partition@500000 {
172 label = "rootfs1";
173 reg = <0x500000 0x1100000>;
174 };
175
176 partition@1600000 {
177 label = "kernel2";
178 reg = <0x1600000 0x1400000>;
179 };
180
181 partition@1900000 {
182 label = "rootfs2";
183 reg = <0x1900000 0x1100000>;
184 };
185
186 partition@2a00000 {
187 label = "syscfg";
188 reg = <0x2a00000 0x1600000>;
189 };
190
191 partition@88000 {
192 label = "unused";
193 reg = <0x88000 0x178000>;
194 };
195 };
196 };
197
198 &pciec {
199 status = "okay";
200 };
201
202 &pcie0 {
203 status = "okay";
204 };
205
206 &pcie1 {
207 status = "okay";
208 };
209
210 &mdio {
211 status = "okay";
212 };
213
214 &uart0 {
215 status = "okay";
216 };
217
218 /* eth0 is connected to a Marvell 88E6171 switch, without a PHY. So set
219 * fixed speed and duplex.
220 */
221 &eth0 {
222 status = "okay";
223
224 ethernet0-port@0 {
225 speed = <1000>;
226 duplex = <1>;
227 phy-mode = "rgmii";
228 };
229 };
230
231 /* eth1 is connected to the switch at port 6. However DSA only supports a
232 * single CPU port. This port is disabled to avoid confusion.
233 */
234 &eth1 {
235 status = "disabled";
236 };
237
238 /* There is no battery on the board, so the RTC does not keep
239 * time when there is no power, making it useless.
240 */
241 &rtc {
242 status = "disabled";
243 };