4b5cbcac33b711ed1ae81da69e63800974f17d70
[openwrt/openwrt.git] / target / linux / ipq40xx / files-4.14 / arch / arm / boot / dts / qcom-ipq4019-fritz4040.dts
1 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2 *
3 * Permission to use, copy, modify, and/or distribute this software for any
4 * purpose with or without fee is hereby granted, provided that the above
5 * copyright notice and this permission notice appear in all copies.
6 *
7 * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8 * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9 * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10 * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11 * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12 * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13 * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14 *
15 */
16
17 #include "qcom-ipq4019.dtsi"
18 #include "qcom-ipq4019-bus.dtsi"
19 #include <dt-bindings/gpio/gpio.h>
20 #include <dt-bindings/input/input.h>
21 #include <dt-bindings/soc/qcom,tcsr.h>
22
23 / {
24 model = "AVM FRITZ!Box 4040";
25 compatible = "avm,fritzbox-4040", "qcom,ipq4019";
26
27 aliases {
28 led-boot = &power;
29 led-failsafe = &flash;
30 led-running = &power;
31 led-upgrade = &flash;
32 };
33
34 reserved-memory {
35 #address-cells = <0x1>;
36 #size-cells = <0x1>;
37 ranges;
38
39 tz_apps@87b80000 {
40 reg = <0x87b80000 0x280000>;
41 reusable;
42 };
43
44 smem@87e00000 {
45 reg = <0x87e00000 0x080000>;
46 no-map;
47 };
48
49 tz@87e80000 {
50 reg = <0x87e80000 0x180000>;
51 no-map;
52 };
53 };
54
55 soc {
56 mdio@90000 {
57 status = "okay";
58 };
59
60 ess-psgmii@98000 {
61 status = "okay";
62 };
63
64 tcsr@1949000 {
65 compatible = "qcom,tcsr";
66 reg = <0x1949000 0x100>;
67 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
68 };
69
70 tcsr@194b000 {
71 compatible = "qcom,tcsr";
72 reg = <0x194b000 0x100>;
73 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
74 };
75
76 ess_tcsr@1953000 {
77 compatible = "qcom,tcsr";
78 reg = <0x1953000 0x1000>;
79 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
80 };
81
82 tcsr@1957000 {
83 compatible = "qcom,tcsr";
84 reg = <0x1957000 0x100>;
85 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
86 };
87
88 usb2@60f8800 {
89 status = "okay";
90 };
91
92 serial@78af000 {
93 pinctrl-0 = <&serial_pins>;
94 pinctrl-names = "default";
95 status = "okay";
96 };
97
98 usb3@8af8800 {
99 status = "okay";
100 };
101
102 crypto@8e3a000 {
103 status = "okay";
104 };
105
106 wifi@a000000 {
107 status = "okay";
108 };
109
110 wifi@a800000 {
111 status = "okay";
112 };
113
114 watchdog@b017000 {
115 status = "okay";
116 };
117
118 qca8075: ess-switch@c000000 {
119 status = "okay";
120
121 #gpio-cells = <2>;
122 gpio-controller;
123
124 enable-usb-power {
125 gpio-hog;
126 line-name = "enable USB3 power";
127 gpios = <7 GPIO_ACTIVE_HIGH>;
128 output-high;
129 };
130 };
131
132 edma@c080000 {
133 status = "okay";
134 };
135 };
136
137 gpio-keys {
138 compatible = "gpio-keys";
139
140 wlan {
141 label = "wlan";
142 gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
143 linux,code = <KEY_RFKILL>;
144 };
145
146 wps {
147 label = "wps";
148 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
149 linux,code = <KEY_WPS_BUTTON>;
150 };
151 };
152
153 gpio-leds {
154 compatible = "gpio-leds";
155
156 wlan {
157 label = "fritz4040:green:wlan";
158 gpios = <&qca8075 1 GPIO_ACTIVE_HIGH>;
159 };
160
161 panic: info_red {
162 label = "fritz4040:red:info";
163 gpios = <&qca8075 3 GPIO_ACTIVE_HIGH>;
164 panic-indicator;
165 };
166
167 wan {
168 label = "fritz4040:green:wan";
169 gpios = <&qca8075 5 GPIO_ACTIVE_HIGH>;
170 };
171
172 power: power {
173 label = "fritz4040:green:power";
174 gpios = <&qca8075 11 GPIO_ACTIVE_HIGH>;
175 };
176
177 lan {
178 label = "fritz4040:green:lan";
179 gpios = <&qca8075 13 GPIO_ACTIVE_HIGH>;
180 };
181
182 flash: info_amber {
183 label = "fritz4040:amber:info";
184 gpios = <&qca8075 15 GPIO_ACTIVE_HIGH>;
185 };
186 };
187 };
188
189 &tlmm {
190 serial_pins: serial_pinmux {
191 mux {
192 pins = "gpio60", "gpio61";
193 function = "blsp_uart0";
194 bias-disable;
195 };
196 };
197
198 spi_0_pins: spi_0_pinmux {
199 mux {
200 function = "blsp_spi0";
201 pins = "gpio55", "gpio56", "gpio57";
202 drive-strength = <12>;
203 bias-disable;
204 };
205
206 mux_cs {
207 function = "gpio";
208 pins = "gpio54";
209 drive-strength = <2>;
210 bias-disable;
211 output-high;
212 };
213 };
214 };
215
216 &cryptobam {
217 status = "okay";
218 };
219
220 &blsp_dma {
221 status = "okay";
222 };
223
224 &spi_0 { /* BLSP1 QUP1 */
225 pinctrl-0 = <&spi_0_pins>;
226 pinctrl-names = "default";
227 status = "okay";
228 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
229
230 mx25l25635f@0 {
231 compatible = "jedec,spi-nor";
232 #address-cells = <1>;
233 #size-cells = <0>;
234 reg = <0>;
235 spi-max-frequency = <24000000>;
236 status = "okay";
237 m25p,fast-read;
238
239 partitions {
240 compatible = "fixed-partitions";
241 #address-cells = <1>;
242 #size-cells = <1>;
243
244 partition0@0 {
245 label = "SBL1";
246 reg = <0x00000000 0x00040000>;
247 read-only;
248 };
249 partition1@40000 {
250 label = "MIBIB";
251 reg = <0x00040000 0x00020000>;
252 read-only;
253 };
254 partition2@60000 {
255 label = "QSEE";
256 reg = <0x00060000 0x00060000>;
257 read-only;
258 };
259 partition3@c0000 {
260 label = "CDT";
261 reg = <0x000c0000 0x00010000>;
262 read-only;
263 };
264 partition4@d0000 {
265 label = "DDRPARAMS";
266 reg = <0x000d0000 0x00010000>;
267 read-only;
268 };
269 partition5@e0000 {
270 label = "APPSBLENV"; /* uboot env - empty */
271 reg = <0x000e0000 0x00010000>;
272 read-only;
273 };
274 partition6@f0000 {
275 label = "urlader"; /* APPSBL */
276 reg = <0x000f0000 0x0002dc000>;
277 read-only;
278 };
279 partition7@11dc00 {
280 /* make a backup of this partition! */
281 label = "urlader_config";
282 reg = <0x0011dc00 0x00002400>;
283 read-only;
284 };
285 partition8@120000 {
286 label = "tffs1";
287 reg = <0x00120000 0x00080000>;
288 read-only;
289 };
290 partition9@1a0000 {
291 label = "tffs2";
292 reg = <0x001a0000 0x00080000>;
293 read-only;
294 };
295 partition10@220000 {
296 label = "uboot";
297 reg = <0x00220000 0x00080000>;
298 read-only;
299 };
300 partition11@2A0000 {
301 label = "firmware";
302 reg = <0x002a0000 0x01c60000>;
303 };
304 partition12@1f00000 {
305 label = "jffs2";
306 reg = <0x01f00000 0x00100000>;
307 };
308 };
309 };
310 };
311
312 &usb3_ss_phy {
313 status = "okay";
314 };
315
316 &usb3_hs_phy {
317 status = "okay";
318 };
319
320 &usb2_hs_phy {
321 status = "okay";
322 };