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	reboot-mode-syscon@32100000 {
43		compatible = "syscon", "simple-mfd";
44		reg = <0x0 0x32100000 0x0 0x00001000>;
45
46		reboot-mode {
47			compatible = "syscon-reboot-mode";
48			offset = <0x0>;
49
50			mode-normal	= <0x77665501>;
51			mode-bootloader	= <0x77665500>;
52			mode-recovery	= <0x77665502>;
53		};
54	};
55
56	keys {
57		compatible = "gpio-keys";
58		pinctrl-names = "default";
59		pinctrl-0 = <&pwr_key_pmx_func &pwr_key_cfg_func>;
60
61		power {
62			wakeup-source;
63			gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
64			label = "GPIO Power";
65			linux,code = <KEY_POWER>;
66		};
67	};
68
69	leds {
70		compatible = "gpio-leds";
71
72		user_led1 {
73			label = "user_led1";
74			/* gpio_150_user_led1 */
75			gpios = <&gpio18 6 0>;
76			linux,default-trigger = "heartbeat";
77		};
78
79		user_led2 {
80			label = "user_led2";
81			/* gpio_151_user_led2 */
82			gpios = <&gpio18 7 0>;
83			linux,default-trigger = "mmc0";
84		};
85
86		user_led3 {
87			label = "user_led3";
88			/* gpio_189_user_led3 */
89			gpios = <&gpio23 5 0>;
90			default-state = "off";
91		};
92
93		user_led4 {
94			label = "user_led4";
95			/* gpio_190_user_led4 */
96			gpios = <&gpio23 6 0>;
97			linux,default-trigger = "cpu0";
98		};
99
100		wlan_active_led {
101			label = "wifi_active";
102			/* gpio_205_wifi_active */
103			gpios = <&gpio25 5 0>;
104			linux,default-trigger = "phy0tx";
105			default-state = "off";
106		};
107
108		bt_active_led {
109			label = "bt_active";
110			gpios = <&gpio25 7 0>;
111			/* gpio_207_user_led1 */
112			linux,default-trigger = "hci0-power";
113			default-state = "off";
114		};
115	};
116
117	pmic: pmic@fff34000 {
118		compatible = "hisilicon,hi6421v530-pmic";
119		reg = <0x0 0xfff34000 0x0 0x1000>;
120		interrupt-controller;
121		#interrupt-cells = <2>;
122
123		regulators {
124			ldo3: LDO3 { /* HDMI */
125				regulator-name = "VOUT3_1V85";
126				regulator-min-microvolt = <1800000>;
127				regulator-max-microvolt = <2200000>;
128				regulator-enable-ramp-delay = <120>;
129			};
130
131			ldo9: LDO9 { /* SDCARD I/O */
132				regulator-name = "VOUT9_1V8_2V95";
133				regulator-min-microvolt = <1750000>;
134				regulator-max-microvolt = <3300000>;
135				regulator-enable-ramp-delay = <240>;
136			};
137
138			ldo11: LDO11 { /* Low Speed Connector */
139				regulator-name = "VOUT11_1V8_2V95";
140				regulator-min-microvolt = <1750000>;
141				regulator-max-microvolt = <3300000>;
142				regulator-enable-ramp-delay = <240>;
143			};
144
145			ldo15: LDO15 { /* UFS VCC */
146				regulator-name = "VOUT15_3V0";
147				regulator-min-microvolt = <1750000>;
148				regulator-max-microvolt = <3000000>;
149				regulator-boot-on;
150				regulator-always-on;
151				regulator-enable-ramp-delay = <120>;
152			};
153
154			ldo16: LDO16 { /* SD VDD */
155				regulator-name = "VOUT16_2V95";
156				regulator-min-microvolt = <1750000>;
157				regulator-max-microvolt = <3000000>;
158				regulator-enable-ramp-delay = <360>;
159			};
160		};
161	};
162
163	wlan_en: wlan-en-1-8v {
164		compatible = "regulator-fixed";
165		regulator-name = "wlan-en-regulator";
166		regulator-min-microvolt = <1800000>;
167		regulator-max-microvolt = <1800000>;
168
169		/* GPIO_051_WIFI_EN */
170		gpio = <&gpio6 3 0>;
171
172		/* WLAN card specific delay */
173		startup-delay-us = <70000>;
174		enable-active-high;
175	};
176
177	firmware {
178		optee {
179			compatible = "linaro,optee-tz";
180			method = "smc";
181		};
182	};
183};
184
185&i2c0 {
186	/* On Low speed expansion */
187	label = "LS-I2C0";
188	status = "okay";
189};
190
191&i2c1 {
192	status = "okay";
193
194	adv7533: adv7533@39 {
195		status = "ok";
196		compatible = "adi,adv7533";
197		reg = <0x39>;
198	};
199};
200
201&i2c7 {
202	/* On Low speed expansion */
203	label = "LS-I2C1";
204	status = "okay";
205};
206
207&uart3 {
208	/* On Low speed expansion */
209	label = "LS-UART0";
210	status = "okay";
211};
212
213&uart4 {
214	status = "okay";
215
216	bluetooth {
217		compatible = "ti,wl1837-st";
218		enable-gpios = <&gpio15 6 GPIO_ACTIVE_HIGH>;
219		max-speed = <921600>;
220	};
221};
222
223&uart6 {
224	/* On Low speed expansion */
225	label = "LS-UART1";
226	status = "okay";
227};
228
229&spi2 {
230	/* On Low speed expansion */
231	label = "LS-SPI0";
232	status = "okay";
233};
234
235&spi3 {
236	/* On High speed expansion */
237	label = "HS-SPI1";
238	status = "okay";
239};
240
241&dwmmc1 {
242	vmmc-supply = <&ldo16>;
243	vqmmc-supply = <&ldo9>;
244	status = "okay";
245};
246
247&dwmmc2 { /* WIFI */
248	broken-cd;
249	/* WL_EN */
250	vmmc-supply = <&wlan_en>;
251	ti,non-removable;
252	non-removable;
253	#address-cells = <0x1>;
254	#size-cells = <0x0>;
255	status = "ok";
256
257	wlcore: wlcore@2 {
258		compatible = "ti,wl1837";
259		reg = <2>;      /* sdio func num */
260		/* WL_IRQ, GPIO_179_WL_WAKEUP_AP */
261		interrupt-parent = <&gpio22>;
262		interrupts = <3 IRQ_TYPE_EDGE_RISING>;
263	};
264};
265