ipq40xx: dts: Unify naming of gpio-led nodes
[oweals/openwrt.git] / target / linux / ipq40xx / files-4.14 / arch / arm / boot / dts / qcom-ipq4029-gl-b1300.dts
1 /* Copyright (c) 2015, The Linux Foundation. All rights reserved.
2  *
3  * Permission to use, copy, modify, and/or distribute this software for any
4  * purpose with or without fee is hereby granted, provided that the above
5  * copyright notice and this permission notice appear in all copies.
6  *
7  * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
8  * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
9  * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
10  * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
11  * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
12  * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
13  * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
14  *
15  */
16
17 #include "qcom-ipq4019.dtsi"
18 #include <dt-bindings/gpio/gpio.h>
19 #include <dt-bindings/input/input.h>
20 #include <dt-bindings/soc/qcom,tcsr.h>
21
22 / {
23         model = "GL.iNet GL-B1300";
24         compatible = "glinet,gl-b1300", "qcom,ipq4019";
25
26         aliases {
27                 led-boot = &power;
28                 led-failsafe = &power;
29                 led-running = &power;
30                 led-upgrade = &power;
31         };
32
33         memory {
34                 device_type = "memory";
35                 reg = <0x80000000 0x10000000>;
36         };
37
38         soc {
39                 mdio@90000 {
40                         status = "okay";
41                 };
42
43                 ess-psgmii@98000 {
44                         status = "okay";
45                 };
46
47                 tcsr@1949000 {
48                         compatible = "qcom,tcsr";
49                         reg = <0x1949000 0x100>;
50                         qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
51                 };
52
53                 tcsr@194b000 {
54                         /* select hostmode */
55                         compatible = "qcom,tcsr";
56                         reg = <0x194b000 0x100>;
57                         qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
58                         status = "okay";
59                 };
60
61                 ess_tcsr@1953000 {
62                         compatible = "qcom,tcsr";
63                         reg = <0x1953000 0x1000>;
64                         qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
65                 };
66
67                 tcsr@1957000 {
68                         compatible = "qcom,tcsr";
69                         reg = <0x1957000 0x100>;
70                         qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
71                 };
72
73                 usb2@60f8800 {
74                         status = "okay";
75                 };
76
77                 usb3@8af8800 {
78                         status = "okay";
79                 };
80
81                 crypto@8e3a000 {
82                         status = "okay";
83                 };
84
85                 watchdog@b017000 {
86                         status = "okay";
87                 };
88
89                 ess-switch@c000000 {
90                         status = "okay";
91                         switch_lan_bmp = <0x18>;
92                         switch_wan_bmp = <0x20>;
93                 };
94
95                 edma@c080000 {
96                         status = "okay";
97                 };
98         };
99
100         keys {
101                 compatible = "gpio-keys";
102
103                 wps {
104                         label = "wps";
105                         gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
106                         linux,code = <KEY_WPS_BUTTON>;
107                 };
108
109                 reset {
110                         label = "reset";
111                         gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
112                         linux,code = <KEY_RESTART>;
113                 };
114         };
115
116         leds {
117                 compatible = "gpio-leds";
118
119                 power: power {
120                         label = "gl-b1300:green:power";
121                         gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
122                         default-state = "on";
123                 };
124
125                 mesh {
126                         label = "gl-b1300:green:mesh";
127                         gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
128                 };
129
130                 wlan {
131                         label = "gl-b1300:green:wlan";
132                         gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
133                 };
134         };
135 };
136
137 &blsp_dma {
138         status = "okay";
139 };
140
141 &cryptobam {
142         status = "okay";
143 };
144
145 &blsp1_spi1 {
146         pinctrl-0 = <&spi_0_pins>;
147         pinctrl-names = "default";
148         status = "okay";
149         cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
150
151         mx25l25635f@0 {
152                 compatible = "jedec,spi-nor";
153                 #address-cells = <1>;
154                 #size-cells = <1>;
155                 reg = <0>;
156                 spi-max-frequency = <24000000>;
157
158                 partitions {
159                         compatible = "fixed-partitions";
160                         #address-cells = <1>;
161                         #size-cells = <1>;
162
163                         SBL1@0 {
164                                 label = "SBL1";
165                                 reg = <0x0 0x40000>;
166                                 read-only;
167                         };
168
169                         MIBIB@40000 {
170                                 label = "MIBIB";
171                                 reg = <0x40000 0x20000>;
172                                 read-only;
173                         };
174
175                         QSEE@60000 {
176                                 label = "QSEE";
177                                 reg = <0x60000 0x60000>;
178                                 read-only;
179                         };
180
181                         CDT@c0000 {
182                                 label = "CDT";
183                                 reg = <0xc0000 0x10000>;
184                                 read-only;
185                         };
186
187                         DDRPARAMS@d0000 {
188                                 label = "DDRPARAMS";
189                                 reg = <0xd0000 0x10000>;
190                                 read-only;
191                         };
192
193                         APPSBLENV@e0000 {
194                                 label = "APPSBLENV";
195                                 reg = <0xe0000 0x10000>;
196                                 read-only;
197                         };
198
199                         APPSBL@f0000 {
200                                 label = "APPSBL";
201                                 reg = <0xf0000 0x80000>;
202                                 read-only;
203                         };
204
205                         ART@170000 {
206                                 label = "ART";
207                                 reg = <0x170000 0x10000>;
208                                 read-only;
209                         };
210
211                         firmware@180000 {
212                                 compatible = "denx,fit";
213                                 label = "firmware";
214                                 reg = <0x180000 0x1e80000>;
215                         };
216                 };
217         };
218 };
219
220 &blsp1_uart1 {
221         pinctrl-0 = <&serial_pins>;
222         pinctrl-names = "default";
223         status = "okay";
224 };
225
226 &tlmm {
227         serial_pins: serial_pinmux {
228                 mux {
229                         pins = "gpio60", "gpio61";
230                         function = "blsp_uart0";
231                         bias-disable;
232                 };
233         };
234
235         spi_0_pins: spi_0_pinmux {
236                 pinmux {
237                         function = "blsp_spi0";
238                         pins = "gpio55", "gpio56", "gpio57";
239                 };
240                 pinmux_cs {
241                         function = "gpio";
242                         pins = "gpio54";
243                 };
244                 pinconf {
245                         pins = "gpio55", "gpio56", "gpio57";
246                         drive-strength = <12>;
247                         bias-disable;
248                 };
249                 pinconf_cs {
250                         pins = "gpio54";
251                         drive-strength = <2>;
252                         bias-disable;
253                         output-high;
254                 };
255         };
256 };
257
258 &usb2_hs_phy {
259         status = "okay";
260 };
261
262 &usb3_hs_phy {
263         status = "okay";
264 };
265
266 &usb3_ss_phy {
267         status = "okay";
268 };
269
270 &wifi0 {
271         status = "okay";
272         qcom,ath10k-calibration-variant = "GL-B1300";
273 };
274
275 &wifi1 {
276         status = "okay";
277         qcom,ath10k-calibration-variant = "GL-B1300";
278 };