ipq40xx: convert to new LED color/function format where possible
[openwrt/staging/nbd.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4019-fritzrepeater-1200.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 #include <dt-bindings/soc/qcom,tcsr.h>
8
9 / {
10 model = "AVM FRITZ!Repeater 1200";
11 compatible = "avm,fritzrepeater-1200";
12
13 aliases {
14 led-boot = &power_green;
15 led-failsafe = &power_red;
16 led-running = &power_green;
17 led-upgrade = &power_red;
18 label-mac-device = &wifi0;
19 };
20
21 soc {
22 rng@22000 {
23 status = "okay";
24 };
25
26 mdio@90000 {
27 status = "okay";
28 pinctrl-0 = <&mdio_pins>;
29 pinctrl-names = "default";
30
31 ethphy: ethernet-phy@0 {
32 reg = <0x0>;
33 };
34 };
35
36 tcsr@1949000 {
37 compatible = "qcom,tcsr";
38 reg = <0x1949000 0x100>;
39 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
40 };
41
42 ess_tcsr@1953000 {
43 compatible = "qcom,tcsr";
44 reg = <0x1953000 0x1000>;
45 qcom,ess-interface-select = <TCSR_ESS_PSGMII_RGMII5>;
46 };
47
48 tcsr@1957000 {
49 compatible = "qcom,tcsr";
50 reg = <0x1957000 0x100>;
51 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
52 };
53
54 crypto@8e3a000 {
55 status = "okay";
56 };
57
58 watchdog@b017000 {
59 status = "okay";
60 };
61 };
62
63 key {
64 compatible = "gpio-keys";
65
66 wps {
67 label = "WPS button";
68 gpios = <&tlmm 10 GPIO_ACTIVE_LOW>;
69 linux,code = <KEY_WPS_BUTTON>;
70 };
71 };
72
73 leds {
74 compatible = "gpio-leds";
75
76 power_red: power_red {
77 function = LED_FUNCTION_POWER;
78 color = <LED_COLOR_ID_RED>;
79 gpios = <&tlmm 50 GPIO_ACTIVE_LOW>;
80 };
81
82 power_green: power_green {
83 function = LED_FUNCTION_POWER;
84 color = <LED_COLOR_ID_GREEN>;
85 gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
86 };
87
88 power_yellow {
89 function = LED_FUNCTION_POWER;
90 color = <LED_COLOR_ID_YELLOW>;
91 gpios = <&tlmm 49 GPIO_ACTIVE_LOW>;
92 };
93 };
94 };
95
96 &tlmm {
97 serial_0_pins: serial_pinmux {
98 mux {
99 pins = "gpio16", "gpio17";
100 function = "blsp_uart0";
101 bias-disable;
102 };
103 };
104
105 nand_pins: nand_pins {
106 pullups {
107 pins = "gpio53", "gpio58", "gpio59";
108 function = "qpic";
109 bias-pull-up;
110 };
111
112 pulldowns {
113 pins = "gpio54", "gpio55", "gpio56",
114 "gpio57", "gpio60", "gpio61",
115 "gpio62", "gpio63", "gpio64",
116 "gpio65", "gpio66", "gpio67",
117 "gpio68", "gpio69";
118 function = "qpic";
119 bias-pull-down;
120 };
121 };
122
123 mdio_pins: mdio_pinmux {
124 mux_1 {
125 pins = "gpio6";
126 function = "mdio";
127 bias-pull-up;
128 };
129 mux_2 {
130 pins = "gpio7";
131 function = "mdc";
132 bias-pull-up;
133 };
134 };
135
136 phy-reset {
137 line-name = "PHY-reset";
138 gpios = <19 GPIO_ACTIVE_HIGH>;
139 gpio-hog;
140 output-high;
141 };
142
143 phy-reset-2 {
144 line-name = "PHY-reset-2";
145 gpios = <47 GPIO_ACTIVE_HIGH>;
146 gpio-hog;
147 output-high;
148 };
149 };
150
151 &nand {
152 pinctrl-0 = <&nand_pins>;
153 pinctrl-names = "default";
154 status = "okay";
155
156 nand@0 {
157 partitions {
158 compatible = "fixed-partitions";
159 #address-cells = <1>;
160 #size-cells = <1>;
161
162 partition@0 {
163 label = "SBL1";
164 reg = <0x0 0x80000>;
165 read-only;
166 };
167
168 partition@80000 {
169 label = "MIBIB";
170 reg = <0x80000 0x80000>;
171 read-only;
172 };
173
174 partition@100000 {
175 label = "QSEE";
176 reg = <0x100000 0x80000>;
177 read-only;
178 };
179
180 partition@180000 {
181 label = "CDT";
182 reg = <0x180000 0x40000>;
183 read-only;
184 };
185
186 partition@1c0000 {
187 label = "QSEE_B";
188 reg = <0x1c0000 0x80000>;
189 read-only;
190 };
191
192 partition@240000 {
193 label = "urlader0";
194 reg = <0x240000 0x40000>;
195 read-only;
196 };
197
198 partition@280000 {
199 label = "urlader1";
200 reg = <0x280000 0x40000>;
201 read-only;
202 };
203
204 partition@2c0000 {
205 label = "nand-tffs";
206 reg = <0x2c0000 0x840000>;
207 read-only;
208 };
209
210 partition@b00000 {
211 /* 'kernel1' in AVM firmware */
212 label = "uboot0";
213 reg = <0xb00000 0x400000>;
214 };
215
216 partition@f00000 {
217 /* 'kernel2' in AVM firmware */
218 label = "uboot1";
219 reg = <0xf00000 0x400000>;
220 };
221
222 partition@1300000 {
223 label = "ubi";
224 reg = <0x1300000 0x6d00000>;
225 };
226 };
227 };
228 };
229
230 &cryptobam {
231 status = "okay";
232 };
233
234 &blsp_dma {
235 status = "okay";
236 };
237
238 &blsp1_uart1 {
239 pinctrl-0 = <&serial_0_pins>;
240 pinctrl-names = "default";
241 status = "okay";
242 };
243
244 &qpic_bam {
245 status = "okay";
246 };
247
248 &wifi0 {
249 status = "okay";
250 qcom,ath10k-calibration-variant = "AVM-FRITZRepeater-1200";
251 };
252
253 &wifi1 {
254 status = "okay";
255 qcom,ath10k-calibration-variant = "AVM-FRITZRepeater-1200";
256 };
257
258 &gmac {
259 status = "okay";
260 };
261
262 &switch {
263 status = "okay";
264
265 /delete-property/ psgmii-ethphy;
266 };
267
268 &swport5 {
269 status = "okay";
270
271 label = "lan";
272 phy-handle = <&ethphy>;
273 phy-mode = "rgmii-id";
274 };
275
276 &ethphy1 {
277 status = "disabled";
278 };
279
280 &ethphy2 {
281 status = "disabled";
282 };
283
284 &ethphy3 {
285 status = "disabled";
286 };
287
288 &ethphy4 {
289 status = "disabled";
290 };
291
292 &psgmiiphy {
293 status = "disabled";
294 };