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