eed30c2f0fe2394ead382da2cc5b4e0100bfbaee
[openwrt/openwrt.git] / target / linux / lantiq / files-5.4 / arch / mips / boot / dts / lantiq / vr9_avm_fritz7412.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,fritz7412", "lantiq,xway", "lantiq,vr9";
10 model = "AVM FRITZ!Box 7412";
11
12 chosen {
13 bootargs = "console=ttyLTQ0,115200";
14 };
15
16 aliases {
17 led-boot = &power_green;
18 led-failsafe = &power_red;
19 led-running = &power_green;
20 led-upgrade = &power_red;
21
22 led-dsl = &info;
23 led-wifi = &wifi;
24 };
25
26 memory@0 {
27 device_type = "memory";
28 reg = <0x0 0x8000000>;
29 };
30
31 keys {
32 compatible = "gpio-keys-polled";
33 poll-interval = <100>;
34
35 wps {
36 label = "wps";
37 gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
38 linux,code = <KEY_WPS_BUTTON>;
39 };
40
41 dect {
42 label = "dect";
43 gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
44 linux,code = <KEY_PHONE>;
45 };
46 };
47
48 leds {
49 compatible = "gpio-leds";
50
51 power_green: power_green {
52 label = "green:power";
53 gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
54 default-state = "keep";
55 };
56
57 power_red: power_red {
58 label = "red:power";
59 gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
60 };
61
62 fon {
63 label = "green:fon";
64 gpios = <&gpio 34 GPIO_ACTIVE_LOW>;
65 };
66
67 dect {
68 label = "green:dect";
69 gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
70 };
71
72 wifi: wifi {
73 label = "green:wifi";
74 gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
75 };
76
77 info: info {
78 label = "green:info";
79 gpios = <&gpio 35 GPIO_ACTIVE_LOW>;
80 };
81 };
82 };
83
84 &localbus {
85 flash@0 {
86 compatible = "lantiq,nand-xway";
87 bank-width = <2>;
88 reg = <0 0x0 0x2000000>;
89 lantiq,cs = <1>;
90
91 pinctrl-0 = <&nand_pins>, <&nand_cs1_pins>;
92 pinctrl-names = "default";
93
94 partitions {
95 compatible = "fixed-partitions";
96 #address-cells = <1>;
97 #size-cells = <1>;
98
99 partition@0 {
100 label = "urlader";
101 reg = <0x0 0x40000>;
102 read-only;
103 };
104
105 partition@40000 {
106 label = "nand-tffs";
107 reg = <0x40000 0x400000>;
108 read-only;
109 };
110
111 partition@440000 {
112 label = "kernel";
113 reg = <0x440000 0x400000>;
114 };
115
116 partition@840000 {
117 label = "ubi";
118 reg = <0x840000 0x3000000>;
119 };
120
121 partition@3840000 {
122 label = "reserved-kernel";
123 reg = <0x3840000 0x400000>;
124 read-only;
125 };
126
127 partition@3c40000 {
128 label = "reserved-filesystem";
129 reg = <0x3c40000 0x3000000>;
130 read-only;
131 };
132
133 partition@6c40000 {
134 label = "config";
135 reg = <0x6c40000 0x400000>;
136 read-only;
137 };
138
139 partition@6e40000 {
140 label = "nand-filesystem";
141 reg = <0x6e40000 0x400000>;
142 read-only;
143 };
144 };
145 };
146 };
147
148 &pcie0 {
149 status = "okay";
150 gpio-reset = <&gpio 11 GPIO_ACTIVE_HIGH>;
151
152 pcie@0 {
153 reg = <0 0 0 0 0>;
154 #interrupt-cells = <1>;
155 #size-cells = <2>;
156 #address-cells = <3>;
157 device_type = "pci";
158
159 wifi@168c,002e {
160 compatible = "pci168c,002e";
161 reg = <0 0 0 0 0>;
162 qca,no-eeprom; /* load from ath9k-eeprom-pci-0000:01:00.0.bin */
163 };
164 };
165 };
166
167 &gpio {
168 pinctrl-names = "default";
169 pinctrl-0 = <&state_default>;
170
171 state_default: pinmux {
172 pcie-rst {
173 lantiq,pins = "io11";
174 lantiq,open-drain = <1>;
175 lantiq,output = <1>;
176 };
177 };
178 };
179
180 &gphy0 {
181 lantiq,gphy-mode = <GPHY_MODE_FE>;
182 };
183
184 &eth0 {
185 lantiq,phys = <&gphy0>;
186
187 interface@0 {
188 compatible = "lantiq,xrx200-pdi";
189 #address-cells = <1>;
190 #size-cells = <0>;
191 reg = <0>;
192 mac-address = [ 00 11 22 33 44 55 ];
193 lantiq,switch;
194
195 ethernet@2 {
196 compatible = "lantiq,xrx200-pdi-port";
197 reg = <2>;
198 phy-mode = "gmii";
199 phy-handle = <&phy11>;
200 };
201 };
202
203 mdio {
204 #address-cells = <1>;
205 #size-cells = <0>;
206 compatible = "lantiq,xrx200-mdio";
207
208 phy11: ethernet-phy@11 {
209 reg = <0x11>;
210 compatible = "lantiq,phy11g", "ethernet-phy-ieee802.3-c22";
211 };
212 };
213 };