ipq40xx: add support for the ZyXEL NBG6617
[openwrt/openwrt.git] / target / linux / ipq40xx / files-4.14 / arch / arm / boot / dts / qcom-ipq4018-nbg6617.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/input/linux-event-codes.h>
22 #include <dt-bindings/soc/qcom,tcsr.h>
23
24 / {
25 model = "ZyXEL NBG6617";
26 compatible = "zyxel,nbg6617", "qcom,ipq4019";
27
28 chosen {
29 /*
30 * the vendor u-boot adds root and mtdparts cmdline parameters
31 * which we don't want... but we have to overwrite them or else
32 * the kernel will take them at face value.
33 */
34 bootargs-append = " mtdparts= root=31:13";
35 };
36
37 aliases {
38 led-boot = &power;
39 led-failsafe = &power;
40 led-running = &power;
41 led-upgrade = &power;
42 };
43
44 soc {
45 mdio@90000 {
46 status = "okay";
47 };
48
49 ess-psgmii@98000 {
50 status = "okay";
51 };
52
53 tcsr@1949000 {
54 compatible = "qcom,tcsr";
55 reg = <0x1949000 0x100>;
56 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
57 };
58
59 tcsr@194b000 {
60 compatible = "qcom,tcsr";
61 reg = <0x194b000 0x100>;
62 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
63 };
64
65 ess_tcsr@1953000 {
66 compatible = "qcom,tcsr";
67 reg = <0x1953000 0x1000>;
68 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
69 };
70
71 tcsr@1957000 {
72 compatible = "qcom,tcsr";
73 reg = <0x1957000 0x100>;
74 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
75 };
76
77 usb2@60f8800 {
78 status = "okay";
79 };
80
81 serial@78af000 {
82 pinctrl-0 = <&serial_pins>;
83 pinctrl-names = "default";
84 status = "okay";
85 };
86
87 usb3@8af8800 {
88 status = "okay";
89 };
90
91 crypto@8e3a000 {
92 status = "okay";
93 };
94
95 watchdog@b017000 {
96 status = "okay";
97 };
98
99 ess-switch@c000000 {
100 status = "okay";
101 };
102
103 edma@c080000 {
104 status = "okay";
105 };
106 };
107
108 gpio-keys {
109 compatible = "gpio-keys";
110
111 wlan {
112 label = "wlan";
113 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
114 linux,code = <KEY_RFKILL>;
115 linux,input-type = <EV_SW>;
116 };
117
118 wps {
119 label = "wps";
120 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
121 linux,code = <KEY_WPS_BUTTON>;
122 };
123
124 reset {
125 label = "reset";
126 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
127 linux,code = <KEY_RESTART>;
128 };
129 };
130
131 gpio-leds {
132 compatible = "gpio-leds";
133 pinctrl-0 = <&led_pins>;
134 pinctrl-names = "default";
135
136 power: power {
137 label = "nbg6617:green:power";
138 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
139 };
140
141 usb {
142 label = "nbg6617:green:usb";
143 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
144 };
145
146 wlan2G {
147 label = "nbg6617:green:wlan2G";
148 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
149 };
150
151 wlan5G {
152 label = "nbg6617:green:wlan5G";
153 gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
154 };
155
156 wps {
157 label = "nbg6617:green:wps";
158 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
159 };
160 };
161 };
162
163 &tlmm {
164 serial_pins: serial_pinmux {
165 mux {
166 pins = "gpio60", "gpio61";
167 function = "blsp_uart0";
168 bias-disable;
169 };
170 };
171 spi_0_pins: spi_0_pinmux {
172 mux {
173 function = "blsp_spi0";
174 pins = "gpio55", "gpio56", "gpio57";
175 drive-strength = <12>;
176 bias-disable;
177 };
178
179 mux_cs {
180 function = "gpio";
181 pins = "gpio54";
182 drive-strength = <2>;
183 bias-disable;
184 output-low;
185 };
186 };
187 led_pins: led_pinmux {
188 mux {
189 pins = "gpio0", "gpio1", "gpio3", "gpio5", "gpio58";
190 drive-strength = <0x8>;
191 bias-disable;
192 output-low;
193 };
194 };
195 };
196
197 &spi_0 { /* BLSP1 QUP1 */
198 pinctrl-0 = <&spi_0_pins>;
199 pinctrl-names = "default";
200 status = "okay";
201 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
202
203 mx25l25635f@0 {
204 compatible = "mx25l25635f", "jedec,spi-nor";
205 #address-cells = <1>;
206 #size-cells = <0>;
207 reg = <0>;
208 spi-max-frequency = <24000000>;
209 status = "okay";
210 m25p,fast-read;
211
212 partitions {
213 compatible = "fixed-partitions";
214 #address-cells = <1>;
215 #size-cells = <1>;
216
217 partition0@0 {
218 label = "SBL1";
219 reg = <0x00000000 0x00040000>;
220 read-only;
221 };
222 partition1@40000 {
223 label = "MIBIB";
224 reg = <0x00040000 0x00020000>;
225 read-only;
226 };
227 partition2@60000 {
228 label = "QSEE";
229 reg = <0x00060000 0x00060000>;
230 read-only;
231 };
232 partition3@c0000 {
233 label = "CDT";
234 reg = <0x000c0000 0x00010000>;
235 read-only;
236 };
237 partition4@d0000 {
238 label = "DDRPARAMS";
239 reg = <0x000d0000 0x00010000>;
240 read-only;
241 };
242 partition5@e0000 {
243 label = "APPSBL"; /* u-boot */
244 reg = <0x000e0000 0x00080000>;
245 /* U-Boot Standalone App "zloader" is located at 0x64000 */
246 read-only;
247 };
248 partition6@160000 {
249 label = "APPSBLENV"; /* u-boot env */
250 reg = <0x00160000 0x00010000>;
251 };
252 partition7@170000 {
253 /* make a backup of this partition! */
254 label = "ART";
255 reg = <0x00170000 0x00010000>;
256 read-only;
257 };
258 partition8@180000 {
259 label = "kernel";
260 reg = <0x00180000 0x00400000>;
261 };
262 partition9@580000 {
263 label = "dualflag";
264 reg = <0x00580000 0x00010000>;
265 read-only;
266 };
267 partition10@590000 {
268 label = "header";
269 reg = <0x00590000 0x00010000>;
270 };
271 partition11@5a0000 {
272 label = "romd";
273 reg = <0x005a0000 0x00100000>;
274 read-only;
275 };
276 partition12@6a0000 {
277 label = "not_root_data";
278 /*
279 * for some strange reason, someone at ZyXEL
280 * had the "great" idea to put the rootfs_data
281 * in front of rootfs... Don't do that!
282 * As a result this one, full MebiByte remains
283 * unused.
284 */
285 reg = <0x006a0000 0x00100000>;
286 };
287 partition13@7a0000 {
288 label = "rootfs";
289 reg = <0x007a0000 0x01860000>;
290 };
291 };
292 };
293 };
294
295 &cryptobam {
296 status = "okay";
297 };
298
299 &blsp_dma {
300 status = "okay";
301 };
302
303 &wifi0 {
304 status = "okay";
305 };
306
307 &wifi1 {
308 status = "okay";
309 };
310
311 &usb3_ss_phy {
312 status = "okay";
313 };
314
315 &usb3_hs_phy {
316 status = "okay";
317 };
318
319 &usb2_hs_phy {
320 status = "okay";
321 };