1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
|
// SPDX-License-Identifier: GPL-2.0
/*
* dts file for Hisilicon HiKey960 Development Board
*
* Copyright (C) 2016, Hisilicon Ltd.
*
*/
/dts-v1/;
#include "hi3660.dtsi"
#include "hikey960-pinctrl.dtsi"
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/input/input.h>
#include <dt-bindings/interrupt-controller/irq.h>
/ {
model = "HiKey960";
compatible = "hisilicon,hi3660-hikey960", "hisilicon,hi3660";
aliases {
mshc1 = &dwmmc1;
mshc2 = &dwmmc2;
serial0 = &uart0;
serial1 = &uart1;
serial2 = &uart2;
serial3 = &uart3;
serial4 = &uart4;
serial5 = &uart5;
serial6 = &uart6;
};
chosen {
stdout-path = "serial6:115200n8";
};
memory@0 {
device_type = "memory";
/* rewrite this at bootloader */
reg = <0x0 0x0 0x0 0x0>;
};
reserved-memory {
#address-cells = <2>;
#size-cells = <2>;
ranges;
ramoops@32000000 {
compatible = "ramoops";
reg = <0x0 0x32000000 0x0 0x00100000>;
record-size = <0x00020000>;
console-size = <0x00020000>;
ftrace-size = <0x00020000>;
};
};
reboot-mode-syscon@32100000 {
compatible = "syscon", "simple-mfd";
reg = <0x0 0x32100000 0x0 0x00001000>;
reboot-mode {
compatible = "syscon-reboot-mode";
offset = <0x0>;
mode-normal = <0x77665501>;
mode-bootloader = <0x77665500>;
mode-recovery = <0x77665502>;
};
};
keys {
compatible = "gpio-keys";
pinctrl-names = "default";
pinctrl-0 = <&pwr_key_pmx_func &pwr_key_cfg_func>;
power {
wakeup-source;
gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
label = "GPIO Power";
linux,code = <KEY_POWER>;
};
};
leds {
compatible = "gpio-leds";
user_led1 {
label = "green:user1";
/* gpio_150_user_led1 */
gpios = <&gpio18 6 0>;
linux,default-trigger = "heartbeat";
};
user_led2 {
label = "green:user2";
/* gpio_151_user_led2 */
gpios = <&gpio18 7 0>;
linux,default-trigger = "none";
};
user_led3 {
label = "green:user3";
/* gpio_189_user_led3 */
gpios = <&gpio23 5 0>;
linux,default-trigger = "mmc0";
};
user_led4 {
label = "green:user4";
/* gpio_190_user_led4 */
gpios = <&gpio23 6 0>;
panic-indicator;
linux,default-trigger = "none";
};
wlan_active_led {
label = "yellow:wlan";
/* gpio_205_wifi_active */
gpios = <&gpio25 5 0>;
linux,default-trigger = "phy0tx";
default-state = "off";
};
bt_active_led {
label = "blue:bt";
gpios = <&gpio25 7 0>;
/* gpio_207_user_led1 */
linux,default-trigger = "hci0-power";
default-state = "off";
};
};
pmic: pmic@fff34000 {
compatible = "hisilicon,hi6421v530-pmic";
reg = <0x0 0xfff34000 0x0 0x1000>;
interrupt-controller;
#interrupt-cells = <2>;
regulators {
ldo3: LDO3 { /* HDMI */
regulator-name = "VOUT3_1V85";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <2200000>;
regulator-enable-ramp-delay = <120>;
};
ldo9: LDO9 { /* SDCARD I/O */
regulator-name = "VOUT9_1V8_2V95";
regulator-min-microvolt = <1750000>;
regulator-max-microvolt = <3300000>;
regulator-enable-ramp-delay = <240>;
};
ldo11: LDO11 { /* Low Speed Connector */
regulator-name = "VOUT11_1V8_2V95";
regulator-min-microvolt = <1750000>;
regulator-max-microvolt = <3300000>;
regulator-enable-ramp-delay = <240>;
};
ldo15: LDO15 { /* UFS VCC */
regulator-name = "VOUT15_3V0";
regulator-min-microvolt = <1750000>;
regulator-max-microvolt = <3000000>;
regulator-boot-on;
regulator-always-on;
regulator-enable-ramp-delay = <120>;
};
ldo16: LDO16 { /* SD VDD */
regulator-name = "VOUT16_2V95";
regulator-min-microvolt = <1750000>;
regulator-max-microvolt = <3000000>;
regulator-enable-ramp-delay = <360>;
};
};
};
wlan_en: wlan-en-1-8v {
compatible = "regulator-fixed";
regulator-name = "wlan-en-regulator";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
/* GPIO_051_WIFI_EN */
gpio = <&gpio6 3 0>;
/* WLAN card specific delay */
startup-delay-us = <70000>;
enable-active-high;
};
firmware {
optee {
compatible = "linaro,optee-tz";
method = "smc";
};
};
};
/*
* Legend: proper name = the GPIO line is used as GPIO
* NC = not connected (pin out but not routed from the chip to
* anything the board)
* "[PER]" = pin is muxed for [peripheral] (not GPIO)
* "" = no idea, schematic doesn't say, could be
* unrouted (not connected to any external pin)
* LSEC = Low Speed External Connector
* HSEC = High Speed External Connector
*
* Line names are taken from "HiKey 960 Board ver A" schematics
* from Huawei. The 40 pin low speed expansion connector is named
* J2002 63453-140LF.
*
* For the lines routed to the external connectors the
* lines are named after the 96Boards CE Specification 1.0,
* Appendix "Expansion Connector Signal Description".
*
* When the 96Board naming of a line and the schematic name of
* the same line are in conflict, the 96Board specification
* takes precedence, which means that the external UART on the
* LSEC is named UART0 while the schematic and SoC names this
* UART3. This is only for the informational lines i.e. "[FOO]",
* the GPIO named lines "GPIO-A" thru "GPIO-L" are the only
* ones actually used for GPIO.
*/
&gpio0 {
/* GPIO_000-GPIO_007 */
gpio-line-names =
"",
"TP901", /* TEST_MODE connected to TP901 */
"[PMU0_SSI]",
"[PMU1_SSI]",
"[PMU2_SSI]",
"[PMU0_CLKOUT]",
"[JTAG_TCK]",
"[JTAG_TMS]";
};
&gpio1 {
/* GPIO_008-GPIO_015 */
gpio-line-names =
"[JTAG_TRST_N]",
"[JTAG_TDI]",
"[JTAG_TDO]",
"NC", "NC",
"[I2C3_SCL]",
"[I2C3_SDA]",
"NC";
};
&gpio2 {
/* GPIO_016-GPIO_023 */
gpio-line-names =
"NC", "NC", "NC",
"GPIO-J", /* LSEC pin 32: GPIO_019 */
"GPIO_020_HDMI_SEL",
"GPIO-L", /* LSEC pin 34: GPIO_021 */
"GPIO_022_UFSBUCK_INT_N",
"GPIO-G"; /* LSEC pin 29: LCD_TE0 */
};
&gpio3 {
/* GPIO_024-GPIO_031 */
/* The rail from pin BK36 is named LCD_TE0, we assume to be muxed as GPIO for GPIO-G */
gpio-line-names =
"[CSI0_MCLK]", /* HSEC pin 15: ISP_CCLK0_MCAM */
"[CSI1_MCLK]", /* HSEC pin 17: ISP_CCLK1_SCAM */
"NC",
"[I2C2_SCL]", /* HSEC pin 32: ISP_SCL0 */
"[I2C2_SDA]", /* HSEC pin 34: ISP_SDA0 */
"[I2C3_SCL]", /* HSEC pin 36: ISP_SCL1 */
"[I2C3_SDA]", /* HSEC pin 38: ISP_SDA1 */
"NC";
};
&gpio4 {
/* GPIO_032-GPIO_039 */
gpio-line-names =
"NC", "NC",
"PWR_BTN_N", /* LSEC pin 4: GPIO_034_PWRON_DET */
"GPIO_035_PMU2_EN",
"GPIO_036_USB_HUB_RESET",
"NC", "NC", "NC";
};
&gpio5 {
/* GPIO_040-GPIO_047 */
gpio-line-names =
"GPIO-H", /* LSEC pin 30: GPIO_040_LCD_RST_N */
"GPIO_041_HDMI_PD",
"TP904", /* Test point */
"TP905", /* Test point */
"NC", "NC",
"GPIO_046_HUB_VDD33_EN",
"GPIO_047_PMU1_EN";
};
&gpio6 {
/* GPIO_048-GPIO_055 */
gpio-line-names =
"NC", "NC", "NC",
"GPIO_051_WIFI_EN",
"GPIO-I", /* LSEC pin 31: GPIO_052_CAM0_RST_N */
/*
* These two pins should be used for SD(IO) data according to the
* 96boards specification but seems to be repurposed for a IRDA UART.
* They are however named according to the spec.
*/
"[SD_DAT1]", /* HSEC pin 3: UART0_IRDA_RXD */
"[SD_DAT2]", /* HSEC pin 5: UART0_IRDA_TXD */
"[UART1_RXD]"; /* LSEC pin 13: DEBUG_UART6_RXD */
};
&gpio7 {
/* GPIO_056-GPIO_063 */
gpio-line-names =
"[UART1_TXD]", /* LSEC pin 11: DEBUG_UART6_TXD */
"[UART0_CTS]", /* LSEC pin 3: UART3_CTS_N */
"[UART0_RTS]", /* LSEC pin 9: UART3_RTS_N */
"[UART0_RXD]", /* LSEC pin 7: UART3_RXD */
"[UART0_TXD]", /* LSEC pin 5: UART3_TXD */
"[SOC_BT_UART4_CTS_N]",
"[SOC_BT_UART4_RTS_N]",
"[SOC_BT_UART4_RXD]";
};
&gpio8 {
/* GPIO_064-GPIO_071 */
gpio-line-names =
"[SOC_BT_UART4_TXD]",
"NC",
"[PMU_HKADC_SSI]",
"NC",
"GPIO_068_SEL",
"NC", "NC", "NC";
};
&gpio9 {
/* GPIO_072-GPIO_079 */
gpio-line-names =
"NC", "NC", "NC",
"GPIO-K", /* LSEC pin 33: GPIO_075_CAM1_RST_N */
"NC", "NC", "NC", "NC";
};
&gpio10 {
/* GPIO_080-GPIO_087 */
gpio-line-names = "NC", "NC", "NC", "NC", "NC", "NC", "NC", "NC";
};
&gpio11 {
/* GPIO_088-GPIO_095 */
gpio-line-names =
"NC",
"[PCIE_PERST_N]",
"NC", "NC", "NC", "NC", "NC", "NC";
};
&gpio12 {
/* GPIO_096-GPIO_103 */
gpio-line-names = "NC", "NC", "NC", "", "", "", "", "NC";
};
&gpio13 {
/* GPIO_104-GPIO_111 */
gpio-line-names = "NC", "NC", "NC", "NC", "NC", "NC", "NC", "NC";
};
&gpio14 {
/* GPIO_112-GPIO_119 */
gpio-line-names = "NC", "NC", "NC", "NC", "NC", "NC", "NC", "NC";
};
&gpio15 {
/* GPIO_120-GPIO_127 */
gpio-line-names =
"NC", "NC", "NC", "NC", "NC", "NC",
"GPIO_126_BT_EN",
"TP902"; /* GPIO_127_JTAG_SEL0 */
};
&gpio16 {
/* GPIO_128-GPIO_135 */
gpio-line-names = "", "", "", "", "", "", "", "";
};
&gpio17 {
/* GPIO_136-GPIO_143 */
gpio-line-names = "", "", "", "", "", "", "", "";
};
&gpio18 {
/* GPIO_144-GPIO_151 */
gpio-line-names =
"[UFS_REF_CLK]",
"[UFS_RST_N]",
"[SPI1_SCLK]", /* HSEC pin 9: GPIO_146_SPI3_CLK */
"[SPI1_DIN]", /* HSEC pin 11: GPIO_147_SPI3_DI */
"[SPI1_DOUT]", /* HSEC pin 1: GPIO_148_SPI3_DO */
"[SPI1_CS]", /* HSEC pin 7: GPIO_149_SPI3_CS0_N */
"GPIO_150_USER_LED1",
"GPIO_151_USER_LED2";
};
&gpio19 {
/* GPIO_152-GPIO_159 */
gpio-line-names = "NC", "NC", "NC", "NC", "", "", "", "";
};
&gpio20 {
/* GPIO_160-GPIO_167 */
gpio-line-names =
"[SD_CLK]",
"[SD_CMD]",
"[SD_DATA0]",
"[SD_DATA1]",
"[SD_DATA2]",
"[SD_DATA3]",
"", "";
};
&gpio21 {
/* GPIO_168-GPIO_175 */
gpio-line-names =
"[WL_SDIO_CLK]",
"[WL_SDIO_CMD]",
"[WL_SDIO_DATA0]",
"[WL_SDIO_DATA1]",
"[WL_SDIO_DATA2]",
"[WL_SDIO_DATA3]",
"", "";
};
&gpio22 {
/* GPIO_176-GPIO_183 */
gpio-line-names =
"[GPIO_176_PMU_PWR_HOLD]",
"NA",
"[SYSCLK_EN]",
"GPIO_179_WL_WAKEUP_AP",
"GPIO_180_HDMI_INT",
"NA",
"GPIO-F", /* LSEC pin 28: LCD_BL_PWM */
"[I2C0_SCL]"; /* LSEC pin 15 */
};
&gpio23 {
/* GPIO_184-GPIO_191 */
gpio-line-names =
"[I2C0_SDA]", /* LSEC pin 17 */
"[I2C1_SCL]", /* Actual SoC I2C1 */
"[I2C1_SDA]", /* Actual SoC I2C1 */
"[I2C1_SCL]", /* LSEC pin 19: I2C7_SCL */
"[I2C1_SDA]", /* LSEC pin 21: I2C7_SDA */
"GPIO_189_USER_LED3",
"GPIO_190_USER_LED4",
"";
};
&gpio24 {
/* GPIO_192-GPIO_199 */
gpio-line-names =
"[PCM_DI]", /* LSEC pin 22: GPIO_192_I2S0_DI */
"[PCM_DO]", /* LSEC pin 20: GPIO_193_I2S0_DO */
"[PCM_CLK]", /* LSEC pin 18: GPIO_194_I2S0_XCLK */
"[PCM_FS]", /* LSEC pin 16: GPIO_195_I2S0_XFS */
"[GPIO_196_I2S2_DI]",
"[GPIO_197_I2S2_DO]",
"[GPIO_198_I2S2_XCLK]",
"[GPIO_199_I2S2_XFS]";
};
&gpio25 {
/* GPIO_200-GPIO_207 */
gpio-line-names =
"NC",
"NC",
"GPIO_202_VBUS_TYPEC",
"GPIO_203_SD_DET",
"GPIO_204_PMU12_IRQ_N",
"GPIO_205_WIFI_ACTIVE",
"GPIO_206_USBSW_SEL",
"GPIO_207_BT_ACTIVE";
};
&gpio26 {
/* GPIO_208-GPIO_215 */
gpio-line-names =
"GPIO-A", /* LSEC pin 23: GPIO_208 */
"GPIO-B", /* LSEC pin 24: GPIO_209 */
"GPIO-C", /* LSEC pin 25: GPIO_210 */
"GPIO-D", /* LSEC pin 26: GPIO_211 */
"GPIO-E", /* LSEC pin 27: GPIO_212 */
"[PCIE_CLKREQ_N]",
"[PCIE_WAKE_N]",
"[SPI0_CLK]"; /* LSEC pin 8: SPI2_CLK */
};
&gpio27 {
/* GPIO_216-GPIO_223 */
gpio-line-names =
"[SPI0_DIN]", /* LSEC pin 10: SPI2_DI */
"[SPI0_DOUT]", /* LSEC pin 14: SPI2_DO */
"[SPI0_CS]", /* LSEC pin 12: SPI2_CS0_N */
"GPIO_219_CC_INT",
"NC",
"NC",
"[PMU_INT]",
"";
};
&gpio28 {
/* GPIO_224-GPIO_231 */
gpio-line-names =
"", "", "", "", "", "", "", "";
};
&i2c0 {
/* On Low speed expansion */
label = "LS-I2C0";
status = "okay";
};
&i2c1 {
status = "okay";
adv7533: adv7533@39 {
status = "ok";
compatible = "adi,adv7533";
reg = <0x39>;
};
};
&uart3 {
/* On Low speed expansion */
label = "LS-UART0";
status = "okay";
};
&uart4 {
status = "okay";
bluetooth {
compatible = "ti,wl1837-st";
enable-gpios = <&gpio15 6 GPIO_ACTIVE_HIGH>;
max-speed = <3000000>;
};
};
&i2c7 {
/* On Low speed expansion */
label = "LS-I2C1";
status = "okay";
};
&uart6 {
/* On Low speed expansion */
label = "LS-UART1";
status = "okay";
};
&spi2 {
/* On Low speed expansion */
label = "LS-SPI0";
status = "okay";
};
&spi3 {
/* On High speed expansion */
label = "HS-SPI1";
status = "okay";
};
&dwmmc1 {
cd-gpios = <&gpio25 3 GPIO_ACTIVE_LOW>;
pinctrl-names = "default";
pinctrl-0 = <&sd_pmx_func
&sd_clk_cfg_func
&sd_cfg_func>;
vmmc-supply = <&ldo16>;
vqmmc-supply = <&ldo9>;
status = "okay";
};
&dwmmc2 { /* WIFI */
bus-width = <0x4>;
non-removable;
broken-cd;
cap-power-off-card;
pinctrl-names = "default";
pinctrl-0 = <&sdio_pmx_func
&sdio_clk_cfg_func
&sdio_cfg_func>;
/* WL_EN */
vmmc-supply = <&wlan_en>;
status = "ok";
wlcore: wlcore@2 {
compatible = "ti,wl1837";
reg = <2>; /* sdio func num */
/* WL_IRQ, GPIO_179_WL_WAKEUP_AP */
interrupt-parent = <&gpio22>;
interrupts = <3 IRQ_TYPE_EDGE_RISING>;
};
};
|