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