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