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