ipq40xx: add MikroTik LHGG-60ad outdoor 802.11ad (60GHz) dish
[openwrt/staging/chunkeey.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4019-lhgg-60ad.dts
1 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2 * Copyright (c) 2019, Robert Marko <robimarko@gmail.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 = "Mikrotik Wireless Wire Dish LHGG-60ad";
25 compatible = "mikrotik,lhgg-60ad";
26
27 memory {
28 device_type = "memory";
29 reg = <0x80000000 0x10000000>;
30 };
31
32 chosen {
33 stdout-path = "serial0:115200n8";
34 };
35
36 aliases {
37 led-boot = &user;
38 led-failsafe = &user;
39 led-running = &user;
40 led-upgrade = &user;
41 };
42
43 soc {
44 rng@22000 {
45 status = "okay";
46 };
47
48 mdio@90000 {
49 status = "okay";
50
51 /delete-node/ ethernet-phy@1;
52 /delete-node/ ethernet-phy@2;
53 /delete-node/ ethernet-phy@3;
54 /delete-node/ ethernet-phy@4;
55 /delete-node/ psgmii-phy@5;
56 };
57
58 counter@4a1000 {
59 compatible = "qcom,qca-gcnt";
60 reg = <0x4a1000 0x4>;
61 };
62
63 tcsr@1949000 {
64 compatible = "qcom,tcsr";
65 reg = <0x1949000 0x100>;
66 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
67 };
68
69 ess_tcsr@1953000 {
70 compatible = "qcom,tcsr";
71 reg = <0x1953000 0x1000>;
72 qcom,ess-interface-select = <TCSR_ESS_PSGMII_RGMII5>;
73 };
74
75 tcsr@1957000 {
76 compatible = "qcom,tcsr";
77 reg = <0x1957000 0x100>;
78 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
79 };
80
81 crypto@8e3a000 {
82 status = "okay";
83 };
84
85 watchdog@b017000 {
86 status = "okay";
87 };
88
89 ess-switch@c000000 {
90 switch_mac_mode = <0x3>; /* mac mode for RGMII RMII */
91 switch_lan_bmp = <0x0>; /* lan port bitmap */
92 switch_wan_bmp = <0x10>; /* wan port bitmap */
93 };
94
95 edma@c080000 {
96 status = "okay";
97 phy-mode = "rgmii-id";
98 qcom,num_gmac = <1>;
99 qcom,single-phy;
100 };
101 };
102
103 keys {
104 compatible = "gpio-keys";
105
106 reset {
107 label = "reset";
108 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
109 linux,code = <KEY_RESTART>;
110 };
111 };
112
113 leds {
114 compatible = "gpio-leds";
115
116 power: power {
117 label = "blue:power";
118 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
119 default-state = "keep";
120 panic-indicator;
121 };
122
123 user: user {
124 label = "yellow:user";
125 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
126 };
127
128 wlan {
129 label = "green:wlan";
130 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
131 };
132
133 align-left {
134 label = "green:align-left";
135 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
136 };
137
138 align-right {
139 label = "green:align-right";
140 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
141 };
142
143 wlan-rx {
144 label = "green:align-down";
145 gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
146 };
147
148 wlan-tx {
149 label = "green:align-up";
150 gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
151 };
152 };
153 };
154
155 &tlmm {
156 serial_pins: serial_pinmux {
157 mux {
158 pins = "gpio60", "gpio61";
159 function = "blsp_uart0";
160 bias-disable;
161 };
162 };
163
164 spi_0_pins: spi-0-pinmux {
165 pinmux {
166 function = "blsp_spi0";
167 pins = "gpio13", "gpio14", "gpio15";
168 bias-disable;
169 };
170
171 pinmux_cs {
172 function = "gpio";
173 pins = "gpio12";
174 bias-disable;
175 output-high;
176 };
177 };
178 };
179
180 &blsp_dma {
181 status = "okay";
182 };
183
184 &blsp1_spi1 {
185 pinctrl-0 = <&spi_0_pins>;
186 pinctrl-names = "default";
187 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
188 status = "okay";
189
190 m25p80@0 {
191 reg = <0>;
192 compatible = "jedec,spi-nor";
193 spi-max-frequency = <24000000>;
194
195 partitions {
196 compatible = "fixed-partitions";
197 #address-cells = <1>;
198 #size-cells = <1>;
199
200 partition@0 {
201 label = "Qualcomm";
202 reg = <0x0 0x80000>;
203 read-only;
204 };
205
206 partition@80000 {
207 compatible = "mikrotik,routerboot-partitions";
208 #address-cells = <1>;
209 #size-cells = <1>;
210 label = "RouterBoot";
211 reg = <0x80000 0x80000>;
212 read-only;
213
214 hard_config {
215 read-only;
216 size = <0x2000>;
217 };
218
219 dtb_config {
220 read-only;
221 };
222
223 soft_config {
224 };
225 };
226
227 partition@100000 {
228 compatible = "mikrotik,minor";
229 label = "firmware";
230 reg = <0x100000 0xf00000>;
231 };
232 };
233 };
234 };
235
236 &blsp1_uart1 {
237 pinctrl-0 = <&serial_pins>;
238 pinctrl-names = "default";
239 status = "okay";
240 };
241
242 &cryptobam {
243 status = "okay";
244 };
245
246 &pcie0 {
247 status = "okay";
248 perst-gpio = <&tlmm 42 GPIO_ACTIVE_HIGH>;
249
250 bridge@0,0 {
251 reg = <0x00000000 0 0 0 0>;
252 #address-cells = <3>;
253 #size-cells = <2>;
254 ranges;
255
256 /* wil6210 802.11ad card */
257 wifi: wifi@1,0 {
258 status = "okay";
259 /* wil6210 driver has no compatible */
260 reg = <0x00010000 0 0 0 0>;
261 };
262 };
263 };
264
265 &gmac0 {
266 qcom,phy_mdio_addr = <0>;
267 qcom,poll_required = <1>;
268 vlan_tag = <0 0x20>;
269 };