xref: /linux/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts (revision b24413180f5600bcb3bb70fbed5cf186b60864bd)
1*b2441318SGreg Kroah-Hartman// SPDX-License-Identifier: GPL-2.0
235ca8168SChen Feng/*
335ca8168SChen Feng * dts file for Hisilicon HiKey960 Development Board
435ca8168SChen Feng *
535ca8168SChen Feng * Copyright (C) 2016, Hisilicon Ltd.
635ca8168SChen Feng *
735ca8168SChen Feng */
835ca8168SChen Feng
935ca8168SChen Feng/dts-v1/;
1035ca8168SChen Feng
1135ca8168SChen Feng#include "hi3660.dtsi"
12d4e1eaeeSWang Xiaoyin#include "hikey960-pinctrl.dtsi"
132e9b4447SGuodong Xu#include <dt-bindings/gpio/gpio.h>
148cb53a8dSChen Jun#include <dt-bindings/input/input.h>
158cb53a8dSChen Jun#include <dt-bindings/interrupt-controller/irq.h>
1635ca8168SChen Feng
1735ca8168SChen Feng/ {
1835ca8168SChen Feng	model = "HiKey960";
19b6c93186SGuodong Xu	compatible = "hisilicon,hi3660-hikey960", "hisilicon,hi3660";
2035ca8168SChen Feng
2135ca8168SChen Feng	aliases {
22804d7d7aSLi Wei		mshc1 = &dwmmc1;
23804d7d7aSLi Wei		mshc2 = &dwmmc2;
24254b07b2SChen Feng		serial0 = &uart0;
25254b07b2SChen Feng		serial1 = &uart1;
26254b07b2SChen Feng		serial2 = &uart2;
27254b07b2SChen Feng		serial3 = &uart3;
28254b07b2SChen Feng		serial4 = &uart4;
29254b07b2SChen Feng		serial5 = &uart5;
30254b07b2SChen Feng		serial6 = &uart6;
3135ca8168SChen Feng	};
3235ca8168SChen Feng
3335ca8168SChen Feng	chosen {
34254b07b2SChen Feng		stdout-path = "serial6:115200n8";
3535ca8168SChen Feng	};
3635ca8168SChen Feng
3735ca8168SChen Feng	memory@0 {
3835ca8168SChen Feng		device_type = "memory";
3935ca8168SChen Feng		/* rewrite this at bootloader */
4035ca8168SChen Feng		reg = <0x0 0x0 0x0 0x0>;
4135ca8168SChen Feng	};
428cb53a8dSChen Jun
439c24dc9dSGuodong Xu	reserved-memory {
449c24dc9dSGuodong Xu		#address-cells = <2>;
459c24dc9dSGuodong Xu		#size-cells = <2>;
469c24dc9dSGuodong Xu		ranges;
479c24dc9dSGuodong Xu
489c24dc9dSGuodong Xu		ramoops@32000000 {
499c24dc9dSGuodong Xu			compatible = "ramoops";
509c24dc9dSGuodong Xu			reg = <0x0 0x32000000 0x0 0x00100000>;
519c24dc9dSGuodong Xu			record-size	= <0x00020000>;
529c24dc9dSGuodong Xu			console-size	= <0x00020000>;
539c24dc9dSGuodong Xu			ftrace-size	= <0x00020000>;
549c24dc9dSGuodong Xu		};
559c24dc9dSGuodong Xu	};
569c24dc9dSGuodong Xu
57b6b681c1SGuodong Xu	reboot-mode-syscon@32100000 {
58b6b681c1SGuodong Xu		compatible = "syscon", "simple-mfd";
59b6b681c1SGuodong Xu		reg = <0x0 0x32100000 0x0 0x00001000>;
60b6b681c1SGuodong Xu
61b6b681c1SGuodong Xu		reboot-mode {
62b6b681c1SGuodong Xu			compatible = "syscon-reboot-mode";
63b6b681c1SGuodong Xu			offset = <0x0>;
64b6b681c1SGuodong Xu
65b6b681c1SGuodong Xu			mode-normal	= <0x77665501>;
66b6b681c1SGuodong Xu			mode-bootloader	= <0x77665500>;
67b6b681c1SGuodong Xu			mode-recovery	= <0x77665502>;
68b6b681c1SGuodong Xu		};
69b6b681c1SGuodong Xu	};
70b6b681c1SGuodong Xu
718cb53a8dSChen Jun	keys {
728cb53a8dSChen Jun		compatible = "gpio-keys";
738cb53a8dSChen Jun		pinctrl-names = "default";
748cb53a8dSChen Jun		pinctrl-0 = <&pwr_key_pmx_func &pwr_key_cfg_func>;
758cb53a8dSChen Jun
768cb53a8dSChen Jun		power {
778cb53a8dSChen Jun			wakeup-source;
788cb53a8dSChen Jun			gpios = <&gpio4 2 GPIO_ACTIVE_LOW>;
798cb53a8dSChen Jun			label = "GPIO Power";
808cb53a8dSChen Jun			linux,code = <KEY_POWER>;
818cb53a8dSChen Jun		};
828cb53a8dSChen Jun	};
83fc5f2ed6SGuodong Xu
84fc5f2ed6SGuodong Xu	leds {
85fc5f2ed6SGuodong Xu		compatible = "gpio-leds";
86fc5f2ed6SGuodong Xu
87fc5f2ed6SGuodong Xu		user_led1 {
88fc5f2ed6SGuodong Xu			label = "user_led1";
89fc5f2ed6SGuodong Xu			/* gpio_150_user_led1 */
90fc5f2ed6SGuodong Xu			gpios = <&gpio18 6 0>;
91fc5f2ed6SGuodong Xu			linux,default-trigger = "heartbeat";
92fc5f2ed6SGuodong Xu		};
93fc5f2ed6SGuodong Xu
94fc5f2ed6SGuodong Xu		user_led2 {
95fc5f2ed6SGuodong Xu			label = "user_led2";
96fc5f2ed6SGuodong Xu			/* gpio_151_user_led2 */
97fc5f2ed6SGuodong Xu			gpios = <&gpio18 7 0>;
98fc5f2ed6SGuodong Xu			linux,default-trigger = "mmc0";
99fc5f2ed6SGuodong Xu		};
100fc5f2ed6SGuodong Xu
101fc5f2ed6SGuodong Xu		user_led3 {
102fc5f2ed6SGuodong Xu			label = "user_led3";
103fc5f2ed6SGuodong Xu			/* gpio_189_user_led3 */
104fc5f2ed6SGuodong Xu			gpios = <&gpio23 5 0>;
105fc5f2ed6SGuodong Xu			default-state = "off";
106fc5f2ed6SGuodong Xu		};
107fc5f2ed6SGuodong Xu
108fc5f2ed6SGuodong Xu		user_led4 {
109fc5f2ed6SGuodong Xu			label = "user_led4";
110fc5f2ed6SGuodong Xu			/* gpio_190_user_led4 */
111fc5f2ed6SGuodong Xu			gpios = <&gpio23 6 0>;
112fc5f2ed6SGuodong Xu			linux,default-trigger = "cpu0";
113fc5f2ed6SGuodong Xu		};
114fc5f2ed6SGuodong Xu
115fc5f2ed6SGuodong Xu		wlan_active_led {
116fc5f2ed6SGuodong Xu			label = "wifi_active";
117fc5f2ed6SGuodong Xu			/* gpio_205_wifi_active */
118fc5f2ed6SGuodong Xu			gpios = <&gpio25 5 0>;
119fc5f2ed6SGuodong Xu			linux,default-trigger = "phy0tx";
120fc5f2ed6SGuodong Xu			default-state = "off";
121fc5f2ed6SGuodong Xu		};
122fc5f2ed6SGuodong Xu
123fc5f2ed6SGuodong Xu		bt_active_led {
124fc5f2ed6SGuodong Xu			label = "bt_active";
125fc5f2ed6SGuodong Xu			gpios = <&gpio25 7 0>;
126fc5f2ed6SGuodong Xu			/* gpio_207_user_led1 */
127fc5f2ed6SGuodong Xu			linux,default-trigger = "hci0-power";
128fc5f2ed6SGuodong Xu			default-state = "off";
129fc5f2ed6SGuodong Xu		};
130fc5f2ed6SGuodong Xu	};
131e02045aaSWang Xiaoyin
132e02045aaSWang Xiaoyin	pmic: pmic@fff34000 {
133e02045aaSWang Xiaoyin		compatible = "hisilicon,hi6421v530-pmic";
134e02045aaSWang Xiaoyin		reg = <0x0 0xfff34000 0x0 0x1000>;
135e02045aaSWang Xiaoyin		interrupt-controller;
136e02045aaSWang Xiaoyin		#interrupt-cells = <2>;
137e02045aaSWang Xiaoyin
138e02045aaSWang Xiaoyin		regulators {
139e02045aaSWang Xiaoyin			ldo3: LDO3 { /* HDMI */
140e02045aaSWang Xiaoyin				regulator-name = "VOUT3_1V85";
141e02045aaSWang Xiaoyin				regulator-min-microvolt = <1800000>;
142e02045aaSWang Xiaoyin				regulator-max-microvolt = <2200000>;
143e02045aaSWang Xiaoyin				regulator-enable-ramp-delay = <120>;
144e02045aaSWang Xiaoyin			};
145e02045aaSWang Xiaoyin
146e02045aaSWang Xiaoyin			ldo9: LDO9 { /* SDCARD I/O */
147e02045aaSWang Xiaoyin				regulator-name = "VOUT9_1V8_2V95";
148e02045aaSWang Xiaoyin				regulator-min-microvolt = <1750000>;
149e02045aaSWang Xiaoyin				regulator-max-microvolt = <3300000>;
150e02045aaSWang Xiaoyin				regulator-enable-ramp-delay = <240>;
151e02045aaSWang Xiaoyin			};
152e02045aaSWang Xiaoyin
153e02045aaSWang Xiaoyin			ldo11: LDO11 { /* Low Speed Connector */
154e02045aaSWang Xiaoyin				regulator-name = "VOUT11_1V8_2V95";
155e02045aaSWang Xiaoyin				regulator-min-microvolt = <1750000>;
156e02045aaSWang Xiaoyin				regulator-max-microvolt = <3300000>;
157e02045aaSWang Xiaoyin				regulator-enable-ramp-delay = <240>;
158e02045aaSWang Xiaoyin			};
159e02045aaSWang Xiaoyin
160e02045aaSWang Xiaoyin			ldo15: LDO15 { /* UFS VCC */
161e02045aaSWang Xiaoyin				regulator-name = "VOUT15_3V0";
162e02045aaSWang Xiaoyin				regulator-min-microvolt = <1750000>;
163e02045aaSWang Xiaoyin				regulator-max-microvolt = <3000000>;
164e02045aaSWang Xiaoyin				regulator-boot-on;
165e02045aaSWang Xiaoyin				regulator-always-on;
166e02045aaSWang Xiaoyin				regulator-enable-ramp-delay = <120>;
167e02045aaSWang Xiaoyin			};
168e02045aaSWang Xiaoyin
169e02045aaSWang Xiaoyin			ldo16: LDO16 { /* SD VDD */
170e02045aaSWang Xiaoyin				regulator-name = "VOUT16_2V95";
171e02045aaSWang Xiaoyin				regulator-min-microvolt = <1750000>;
172e02045aaSWang Xiaoyin				regulator-max-microvolt = <3000000>;
173e02045aaSWang Xiaoyin				regulator-enable-ramp-delay = <360>;
174e02045aaSWang Xiaoyin			};
175e02045aaSWang Xiaoyin		};
176e02045aaSWang Xiaoyin	};
1777d8c3667SGuodong Xu
1787d8c3667SGuodong Xu	wlan_en: wlan-en-1-8v {
1797d8c3667SGuodong Xu		compatible = "regulator-fixed";
1807d8c3667SGuodong Xu		regulator-name = "wlan-en-regulator";
1817d8c3667SGuodong Xu		regulator-min-microvolt = <1800000>;
1827d8c3667SGuodong Xu		regulator-max-microvolt = <1800000>;
1837d8c3667SGuodong Xu
1847d8c3667SGuodong Xu		/* GPIO_051_WIFI_EN */
1857d8c3667SGuodong Xu		gpio = <&gpio6 3 0>;
1867d8c3667SGuodong Xu
1877d8c3667SGuodong Xu		/* WLAN card specific delay */
1887d8c3667SGuodong Xu		startup-delay-us = <70000>;
1897d8c3667SGuodong Xu		enable-active-high;
1907d8c3667SGuodong Xu	};
191313aebdaSVictor Chong
192313aebdaSVictor Chong	firmware {
193313aebdaSVictor Chong		optee {
194313aebdaSVictor Chong			compatible = "linaro,optee-tz";
195313aebdaSVictor Chong			method = "smc";
196313aebdaSVictor Chong		};
197313aebdaSVictor Chong	};
19835ca8168SChen Feng};
19935ca8168SChen Feng
2005f8a3b77SZhangfei Gao&i2c0 {
2015f8a3b77SZhangfei Gao	/* On Low speed expansion */
2025f8a3b77SZhangfei Gao	label = "LS-I2C0";
2035f8a3b77SZhangfei Gao	status = "okay";
2045f8a3b77SZhangfei Gao};
2055f8a3b77SZhangfei Gao
2065f8a3b77SZhangfei Gao&i2c1 {
2075f8a3b77SZhangfei Gao	status = "okay";
2085f8a3b77SZhangfei Gao
2095f8a3b77SZhangfei Gao	adv7533: adv7533@39 {
2105f8a3b77SZhangfei Gao		status = "ok";
2115f8a3b77SZhangfei Gao		compatible = "adi,adv7533";
2125f8a3b77SZhangfei Gao		reg = <0x39>;
2135f8a3b77SZhangfei Gao	};
2145f8a3b77SZhangfei Gao};
2155f8a3b77SZhangfei Gao
2165f8a3b77SZhangfei Gao&i2c7 {
2175f8a3b77SZhangfei Gao	/* On Low speed expansion */
2185f8a3b77SZhangfei Gao	label = "LS-I2C1";
2195f8a3b77SZhangfei Gao	status = "okay";
2205f8a3b77SZhangfei Gao};
2215f8a3b77SZhangfei Gao
222254b07b2SChen Feng&uart3 {
223254b07b2SChen Feng	/* On Low speed expansion */
224254b07b2SChen Feng	label = "LS-UART0";
225254b07b2SChen Feng	status = "okay";
226254b07b2SChen Feng};
227254b07b2SChen Feng
2282e9b4447SGuodong Xu&uart4 {
2292e9b4447SGuodong Xu	status = "okay";
2302e9b4447SGuodong Xu
2312e9b4447SGuodong Xu	bluetooth {
2322e9b4447SGuodong Xu		compatible = "ti,wl1837-st";
2332e9b4447SGuodong Xu		enable-gpios = <&gpio15 6 GPIO_ACTIVE_HIGH>;
234bf1ff532SGuodong Xu		max-speed = <3000000>;
2352e9b4447SGuodong Xu	};
2362e9b4447SGuodong Xu};
2372e9b4447SGuodong Xu
238254b07b2SChen Feng&uart6 {
239254b07b2SChen Feng	/* On Low speed expansion */
240254b07b2SChen Feng	label = "LS-UART1";
24135ca8168SChen Feng	status = "okay";
24235ca8168SChen Feng};
24338810497SWang Xiaoyin
24438810497SWang Xiaoyin&spi2 {
24538810497SWang Xiaoyin	/* On Low speed expansion */
24638810497SWang Xiaoyin	label = "LS-SPI0";
24738810497SWang Xiaoyin	status = "okay";
24838810497SWang Xiaoyin};
24938810497SWang Xiaoyin
25038810497SWang Xiaoyin&spi3 {
25138810497SWang Xiaoyin	/* On High speed expansion */
25238810497SWang Xiaoyin	label = "HS-SPI1";
25338810497SWang Xiaoyin	status = "okay";
25438810497SWang Xiaoyin};
255804d7d7aSLi Wei
256804d7d7aSLi Wei&dwmmc1 {
257804d7d7aSLi Wei	vmmc-supply = <&ldo16>;
258804d7d7aSLi Wei	vqmmc-supply = <&ldo9>;
259804d7d7aSLi Wei	status = "okay";
260804d7d7aSLi Wei};
2617d8c3667SGuodong Xu
2627d8c3667SGuodong Xu&dwmmc2 { /* WIFI */
2637d8c3667SGuodong Xu	broken-cd;
2647d8c3667SGuodong Xu	/* WL_EN */
2657d8c3667SGuodong Xu	vmmc-supply = <&wlan_en>;
2667d8c3667SGuodong Xu	ti,non-removable;
2677d8c3667SGuodong Xu	non-removable;
2687d8c3667SGuodong Xu	#address-cells = <0x1>;
2697d8c3667SGuodong Xu	#size-cells = <0x0>;
2707d8c3667SGuodong Xu	status = "ok";
2717d8c3667SGuodong Xu
2727d8c3667SGuodong Xu	wlcore: wlcore@2 {
2737d8c3667SGuodong Xu		compatible = "ti,wl1837";
2747d8c3667SGuodong Xu		reg = <2>;      /* sdio func num */
2757d8c3667SGuodong Xu		/* WL_IRQ, GPIO_179_WL_WAKEUP_AP */
2767d8c3667SGuodong Xu		interrupt-parent = <&gpio22>;
2777d8c3667SGuodong Xu		interrupts = <3 IRQ_TYPE_EDGE_RISING>;
2787d8c3667SGuodong Xu	};
2797d8c3667SGuodong Xu};
280