Merge remote-tracking branch 'asoc/topic/pcm5102a' into asoc-next
[linux-2.6-block.git] / arch / arm64 / boot / dts / hisilicon / hi6220-hikey.dts
CommitLineData
b2441318 1// SPDX-License-Identifier: GPL-2.0
86e8f528
BW
2/*
3 * dts file for Hisilicon HiKey Development Board
4 *
5 * Copyright (C) 2015, Hisilicon Ltd.
6 *
7 */
8
9/dts-v1/;
86e8f528 10#include "hi6220.dtsi"
379e9bf5 11#include "hikey-pinctrl.dtsi"
a817137a 12#include <dt-bindings/gpio/gpio.h>
86e8f528
BW
13
14/ {
15 model = "HiKey Development Board";
16 compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220";
17
18 aliases {
a362ec8f
TB
19 serial0 = &uart0; /* On board UART0 */
20 serial1 = &uart1; /* BT UART */
21 serial2 = &uart2; /* LS Expansion UART0 */
22 serial3 = &uart3; /* LS Expansion UART1 */
86e8f528
BW
23 };
24
25 chosen {
a362ec8f 26 stdout-path = "serial3:115200n8";
86e8f528
BW
27 };
28
6da3aba6
LY
29 /*
30 * Reserve below regions from memory node:
31 *
32 * 0x05e0,0000 - 0x05ef,ffff: MCU firmware runtime using
330fd87c 33 * 0x05f0,1000 - 0x05f0,1fff: Reboot reason
6da3aba6
LY
34 * 0x06df,f000 - 0x06df,ffff: Mailbox message data
35 * 0x0740,f000 - 0x0740,ffff: MCU firmware section
813a7315 36 * 0x21f0,0000 - 0x21ff,ffff: pstore/ramoops buffer
6da3aba6
LY
37 * 0x3e00,0000 - 0x3fff,ffff: OP-TEE
38 */
86e8f528
BW
39 memory@0 {
40 device_type = "memory";
6da3aba6 41 reg = <0x00000000 0x00000000 0x00000000 0x05e00000>,
330fd87c
JS
42 <0x00000000 0x05f00000 0x00000000 0x00001000>,
43 <0x00000000 0x05f02000 0x00000000 0x00efd000>,
6da3aba6 44 <0x00000000 0x06e00000 0x00000000 0x0060f000>,
813a7315
JS
45 <0x00000000 0x07410000 0x00000000 0x1aaf0000>,
46 <0x00000000 0x22000000 0x00000000 0x1c000000>;
86e8f528 47 };
60dac1b1 48
813a7315
JS
49 reserved-memory {
50 #address-cells = <2>;
51 #size-cells = <2>;
52 ranges;
53
9977a8c3 54 ramoops@21f00000 {
813a7315
JS
55 compatible = "ramoops";
56 reg = <0x0 0x21f00000 0x0 0x00100000>;
57 record-size = <0x00020000>;
58 console-size = <0x00020000>;
59 ftrace-size = <0x00020000>;
60 };
813a7315 61
8f5203ab
GX
62 /* global autoconfigured region for contiguous allocations */
63 linux,cma {
64 compatible = "shared-dma-pool";
65 reusable;
66 size = <0x00000000 0x08000000>;
67 linux,cma-default;
68 };
69 };
813a7315 70
330fd87c
JS
71 reboot-mode-syscon@5f01000 {
72 compatible = "syscon", "simple-mfd";
73 reg = <0x0 0x05f01000 0x0 0x00001000>;
74
75 reboot-mode {
76 compatible = "syscon-reboot-mode";
77 offset = <0x0>;
78
79 mode-normal = <0x77665501>;
80 mode-bootloader = <0x77665500>;
81 mode-recovery = <0x77665502>;
82 };
83 };
84
84f7c60b
UH
85 reg_sys_5v: regulator@0 {
86 compatible = "regulator-fixed";
87 regulator-name = "SYS_5V";
88 regulator-min-microvolt = <5000000>;
89 regulator-max-microvolt = <5000000>;
90 regulator-boot-on;
91 regulator-always-on;
92 };
93
94 reg_vdd_3v3: regulator@1 {
95 compatible = "regulator-fixed";
96 regulator-name = "VDD_3V3";
97 regulator-min-microvolt = <3300000>;
98 regulator-max-microvolt = <3300000>;
99 regulator-boot-on;
100 regulator-always-on;
101 vin-supply = <&reg_sys_5v>;
102 };
103
104 reg_5v_hub: regulator@2 {
1b32a5ff
UH
105 compatible = "regulator-fixed";
106 regulator-name = "5V_HUB";
107 regulator-min-microvolt = <5000000>;
108 regulator-max-microvolt = <5000000>;
109 regulator-boot-on;
110 gpio = <&gpio0 7 0>;
111 regulator-always-on;
84f7c60b 112 vin-supply = <&reg_sys_5v>;
1b32a5ff
UH
113 };
114
ea452678
UH
115 wl1835_pwrseq: wl1835-pwrseq {
116 compatible = "mmc-pwrseq-simple";
117 /* WLAN_EN GPIO */
118 reset-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
119 clocks = <&pmic>;
120 clock-names = "ext_clock";
121 power-off-delay-us = <10>;
122 };
123
60dac1b1
ZK
124 soc {
125 spi0: spi@f7106000 {
126 status = "ok";
127 };
0c231751
GX
128
129 i2c0: i2c@f7100000 {
130 status = "ok";
131 };
132
133 i2c1: i2c@f7101000 {
134 status = "ok";
135 };
c2aad932
GX
136
137 uart1: uart@f7111000 {
1b9c7b2d
JRO
138 assigned-clocks = <&sys_ctrl HI6220_UART1_SRC>;
139 assigned-clock-rates = <150000000>;
c2aad932 140 status = "ok";
019aa56b
RH
141
142 bluetooth {
143 compatible = "ti,wl1835-st";
144 enable-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
b73f2269
UH
145 clocks = <&pmic>;
146 clock-names = "ext_clock";
019aa56b 147 };
c2aad932
GX
148 };
149
150 uart2: uart@f7112000 {
151 status = "ok";
152 };
153
154 uart3: uart@f7113000 {
155 status = "ok";
156 };
841478d4 157
bbaf867e
LW
158 /*
159 * Legend: proper name = the GPIO line is used as GPIO
160 * NC = not connected (not routed from the SoC)
161 * "[PER]" = pin is muxed for peripheral (not GPIO)
162 * "" = no idea, schematic doesn't say, could be
163 * unrouted (not connected to any external pin)
164 * LSEC = Low Speed External Connector
165 * HSEC = High Speed External Connector
166 *
167 * Pin assignments taken from LeMaker and CircuitCo Schematics
168 * Rev A1.
169 *
170 * For the lines routed to the external connectors the
171 * lines are named after the 96Boards CE Specification 1.0,
172 * Appendix "Expansion Connector Signal Description".
173 *
174 * When the 96Board naming of a line and the schematic name of
175 * the same line are in conflict, the 96Board specification
176 * takes precedence, which means that the external UART on the
177 * LSEC is named UART0 while the schematic and SoC names this
178 * UART2. This is only for the informational lines i.e. "[FOO]",
179 * the GPIO named lines "GPIO-A" thru "GPIO-L" are the only
180 * ones actually used for GPIO.
181 */
182 gpio0: gpio@f8011000 {
183 gpio-line-names = "PWR_HOLD", "DSI_SEL",
184 "USB_HUB_RESET_N", "USB_SEL", "HDMI_PD", "WL_REG_ON",
185 "PWRON_DET", "5V_HUB_EN";
186 };
187
188 gpio1: gpio@f8012000 {
189 gpio-line-names = "SD_DET", "HDMI_INT", "PMU_IRQ_N",
190 "WL_HOST_WAKE", "NC", "NC", "NC", "BT_REG_ON";
191 };
192
193 gpio2: gpio@f8013000 {
194 gpio-line-names =
195 "GPIO-A", /* LSEC Pin 23: GPIO2_0 */
196 "GPIO-B", /* LSEC Pin 24: GPIO2_1 */
197 "GPIO-C", /* LSEC Pin 25: GPIO2_2 */
198 "GPIO-D", /* LSEC Pin 26: GPIO2_3 */
199 "GPIO-E", /* LSEC Pin 27: GPIO2_4 */
200 "USB_ID_DET", "USB_VBUS_DET",
201 "GPIO-H"; /* LSEC Pin 30: GPIO2_7 */
202 };
203
204 gpio3: gpio@f8014000 {
205 gpio-line-names = "GPIO3_0", "NC", "NC", "", "NC", "",
206 "WLAN_ACTIVE", "NC", "NC";
207 };
208
209 gpio4: gpio@f7020000 {
210 gpio-line-names = "USER_LED1", "USER_LED2", "USER_LED3",
211 "USER_LED4", "SD_SEL", "NC", "NC", "BT_ACTIVE";
212 };
213
214 gpio5: gpio@f7021000 {
215 gpio-line-names = "NC", "NC",
216 "[UART1_RxD]", /* LSEC Pin 11: UART3_RX */
217 "[UART1_TxD]", /* LSEC Pin 13: UART3_TX */
218 "[AUX_SSI1]", "NC",
219 "[PCM_CLK]", /* LSEC Pin 18: MODEM_PCM_XCLK */
220 "[PCM_FS]"; /* LSEC Pin 16: MODEM_PCM_XFS */
221 };
222
223 gpio6: gpio@f7022000 {
224 gpio-line-names =
225 "[SPI0_DIN]", /* Pin 10: SPI0_DI */
226 "[SPI0_DOUT]", /* Pin 14: SPI0_DO */
227 "[SPI0_CS]", /* Pin 12: SPI0_CS_N */
228 "[SPI0_SCLK]", /* Pin 8: SPI0_SCLK */
229 "NC", "NC", "NC",
230 "GPIO-G"; /* Pin 29: GPIO6_7_DSI_TE0 */
231 };
232
233 gpio7: gpio@f7023000 {
234 gpio-line-names = "NC", "NC", "NC", "NC",
235 "[PCM_DI]", /* Pin 22: MODEM_PCM_DI */
236 "[PCM_DO]", /* Pin 20: MODEM_PCM_DO */
237 "NC", "NC";
238 };
239
240 gpio8: gpio@f7024000 {
241 gpio-line-names = "NC", "[CEC_CLK_19_2MHZ]", "NC",
242 "", "", "", "", "", "";
243 };
244
245 gpio9: gpio@f7025000 {
246 gpio-line-names = "",
247 "GPIO-J", /* LSEC Pin 32: ISP_PWDN0_GPIO9_1 */
248 "GPIO-L", /* LSEC Pin 34: ISP_PWDN1_GPIO9_2 */
249 "NC", "NC", "NC", "NC", "[ISP_CCLK0]";
250 };
251
252 gpio10: gpio@f7026000 {
253 gpio-line-names = "BOOT_SEL",
254 "[ISP_CCLK1]",
255 "GPIO-I", /* LSEC Pin 31: ISP_RSTB0_GPIO10_2 */
256 "GPIO-K", /* LSEC Pin 33: ISP_RSTB1_GPIO10_3 */
257 "NC", "NC",
258 "[I2C2_SDA]", /* HSEC Pin 34: ISP0_SDA */
259 "[I2C2_SCL]"; /* HSEC Pin 32: ISP0_SCL */
260 };
261
262 gpio11: gpio@f7027000 {
263 gpio-line-names =
264 "[I2C3_SDA]", /* HSEC Pin 38: ISP1_SDA */
265 "[I2C3_SCL]", /* HSEC Pin 36: ISP1_SCL */
266 "", "NC", "NC", "NC", "", "";
267 };
268
269 gpio12: gpio@f7028000 {
270 gpio-line-names = "[BT_PCM_XFS]", "[BT_PCM_DI]",
271 "[BT_PCM_DO]",
272 "NC", "NC", "NC", "NC",
273 "GPIO-F"; /* LSEC Pin 28: BL_PWM_GPIO12_7 */
274 };
275
276 gpio13: gpio@f7029000 {
277 gpio-line-names = "[UART0_RX]", "[UART0_TX]",
278 "[BT_UART1_CTS]", "[BT_UART1_RTS]",
279 "[BT_UART1_RX]", "[BT_UART1_TX]",
280 "[UART0_CTS]", /* LSEC Pin 3: UART2_CTS_N */
281 "[UART0_RTS]"; /* LSEC Pin 9: UART2_RTS_N */
282 };
283
284 gpio14: gpio@f702a000 {
285 gpio-line-names =
286 "[UART0_RxD]", /* LSEC Pin 7: UART2_RX */
287 "[UART0_TxD]", /* LSEC Pin 5: UART2_TX */
288 "[I2C0_SCL]", /* LSEC Pin 15: I2C0_SCL */
289 "[I2C0_SDA]", /* LSEC Pin 17: I2C0_SDA */
290 "[I2C1_SCL]", /* LSEC Pin 19: I2C1_SCL */
291 "[I2C1_SDA]", /* LSEC Pin 21: I2C1_SDA */
292 "[I2C2_SCL]", "[I2C2_SDA]";
293 };
294
295 gpio15: gpio@f702b000 {
296 gpio-line-names = "", "", "", "", "", "", "NC", "";
297 };
298
299 /* GPIO blocks 16 thru 19 do not appear to be routed to pins */
300
76f1dfb6
UH
301 dwmmc_0: dwmmc0@f723d000 {
302 cap-mmc-highspeed;
303 non-removable;
304 bus-width = <0x8>;
305 vmmc-supply = <&ldo19>;
306 };
307
308 dwmmc_1: dwmmc1@f723e000 {
309 card-detect-delay = <200>;
310 cap-sd-highspeed;
311 sd-uhs-sdr12;
312 sd-uhs-sdr25;
313 sd-uhs-sdr50;
314 vqmmc-supply = <&ldo7>;
315 vmmc-supply = <&ldo10>;
316 bus-width = <0x4>;
317 disable-wp;
318 cd-gpios = <&gpio1 0 1>;
319 };
320
841478d4 321 dwmmc_2: dwmmc2@f723f000 {
76f1dfb6 322 bus-width = <0x4>;
841478d4 323 non-removable;
ea452678
UH
324 vmmc-supply = <&reg_vdd_3v3>;
325 mmc-pwrseq = <&wl1835_pwrseq>;
841478d4
GX
326
327 #address-cells = <0x1>;
328 #size-cells = <0x0>;
329 wlcore: wlcore@2 {
330 compatible = "ti,wl1835";
331 reg = <2>; /* sdio func num */
332 /* WL_IRQ, WL_HOST_WAKE_GPIO1_3 */
333 interrupt-parent = <&gpio1>;
334 interrupts = <3 IRQ_TYPE_EDGE_RISING>;
335 };
336 };
60dac1b1 337 };
ad05f38b
GX
338
339 leds {
340 compatible = "gpio-leds";
341 user_led4 {
342 label = "user_led4";
343 gpios = <&gpio4 0 0>; /* <&gpio_user_led_1>; */
344 linux,default-trigger = "heartbeat";
345 };
346
347 user_led3 {
348 label = "user_led3";
349 gpios = <&gpio4 1 0>; /* <&gpio_user_led_2>; */
350 linux,default-trigger = "mmc0";
351 };
352
353 user_led2 {
354 label = "user_led2";
355 gpios = <&gpio4 2 0>; /* <&gpio_user_led_3>; */
356 linux,default-trigger = "mmc1";
357 };
358
359 user_led1 {
360 label = "user_led1";
361 gpios = <&gpio4 3 0>; /* <&gpio_user_led_4>; */
b6fff603 362 panic-indicator;
ad05f38b
GX
363 linux,default-trigger = "cpu0";
364 };
365
366 wlan_active_led {
367 label = "wifi_active";
368 gpios = <&gpio3 5 0>; /* <&gpio_wlan_active_led>; */
369 linux,default-trigger = "phy0tx";
370 default-state = "off";
371 };
372
373 bt_active_led {
374 label = "bt_active";
375 gpios = <&gpio4 7 0>; /* <&gpio_bt_active_led>; */
376 linux,default-trigger = "hci0rx";
377 default-state = "off";
378 };
379 };
a817137a
CF
380
381 pmic: pmic@f8000000 {
382 compatible = "hisilicon,hi655x-pmic";
383 reg = <0x0 0xf8000000 0x0 0x1000>;
307ded89 384 #clock-cells = <0>;
a817137a
CF
385 interrupt-controller;
386 #interrupt-cells = <2>;
387 pmic-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
388
389 regulators {
390 ldo2: LDO2 {
391 regulator-name = "LDO2_2V8";
392 regulator-min-microvolt = <2500000>;
393 regulator-max-microvolt = <3200000>;
394 regulator-enable-ramp-delay = <120>;
395 };
396
397 ldo7: LDO7 {
398 regulator-name = "LDO7_SDIO";
399 regulator-min-microvolt = <1800000>;
400 regulator-max-microvolt = <3300000>;
401 regulator-enable-ramp-delay = <120>;
402 };
403
404 ldo10: LDO10 {
405 regulator-name = "LDO10_2V85";
406 regulator-min-microvolt = <1800000>;
407 regulator-max-microvolt = <3000000>;
408 regulator-enable-ramp-delay = <360>;
409 };
410
411 ldo13: LDO13 {
412 regulator-name = "LDO13_1V8";
413 regulator-min-microvolt = <1600000>;
414 regulator-max-microvolt = <1950000>;
415 regulator-enable-ramp-delay = <120>;
416 };
417
418 ldo14: LDO14 {
419 regulator-name = "LDO14_2V8";
420 regulator-min-microvolt = <2500000>;
421 regulator-max-microvolt = <3200000>;
422 regulator-enable-ramp-delay = <120>;
423 };
424
425 ldo15: LDO15 {
426 regulator-name = "LDO15_1V8";
427 regulator-min-microvolt = <1600000>;
428 regulator-max-microvolt = <1950000>;
429 regulator-boot-on;
430 regulator-always-on;
431 regulator-enable-ramp-delay = <120>;
432 };
433
434 ldo17: LDO17 {
435 regulator-name = "LDO17_2V5";
436 regulator-min-microvolt = <2500000>;
437 regulator-max-microvolt = <3200000>;
438 regulator-enable-ramp-delay = <120>;
439 };
440
441 ldo19: LDO19 {
442 regulator-name = "LDO19_3V0";
443 regulator-min-microvolt = <1800000>;
444 regulator-max-microvolt = <3000000>;
445 regulator-enable-ramp-delay = <360>;
446 };
447
448 ldo21: LDO21 {
449 regulator-name = "LDO21_1V8";
450 regulator-min-microvolt = <1650000>;
451 regulator-max-microvolt = <2000000>;
452 regulator-always-on;
453 regulator-enable-ramp-delay = <120>;
454 };
455
456 ldo22: LDO22 {
457 regulator-name = "LDO22_1V2";
458 regulator-min-microvolt = <900000>;
459 regulator-max-microvolt = <1200000>;
460 regulator-boot-on;
461 regulator-always-on;
462 regulator-enable-ramp-delay = <120>;
463 };
464 };
465 };
14e21cb8
JF
466
467 firmware {
468 optee {
469 compatible = "linaro,optee-tz";
470 method = "smc";
471 };
472 };
0cf6a8e2
JS
473
474 sound_card {
475 compatible = "audio-graph-card";
476 dais = <&i2s0_port0>;
477 };
86e8f528 478};
dd90caac
RH
479
480&uart2 {
481 label = "LS-UART0";
482};
483&uart3 {
484 label = "LS-UART1";
485};
3814b61b
XL
486
487&ade {
488 status = "ok";
489};
490
491&dsi {
492 status = "ok";
b77c23a0
XL
493
494 ports {
495 /* 1 for output port */
496 port@1 {
497 reg = <1>;
498
499 dsi_out0: endpoint@0 {
500 remote-endpoint = <&adv7533_in>;
501 };
502 };
503 };
504};
505
506&i2c2 {
507 #address-cells = <1>;
508 #size-cells = <0>;
509 status = "ok";
510
511 adv7533: adv7533@39 {
512 compatible = "adi,adv7533";
513 reg = <0x39>;
514 interrupt-parent = <&gpio1>;
515 interrupts = <1 2>;
516 pd-gpio = <&gpio0 4 0>;
517 adi,dsi-lanes = <4>;
0cf6a8e2
JS
518 #sound-dai-cells = <0>;
519
520 ports {
521 #address-cells = <1>;
522 #size-cells = <0>;
523 port@0 {
524 adv7533_in: endpoint {
525 remote-endpoint = <&dsi_out0>;
526 };
527 };
528 port@2 {
529 reg = <2>;
530 codec_endpoint: endpoint {
531 remote-endpoint = <&i2s0_cpu_endpoint>;
532 };
533 };
534 };
535 };
536};
b77c23a0 537
0cf6a8e2
JS
538&i2s0 {
539
540 ports {
541 i2s0_port0: port@0 {
542 i2s0_cpu_endpoint: endpoint {
543 remote-endpoint = <&codec_endpoint>;
544 dai-format = "i2s";
b77c23a0
XL
545 };
546 };
547 };
3814b61b 548};