ipq40xx: add target
[openwrt/openwrt.git] / target / linux / ipq40xx / files-4.14 / arch / arm / boot / dts / qcom-ipq4019-a42.dts
1 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2 * Copyright (c) 2017, 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 "qcom-ipq4019-bus.dtsi"
20 #include <dt-bindings/gpio/gpio.h>
21 #include <dt-bindings/input/input.h>
22 #include <dt-bindings/soc/qcom,tcsr.h>
23
24 / {
25 model = "OpenMesh A42";
26 compatible = "openmesh,a42", "qcom,ipq4019";
27
28 reserved-memory {
29 #address-cells = <0x1>;
30 #size-cells = <0x1>;
31 ranges;
32
33 rsvd1@87000000 {
34 reg = <0x87000000 0x500000>;
35 no-map;
36 };
37
38 wifi_dump@87500000 {
39 reg = <0x87500000 0x600000>;
40 no-map;
41 };
42
43 rsvd2@87B00000 {
44 reg = <0x87b00000 0x500000>;
45 no-map;
46 };
47 };
48
49 soc {
50 tcsr@194b000 {
51 /* select hostmode */
52 compatible = "qcom,tcsr";
53 reg = <0x194b000 0x100>;
54 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
55 status = "ok";
56 };
57
58 ess_tcsr@1953000 {
59 compatible = "qcom,tcsr";
60 reg = <0x1953000 0x1000>;
61 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
62 };
63
64 tcsr@1949000 {
65 compatible = "qcom,tcsr";
66 reg = <0x1949000 0x100>;
67 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
68 };
69
70 tcsr@1957000 {
71 compatible = "qcom,tcsr";
72 reg = <0x1957000 0x100>;
73 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
74 };
75
76 pinctrl@1000000 {
77 serial_pins: serial_pinmux {
78 mux {
79 pins = "gpio60", "gpio61";
80 function = "blsp_uart0";
81 bias-disable;
82 };
83 };
84
85 spi_0_pins: spi_0_pinmux {
86 pinmux {
87 function = "blsp_spi0";
88 pins = "gpio55", "gpio56", "gpio57";
89 };
90 pinmux_cs {
91 function = "gpio";
92 pins = "gpio54";
93 };
94 pinconf {
95 pins = "gpio55", "gpio56", "gpio57";
96 drive-strength = <12>;
97 bias-disable;
98 };
99 pinconf_cs {
100 pins = "gpio54";
101 drive-strength = <2>;
102 bias-disable;
103 output-high;
104 };
105 };
106 };
107
108 blsp_dma: dma@7884000 {
109 status = "ok";
110 };
111
112 spi_0: spi@78b5000 {
113 pinctrl-0 = <&spi_0_pins>;
114 pinctrl-names = "default";
115 status = "ok";
116 cs-gpios = <&tlmm 54 0>;
117
118 m25p80@0 {
119 #address-cells = <1>;
120 #size-cells = <1>;
121 compatible = "jedec,spi-nor";
122 reg = <0>;
123 spi-max-frequency = <24000000>;
124
125 /* partitions are passed via bootloader */
126 };
127 };
128
129 serial@78af000 {
130 pinctrl-0 = <&serial_pins>;
131 pinctrl-names = "default";
132 status = "ok";
133 };
134
135 cryptobam: dma@8e04000 {
136 status = "ok";
137 };
138
139 crypto@8e3a000 {
140 status = "ok";
141 };
142
143 watchdog@b017000 {
144 status = "ok";
145 };
146
147 usb2_hs_phy: hsphy@a8000 {
148 status = "ok";
149 };
150
151 usb2: usb2@60f8800 {
152 status = "ok";
153 };
154
155 mdio@90000 {
156 status = "okay";
157 };
158
159 ess-switch@c000000 {
160 status = "okay";
161 };
162
163 ess-psgmii@98000 {
164 status = "okay";
165 };
166
167 edma@c080000 {
168 status = "okay";
169 };
170
171 wifi@a000000 {
172 status = "okay";
173 qcom,ath10k-calibration-variant = "OM-A42";
174 };
175
176 wifi@a800000 {
177 status = "okay";
178 qcom,ath10k-calibration-variant = "OM-A42";
179 };
180 };
181
182 gpio-keys {
183 compatible = "gpio-keys";
184
185 reset {
186 label = "reset";
187 gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
188 linux,code = <KEY_RESTART>;
189 };
190 };
191
192 aliases {
193 led-boot = &power;
194 led-failsafe = &power;
195 led-running = &power;
196 led-upgrade = &power;
197 };
198
199 gpio-leds {
200 compatible = "gpio-leds";
201
202 red {
203 label = "a42:red:status";
204 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
205 linux,default-trigger = "default-off";
206 };
207
208 power: green {
209 label = "a42:green:status";
210 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
211 };
212
213 blue {
214 label = "a42:blue:status";
215 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
216 linux,default-trigger = "default-off";
217 };
218 };
219
220 watchdog {
221 compatible = "linux,wdt-gpio";
222 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
223 hw_algo = "toggle";
224 /* hw_margin_ms is actually 300s but driver limits it to 60s */
225 hw_margin_ms = <60000>;
226 always-running;
227 };
228 };
229
230 &gmac0 {
231 qcom,phy_mdio_addr = <4>;
232 qcom,poll_required = <1>;
233 qcom,forced_speed = <1000>;
234 qcom,forced_duplex = <1>;
235 vlan_tag = <2 0x20>;
236 };
237
238 &gmac1 {
239 qcom,phy_mdio_addr = <3>;
240 qcom,poll_required = <1>;
241 qcom,forced_speed = <1000>;
242 qcom,forced_duplex = <1>;
243 vlan_tag = <1 0x10>;
244 };