4c1e1de24c3a4c47a6ea27cab88e21a23b9ad376
[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 <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 A42";
25 compatible = "openmesh,a42", "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 serial@78af000 {
67 pinctrl-0 = <&serial_pins>;
68 pinctrl-names = "default";
69 status = "okay";
70 };
71
72 crypto@8e3a000 {
73 status = "okay";
74 };
75
76 watchdog@b017000 {
77 status = "okay";
78 };
79
80 ess-switch@c000000 {
81 status = "okay";
82 };
83
84 edma@c080000 {
85 status = "okay";
86 };
87 };
88
89 gpio-keys {
90 compatible = "gpio-keys";
91
92 reset {
93 label = "reset";
94 gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
95 linux,code = <KEY_RESTART>;
96 };
97 };
98
99 aliases {
100 led-boot = &power;
101 led-failsafe = &power;
102 led-running = &power;
103 led-upgrade = &power;
104 };
105
106 gpio-leds {
107 compatible = "gpio-leds";
108
109 red {
110 label = "a42:red:status";
111 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
112 linux,default-trigger = "default-off";
113 };
114
115 power: green {
116 label = "a42:green:status";
117 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
118 };
119
120 blue {
121 label = "a42:blue:status";
122 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
123 linux,default-trigger = "default-off";
124 };
125 };
126
127 watchdog {
128 compatible = "linux,wdt-gpio";
129 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
130 hw_algo = "toggle";
131 /* hw_margin_ms is actually 300s but driver limits it to 60s */
132 hw_margin_ms = <60000>;
133 always-running;
134 };
135 };
136
137 &tlmm {
138 serial_pins: serial_pinmux {
139 mux {
140 pins = "gpio60", "gpio61";
141 function = "blsp_uart0";
142 bias-disable;
143 };
144 };
145
146 spi_0_pins: spi_0_pinmux {
147 pin {
148 function = "blsp_spi0";
149 pins = "gpio55", "gpio56", "gpio57";
150 drive-strength = <12>;
151 bias-disable;
152 };
153 pin_cs {
154 function = "gpio";
155 pins = "gpio54";
156 drive-strength = <2>;
157 bias-disable;
158 output-high;
159 };
160 };
161 };
162
163 &blsp_dma {
164 status = "okay";
165 };
166
167 &blsp1_spi1 {
168 pinctrl-0 = <&spi_0_pins>;
169 pinctrl-names = "default";
170 status = "okay";
171 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
172
173 m25p80@0 {
174 #address-cells = <1>;
175 #size-cells = <1>;
176 compatible = "jedec,spi-nor";
177 reg = <0>;
178 spi-max-frequency = <24000000>;
179 /* partitions are passed via bootloader */
180 };
181 };
182
183 &cryptobam {
184 status = "okay";
185 };
186
187 &gmac0 {
188 qcom,phy_mdio_addr = <4>;
189 qcom,poll_required = <1>;
190 qcom,forced_speed = <1000>;
191 qcom,forced_duplex = <1>;
192 vlan_tag = <2 0x20>;
193 };
194
195 &gmac1 {
196 qcom,phy_mdio_addr = <3>;
197 qcom,poll_required = <1>;
198 qcom,forced_speed = <1000>;
199 qcom,forced_duplex = <1>;
200 vlan_tag = <1 0x10>;
201 };
202
203 &usb2_hs_phy {
204 status = "okay";
205 };
206
207 &wifi0 {
208 status = "okay";
209 qcom,ath10k-calibration-variant = "OM-A42";
210 };
211
212 &wifi1 {
213 status = "okay";
214 qcom,ath10k-calibration-variant = "OM-A42";
215 };