mediatek: fix wps button for nokia ea0326gmp
[openwrt/staging/pepe2k.git] / target / linux / ipq40xx / files-6.6 / arch / arm / boot / dts / qcom / qcom-ipq4018-fritzbox-4040.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qcom-ipq4019.dtsi"
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
7 #include <dt-bindings/soc/qcom,tcsr.h>
8
9 / {
10 model = "AVM FRITZ!Box 4040";
11 compatible = "avm,fritzbox-4040";
12
13 aliases {
14 led-boot = &power;
15 led-failsafe = &flash;
16 led-running = &power;
17 led-upgrade = &flash;
18 label-mac-device = &gmac;
19 };
20
21 soc {
22 tcsr@1949000 {
23 compatible = "qcom,tcsr";
24 reg = <0x1949000 0x100>;
25 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
26 };
27
28 tcsr@194b000 {
29 compatible = "qcom,tcsr";
30 reg = <0x194b000 0x100>;
31 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
32 };
33
34 ess_tcsr@1953000 {
35 compatible = "qcom,tcsr";
36 reg = <0x1953000 0x1000>;
37 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
38 };
39
40 tcsr@1957000 {
41 compatible = "qcom,tcsr";
42 reg = <0x1957000 0x100>;
43 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
44 };
45 };
46
47 keys {
48 compatible = "gpio-keys";
49
50 wlan {
51 label = "wlan";
52 gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
53 linux,code = <KEY_RFKILL>;
54 };
55
56 wps {
57 label = "wps";
58 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
59 linux,code = <KEY_WPS_BUTTON>;
60 };
61 };
62
63 switch-leds {
64 compatible = "gpio-leds";
65
66 wlan {
67 function = LED_FUNCTION_WLAN;
68 color = <LED_COLOR_ID_GREEN>;
69 gpios = <&ethphy0 0 GPIO_ACTIVE_HIGH>;
70 };
71
72 panic: info_red {
73 label = "red:info";
74 gpios = <&ethphy0 1 GPIO_ACTIVE_HIGH>;
75 panic-indicator;
76 };
77
78 wan {
79 function = LED_FUNCTION_WAN;
80 color = <LED_COLOR_ID_GREEN>;
81 gpios = <&ethphy1 0 GPIO_ACTIVE_HIGH>;
82 };
83
84 power: power {
85 function = LED_FUNCTION_POWER;
86 color = <LED_COLOR_ID_GREEN>;
87 gpios = <&ethphy2 1 GPIO_ACTIVE_HIGH>;
88 };
89
90 lan {
91 function = LED_FUNCTION_LAN;
92 color = <LED_COLOR_ID_GREEN>;
93 gpios = <&ethphy3 0 GPIO_ACTIVE_HIGH>;
94 };
95
96 flash: info_amber {
97 label = "amber:info";
98 gpios = <&ethphy3 1 GPIO_ACTIVE_HIGH>;
99 };
100 };
101 };
102
103 &watchdog {
104 status = "okay";
105 };
106
107 &prng {
108 status = "okay";
109 };
110
111 &crypto {
112 status = "okay";
113 };
114
115 &tlmm {
116 serial_pins: serial_pinmux {
117 mux {
118 pins = "gpio60", "gpio61";
119 function = "blsp_uart0";
120 bias-disable;
121 };
122 };
123
124 spi_0_pins: spi_0_pinmux {
125 mux {
126 function = "blsp_spi0";
127 pins = "gpio55", "gpio56", "gpio57";
128 drive-strength = <12>;
129 bias-disable;
130 };
131
132 mux_cs {
133 function = "gpio";
134 pins = "gpio54";
135 drive-strength = <2>;
136 bias-disable;
137 output-high;
138 };
139 };
140 };
141
142 &cryptobam {
143 status = "okay";
144 };
145
146 &blsp_dma {
147 status = "okay";
148 };
149
150 &blsp1_spi1 { /* BLSP1 QUP1 */
151 pinctrl-0 = <&spi_0_pins>;
152 pinctrl-names = "default";
153 status = "okay";
154 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
155
156 flash@0 {
157 compatible = "jedec,spi-nor";
158 reg = <0>;
159 spi-max-frequency = <24000000>;
160 status = "okay";
161 m25p,fast-read;
162
163 partitions {
164 compatible = "fixed-partitions";
165 #address-cells = <1>;
166 #size-cells = <1>;
167
168 partition0@0 {
169 label = "SBL1";
170 reg = <0x00000000 0x00040000>;
171 read-only;
172 };
173 partition1@40000 {
174 label = "MIBIB";
175 reg = <0x00040000 0x00020000>;
176 read-only;
177 };
178 partition2@60000 {
179 label = "QSEE";
180 reg = <0x00060000 0x00060000>;
181 read-only;
182 };
183 partition3@c0000 {
184 label = "CDT";
185 reg = <0x000c0000 0x00010000>;
186 read-only;
187 };
188 partition4@d0000 {
189 label = "DDRPARAMS";
190 reg = <0x000d0000 0x00010000>;
191 read-only;
192 };
193 partition5@e0000 {
194 label = "APPSBLENV"; /* uboot env - empty */
195 reg = <0x000e0000 0x00010000>;
196 read-only;
197 };
198 partition6@f0000 {
199 label = "urlader"; /* APPSBL */
200 reg = <0x000f0000 0x0002dc000>;
201 read-only;
202 };
203 partition7@11dc00 {
204 /* make a backup of this partition! */
205 label = "urlader_config";
206 reg = <0x0011dc00 0x00002400>;
207 read-only;
208 };
209 partition8@120000 {
210 label = "tffs1";
211 reg = <0x00120000 0x00080000>;
212 read-only;
213 };
214 partition9@1a0000 {
215 label = "tffs2";
216 reg = <0x001a0000 0x00080000>;
217 read-only;
218 };
219 partition10@220000 {
220 label = "uboot";
221 reg = <0x00220000 0x00080000>;
222 read-only;
223 };
224 partition11@2A0000 {
225 compatible = "denx,fit";
226 label = "firmware";
227 reg = <0x002a0000 0x01c60000>;
228 };
229 partition12@1f00000 {
230 label = "jffs2";
231 reg = <0x01f00000 0x00100000>;
232 };
233 };
234 };
235 };
236
237 &blsp1_uart1 {
238 pinctrl-0 = <&serial_pins>;
239 pinctrl-names = "default";
240 status = "okay";
241 };
242
243 &mdio {
244 status = "okay";
245 };
246
247 &ethphy0 {
248 gpio-controller;
249 #gpio-cells = <2>;
250 };
251
252 &ethphy1 {
253 gpio-controller;
254 #gpio-cells = <2>;
255
256 enable-usb-power {
257 gpio-hog;
258 line-name = "enable USB3 power";
259 gpios = <1 GPIO_ACTIVE_HIGH>;
260 output-high;
261 };
262 };
263
264 &ethphy2 {
265 gpio-controller;
266 #gpio-cells = <2>;
267 };
268
269 &ethphy3 {
270 gpio-controller;
271 #gpio-cells = <2>;
272 };
273
274 &gmac {
275 status = "okay";
276 };
277
278 &switch {
279 status = "okay";
280 };
281
282 &swport1 {
283 status = "okay";
284 };
285
286 &swport2 {
287 status = "okay";
288 };
289
290 &swport3 {
291 status = "okay";
292 };
293
294 &swport4 {
295 status = "okay";
296 };
297
298 &swport5 {
299 status = "okay";
300 };
301
302 &usb3_ss_phy {
303 status = "okay";
304 };
305
306 &usb3_hs_phy {
307 status = "okay";
308 };
309
310 &usb3 {
311 status = "okay";
312 };
313
314 &usb2_hs_phy {
315 status = "okay";
316 };
317
318 &usb2 {
319 status = "okay";
320 };
321
322 &wifi0 {
323 status = "okay";
324 qcom,ath10k-calibration-variant = "AVM-FRITZBox-4040";
325 };
326
327 &wifi1 {
328 status = "okay";
329 qcom,ath10k-calibration-variant = "AVM-FRITZBox-4040";
330 };