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