ba88a812706d355fa8a4d6ee534663f5d0441a33
[openwrt/openwrt.git] / target / linux / lantiq / files / arch / mips / boot / dts / lantiq / vr9_avm_fritz3390.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "vr9.dtsi"
4
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/mips/lantiq_rcu_gphy.h>
7
8 / {
9 compatible = "avm,fritz3390", "lantiq,xway", "lantiq,vr9";
10 model = "AVM FRITZ!Box 3390";
11
12 chosen {
13 bootargs = "console=ttyLTQ0,115200";
14 };
15
16 aliases {
17 led-boot = &led_power_green;
18 led-failsafe = &led_power_red;
19 led-running = &led_power_green;
20 led-upgrade = &led_power_red;
21
22 led-dsl = &led_dsl;
23 led-internet = &led_info;
24 led-wifi = &led_wifi;
25 };
26
27 memory@0 {
28 device_type = "memory";
29 reg = <0x0 0x8000000>;
30 };
31
32 keys {
33 compatible = "gpio-keys-polled";
34 poll-interval = <100>;
35
36 power {
37 label = "power";
38 gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
39 linux,code = <KEY_POWER>;
40 };
41
42 wifi {
43 label = "wifi";
44 gpios = <&gpio 29 GPIO_ACTIVE_HIGH>;
45 linux,code = <KEY_RFKILL>;
46 };
47 };
48
49 leds {
50 compatible = "gpio-leds";
51
52 led_power_green: power_green {
53 label = "green:power";
54 gpios = <&gpio 45 GPIO_ACTIVE_LOW>;
55 default-state = "keep";
56 };
57
58 led_power_red: power_red {
59 label = "red:power";
60 gpios = <&gpio 46 GPIO_ACTIVE_LOW>;
61 };
62
63 led_wifi: wifi {
64 label = "green:wifi";
65 gpios = <&gpio 36 GPIO_ACTIVE_LOW>;
66 };
67
68 led_dsl: dsl {
69 label = "green:dsl";
70 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
71 };
72
73 led_lan {
74 label = "green:lan";
75 gpios = <&gpio 47 GPIO_ACTIVE_LOW>;
76 };
77
78 led_info: info {
79 label = "green:info";
80 gpios = <&gpio 33 GPIO_ACTIVE_LOW>;
81 };
82 };
83
84 usb0_vbus: regulator-usb0-vbus {
85 compatible = "regulator-fixed";
86
87 regulator-name = "USB0_VBUS";
88
89 regulator-min-microvolt = <5000000>;
90 regulator-max-microvolt = <5000000>;
91
92 gpio = <&gpio 14 GPIO_ACTIVE_HIGH>;
93 enable-active-high;
94 };
95
96 usb1_vbus: regulator-usb1-vbus {
97 compatible = "regulator-fixed";
98
99 regulator-name = "USB1_VBUS";
100
101 regulator-min-microvolt = <5000000>;
102 regulator-max-microvolt = <5000000>;
103
104 gpio = <&gpio 5 GPIO_ACTIVE_HIGH>;
105 enable-active-high;
106 };
107 };
108
109 &gphy0 {
110 lantiq,gphy-mode = <GPHY_MODE_GE>;
111 };
112
113 &gphy1 {
114 lantiq,gphy-mode = <GPHY_MODE_GE>;
115 };
116
117 &gpio {
118 pinctrl-names = "default";
119 pinctrl-0 = <&state_default>;
120
121 state_default: pinmux {
122 phy-rst {
123 lantiq,pins = "io32", "io44";
124 lantiq,pull = <0>;
125 lantiq,open-drain;
126 lantiq,output = <1>;
127 };
128
129 pcie-rst {
130 lantiq,pins = "io21";
131 lantiq,open-drain;
132 lantiq,output = <1>;
133 };
134 };
135
136 pcie-rst-dev {
137 gpio-hog;
138 line-name = "pcie-rst-dev";
139 gpios = <22 GPIO_ACTIVE_LOW>;
140 output-low;
141 };
142 };
143
144 &gswip {
145 pinctrl-0 = <&mdio_pins>;
146 pinctrl-names = "default";
147 };
148
149 &gswip_mdio {
150 phy0: ethernet-phy@0 {
151 reg = <0x0>;
152 gpios = <&gpio 32 GPIO_ACTIVE_LOW>;
153 };
154
155 phy1: ethernet-phy@1 {
156 reg = <0x1>;
157 gpios = <&gpio 44 GPIO_ACTIVE_LOW>;
158 };
159
160 phy11: ethernet-phy@11 {
161 reg = <0x11>;
162 };
163
164 phy13: ethernet-phy@13 {
165 reg = <0x13>;
166 };
167 };
168
169 &gswip_ports {
170 port@0 {
171 reg = <0>;
172 label = "lan3";
173 phy-mode = "rgmii-rxid";
174 phy-handle = <&phy0>;
175 };
176
177 port@1 {
178 reg = <1>;
179 label = "lan4";
180 phy-mode = "rgmii-rxid";
181 phy-handle = <&phy1>;
182 };
183
184 port@2 {
185 reg = <2>;
186 label = "lan2";
187 phy-mode = "internal";
188 phy-handle = <&phy11>;
189 };
190
191 port@4 {
192 reg = <4>;
193 label = "lan1";
194 phy-mode = "internal";
195 phy-handle = <&phy13>;
196 };
197 };
198
199 &spi {
200 status = "okay";
201
202 flash@4 {
203 compatible = "jedec,spi-nor";
204 reg = <4>;
205 spi-max-frequency = <10000000>;
206
207 partitions {
208 compatible = "fixed-partitions";
209 #address-cells = <1>;
210 #size-cells = <1>;
211
212 partition@0 {
213 reg = <0x0 0x20000>;
214 label = "urlader";
215 read-only;
216 };
217
218 partition@20000 {
219 reg = <0x20000 0x10000>;
220 label = "tffs (1)";
221 read-only;
222 };
223
224 partition@30000 {
225 reg = <0x30000 0x10000>;
226 label = "tffs (2)";
227 read-only;
228 };
229 };
230 };
231 };
232
233 &localbus {
234 flash1: flash@1 {
235 compatible = "lantiq,nand-xway";
236 bank-width = <1>;
237 reg = <1 0x0 0x2000000>;
238
239 pinctrl-0 = <&nand_pins>;
240 pinctrl-names = "default";
241
242 nand-ecc-engine = <&flash1>;
243
244 partitions {
245 compatible = "fixed-partitions";
246 #address-cells = <1>;
247 #size-cells = <1>;
248
249 partition@0 {
250 label = "kernel";
251 reg = <0x0 0x400000>;
252 };
253
254 partition@400000 {
255 label = "ubi";
256 reg = <0x400000 0x7c00000>;
257 };
258 };
259 };
260 };
261
262 &usb_phy0 {
263 status = "okay";
264 };
265
266 &usb_phy1 {
267 status = "okay";
268 };
269
270 &usb0 {
271 status = "okay";
272 vbus-supply = <&usb0_vbus>;
273 };
274
275 &usb1 {
276 status = "okay";
277 vbus-supply = <&usb1_vbus>;
278 };
279
280 &pcie0 {
281 status = "okay";
282 gpio-reset = <&gpio 21 GPIO_ACTIVE_LOW>;
283
284 pcie@0 {
285 reg = <0 0 0 0 0>;
286 #interrupt-cells = <1>;
287 #size-cells = <1>;
288 #address-cells = <2>;
289 device_type = "pci";
290
291 wifi@0,0 {
292 compatible = "pci168c,0033";
293 reg = <0 0 0 0 0>;
294 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */
295 };
296 };
297 };