ipq40xx: Add files for 4.19
[oweals/openwrt.git] / target / linux / ipq40xx / files-4.19 / arch / arm / boot / dts / qcom-ipq4019-a62.dts
1 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2  * Copyright (c) 2017-2018, Sven Eckelmann <sven.eckelmann@openmesh.com>
3  *
4  * Permission to use, copy, modify, and/or distribute this software for any
5  * purpose with or without fee is hereby granted, provided that the above
6  * copyright notice and this permission notice appear in all copies.
7  *
8  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
9  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
10  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
11  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
12  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
13  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
14  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
15  *
16  */
17
18 #include "qcom-ipq4019.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 = "OpenMesh A62";
25         compatible = "openmesh,a62", "qcom,ipq4019";
26
27         soc {
28                 mdio@90000 {
29                         status = "okay";
30                 };
31
32                 ess-psgmii@98000 {
33                         status = "okay";
34                 };
35
36                 tcsr@194b000 {
37                         /* select hostmode */
38                         compatible = "qcom,tcsr";
39                         reg = <0x194b000 0x100>;
40                         qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
41                         status = "okay";
42                 };
43
44                 tcsr@1949000 {
45                         compatible = "qcom,tcsr";
46                         reg = <0x1949000 0x100>;
47                         qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
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: usb2@60f8800 {
63                         status = "okay";
64                 };
65
66                 crypto@8e3a000 {
67                         status = "okay";
68                 };
69
70                 watchdog@b017000 {
71                         status = "okay";
72                 };
73
74                 ess-switch@c000000 {
75                         switch_lan_bmp = <0x10>;
76                         switch_wan_bmp = <0x20>;
77
78                         status = "okay";
79                 };
80
81                 edma@c080000 {
82                         status = "okay";
83                 };
84         };
85
86         gpio-keys {
87                 compatible = "gpio-keys";
88
89                 reset {
90                         label = "reset";
91                         gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
92                         linux,code = <KEY_RESTART >;
93                 };
94         };
95
96         aliases {
97                 led-boot = &power;
98                 led-failsafe = &power;
99                 led-running = &power;
100                 led-upgrade = &power;
101         };
102
103         gpio-leds {
104                 compatible = "gpio-leds";
105
106                 red {
107                         label = "a62:red:status";
108                         gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
109                         linux,default-trigger = "default-off";
110                 };
111
112                 power: green {
113                         label = "a62:green:status";
114                         gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
115                 };
116
117                 blue {
118                         label = "a62:blue:status";
119                         gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
120                         linux,default-trigger = "default-off";
121                 };
122         };
123
124         watchdog {
125                 compatible = "linux,wdt-gpio";
126                 gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
127                 hw_algo = "toggle";
128                 /* hw_margin_ms is actually 300s but driver limits it to 60s */
129                 hw_margin_ms = <60000>;
130                 always-running;
131         };
132 };
133
134 &tlmm {
135         serial_pins: serial_pinmux {
136                 mux {
137                         pins = "gpio16", "gpio17";
138                         function = "blsp_uart0";
139                         bias-disable;
140                 };
141         };
142
143         spi_0_pins: spi_0_pinmux {
144                 pin {
145                         function = "blsp_spi0";
146                         pins = "gpio13", "gpio14", "gpio15";
147                         drive-strength = <12>;
148                         bias-disable;
149                 };
150                 pin_cs {
151                         function = "gpio";
152                         pins = "gpio12";
153                         drive-strength = <2>;
154                         bias-disable;
155                         output-high;
156                 };
157         };
158
159         enable-usb-power {
160                 gpio-hog;
161                 gpios = <58 GPIO_ACTIVE_HIGH>;
162                 output-low;
163                 line-name = "enable USB2 power";
164         };
165 };
166
167 &blsp_dma {
168         status = "okay";
169 };
170
171 &blsp1_spi1 {
172         pinctrl-0 = <&spi_0_pins>;
173         pinctrl-names = "default";
174         status = "okay";
175         cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
176
177         m25p80@0 {
178                 #address-cells = <1>;
179                 #size-cells = <1>;
180                 compatible = "jedec,spi-nor";
181                 reg = <0>;
182                 spi-max-frequency = <24000000>;
183                 /* partitions are passed via bootloader */
184         };
185 };
186
187 &blsp1_uart1 {
188         pinctrl-0 = <&serial_pins>;
189         pinctrl-names = "default";
190         status = "okay";
191 };
192
193 &cryptobam {
194         status = "okay";
195 };
196
197 &gmac0 {
198         qcom,phy_mdio_addr = <3>;
199         qcom,poll_required = <1>;
200         qcom,forced_speed = <1000>;
201         qcom,forced_duplex = <1>;
202         vlan_tag = <1 0x10>;
203 };
204
205 &usb2_hs_phy {
206         status = "okay";
207 };
208
209 &pcie0 {
210         status = "okay";
211         perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
212         wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
213
214         bridge@0,0 {
215                 reg = <0x00000000 0 0 0 0>;
216                 #address-cells = <3>;
217                 #size-cells = <2>;
218                 ranges;
219
220                 wifi2: wifi@0,0 {
221                         compatible = "qcom,ath10k";
222                         status = "okay";
223                         reg = <0x00010000 0 0 0 0>;
224                         qcom,ath10k-calibration-variant = "OM-A62";
225                         ieee80211-freq-limit = <5170000 5350000>;
226                 };
227         };
228 };
229
230 &wifi0 {
231         status = "okay";
232         qcom,ath10k-calibration-variant = "OM-A62";
233 };
234
235 &wifi1 {
236         status = "okay";
237         qcom,ath10k-calibration-variant = "OM-A62";
238         ieee80211-freq-limit = <5470000 5875000>;
239 };