Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[sfrench/cifs-2.6.git] / arch / arm64 / boot / dts / qcom / apq8096-db820c.dtsi
1 /*
2  * Copyright (c) 2014-2016, The Linux Foundation. All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or modify
5  * it under the terms of the GNU General Public License version 2 and
6  * only version 2 as published by the Free Software Foundation.
7  *
8  * This program is distributed in the hope that it will be useful,
9  * but WITHOUT ANY WARRANTY; without even the implied warranty of
10  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11  * GNU General Public License for more details.
12  */
13
14 #include "msm8996.dtsi"
15 #include "pm8994.dtsi"
16 #include "pmi8994.dtsi"
17 #include "apq8096-db820c-pins.dtsi"
18 #include "apq8096-db820c-pmic-pins.dtsi"
19 #include <dt-bindings/input/input.h>
20 #include <dt-bindings/gpio/gpio.h>
21
22 / {
23         aliases {
24                 serial0 = &blsp2_uart1;
25                 serial1 = &blsp2_uart2;
26                 serial2 = &blsp1_uart1;
27                 i2c0    = &blsp1_i2c2;
28                 i2c1    = &blsp2_i2c1;
29                 i2c2    = &blsp2_i2c0;
30                 spi0    = &blsp1_spi0;
31                 spi1    = &blsp2_spi5;
32         };
33
34         chosen {
35                 stdout-path = "serial0:115200n8";
36         };
37
38         clocks {
39                 divclk4: divclk4 {
40                         compatible = "fixed-clock";
41                         #clock-cells = <0>;
42                         clock-frequency = <32768>;
43                         clock-output-names = "divclk4";
44
45                         pinctrl-names = "default";
46                         pinctrl-0 = <&divclk4_pin_a>;
47                 };
48         };
49
50         soc {
51                 serial@7570000 {
52                         label = "BT-UART";
53                         status = "okay";
54                         pinctrl-names = "default", "sleep";
55                         pinctrl-0 = <&blsp1_uart1_default>;
56                         pinctrl-1 = <&blsp1_uart1_sleep>;
57
58                         bluetooth {
59                                 compatible = "qcom,qca6174-bt";
60
61                                 /* bt_disable_n gpio */
62                                 enable-gpios = <&pm8994_gpios 19 GPIO_ACTIVE_HIGH>;
63
64                                 clocks = <&divclk4>;
65                         };
66                 };
67
68                 serial@75b0000 {
69                         label = "LS-UART1";
70                         status = "okay";
71                         pinctrl-names = "default", "sleep";
72                         pinctrl-0 = <&blsp2_uart1_2pins_default>;
73                         pinctrl-1 = <&blsp2_uart1_2pins_sleep>;
74                 };
75
76                 serial@75b1000 {
77                         label = "LS-UART0";
78                         status = "okay";
79                         pinctrl-names = "default", "sleep";
80                         pinctrl-0 = <&blsp2_uart2_4pins_default>;
81                         pinctrl-1 = <&blsp2_uart2_4pins_sleep>;
82                 };
83
84                 i2c@7577000 {
85                 /* On Low speed expansion */
86                         label = "LS-I2C0";
87                         status = "okay";
88                 };
89
90                 i2c@75b6000 {
91                 /* On Low speed expansion */
92                         label = "LS-I2C1";
93                         status = "okay";
94                 };
95
96                 spi@7575000 {
97                 /* On Low speed expansion */
98                         label = "LS-SPI0";
99                         status = "okay";
100                 };
101
102                 i2c@75b5000 {
103                 /* On High speed expansion */
104                         label = "HS-I2C2";
105                         status = "okay";
106                 };
107
108                 spi@75ba000{
109                 /* On High speed expansion */
110                         label = "HS-SPI1";
111                         status = "okay";
112                 };
113
114                 sdhci@74a4900 {
115                 /* External SD card */
116                         pinctrl-names = "default", "sleep";
117                         pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
118                         pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
119                         cd-gpios = <&msmgpio 38 0x1>;
120                         vmmc-supply = <&pm8994_l21>;
121                         vqmmc-supply = <&pm8994_l13>;
122                         status = "okay";
123                 };
124
125                 phy@627000 {
126                         status = "okay";
127                 };
128
129                 ufshc@624000 {
130                         status = "okay";
131                 };
132
133                 phy@34000 {
134                         status = "okay";
135                 };
136
137                 phy@7410000 {
138                         status = "okay";
139                 };
140
141                 phy@7411000 {
142                         status = "okay";
143                 };
144
145                 phy@7412000 {
146                         status = "okay";
147                 };
148
149                 usb@6a00000 {
150                         status = "okay";
151
152                         dwc3@6a00000 {
153                                 extcon = <&usb3_id>;
154                                 dr_mode = "otg";
155                         };
156                 };
157
158                 usb3_id: usb3-id {
159                         compatible = "linux,extcon-usb-gpio";
160                         id-gpio = <&pm8994_gpios 22 GPIO_ACTIVE_HIGH>;
161                         pinctrl-names = "default";
162                         pinctrl-0 = <&usb3_vbus_det_gpio>;
163                 };
164
165                 usb@7600000 {
166                         status = "okay";
167
168                         dwc3@7600000 {
169                                 extcon = <&usb2_id>;
170                                 dr_mode = "otg";
171                                 maximum-speed = "high-speed";
172                         };
173                 };
174
175                 usb2_id: usb2-id {
176                         compatible = "linux,extcon-usb-gpio";
177                         id-gpio = <&pmi8994_gpios 6 GPIO_ACTIVE_HIGH>;
178                         pinctrl-names = "default";
179                         pinctrl-0 = <&usb2_vbus_det_gpio>;
180                 };
181
182                 wlan_en: wlan-en-1-8v {
183                         pinctrl-names = "default";
184                         pinctrl-0 = <&wlan_en_gpios>;
185                         compatible = "regulator-fixed";
186                         regulator-name = "wlan-en-regulator";
187                         regulator-min-microvolt = <1800000>;
188                         regulator-max-microvolt = <1800000>;
189
190                         gpio = <&pm8994_gpios 8 0>;
191
192                         /* WLAN card specific delay */
193                         startup-delay-us = <70000>;
194                         enable-active-high;
195                 };
196
197                 agnoc@0 {
198                         pcie@600000 {
199                                 status = "okay";
200                                 perst-gpio = <&msmgpio 35 GPIO_ACTIVE_LOW>;
201                                 vddpe-3v3-supply = <&wlan_en>;
202                         };
203
204                         pcie@608000 {
205                                 status = "okay";
206                                 perst-gpio = <&msmgpio 130 GPIO_ACTIVE_LOW>;
207                         };
208
209                         pcie@610000 {
210                                 status = "okay";
211                                 perst-gpio = <&msmgpio 114 GPIO_ACTIVE_LOW>;
212                         };
213                 };
214         };
215
216
217         gpio_keys {
218                 compatible = "gpio-keys";
219                 #address-cells = <1>;
220                 #size-cells = <0>;
221                 autorepeat;
222
223                 pinctrl-names = "default";
224                 pinctrl-0 = <&volume_up_gpio>;
225
226                 button@0 {
227                         label = "Volume Up";
228                         linux,code = <KEY_VOLUMEUP>;
229                         gpios = <&pm8994_gpios 2 GPIO_ACTIVE_LOW>;
230                 };
231         };
232
233         rpm-glink {
234                 rpm_requests {
235                         pm8994-regulators {
236                                 vdd_l1-supply = <&pm8994_s3>;
237                                 vdd_l2_l26_l28-supply = <&pm8994_s3>;
238                                 vdd_l3_l11-supply = <&pm8994_s3>;
239                                 vdd_l4_l27_l31-supply = <&pm8994_s3>;
240                                 vdd_l5_l7-supply = <&pm8994_s5>;
241                                 vdd_l14_l15-supply = <&pm8994_s5>;
242                                 vdd_l20_l21-supply = <&pm8994_s5>;
243                                 vdd_l25-supply = <&pm8994_s3>;
244
245                                 s3 {
246                                         regulator-min-microvolt = <1300000>;
247                                         regulator-max-microvolt = <1300000>;
248                                 };
249
250                                 /**
251                                  * 1.8v required on LS expansion
252                                  * for mezzanine boards
253                                  */
254                                 s4 {
255                                         regulator-min-microvolt = <1800000>;
256                                         regulator-max-microvolt = <1800000>;
257                                         regulator-always-on;
258                                 };
259                                 s5 {
260                                         regulator-min-microvolt = <2150000>;
261                                         regulator-max-microvolt = <2150000>;
262                                 };
263                                 s7 {
264                                         regulator-min-microvolt = <800000>;
265                                         regulator-max-microvolt = <800000>;
266                                 };
267
268                                 l1 {
269                                         regulator-min-microvolt = <1000000>;
270                                         regulator-max-microvolt = <1000000>;
271                                 };
272                                 l2 {
273                                         regulator-min-microvolt = <1250000>;
274                                         regulator-max-microvolt = <1250000>;
275                                 };
276                                 l3 {
277                                         regulator-min-microvolt = <850000>;
278                                         regulator-max-microvolt = <850000>;
279                                 };
280                                 l4 {
281                                         regulator-min-microvolt = <1225000>;
282                                         regulator-max-microvolt = <1225000>;
283                                 };
284                                 l6 {
285                                         regulator-min-microvolt = <1200000>;
286                                         regulator-max-microvolt = <1200000>;
287                                 };
288                                 l8 {
289                                         regulator-min-microvolt = <1800000>;
290                                         regulator-max-microvolt = <1800000>;
291                                 };
292                                 l9 {
293                                         regulator-min-microvolt = <1800000>;
294                                         regulator-max-microvolt = <1800000>;
295                                 };
296                                 l10 {
297                                         regulator-min-microvolt = <1800000>;
298                                         regulator-max-microvolt = <1800000>;
299                                 };
300                                 l11 {
301                                         regulator-min-microvolt = <1150000>;
302                                         regulator-max-microvolt = <1150000>;
303                                 };
304                                 l12 {
305                                         regulator-min-microvolt = <1800000>;
306                                         regulator-max-microvolt = <1800000>;
307                                 };
308                                 l13 {
309                                         regulator-min-microvolt = <1800000>;
310                                         regulator-max-microvolt = <2950000>;
311                                 };
312                                 l14 {
313                                         regulator-min-microvolt = <1800000>;
314                                         regulator-max-microvolt = <1800000>;
315                                 };
316                                 l15 {
317                                         regulator-min-microvolt = <1800000>;
318                                         regulator-max-microvolt = <1800000>;
319                                 };
320                                 l16 {
321                                         regulator-min-microvolt = <2700000>;
322                                         regulator-max-microvolt = <2700000>;
323                                 };
324                                 l17 {
325                                         regulator-min-microvolt = <2500000>;
326                                         regulator-max-microvolt = <2500000>;
327                                 };
328                                 l18 {
329                                         regulator-min-microvolt = <2700000>;
330                                         regulator-max-microvolt = <2900000>;
331                                 };
332                                 l19 {
333                                         regulator-min-microvolt = <3000000>;
334                                         regulator-max-microvolt = <3000000>;
335                                 };
336                                 l20 {
337                                         regulator-min-microvolt = <2950000>;
338                                         regulator-max-microvolt = <2950000>;
339                                         regulator-allow-set-load;
340                                 };
341                                 l21 {
342                                         regulator-min-microvolt = <2950000>;
343                                         regulator-max-microvolt = <2950000>;
344                                 };
345                                 l22 {
346                                         regulator-min-microvolt = <3300000>;
347                                         regulator-max-microvolt = <3300000>;
348                                 };
349                                 l23 {
350                                         regulator-min-microvolt = <2800000>;
351                                         regulator-max-microvolt = <2800000>;
352                                 };
353                                 l24 {
354                                         regulator-min-microvolt = <3075000>;
355                                         regulator-max-microvolt = <3075000>;
356                                 };
357                                 l25 {
358                                         regulator-min-microvolt = <1200000>;
359                                         regulator-max-microvolt = <1200000>;
360                                         regulator-allow-set-load;
361                                 };
362                                 l27 {
363                                         regulator-min-microvolt = <1000000>;
364                                         regulator-max-microvolt = <1000000>;
365                                 };
366                                 l28 {
367                                         regulator-min-microvolt = <925000>;
368                                         regulator-max-microvolt = <925000>;
369                                         regulator-allow-set-load;
370                                 };
371                                 l29 {
372                                         regulator-min-microvolt = <2800000>;
373                                         regulator-max-microvolt = <2800000>;
374                                 };
375                                 l30 {
376                                         regulator-min-microvolt = <1800000>;
377                                         regulator-max-microvolt = <1800000>;
378                                 };
379                                 l32 {
380                                         regulator-min-microvolt = <1800000>;
381                                         regulator-max-microvolt = <1800000>;
382                                 };
383                         };
384                 };
385         };
386 };