ipq40xx: convert to new LED color/function format where possible
[openwrt/staging/jow.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-magic-2-wifi-next.dts
1 // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
2
3 #include "qcom-ipq4019.dtsi"
4 #include <dt-bindings/gpio/gpio.h>
5 #include <dt-bindings/input/input.h>
6 #include <dt-bindings/leds/common.h>
7
8 / {
9 model = "devolo Magic 2 WiFi next";
10 compatible = "devolo,magic-2-wifi-next";
11
12 memory {
13 device_type = "memory";
14 reg = <0x80000000 0x10000000>;
15 };
16
17 soc {
18 rng@22000 {
19 status = "okay";
20 };
21
22 mdio@90000 {
23 status = "okay";
24 pinctrl-0 = <&mdio_pins>;
25 pinctrl-names = "default";
26 reset-gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
27 reset-delay-us = <2000>;
28 };
29
30 crypto@8e3a000 {
31 status = "okay";
32 };
33
34 watchdog@b017000 {
35 status = "okay";
36 };
37
38 gpio_export {
39 compatible = "gpio-export";
40 #size-cells = <0>;
41
42 plc {
43 gpio-export,name = "plc-enable";
44 gpio-export,output = <1>;
45 gpios = <&tlmm 63 GPIO_ACTIVE_HIGH>;
46 };
47 };
48
49 };
50
51 keys {
52 compatible = "gpio-keys";
53
54 wlan {
55 label = "WLAN";
56 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
57 linux,code = <KEY_WPS_BUTTON>;
58 };
59
60 reset {
61 label = "Reset";
62 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
63 linux,code = <KEY_RESTART>;
64 };
65 };
66
67 leds {
68 compatible = "gpio-leds";
69
70 status_dlan {
71 label = "white:dlan";
72 gpios = <&tlmm 4 GPIO_ACTIVE_LOW>;
73 default-state = "keep";
74 };
75
76 status_wlan {
77 function = LED_FUNCTION_WLAN;
78 color = <LED_COLOR_ID_WHITE>;
79 gpios = <&tlmm 58 GPIO_ACTIVE_LOW>;
80 default-state = "keep";
81 };
82
83 error_dlan {
84 label = "red:dlan";
85 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
86 default-state = "keep";
87 };
88 };
89 };
90
91 &tlmm {
92 spi_0_pins: spi_0_pinmux {
93 mux {
94 function = "blsp_spi0";
95 pins = "gpio55", "gpio56", "gpio57";
96 drive-strength = <12>;
97 bias-disable;
98 };
99
100 mux_cs {
101 function = "gpio";
102 pins = "gpio54";
103 drive-strength = <2>;
104 bias-disable;
105 output-high;
106 };
107 };
108
109 mdio_pins: mdio_pinmux {
110 mux_1 {
111 pins = "gpio53";
112 function = "mdio";
113 bias-pull-up;
114 };
115 mux_2 {
116 pins = "gpio52";
117 function = "mdc";
118 bias-pull-up;
119 };
120 };
121
122 serial_pins: serial_pinmux {
123 mux {
124 pins = "gpio61", "gpio60";
125 function = "blsp_uart0";
126 bias-disable;
127 };
128 };
129
130 button_pins: button_pinmux {
131 mux {
132 function = "gpio";
133 pins = "gpio0", "gpio5";
134 bias-disable;
135 input;
136 };
137 };
138 };
139
140 &cryptobam {
141 status = "okay";
142 };
143
144 &blsp_dma {
145 status = "okay";
146 };
147
148 &blsp1_uart1 {
149 pinctrl-0 = <&serial_pins>;
150 pinctrl-names = "default";
151 status = "okay";
152 };
153
154 &ethphy0 {
155 status = "disabled";
156 };
157
158 &ethphy1 {
159 status = "disabled";
160 };
161
162 &wifi0 {
163 status = "okay";
164 qcom,ath10k-calibration-variant = "devolo,magic-2-wifi-next";
165 };
166
167 &wifi1 {
168 status = "okay";
169 qcom,ath10k-calibration-variant = "devolo,magic-2-wifi-next";
170 };
171
172 &blsp1_spi1 {
173 pinctrl-0 = <&spi_0_pins>;
174 pinctrl-names = "default";
175 status = "okay";
176 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
177
178 flash@0 {
179 compatible = "jedec,spi-nor";
180 reg = <0>;
181 linux,modalias = "n25q128a11";
182 spi-max-frequency = <24000000>;
183
184 partitions {
185 compatible = "fixed-partitions";
186 #address-cells = <1>;
187 #size-cells = <1>;
188
189 partition@0 {
190 label = "SBL1";
191 reg = <0x00000000 0x00040000>;
192 read-only;
193 };
194 partition@40000 {
195 label = "MIBIB";
196 reg = <0x00040000 0x00020000>;
197 read-only;
198 };
199 partition@60000 {
200 label = "QSEE";
201 reg = <0x00060000 0x00060000>;
202 read-only;
203 };
204 partition@c0000 {
205 label = "CDT";
206 reg = <0x000c0000 0x00010000>;
207 read-only;
208 };
209 partition@d0000 {
210 label = "DDRPARAMS";
211 reg = <0x000d0000 0x00010000>;
212 read-only;
213 };
214 partition@e0000 {
215 label = "APPSBLENV"; /* uboot env*/
216 reg = <0x000e0000 0x00010000>;
217 };
218 partition@f0000 {
219 label = "APPSBL"; /* uboot */
220 reg = <0x000f0000 0x00080000>;
221 read-only;
222 };
223 partition@170000 {
224 label = "ART";
225 reg = <0x00170000 0x00010000>;
226 read-only;
227 };
228 firmware@180000 {
229 compatible = "denx,fit";
230 label = "firmware";
231 reg = <0x00180000 0x01a80000>;
232 };
233 };
234 };
235 };
236
237 &gmac {
238 status = "okay";
239 };
240
241 &switch {
242 status = "okay";
243 };
244
245 &swport5 {
246 status = "okay";
247 label = "lan1";
248 };
249
250 &swport3 {
251 status = "okay";
252 label = "lan2";
253 };
254
255 &swport4 {
256 status = "okay";
257 label = "ghn";
258 };