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	wlan_en: wlan-en-1-8v {
150		compatible = "regulator-fixed";
151		regulator-name = "wlan-en-regulator";
152		regulator-min-microvolt = <1800000>;
153		regulator-max-microvolt = <1800000>;
154
155		/* GPIO_051_WIFI_EN */
156		gpio = <&gpio6 3 0>;
157
158		/* WLAN card specific delay */
159		startup-delay-us = <70000>;
160		enable-active-high;
161	};
162
163	firmware {
164		optee {
165			compatible = "linaro,optee-tz";
166			method = "smc";
167		};
168	};
169};
170
171&i2c0 {
172	/* On Low speed expansion */
173	label = "LS-I2C0";
174	status = "okay";
175};
176
177&i2c1 {
178	status = "okay";
179
180	adv7533: adv7533@39 {
181		status = "ok";
182		compatible = "adi,adv7533";
183		reg = <0x39>;
184	};
185};
186
187&i2c7 {
188	/* On Low speed expansion */
189	label = "LS-I2C1";
190	status = "okay";
191};
192
193&uart3 {
194	/* On Low speed expansion */
195	label = "LS-UART0";
196	status = "okay";
197};
198
199&uart4 {
200	status = "okay";
201
202	bluetooth {
203		compatible = "ti,wl1837-st";
204		enable-gpios = <&gpio15 6 GPIO_ACTIVE_HIGH>;
205		max-speed = <921600>;
206	};
207};
208
209&uart6 {
210	/* On Low speed expansion */
211	label = "LS-UART1";
212	status = "okay";
213};
214
215&spi2 {
216	/* On Low speed expansion */
217	label = "LS-SPI0";
218	status = "okay";
219};
220
221&spi3 {
222	/* On High speed expansion */
223	label = "HS-SPI1";
224	status = "okay";
225};
226
227&dwmmc1 {
228	vmmc-supply = <&ldo16>;
229	vqmmc-supply = <&ldo9>;
230	status = "okay";
231};
232
233&dwmmc2 { /* WIFI */
234	broken-cd;
235	/* WL_EN */
236	vmmc-supply = <&wlan_en>;
237	ti,non-removable;
238	non-removable;
239	#address-cells = <0x1>;
240	#size-cells = <0x0>;
241	status = "ok";
242
243	wlcore: wlcore@2 {
244		compatible = "ti,wl1837";
245		reg = <2>;      /* sdio func num */
246		/* WL_IRQ, GPIO_179_WL_WAKEUP_AP */
247		interrupt-parent = <&gpio22>;
248		interrupts = <3 IRQ_TYPE_EDGE_RISING>;
249	};
250};
251