ipq40xx: consolidate DTS files
[oweals/openwrt.git] / target / linux / ipq40xx / files / 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";
26
27         soc {
28                 rng@22000 {
29                         status = "okay";
30                 };
31
32                 mdio@90000 {
33                         status = "okay";
34                 };
35
36                 ess-psgmii@98000 {
37                         status = "okay";
38                 };
39
40                 tcsr@194b000 {
41                         /* select hostmode */
42                         compatible = "qcom,tcsr";
43                         reg = <0x194b000 0x100>;
44                         qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
45                         status = "okay";
46                 };
47
48                 tcsr@1949000 {
49                         compatible = "qcom,tcsr";
50                         reg = <0x1949000 0x100>;
51                         qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
52                 };
53
54                 ess_tcsr@1953000 {
55                         compatible = "qcom,tcsr";
56                         reg = <0x1953000 0x1000>;
57                         qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
58                 };
59
60                 tcsr@1957000 {
61                         compatible = "qcom,tcsr";
62                         reg = <0x1957000 0x100>;
63                         qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
64                 };
65
66                 usb2: usb2@60f8800 {
67                         status = "okay";
68                 };
69
70                 crypto@8e3a000 {
71                         status = "okay";
72                 };
73
74                 watchdog@b017000 {
75                         status = "okay";
76                 };
77
78                 ess-switch@c000000 {
79                         switch_lan_bmp = <0x10>;
80                         switch_wan_bmp = <0x20>;
81
82                         status = "okay";
83                 };
84
85                 edma@c080000 {
86                         status = "okay";
87                 };
88         };
89
90         keys {
91                 compatible = "gpio-keys";
92
93                 reset {
94                         label = "reset";
95                         gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
96                         linux,code = <KEY_RESTART >;
97                 };
98         };
99
100         aliases {
101                 led-boot = &power;
102                 led-failsafe = &power;
103                 led-running = &power;
104                 led-upgrade = &power;
105         };
106
107         leds {
108                 compatible = "gpio-leds";
109
110                 red {
111                         label = "a62:red:status";
112                         gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
113                         linux,default-trigger = "default-off";
114                 };
115
116                 power: green {
117                         label = "a62:green:status";
118                         gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
119                 };
120
121                 blue {
122                         label = "a62:blue:status";
123                         gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
124                         linux,default-trigger = "default-off";
125                 };
126         };
127
128         watchdog {
129                 compatible = "linux,wdt-gpio";
130                 gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
131                 hw_algo = "toggle";
132                 /* hw_margin_ms is actually 300s but driver limits it to 60s */
133                 hw_margin_ms = <60000>;
134                 always-running;
135         };
136 };
137
138 &tlmm {
139         serial_pins: serial_pinmux {
140                 mux {
141                         pins = "gpio16", "gpio17";
142                         function = "blsp_uart0";
143                         bias-disable;
144                 };
145         };
146
147         spi_0_pins: spi_0_pinmux {
148                 pin {
149                         function = "blsp_spi0";
150                         pins = "gpio13", "gpio14", "gpio15";
151                         drive-strength = <12>;
152                         bias-disable;
153                 };
154                 pin_cs {
155                         function = "gpio";
156                         pins = "gpio12";
157                         drive-strength = <2>;
158                         bias-disable;
159                         output-high;
160                 };
161         };
162
163         enable-usb-power {
164                 gpio-hog;
165                 gpios = <58 GPIO_ACTIVE_HIGH>;
166                 output-low;
167                 line-name = "enable USB2 power";
168         };
169 };
170
171 &blsp_dma {
172         status = "okay";
173 };
174
175 &blsp1_spi1 {
176         pinctrl-0 = <&spi_0_pins>;
177         pinctrl-names = "default";
178         status = "okay";
179         cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
180
181         m25p80@0 {
182                 #address-cells = <1>;
183                 #size-cells = <1>;
184                 compatible = "jedec,spi-nor";
185                 reg = <0>;
186                 spi-max-frequency = <24000000>;
187                 /* partitions are passed via bootloader */
188         };
189 };
190
191 &blsp1_uart1 {
192         pinctrl-0 = <&serial_pins>;
193         pinctrl-names = "default";
194         status = "okay";
195 };
196
197 &cryptobam {
198         status = "okay";
199 };
200
201 &gmac0 {
202         qcom,phy_mdio_addr = <3>;
203         qcom,poll_required = <1>;
204         qcom,forced_speed = <1000>;
205         qcom,forced_duplex = <1>;
206         vlan_tag = <1 0x10>;
207 };
208
209 &usb2_hs_phy {
210         status = "okay";
211 };
212
213 &pcie0 {
214         status = "okay";
215         perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
216         wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
217
218         bridge@0,0 {
219                 reg = <0x00000000 0 0 0 0>;
220                 #address-cells = <3>;
221                 #size-cells = <2>;
222                 ranges;
223
224                 wifi2: wifi@1,0 {
225                         compatible = "qcom,ath10k";
226                         status = "okay";
227                         reg = <0x00010000 0 0 0 0>;
228                         qcom,ath10k-calibration-variant = "OM-A62";
229                         ieee80211-freq-limit = <5170000 5350000>;
230                 };
231         };
232 };
233
234 &wifi0 {
235         status = "okay";
236         qcom,ath10k-calibration-variant = "OM-A62";
237 };
238
239 &wifi1 {
240         status = "okay";
241         qcom,ath10k-calibration-variant = "OM-A62";
242         ieee80211-freq-limit = <5470000 5875000>;
243 };