ipq40xx: convert to new LED color/function format where possible
[openwrt/staging/nbd.git] / target / linux / ipq40xx / files / arch / arm / boot / dts / qcom-ipq4018-pa1200.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 PA1200";
14 compatible = "plasmacloud,pa1200";
15
16 soc {
17 rng@22000 {
18 status = "okay";
19 };
20
21 tcsr@194b000 {
22 /* select hostmode */
23 compatible = "qcom,tcsr";
24 reg = <0x194b000 0x100>;
25 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
26 status = "okay";
27 };
28
29 tcsr@1949000 {
30 compatible = "qcom,tcsr";
31 reg = <0x1949000 0x100>;
32 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
33 };
34
35 ess_tcsr@1953000 {
36 compatible = "qcom,tcsr";
37 reg = <0x1953000 0x1000>;
38 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
39 };
40
41 tcsr@1957000 {
42 compatible = "qcom,tcsr";
43 reg = <0x1957000 0x100>;
44 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
45 };
46
47 usb2: usb2@60f8800 {
48 status = "okay";
49 };
50
51 crypto@8e3a000 {
52 status = "okay";
53 };
54
55 watchdog@b017000 {
56 status = "okay";
57 };
58 };
59
60 keys {
61 compatible = "gpio-keys";
62
63 reset {
64 label = "reset";
65 gpios = <&tlmm 59 GPIO_ACTIVE_LOW>;
66 linux,code = <KEY_RESTART>;
67 };
68 };
69
70 aliases {
71 led-boot = &led_status_purple;
72 led-failsafe = &led_status_yellow;
73 led-running = &led_status_cyan;
74 led-upgrade = &led_status_yellow;
75 label-mac-device = &swport5;
76 };
77
78 leds {
79 compatible = "gpio-leds";
80
81 led_status_cyan: status_cyan {
82 function = LED_FUNCTION_STATUS;
83 color = <LED_COLOR_ID_CYAN>;
84 gpios = <&tlmm 0 GPIO_ACTIVE_HIGH>;
85 };
86
87 led_status_purple: status_purple {
88 function = LED_FUNCTION_STATUS;
89 color = <LED_COLOR_ID_PURPLE>;
90 gpios = <&tlmm 1 GPIO_ACTIVE_HIGH>;
91 };
92
93 led_status_yellow: status_yellow {
94 function = LED_FUNCTION_STATUS;
95 color = <LED_COLOR_ID_YELLOW>;
96 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
97 };
98 };
99
100 };
101
102 &tlmm {
103 serial_pins: serial_pinmux {
104 mux {
105 pins = "gpio60", "gpio61";
106 function = "blsp_uart0";
107 bias-disable;
108 };
109 };
110
111 spi_0_pins: spi_0_pinmux {
112 pin {
113 function = "blsp_spi0";
114 pins = "gpio55", "gpio56", "gpio57";
115 drive-strength = <12>;
116 bias-disable;
117 };
118 pin_cs {
119 function = "gpio";
120 pins = "gpio54";
121 drive-strength = <2>;
122 bias-disable;
123 output-high;
124 };
125 };
126 };
127
128 &blsp_dma {
129 status = "okay";
130 };
131
132 &blsp1_spi1 {
133 pinctrl-0 = <&spi_0_pins>;
134 pinctrl-names = "default";
135 status = "okay";
136 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
137
138 flash@0 {
139 #address-cells = <1>;
140 #size-cells = <1>;
141 compatible = "jedec,spi-nor";
142 reg = <0>;
143 spi-max-frequency = <24000000>;
144
145 /* partitions are passed via bootloader */
146 partitions {
147 partition-art {
148 label = "0:ART";
149
150 nvmem-layout {
151 compatible = "fixed-layout";
152 #address-cells = <1>;
153 #size-cells = <1>;
154
155 macaddr_gmac0: macaddr@0 {
156 reg = <0x0 0x6>;
157 };
158
159 macaddr_gmac1: macaddr@6 {
160 reg = <0x6 0x6>;
161 };
162
163 precal_art_1000: precal@1000 {
164 reg = <0x1000 0x2f20>;
165 };
166
167 precal_art_5000: precal@5000 {
168 reg = <0x5000 0x2f20>;
169 };
170 };
171 };
172 };
173 };
174 };
175
176 &blsp1_uart1 {
177 pinctrl-0 = <&serial_pins>;
178 pinctrl-names = "default";
179 status = "okay";
180 };
181
182 &cryptobam {
183 status = "okay";
184 };
185
186 &usb2_hs_phy {
187 status = "okay";
188 };
189
190 &mdio {
191 status = "okay";
192 };
193
194 &gmac {
195 status = "okay";
196 };
197
198 &switch {
199 status = "okay";
200 };
201
202 &swport4 {
203 status = "okay";
204 label = "ethernet2";
205
206 nvmem-cell-names = "mac-address";
207 nvmem-cells = <&macaddr_gmac1>;
208 };
209
210 &swport5 {
211 status = "okay";
212 label = "ethernet1";
213
214 nvmem-cell-names = "mac-address";
215 nvmem-cells = <&macaddr_gmac0>;
216 };
217
218 &wifi0 {
219 status = "okay";
220 qcom,ath10k-calibration-variant = "PlasmaCloud-PA1200";
221
222 nvmem-cell-names = "pre-calibration";
223 nvmem-cells = <&precal_art_1000>;
224 };
225
226 &wifi1 {
227 status = "okay";
228 qcom,ath10k-calibration-variant = "PlasmaCloud-PA1200";
229
230 nvmem-cell-names = "pre-calibration";
231 nvmem-cells = <&precal_art_5000>;
232 };