• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/*
2 * dts file for Hisilicon HiKey Development Board
3 *
4 * Copyright (C) 2015, Hisilicon Ltd.
5 *
6 */
7
8/dts-v1/;
9#include <dt-bindings/gpio/gpio.h>
10
11#include "hi6220.dtsi"
12#include "hikey-pinctrl.dtsi"
13
14/ {
15	model = "HiKey Development Board";
16	compatible = "hisilicon,hi6220-hikey", "hisilicon,hi6220";
17
18	aliases {
19		serial0 = &uart0; /* On board UART0 */
20		serial1 = &uart1; /* BT UART */
21		serial2 = &uart2; /* LS Expansion UART0 */
22		serial3 = &uart3; /* LS Expansion UART1 */
23	};
24
25	chosen {
26		stdout-path = "serial3:115200n8";
27	};
28
29	/*
30	 * Reserve below regions from memory node:
31	 *
32	 *  0x05e0,0000 - 0x05ef,ffff: MCU firmware runtime using
33	 *  0x05f0,1000 - 0x05f0,1fff: Reboot reason
34	 *  0x06df,f000 - 0x06df,ffff: Mailbox message data
35	 *  0x0740,f000 - 0x0740,ffff: MCU firmware section
36	 *  0x21f0,0000 - 0x21ff,ffff: pstore/ramoops buffer
37	 *  0x3e00,0000 - 0x3fff,ffff: OP-TEE
38	 */
39	memory@0 {
40		device_type = "memory";
41		reg = <0x00000000 0x00000000 0x00000000 0x05e00000>,
42		      <0x00000000 0x05f00000 0x00000000 0x00001000>,
43		      <0x00000000 0x05f02000 0x00000000 0x00efd000>,
44		      <0x00000000 0x06e00000 0x00000000 0x0060f000>,
45		      <0x00000000 0x07410000 0x00000000 0x1aaf0000>,
46		      <0x00000000 0x22000000 0x00000000 0x1c000000>;
47	};
48
49	firmware {
50		optee {
51			compatible = "linaro,optee-tz";
52			method = "smc";
53		};
54	};
55
56	pstore: pstore@0x21f00000 {
57		no-map;
58		reg = <0x0 0x21f00000 0x0 0x00100000>;  /* pstore/ramoops buffer */
59	};
60
61	ramoops {
62		compatible = "ramoops";
63		memory-region = <&pstore>;
64		record-size	= <0x0 0x00020000>;
65		console-size	= <0x0 0x00020000>;
66		ftrace-size	= <0x0 0x00020000>;
67	};
68
69	reboot_reason: reboot-reason@05f01000 {
70		compatible		= "linux,reboot-reason-sram";
71		reg			= <0x0 0x05F01000 0x0 0x4>;
72		reason,none		= <0x77665501>;
73		reason,bootloader	= <0x77665500>;
74		reason,recovery		= <0x77665502>;
75		reason,oem		= <0x6f656d00>;
76	};
77
78	soc {
79		i2c0: i2c@f7100000 {
80			status = "ok";
81		};
82
83		i2c1: i2c@f7101000 {
84			status = "ok";
85		};
86
87		uart1: uart@f7111000 {
88			status = "ok";
89		};
90
91		uart2: uart@f7112000 {
92			status = "ok";
93		};
94
95		uart3: uart@f7113000 {
96			status = "ok";
97		};
98
99		dwmmc_2: dwmmc2@f723f000 {
100			ti,non-removable;
101			non-removable;
102			/* WL_EN */
103			vmmc-supply = <&wlan_en_reg>;
104
105			#address-cells = <0x1>;
106			#size-cells = <0x0>;
107			wlcore: wlcore@2 {
108				compatible = "ti,wl1835";
109				reg = <2>;	/* sdio func num */
110				/* WL_IRQ, WL_HOST_WAKE_GPIO1_3 */
111				interrupt-parent = <&gpio1>;
112				interrupts = <3 IRQ_TYPE_EDGE_RISING>;
113			};
114		};
115
116		wlan_en_reg: fixedregulator@1 {
117			compatible = "regulator-fixed";
118			regulator-name = "wlan-en-regulator";
119			regulator-min-microvolt = <1800000>;
120			regulator-max-microvolt = <1800000>;
121			/* WLAN_EN GPIO */
122			gpio = <&gpio0 5 0>;
123			/* WLAN card specific delay */
124			startup-delay-us = <70000>;
125			enable-active-high;
126		};
127
128		hisi-ion@0 {
129			compatible = "hisilicon,ion";
130
131			heap_sys_user@0 {
132				heap-name = "sys_user";
133				heap-range = <0x0 0x0>;
134				heap-type = "ion_system";
135			};
136
137			heap_sys_contig@0 {
138				heap-name = "sys_contig";
139				heap-range = <0x0 0x0>;
140				heap-type = "ion_system_contig";
141			};
142
143			heap_cma@0 {
144				heap-name = "cma";
145				heap-range = <0x0 0x0>;
146				heap-type = "ion_cma";
147			};
148		};
149	};
150
151	leds {
152		compatible = "gpio-leds";
153		user_led1 {
154			label = "user_led4";
155			gpios = <&gpio4 0 0>; /* <&gpio_user_led_1>; */
156			linux,default-trigger = "heartbeat";
157		};
158
159		user_led2 {
160			label = "user_led3";
161			gpios = <&gpio4 1 0>; /* <&gpio_user_led_2>; */
162			linux,default-trigger = "mmc0";
163		};
164
165		user_led3 {
166			label = "user_led2";
167			gpios = <&gpio4 2 0>; /* <&gpio_user_led_3>; */
168			linux,default-trigger = "mmc1";
169		};
170
171		user_led4 {
172			label = "user_led1";
173			gpios = <&gpio4 3 0>; /* <&gpio_user_led_4>; */
174			linux,default-trigger = "cpu0";
175		};
176
177		wlan_active_led {
178			label = "wifi_active";
179			gpios = <&gpio3 5 0>; /* <&gpio_wlan_active_led>; */
180			linux,default-trigger = "phy0tx";
181			default-state = "off";
182		};
183
184		bt_active_led {
185			label = "bt_active";
186			gpios = <&gpio4 7 0>; /* <&gpio_bt_active_led>; */
187			linux,default-trigger = "hci0rx";
188			default-state = "off";
189		};
190	};
191
192	kim {
193		compatible = "kim";
194		pinctrl-names = "default";
195		pinctrl-0 = <>; /* FIXME: add BT PCM pinctrl here */
196		/*
197		 * FIXME: The following is complete CRAP since
198		 * the vendor driver doesn't follow the gpio
199		 * binding. Passing in a magic Linux gpio number
200		 * here until we fix the vendor driver.
201		 */
202		/* BT_EN: BT_REG_ON_GPIO1_7 */
203		nshutdown_gpio = <503>;
204		dev_name = "/dev/ttyAMA1";
205		flow_cntrl = <1>;
206		baud_rate = <3000000>;
207	};
208
209	btwilink {
210		compatible = "btwilink";
211	};
212
213	pmic: pmic@f8000000 {
214		compatible = "hisilicon,hi655x-pmic";
215		reg = <0x0 0xf8000000 0x0 0x1000>;
216		interrupt-controller;
217		#interrupt-cells = <2>;
218		pmic-gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
219		status = "okay";
220
221		ponkey:ponkey@b1{
222			compatible = "hisilicon,hi6552-powerkey";
223			interrupt-parent = <&pmic>;
224			interrupts = <6 0>, <5 0>, <4 0>;
225			interrupt-names = "down", "up", "hold 4s";
226		};
227
228		regulators {
229			ldo2: LDO2 {
230				regulator-name = "LDO2_2V8";
231				regulator-min-microvolt = <2500000>;
232				regulator-max-microvolt = <3200000>;
233				regulator-enable-ramp-delay = <120>;
234			};
235
236			ldo7: LDO7 {
237				regulator-name = "LDO7_SDIO";
238				regulator-min-microvolt = <1800000>;
239				regulator-max-microvolt = <3300000>;
240				regulator-enable-ramp-delay = <120>;
241			};
242
243			ldo10: LDO10 {
244				regulator-name = "LDO10_2V85";
245				regulator-min-microvolt = <1800000>;
246				regulator-max-microvolt = <3000000>;
247				regulator-enable-ramp-delay = <360>;
248			};
249
250			ldo13: LDO13 {
251				regulator-name = "LDO13_1V8";
252				regulator-min-microvolt = <1600000>;
253				regulator-max-microvolt = <1950000>;
254				regulator-enable-ramp-delay = <120>;
255			};
256
257			ldo14: LDO14 {
258				regulator-name = "LDO14_2V8";
259				regulator-min-microvolt = <2500000>;
260				regulator-max-microvolt = <3200000>;
261				regulator-enable-ramp-delay = <120>;
262			};
263
264			ldo15: LDO15 {
265				regulator-name = "LDO15_1V8";
266				regulator-min-microvolt = <1600000>;
267				regulator-max-microvolt = <1950000>;
268				regulator-boot-on;
269				regulator-always-on;
270				regulator-enable-ramp-delay = <120>;
271			};
272
273			ldo17: LDO17 {
274				regulator-name = "LDO17_2V5";
275				regulator-min-microvolt = <2500000>;
276				regulator-max-microvolt = <3200000>;
277				regulator-enable-ramp-delay = <120>;
278			};
279
280			ldo19: LDO19 {
281				regulator-name = "LDO19_3V0";
282				regulator-min-microvolt = <1800000>;
283				regulator-max-microvolt = <3000000>;
284				regulator-enable-ramp-delay = <360>;
285			};
286
287			ldo21: LDO21 {
288				regulator-name = "LDO21_1V8";
289				regulator-min-microvolt = <1650000>;
290				regulator-max-microvolt = <2000000>;
291				regulator-always-on;
292				regulator-enable-ramp-delay = <120>;
293			};
294
295			ldo22: LDO22 {
296				regulator-name = "LDO22_1V2";
297				regulator-min-microvolt = <900000>;
298				regulator-max-microvolt = <1200000>;
299				regulator-boot-on;
300				regulator-always-on;
301				regulator-enable-ramp-delay = <120>;
302			};
303		};
304	};
305};
306
307&ade {
308	status = "ok";
309};
310
311&dsi {
312	#address-cells = <1>;
313	#size-cells = <0>;
314	mux-gpio = <&gpio0 1 0>;
315	status = "ok";
316
317	ports {
318		/* 1 for output port */
319		port@1 {
320			#address-cells = <1>;
321			#size-cells = <0>;
322			reg = <1>;
323
324			dsi_out0: endpoint@0 {
325				reg = <0>;
326				remote-endpoint = <&adv7533_in>;
327			};
328
329			dsi_out1: endpoint@1 {
330				reg = <1>;
331				remote-endpoint = <&panel0_in>;
332			};
333		};
334	};
335
336	/* For panel reg's value should >= 1 */
337	panel@1 {
338		compatible = "innolux,n070icn-pb1";
339		reg = <1>;
340		power-on-delay= <50>;
341		reset-delay = <100>;
342		init-delay = <100>;
343		panel-width-mm = <58>;
344		panel-height-mm = <103>;
345		pwr-en-gpio = <&gpio2 1 0>;
346		bl-en-gpio = <&gpio2 3 0>;
347		pwm-gpio = <&gpio12 7 0>;
348
349		port {
350			panel0_in: endpoint {
351				remote-endpoint = <&dsi_out1>;
352			};
353		};
354	};
355};
356
357&i2c2 {
358	#address-cells = <1>;
359	#size-cells = <0>;
360	status = "ok";
361
362	adv7533: adv7533@39 {
363		compatible = "adi,adv7533";
364		reg = <0x39>;
365		interrupt-parent = <&gpio1>;
366		interrupts = <1 2>;
367		pd-gpio = <&gpio0 4 0>;
368		adi,dsi-lanes = <4>;
369		adi,disable-timing-generator;
370
371		port {
372			adv7533_in: endpoint {
373				remote-endpoint = <&dsi_out0>;
374			};
375		};
376	};
377 };
378