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
164&i2c0 {
165	/* On Low speed expansion */
166	label = "LS-I2C0";
167	status = "okay";
168};
169
170&i2c1 {
171	status = "okay";
172
173	adv7533: adv7533@39 {
174		status = "ok";
175		compatible = "adi,adv7533";
176		reg = <0x39>;
177	};
178};
179
180&i2c7 {
181	/* On Low speed expansion */
182	label = "LS-I2C1";
183	status = "okay";
184};
185
186&uart3 {
187	/* On Low speed expansion */
188	label = "LS-UART0";
189	status = "okay";
190};
191
192&uart4 {
193	status = "okay";
194
195	bluetooth {
196		compatible = "ti,wl1837-st";
197		enable-gpios = <&gpio15 6 GPIO_ACTIVE_HIGH>;
198		max-speed = <921600>;
199	};
200};
201
202&uart6 {
203	/* On Low speed expansion */
204	label = "LS-UART1";
205	status = "okay";
206};
207
208&spi2 {
209	/* On Low speed expansion */
210	label = "LS-SPI0";
211	status = "okay";
212};
213
214&spi3 {
215	/* On High speed expansion */
216	label = "HS-SPI1";
217	status = "okay";
218};
219
220&dwmmc1 {
221	vmmc-supply = <&ldo16>;
222	vqmmc-supply = <&ldo9>;
223	status = "okay";
224};
225
226&dwmmc2 { /* WIFI */
227	broken-cd;
228	/* WL_EN */
229	vmmc-supply = <&wlan_en>;
230	ti,non-removable;
231	non-removable;
232	#address-cells = <0x1>;
233	#size-cells = <0x0>;
234	status = "ok";
235
236	wlcore: wlcore@2 {
237		compatible = "ti,wl1837";
238		reg = <2>;      /* sdio func num */
239		/* WL_IRQ, GPIO_179_WL_WAKEUP_AP */
240		interrupt-parent = <&gpio22>;
241		interrupts = <3 IRQ_TYPE_EDGE_RISING>;
242	};
243};
244