1/*
2 * dts file for Hisilicon HiKey960 Development Board
3 *
4 * Copyright (C) 2016, Hisilicon Ltd.
5 *
6 */
7
8/dts-v1/;
9
10#include "hi3660.dtsi"
11#include "hikey960-pinctrl.dtsi"
12#include <dt-bindings/gpio/gpio.h>
13#include <dt-bindings/input/input.h>
14#include <dt-bindings/interrupt-controller/irq.h>
15
16/ {
17	model = "HiKey960";
18	compatible = "hisilicon,hi3660-hikey960", "hisilicon,hi3660";
19
20	aliases {
21		mshc1 = &dwmmc1;
22		mshc2 = &dwmmc2;
23		serial0 = &uart0;
24		serial1 = &uart1;
25		serial2 = &uart2;
26		serial3 = &uart3;
27		serial4 = &uart4;
28		serial5 = &uart5;
29		serial6 = &uart6;
30	};
31
32	chosen {
33		stdout-path = "serial6:115200n8";
34	};
35
36	memory@0 {
37		device_type = "memory";
38		/* rewrite this at bootloader */
39		reg = <0x0 0x0 0x0 0x0>;
40	};
41
42	keys {
43		compatible = "gpio-keys";
44		pinctrl-names = "default";
45		pinctrl-0 = <&pwr_key_pmx_func &pwr_key_cfg_func>;
46
47		power {
48			wakeup-source;
49			gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
50			label = "GPIO Power";
51			linux,code = <KEY_POWER>;
52		};
53	};
54
55	leds {
56		compatible = "gpio-leds";
57
58		user_led1 {
59			label = "user_led1";
60			/* gpio_150_user_led1 */
61			gpios = <&gpio18 6 0>;
62			linux,default-trigger = "heartbeat";
63		};
64
65		user_led2 {
66			label = "user_led2";
67			/* gpio_151_user_led2 */
68			gpios = <&gpio18 7 0>;
69			linux,default-trigger = "mmc0";
70		};
71
72		user_led3 {
73			label = "user_led3";
74			/* gpio_189_user_led3 */
75			gpios = <&gpio23 5 0>;
76			default-state = "off";
77		};
78
79		user_led4 {
80			label = "user_led4";
81			/* gpio_190_user_led4 */
82			gpios = <&gpio23 6 0>;
83			linux,default-trigger = "cpu0";
84		};
85
86		wlan_active_led {
87			label = "wifi_active";
88			/* gpio_205_wifi_active */
89			gpios = <&gpio25 5 0>;
90			linux,default-trigger = "phy0tx";
91			default-state = "off";
92		};
93
94		bt_active_led {
95			label = "bt_active";
96			gpios = <&gpio25 7 0>;
97			/* gpio_207_user_led1 */
98			linux,default-trigger = "hci0-power";
99			default-state = "off";
100		};
101	};
102
103	pmic: pmic@fff34000 {
104		compatible = "hisilicon,hi6421v530-pmic";
105		reg = <0x0 0xfff34000 0x0 0x1000>;
106		interrupt-controller;
107		#interrupt-cells = <2>;
108
109		regulators {
110			ldo3: LDO3 { /* HDMI */
111				regulator-name = "VOUT3_1V85";
112				regulator-min-microvolt = <1800000>;
113				regulator-max-microvolt = <2200000>;
114				regulator-enable-ramp-delay = <120>;
115			};
116
117			ldo9: LDO9 { /* SDCARD I/O */
118				regulator-name = "VOUT9_1V8_2V95";
119				regulator-min-microvolt = <1750000>;
120				regulator-max-microvolt = <3300000>;
121				regulator-enable-ramp-delay = <240>;
122			};
123
124			ldo11: LDO11 { /* Low Speed Connector */
125				regulator-name = "VOUT11_1V8_2V95";
126				regulator-min-microvolt = <1750000>;
127				regulator-max-microvolt = <3300000>;
128				regulator-enable-ramp-delay = <240>;
129			};
130
131			ldo15: LDO15 { /* UFS VCC */
132				regulator-name = "VOUT15_3V0";
133				regulator-min-microvolt = <1750000>;
134				regulator-max-microvolt = <3000000>;
135				regulator-boot-on;
136				regulator-always-on;
137				regulator-enable-ramp-delay = <120>;
138			};
139
140			ldo16: LDO16 { /* SD VDD */
141				regulator-name = "VOUT16_2V95";
142				regulator-min-microvolt = <1750000>;
143				regulator-max-microvolt = <3000000>;
144				regulator-enable-ramp-delay = <360>;
145			};
146		};
147	};
148};
149
150&i2c0 {
151	/* On Low speed expansion */
152	label = "LS-I2C0";
153	status = "okay";
154};
155
156&i2c1 {
157	status = "okay";
158
159	adv7533: adv7533@39 {
160		status = "ok";
161		compatible = "adi,adv7533";
162		reg = <0x39>;
163	};
164};
165
166&i2c7 {
167	/* On Low speed expansion */
168	label = "LS-I2C1";
169	status = "okay";
170};
171
172&uart3 {
173	/* On Low speed expansion */
174	label = "LS-UART0";
175	status = "okay";
176};
177
178&uart4 {
179	status = "okay";
180
181	bluetooth {
182		compatible = "ti,wl1837-st";
183		enable-gpios = <&gpio15 6 GPIO_ACTIVE_HIGH>;
184		max-speed = <921600>;
185	};
186};
187
188&uart6 {
189	/* On Low speed expansion */
190	label = "LS-UART1";
191	status = "okay";
192};
193
194&spi2 {
195	/* On Low speed expansion */
196	label = "LS-SPI0";
197	status = "okay";
198};
199
200&spi3 {
201	/* On High speed expansion */
202	label = "HS-SPI1";
203	status = "okay";
204};
205
206&dwmmc1 {
207	vmmc-supply = <&ldo16>;
208	vqmmc-supply = <&ldo9>;
209	status = "okay";
210};
211