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