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