f4af2ba25fad1a8fcc867c9578ff3e8b5c328c20
[oweals/openwrt.git] / target / linux / ipq40xx / files-4.19 / arch / arm / boot / dts / qcom-ipq4019-e2600ac.dtsi
1 /* SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2  *
3  * Copyright (c) 2018 Peng Zhang <sd20@qxwlan.com>
4  *
5  */
6
7 #include "qcom-ipq4019.dtsi"
8 #include <dt-bindings/gpio/gpio.h>
9 #include <dt-bindings/input/input.h>
10 #include <dt-bindings/soc/qcom,tcsr.h>
11
12 / {
13
14         model = "Qxwlan E2600AC";
15         compatible = "qcom,ipq4019";
16
17         memory {
18                 device_type = "memory";
19                 reg = <0x80000000 0x10000000>; /* 256MB */
20         };
21
22         soc {
23                 rng@22000 {
24                         status = "okay";
25                 };
26
27                 mdio@90000 {
28                         status = "okay";
29                         pinctrl-0 = <&mdio_pins>;
30                         pinctrl-names = "default";
31                 };
32
33                 ess-psgmii@98000 {
34                         status = "okay";
35                 };
36
37                 tcsr@1949000 {
38                         compatible = "qcom,tcsr";
39                         reg = <0x1949000 0x100>;
40                         qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
41                 };
42
43                 tcsr@194b000 {
44                         /* select hostmode */
45                         compatible = "qcom,tcsr";
46                         reg = <0x194b000 0x100>;
47                         qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
48                         status = "okay";
49                 };
50
51                 ess_tcsr@1953000 {
52                         compatible = "qcom,tcsr";
53                         reg = <0x1953000 0x1000>;
54                         qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
55                 };
56
57                 tcsr@1957000 {
58                         compatible = "qcom,tcsr";
59                         reg = <0x1957000 0x100>;
60                         qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
61                 };
62
63                 usb2: usb2@60f8800 {
64                         status = "okay";
65
66                         dwc3@6000000 {
67                                 #address-cells = <1>;
68                                 #size-cells = <0>;
69
70                                 usb2_port1: port@1 {
71                                         reg = <1>;
72                                         #trigger-source-cells = <0>;
73                                 };
74                         };
75                 };
76
77                 serial@78af000 {
78                         pinctrl-0 = <&serial_0_pins>;
79                         pinctrl-names = "default";
80                         status = "okay";
81                 };
82
83                 serial@78b0000 {
84                         pinctrl-0 = <&serial_1_pins>;
85                         pinctrl-names = "default";
86                         status = "okay";
87                 };
88
89                 i2c@78b7000 { /* BLSP1 QUP2 */
90                         pinctrl-0 = <&i2c_0_pins>;
91                         pinctrl-names = "default";
92
93                         status = "okay";
94                 };
95
96                 usb3: usb3@8af8800 {
97                         status = "okay";
98
99                         dwc3@8a00000 {
100                                 #address-cells = <1>;
101                                 #size-cells = <0>;
102
103                                 usb3_port1: port@1 {
104                                         reg = <1>;
105                                         #trigger-source-cells = <0>;
106                                 };
107
108                                 usb3_port2: port@2 {
109                                         reg = <2>;
110                                         #trigger-source-cells = <0>;
111                                 };
112                         };
113                 };
114
115                 crypto@8e3a000 {
116                         status = "okay";
117                 };
118
119                 watchdog@b017000 {
120                         status = "okay";
121                 };
122
123                 ess-switch@c000000 {
124                         status = "okay";
125                 };
126
127                 edma@c080000 {
128                         status = "okay";
129                 };
130
131                 leds {
132                         compatible = "gpio-leds";
133
134                         led1 {
135                                 label = "e2600ac:green:wlan0";
136                                 gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
137                         };
138
139                         led2 {
140                                 label = "e2600ac:green:wlan1";
141                                 gpios = <&tlmm 36 GPIO_ACTIVE_LOW>;
142                         };
143
144                         led3 {
145                                 label = "e2600ac:green:usb";
146                                 gpios = <&tlmm 32 GPIO_ACTIVE_LOW>;
147                                 trigger-sources = <&usb2_port1>, <&usb3_port1>, <&usb3_port2>;
148                                 linux,default-trigger = "usbport";
149                         };
150
151                         led4 {
152                                 label = "e2600ac:green:ctrl1";
153                                 gpios = <&tlmm 51 GPIO_ACTIVE_LOW>;
154                         };
155
156                         led5 {
157                                 label = "e2600ac:green:ctrl2";
158                                 gpios = <&tlmm 30 GPIO_ACTIVE_LOW>;
159                         };
160
161                         led6 {
162                                 label = "e2600ac:green:ctrl3";
163                                 gpios = <&tlmm 31 GPIO_ACTIVE_LOW>;
164                         };
165                 };
166
167                 keys {
168                         compatible = "gpio-keys";
169
170                         reset {
171                                 label = "reset";
172                                 gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
173                                 linux,code = <KEY_RESTART>;
174                         };
175                 };
176         };
177 };
178
179 &blsp_dma {
180         status = "okay";
181 };
182
183 &cryptobam {
184         status = "okay";
185 };
186
187 &qpic_bam {
188         status = "okay";
189 };
190
191 &tlmm {
192         i2c_0_pins: i2c-0-pinmux {
193                 mux {
194                         pins = "gpio20", "gpio21";
195                         function = "blsp_i2c0";
196                         bias-disable;
197                 };
198         };
199
200         mdio_pins: mdio_pinmux {
201                 mux_1 {
202                         pins = "gpio6";
203                         function = "mdio";
204                         bias-pull-up;
205                 };
206                 mux_2 {
207                         pins = "gpio7";
208                         function = "mdc";
209                         bias-pull-up;
210                 };
211         };
212
213         serial_0_pins: serial0-pinmux {
214                 mux {
215                         pins = "gpio16", "gpio17";
216                         function = "blsp_uart0";
217                         bias-disable;
218                 };
219         };
220
221         serial_1_pins: serial1_pinmux {
222                 mux {
223                         pins = "gpio8", "gpio9";
224                         function = "blsp_uart1";
225                         bias-disable;
226                 };
227         };
228
229         spi_0_pins: spi_0_pinmux {
230                 pinmux {
231                         function = "blsp_spi0";
232                         pins = "gpio13", "gpio14", "gpio15";
233                         drive-strength = <12>;
234                         bias-disable;
235                 };
236                 pinmux_cs {
237                         function = "gpio";
238                         pins = "gpio12";
239                         drive-strength = <2>;
240                         bias-disable;
241                         output-high;
242                 };
243         };
244 };
245
246 &usb3_ss_phy {
247         status = "okay";
248 };
249
250 &usb3_hs_phy {
251         status = "okay";
252 };
253
254 &usb2_hs_phy {
255         status = "okay";
256 };
257
258 &wifi0 {
259         status = "okay";
260         qcom,ath10k-calibration-variant = "Qxwlan-E2600AC";
261 };
262
263 &wifi1 {
264         status = "okay";
265         qcom,ath10k-calibration-variant = "Qxwlan-E2600AC";
266 };