ipq40xx: Convert openmesh,a62 to DSA
[openwrt/staging/lynxis.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4019-a62.dts
1 // SPDX-License-Identifier: ISC
2 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
3 * Copyright (c) 2017-2018, Sven Eckelmann <sven.eckelmann@openmesh.com>
4 */
5
6 #include "qcom-ipq4019.dtsi"
7 #include <dt-bindings/gpio/gpio.h>
8 #include <dt-bindings/input/input.h>
9 #include <dt-bindings/soc/qcom,tcsr.h>
10
11 / {
12 model = "OpenMesh A62";
13 compatible = "openmesh,a62";
14
15 soc {
16 rng@22000 {
17 status = "okay";
18 };
19
20 tcsr@194b000 {
21 /* select hostmode */
22 compatible = "qcom,tcsr";
23 reg = <0x194b000 0x100>;
24 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
25 status = "okay";
26 };
27
28 tcsr@1949000 {
29 compatible = "qcom,tcsr";
30 reg = <0x1949000 0x100>;
31 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
32 };
33
34 ess_tcsr@1953000 {
35 compatible = "qcom,tcsr";
36 reg = <0x1953000 0x1000>;
37 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
38 };
39
40 tcsr@1957000 {
41 compatible = "qcom,tcsr";
42 reg = <0x1957000 0x100>;
43 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
44 };
45
46 usb2: usb2@60f8800 {
47 status = "okay";
48 };
49
50 crypto@8e3a000 {
51 status = "okay";
52 };
53
54 watchdog@b017000 {
55 status = "okay";
56 };
57 };
58
59 keys {
60 compatible = "gpio-keys";
61
62 reset {
63 label = "reset";
64 gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
65 linux,code = <KEY_RESTART >;
66 };
67 };
68
69 aliases {
70 led-boot = &led_status_green;
71 led-failsafe = &led_status_green;
72 led-running = &led_status_green;
73 led-upgrade = &led_status_green;
74 };
75
76 leds {
77 compatible = "gpio-leds";
78
79 status_red {
80 label = "red:status";
81 gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
82 };
83
84 led_status_green: status_green {
85 label = "green:status";
86 gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
87 };
88
89 status_blue {
90 label = "blue:status";
91 gpios = <&tlmm 46 GPIO_ACTIVE_HIGH>;
92 };
93 };
94
95 watchdog {
96 compatible = "linux,wdt-gpio";
97 gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
98 hw_algo = "toggle";
99 /* hw_margin_ms is actually 300s but driver limits it to 60s */
100 hw_margin_ms = <60000>;
101 always-running;
102 };
103 };
104
105 &tlmm {
106 serial_pins: serial_pinmux {
107 mux {
108 pins = "gpio16", "gpio17";
109 function = "blsp_uart0";
110 bias-disable;
111 };
112 };
113
114 spi_0_pins: spi_0_pinmux {
115 pin {
116 function = "blsp_spi0";
117 pins = "gpio13", "gpio14", "gpio15";
118 drive-strength = <12>;
119 bias-disable;
120 };
121 pin_cs {
122 function = "gpio";
123 pins = "gpio12";
124 drive-strength = <2>;
125 bias-disable;
126 output-high;
127 };
128 };
129
130 enable-usb-power {
131 gpio-hog;
132 gpios = <58 GPIO_ACTIVE_HIGH>;
133 output-low;
134 line-name = "enable USB2 power";
135 };
136 };
137
138 &blsp_dma {
139 status = "okay";
140 };
141
142 &blsp1_spi1 {
143 pinctrl-0 = <&spi_0_pins>;
144 pinctrl-names = "default";
145 status = "okay";
146 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
147
148 flash@0 {
149 #address-cells = <1>;
150 #size-cells = <1>;
151 compatible = "jedec,spi-nor";
152 reg = <0>;
153 spi-max-frequency = <24000000>;
154 /* partitions are passed via bootloader */
155 };
156 };
157
158 &blsp1_uart1 {
159 pinctrl-0 = <&serial_pins>;
160 pinctrl-names = "default";
161 status = "okay";
162 };
163
164 &cryptobam {
165 status = "okay";
166 };
167
168 &usb2_hs_phy {
169 status = "okay";
170 };
171
172 &pcie0 {
173 status = "okay";
174 perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
175 wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
176
177 bridge@0,0 {
178 reg = <0x00000000 0 0 0 0>;
179 #address-cells = <3>;
180 #size-cells = <2>;
181 ranges;
182
183 wifi2: wifi@1,0 {
184 compatible = "qcom,ath10k";
185 status = "okay";
186 reg = <0x00010000 0 0 0 0>;
187 qcom,ath10k-calibration-variant = "OM-A62";
188 ieee80211-freq-limit = <5170000 5350000>;
189 };
190 };
191 };
192
193 &mdio {
194 status = "okay";
195 };
196
197 &gmac {
198 status = "okay";
199 };
200
201 &switch {
202 status = "okay";
203 };
204
205 &swport4 {
206 status = "okay";
207 label = "ethernet1";
208 };
209
210 &swport5 {
211 status = "okay";
212 label = "ethernet2";
213 };
214
215 &wifi0 {
216 status = "okay";
217 qcom,ath10k-calibration-variant = "OM-A62";
218 };
219
220 &wifi1 {
221 status = "okay";
222 qcom,ath10k-calibration-variant = "OM-A62";
223 ieee80211-freq-limit = <5470000 5875000>;
224 };