ipq40xx: convert to new LED color/function format where possible
[openwrt/staging/nbd.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-cap-ac.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2020, Robert Marko <robimarko@gmail.com> */
3
4 #include "qcom-ipq4019.dtsi"
5 #include <dt-bindings/gpio/gpio.h>
6 #include <dt-bindings/input/input.h>
7 #include <dt-bindings/leds/common.h>
8 #include <dt-bindings/soc/qcom,tcsr.h>
9
10 / {
11 model = "MikroTik cAP ac";
12 compatible = "mikrotik,cap-ac";
13
14 memory {
15 device_type = "memory";
16 reg = <0x80000000 0x08000000>;
17 };
18
19 chosen {
20 stdout-path = "serial0:115200n8";
21 };
22
23 aliases {
24 led-boot = &led_user;
25 led-failsafe = &led_user;
26 led-running = &led_user;
27 led-upgrade = &led_user;
28 };
29
30 soc {
31 rng@22000 {
32 status = "okay";
33 };
34
35 counter@4a1000 {
36 compatible = "qcom,qca-gcnt";
37 reg = <0x4a1000 0x4>;
38 };
39
40 tcsr@1949000 {
41 compatible = "qcom,tcsr";
42 reg = <0x1949000 0x100>;
43 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
44 };
45
46 ess_tcsr@1953000 {
47 compatible = "qcom,tcsr";
48 reg = <0x1953000 0x1000>;
49 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
50 };
51
52 tcsr@1957000 {
53 compatible = "qcom,tcsr";
54 reg = <0x1957000 0x100>;
55 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
56 };
57
58 crypto@8e3a000 {
59 status = "okay";
60 };
61
62 watchdog@b017000 {
63 status = "okay";
64 };
65 };
66
67 keys {
68 compatible = "gpio-keys";
69
70 reset {
71 label = "reset";
72 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
73 linux,code = <KEY_RESTART>;
74 };
75
76 mode {
77 label = "mode";
78 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
79 linux,code = <KEY_LIGHTS_TOGGLE>;
80 };
81 };
82
83 leds {
84 compatible = "gpio-leds";
85
86 power {
87 function = LED_FUNCTION_POWER;
88 color = <LED_COLOR_ID_BLUE>;
89 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
90 default-state = "keep";
91 };
92
93 led_user: user {
94 label = "green:user";
95 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
96 panic-indicator;
97 };
98
99 wlan2g {
100 label = "green:wlan2g";
101 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
102 };
103
104 wlan5g {
105 label = "green:wlan5g";
106 gpios = <&tlmm 58 GPIO_ACTIVE_HIGH>;
107 };
108
109 eth1 {
110 label = "green:eth1";
111 gpios = <&ethphy4 1 GPIO_ACTIVE_HIGH>;
112 };
113
114 eth2 {
115 label = "green:eth2";
116 gpios = <&ethphy3 1 GPIO_ACTIVE_HIGH>;
117 };
118 };
119 };
120
121 &tlmm {
122 serial_pins: serial_pinmux {
123 mux {
124 pins = "gpio60", "gpio61";
125 function = "blsp_uart0";
126 bias-disable;
127 };
128 };
129
130 spi_0_pins: spi_0_pinmux {
131 pin {
132 function = "blsp_spi0";
133 pins = "gpio55", "gpio56", "gpio57";
134 drive-strength = <2>;
135 bias-disable;
136 };
137 pin_cs {
138 function = "gpio";
139 pins = "gpio54";
140 drive-strength = <2>;
141 bias-disable;
142 output-high;
143 };
144 };
145 };
146
147 &blsp_dma {
148 status = "okay";
149 };
150
151 &blsp1_spi1 {
152 status = "okay";
153
154 pinctrl-0 = <&spi_0_pins>;
155 pinctrl-names = "default";
156 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
157
158 flash@0 {
159 reg = <0>;
160 compatible = "jedec,spi-nor";
161 spi-max-frequency = <40000000>;
162
163 partitions {
164 compatible = "fixed-partitions";
165 #address-cells = <1>;
166 #size-cells = <1>;
167
168 partition@0 {
169 label = "Qualcomm";
170 reg = <0x0 0x80000>;
171 read-only;
172 };
173
174 partition@80000 {
175 compatible = "mikrotik,routerboot-partitions";
176 #address-cells = <1>;
177 #size-cells = <1>;
178 label = "RouterBoot";
179 reg = <0x80000 0x80000>;
180
181 hard_config {
182 read-only;
183 };
184
185 dtb_config {
186 read-only;
187 };
188
189 soft_config {
190 };
191 };
192
193 partition@100000 {
194 compatible = "mikrotik,minor";
195 label = "firmware";
196 reg = <0x100000 0xf00000>;
197 };
198 };
199 };
200 };
201
202 &blsp1_uart1 {
203 status = "okay";
204
205 pinctrl-0 = <&serial_pins>;
206 pinctrl-names = "default";
207 };
208
209 &cryptobam {
210 status = "okay";
211 };
212
213 &mdio {
214 status = "okay";
215 };
216
217 &ethphy3 {
218 gpio-controller;
219 #gpio-cells = <2>;
220 };
221
222 &ethphy4 {
223 gpio-controller;
224 #gpio-cells = <2>;
225 };
226
227 &gmac {
228 status = "okay";
229 };
230
231 &switch {
232 status = "okay";
233 };
234
235 &swport4 {
236 status = "okay";
237
238 label = "lan";
239 };
240
241 &swport5 {
242 status = "okay";
243 };
244
245 &wifi0 {
246 status = "okay";
247
248 qcom,ath10k-calibration-variant = "MikroTik-cAP-ac";
249 };
250
251 &wifi1 {
252 status = "okay";
253
254 qcom,ath10k-calibration-variant = "MikroTik-cAP-ac";
255 };