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