ipq40xx: convert GL-AP1300 to DSA
[openwrt/staging/dedeckeh.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
52 counter@4a1000 {
53 compatible = "qcom,qca-gcnt";
54 reg = <0x4a1000 0x4>;
55 };
56
57 tcsr@1949000 {
58 compatible = "qcom,tcsr";
59 reg = <0x1949000 0x100>;
60 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
61 };
62
63 ess_tcsr@1953000 {
64 compatible = "qcom,tcsr";
65 reg = <0x1953000 0x1000>;
66 qcom,ess-interface-select = <TCSR_ESS_PSGMII_RGMII5>;
67 };
68
69 tcsr@1957000 {
70 compatible = "qcom,tcsr";
71 reg = <0x1957000 0x100>;
72 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
73 };
74
75 crypto@8e3a000 {
76 status = "okay";
77 };
78
79 watchdog@b017000 {
80 status = "okay";
81 };
82 };
83
84 keys {
85 compatible = "gpio-keys";
86
87 reset {
88 label = "reset";
89 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
90 linux,code = <KEY_RESTART>;
91 };
92 };
93
94 leds {
95 compatible = "gpio-leds";
96
97 power: power {
98 label = "blue:power";
99 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
100 default-state = "keep";
101 panic-indicator;
102 };
103
104 user: user {
105 label = "yellow:user";
106 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
107 };
108
109 wlan {
110 label = "green:wlan";
111 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
112 };
113
114 align-left {
115 label = "green:align-left";
116 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
117 };
118
119 align-right {
120 label = "green:align-right";
121 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
122 };
123
124 wlan-rx {
125 label = "green:align-down";
126 gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
127 };
128
129 wlan-tx {
130 label = "green:align-up";
131 gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
132 };
133 };
134 };
135
136 &tlmm {
137 serial_pins: serial_pinmux {
138 mux {
139 pins = "gpio60", "gpio61";
140 function = "blsp_uart0";
141 bias-disable;
142 };
143 };
144
145 spi_0_pins: spi-0-pinmux {
146 pinmux {
147 function = "blsp_spi0";
148 pins = "gpio13", "gpio14", "gpio15";
149 bias-disable;
150 };
151
152 pinmux_cs {
153 function = "gpio";
154 pins = "gpio12";
155 bias-disable;
156 output-high;
157 };
158 };
159 };
160
161 &blsp_dma {
162 status = "okay";
163 };
164
165 &blsp1_spi1 {
166 pinctrl-0 = <&spi_0_pins>;
167 pinctrl-names = "default";
168 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
169 status = "okay";
170
171 m25p80@0 {
172 reg = <0>;
173 compatible = "jedec,spi-nor";
174 spi-max-frequency = <24000000>;
175
176 partitions {
177 compatible = "fixed-partitions";
178 #address-cells = <1>;
179 #size-cells = <1>;
180
181 partition@0 {
182 label = "Qualcomm";
183 reg = <0x0 0x80000>;
184 read-only;
185 };
186
187 partition@80000 {
188 compatible = "mikrotik,routerboot-partitions";
189 #address-cells = <1>;
190 #size-cells = <1>;
191 label = "RouterBoot";
192 reg = <0x80000 0x80000>;
193
194 hard_config {
195 read-only;
196 size = <0x2000>;
197 };
198
199 dtb_config {
200 read-only;
201 };
202
203 soft_config {
204 };
205 };
206
207 partition@100000 {
208 compatible = "mikrotik,minor";
209 label = "firmware";
210 reg = <0x100000 0xf00000>;
211 };
212 };
213 };
214 };
215
216 &blsp1_uart1 {
217 pinctrl-0 = <&serial_pins>;
218 pinctrl-names = "default";
219 status = "okay";
220 };
221
222 &cryptobam {
223 status = "okay";
224 };
225
226 &pcie0 {
227 status = "okay";
228 perst-gpio = <&tlmm 42 GPIO_ACTIVE_HIGH>;
229
230 bridge@0,0 {
231 reg = <0x00000000 0 0 0 0>;
232 #address-cells = <3>;
233 #size-cells = <2>;
234 ranges;
235
236 /* wil6210 802.11ad card */
237 wifi: wifi@1,0 {
238 status = "okay";
239 /* wil6210 driver has no compatible */
240 reg = <0x00010000 0 0 0 0>;
241 };
242 };
243 };
244
245 &ethphy1 {
246 status = "disabled";
247 };
248
249 &ethphy2 {
250 status = "disabled";
251 };
252
253 &ethphy3 {
254 status = "disabled";
255 };
256
257 &ethphy4 {
258 status = "disabled";
259 };
260
261 &psgmiiphy {
262 status = "disabled";
263 };
264
265 &gmac {
266 status = "okay";
267 };
268
269 &switch {
270 status = "okay";
271
272 /delete-property/ psgmii-ethphy;
273 };
274
275 &swport5 {
276 status = "okay";
277
278 label = "lan";
279 phy-handle = <&ethphy0>;
280 phy-mode = "rgmii-id";
281 };