ipq40xx: utilize nvmem-cells for macs & (pre-)calibration data
[openwrt/staging/mkresin.git] / target / linux / ipq40xx / files / 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";
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 rng@22000 {
40 status = "okay";
41 };
42
43 mdio@90000 {
44 status = "okay";
45 };
46
47 ess-psgmii@98000 {
48 status = "okay";
49 };
50
51 tcsr@1949000 {
52 compatible = "qcom,tcsr";
53 reg = <0x1949000 0x100>;
54 qcom,wifi_glb_cfg = <TCSR_WIFI_GLB_CFG>;
55 };
56
57 tcsr@194b000 {
58 /* select hostmode */
59 compatible = "qcom,tcsr";
60 reg = <0x194b000 0x100>;
61 qcom,usb-hsphy-mode-select = <TCSR_USB_HSPHY_HOST_MODE>;
62 status = "okay";
63 };
64
65 ess_tcsr@1953000 {
66 compatible = "qcom,tcsr";
67 reg = <0x1953000 0x1000>;
68 qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
69 };
70
71 tcsr@1957000 {
72 compatible = "qcom,tcsr";
73 reg = <0x1957000 0x100>;
74 qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
75 };
76
77 usb2@60f8800 {
78 status = "okay";
79 };
80
81 usb3@8af8800 {
82 status = "okay";
83 };
84
85 crypto@8e3a000 {
86 status = "okay";
87 };
88
89 watchdog@b017000 {
90 status = "okay";
91 };
92
93 ess-switch@c000000 {
94 status = "okay";
95 switch_lan_bmp = <0x18>;
96 switch_wan_bmp = <0x20>;
97 };
98
99 edma@c080000 {
100 status = "okay";
101 };
102 };
103
104 keys {
105 compatible = "gpio-keys";
106
107 wps {
108 label = "wps";
109 gpios = <&tlmm 5 GPIO_ACTIVE_LOW>;
110 linux,code = <KEY_WPS_BUTTON>;
111 };
112
113 reset {
114 label = "reset";
115 gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
116 linux,code = <KEY_RESTART>;
117 };
118 };
119
120 leds {
121 compatible = "gpio-leds";
122
123 power: power {
124 label = "green:power";
125 gpios = <&tlmm 4 GPIO_ACTIVE_HIGH>;
126 default-state = "on";
127 };
128
129 mesh {
130 label = "green:mesh";
131 gpios = <&tlmm 3 GPIO_ACTIVE_HIGH>;
132 };
133
134 wlan {
135 label = "green:wlan";
136 gpios = <&tlmm 2 GPIO_ACTIVE_HIGH>;
137 };
138 };
139 };
140
141 &blsp_dma {
142 status = "okay";
143 };
144
145 &cryptobam {
146 status = "okay";
147 };
148
149 &blsp1_spi1 {
150 pinctrl-0 = <&spi_0_pins>;
151 pinctrl-names = "default";
152 status = "okay";
153 cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
154
155 mx25l25635f@0 {
156 compatible = "jedec,spi-nor";
157 reg = <0>;
158 spi-max-frequency = <24000000>;
159
160 partitions {
161 compatible = "fixed-partitions";
162 #address-cells = <1>;
163 #size-cells = <1>;
164
165 SBL1@0 {
166 label = "SBL1";
167 reg = <0x0 0x40000>;
168 read-only;
169 };
170
171 MIBIB@40000 {
172 label = "MIBIB";
173 reg = <0x40000 0x20000>;
174 read-only;
175 };
176
177 QSEE@60000 {
178 label = "QSEE";
179 reg = <0x60000 0x60000>;
180 read-only;
181 };
182
183 CDT@c0000 {
184 label = "CDT";
185 reg = <0xc0000 0x10000>;
186 read-only;
187 };
188
189 DDRPARAMS@d0000 {
190 label = "DDRPARAMS";
191 reg = <0xd0000 0x10000>;
192 read-only;
193 };
194
195 APPSBLENV@e0000 {
196 label = "APPSBLENV";
197 reg = <0xe0000 0x10000>;
198 read-only;
199 };
200
201 APPSBL@f0000 {
202 label = "APPSBL";
203 reg = <0xf0000 0x80000>;
204 read-only;
205 };
206
207 ART@170000 {
208 label = "ART";
209 reg = <0x170000 0x10000>;
210 read-only;
211 compatible = "nvmem-cells";
212 #address-cells = <1>;
213 #size-cells = <1>;
214
215 precal_art_1000: precal@1000 {
216 reg = <0x1000 0x2f20>;
217 };
218
219 precal_art_5000: precal@5000 {
220 reg = <0x5000 0x2f20>;
221 };
222 };
223
224 firmware@180000 {
225 compatible = "denx,fit";
226 label = "firmware";
227 reg = <0x180000 0x1e80000>;
228 };
229 };
230 };
231 };
232
233 &blsp1_uart1 {
234 pinctrl-0 = <&serial_pins>;
235 pinctrl-names = "default";
236 status = "okay";
237 };
238
239 &tlmm {
240 serial_pins: serial_pinmux {
241 mux {
242 pins = "gpio60", "gpio61";
243 function = "blsp_uart0";
244 bias-disable;
245 };
246 };
247
248 spi_0_pins: spi_0_pinmux {
249 pinmux {
250 function = "blsp_spi0";
251 pins = "gpio55", "gpio56", "gpio57";
252 };
253 pinmux_cs {
254 function = "gpio";
255 pins = "gpio54";
256 };
257 pinconf {
258 pins = "gpio55", "gpio56", "gpio57";
259 drive-strength = <12>;
260 bias-disable;
261 };
262 pinconf_cs {
263 pins = "gpio54";
264 drive-strength = <2>;
265 bias-disable;
266 output-high;
267 };
268 };
269 };
270
271 &usb2_hs_phy {
272 status = "okay";
273 };
274
275 &usb3_hs_phy {
276 status = "okay";
277 };
278
279 &usb3_ss_phy {
280 status = "okay";
281 };
282
283 &wifi0 {
284 status = "okay";
285 nvmem-cell-names = "pre-calibration";
286 nvmem-cells = <&precal_art_1000>;
287 qcom,ath10k-calibration-variant = "GL-B1300";
288 };
289
290 &wifi1 {
291 status = "okay";
292 nvmem-cell-names = "pre-calibration";
293 nvmem-cells = <&precal_art_5000>;
294 qcom,ath10k-calibration-variant = "GL-B1300";
295 };