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