ipq40xx: convert to new LED color/function format where possible
[openwrt/staging/nbd.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4019-pa2200.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2 /* Copyright (c) 2017-2020, Sven Eckelmann <sven@narfation.org>
3 * Copyright (c) 2018, Marek Lindner <marek.lindner@kaiwoo.ai>
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/leds/common.h>
10 #include <dt-bindings/soc/qcom,tcsr.h>
11
12 / {
13 model = "Plasma Cloud PA2200";
14 compatible = "plasmacloud,pa2200";
15
16 soc {
17 rng@22000 {
18 status = "okay";
19 };
20
21 tcsr@1949000 {
22 compatible = "qcom,tcsr";
23 reg = <0x1949000 0x100>;
24 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
25 };
26
27 ess_tcsr@1953000 {
28 compatible = "qcom,tcsr";
29 reg = <0x1953000 0x1000>;
30 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
31 };
32
33 tcsr@1957000 {
34 compatible = "qcom,tcsr";
35 reg = <0x1957000 0x100>;
36 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
37 };
38
39 crypto@8e3a000 {
40 status = "okay";
41 };
42
43 watchdog@b017000 {
44 status = "okay";
45 };
46 };
47
48 keys {
49 compatible = "gpio-keys";
50
51 reset {
52 label = "reset";
53 gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
54 linux,code = <KEY_RESTART >;
55 };
56 };
57
58 aliases {
59 led-boot = &led_power_orange;
60 led-failsafe = &led_status_blue;
61 led-running = &led_power_orange;
62 led-upgrade = &led_status_blue;
63 label-mac-device = &swport4;
64 };
65
66 leds {
67 compatible = "gpio-leds";
68
69 led_power_orange: power_orange {
70 function = LED_FUNCTION_POWER;
71 color = <LED_COLOR_ID_ORANGE>;
72 gpios = <&tlmm 43 GPIO_ACTIVE_LOW>;
73 };
74
75 2g_blue {
76 label = "blue:2g";
77 gpios = <&tlmm 46 GPIO_ACTIVE_LOW>;
78 linux,default-trigger = "phy1tpt";
79 };
80
81 2g_green {
82 label = "green:5g1";
83 gpios = <&tlmm 47 GPIO_ACTIVE_LOW>;
84 linux,default-trigger = "phy0tpt";
85 };
86
87 5g2_green {
88 label = "green:5g2";
89 gpios = <&tlmm 48 GPIO_ACTIVE_LOW>;
90 linux,default-trigger = "phy2tpt";
91 };
92
93 led_status_blue: status_blue {
94 function = LED_FUNCTION_STATUS;
95 color = <LED_COLOR_ID_BLUE>;
96 gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
97 };
98 };
99 };
100
101 &tlmm {
102 serial_pins: serial_pinmux {
103 mux {
104 pins = "gpio16", "gpio17";
105 function = "blsp_uart0";
106 bias-disable;
107 };
108 };
109
110 spi_0_pins: spi_0_pinmux {
111 pin {
112 function = "blsp_spi0";
113 pins = "gpio13", "gpio14", "gpio15";
114 drive-strength = <12>;
115 bias-disable;
116 };
117 pin_cs {
118 function = "gpio";
119 pins = "gpio12";
120 drive-strength = <2>;
121 bias-disable;
122 output-high;
123 };
124 };
125 };
126
127 &blsp_dma {
128 status = "okay";
129 };
130
131 &blsp1_spi1 {
132 pinctrl-0 = <&spi_0_pins>;
133 pinctrl-names = "default";
134 status = "okay";
135 cs-gpios = <&tlmm 12 GPIO_ACTIVE_HIGH>;
136
137 flash@0 {
138 #address-cells = <1>;
139 #size-cells = <1>;
140 compatible = "jedec,spi-nor";
141 reg = <0>;
142 spi-max-frequency = <24000000>;
143
144 /* partitions are passed via bootloader */
145 partitions {
146 partition-art {
147 label = "0:ART";
148
149 nvmem-layout {
150 compatible = "fixed-layout";
151 #address-cells = <1>;
152 #size-cells = <1>;
153
154 macaddr_gmac0: macaddr@0 {
155 reg = <0x0 0x6>;
156 };
157
158 macaddr_gmac1: macaddr@6 {
159 reg = <0x6 0x6>;
160 };
161
162 precal_art_1000: precal@1000 {
163 reg = <0x1000 0x2f20>;
164 };
165
166 precal_art_5000: precal@5000 {
167 reg = <0x5000 0x2f20>;
168 };
169
170 precal_art_9000: precal@9000 {
171 reg = <0x9000 0x2f20>;
172 };
173 };
174 };
175 };
176 };
177 };
178
179 &blsp1_uart1 {
180 pinctrl-0 = <&serial_pins>;
181 pinctrl-names = "default";
182 status = "okay";
183 };
184
185 &cryptobam {
186 status = "okay";
187 };
188
189 &pcie0 {
190 status = "okay";
191 perst-gpio = <&tlmm 38 GPIO_ACTIVE_LOW>;
192 wake-gpio = <&tlmm 50 GPIO_ACTIVE_LOW>;
193
194 bridge@0,0 {
195 reg = <0x00000000 0 0 0 0>;
196 #address-cells = <3>;
197 #size-cells = <2>;
198 ranges;
199
200 wifi2: wifi@1,0 {
201 compatible = "qcom,ath10k";
202 status = "okay";
203 reg = <0x00010000 0 0 0 0>;
204 qcom,ath10k-calibration-variant = "PlasmaCloud-PA2200";
205 ieee80211-freq-limit = <5170000 5350000>;
206
207 nvmem-cell-names = "pre-calibration";
208 nvmem-cells = <&precal_art_9000>;
209 };
210 };
211 };
212
213 &mdio {
214 status = "okay";
215 };
216
217 &gmac {
218 status = "okay";
219 };
220
221 &switch {
222 status = "okay";
223 };
224
225 &swport4 {
226 status = "okay";
227 label = "ethernet1";
228
229 nvmem-cell-names = "mac-address";
230 nvmem-cells = <&macaddr_gmac0>;
231 };
232
233 &swport5 {
234 status = "okay";
235 label = "ethernet2";
236
237 nvmem-cell-names = "mac-address";
238 nvmem-cells = <&macaddr_gmac1>;
239 };
240
241 &wifi0 {
242 status = "okay";
243 qcom,ath10k-calibration-variant = "PlasmaCloud-PA2200";
244
245 nvmem-cell-names = "pre-calibration";
246 nvmem-cells = <&precal_art_1000>;
247 };
248
249 &wifi1 {
250 status = "okay";
251 qcom,ath10k-calibration-variant = "PlasmaCloud-PA2200";
252 ieee80211-freq-limit = <5470000 5875000>;
253
254 nvmem-cell-names = "pre-calibration";
255 nvmem-cells = <&precal_art_5000>;
256 };