Linux-libre 4.14.12-gnu
[librecmc/linux-libre.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                 i2c0    = &blsp1_i2c2;
27                 i2c1    = &blsp2_i2c1;
28                 i2c2    = &blsp2_i2c0;
29                 spi0    = &blsp1_spi0;
30                 spi1    = &blsp2_spi5;
31         };
32
33         chosen {
34                 stdout-path = "serial0:115200n8";
35         };
36
37         soc {
38                 serial@75b0000 {
39                         label = "LS-UART1";
40                         status = "okay";
41                         pinctrl-names = "default", "sleep";
42                         pinctrl-0 = <&blsp2_uart1_2pins_default>;
43                         pinctrl-1 = <&blsp2_uart1_2pins_sleep>;
44                 };
45
46                 serial@75b1000 {
47                         label = "LS-UART0";
48                         status = "okay";
49                         pinctrl-names = "default", "sleep";
50                         pinctrl-0 = <&blsp2_uart2_4pins_default>;
51                         pinctrl-1 = <&blsp2_uart2_4pins_sleep>;
52                 };
53
54                 i2c@07577000 {
55                 /* On Low speed expansion */
56                         label = "LS-I2C0";
57                         status = "okay";
58                 };
59
60                 i2c@075b6000 {
61                 /* On Low speed expansion */
62                         label = "LS-I2C1";
63                         status = "okay";
64                 };
65
66                 spi@07575000 {
67                 /* On Low speed expansion */
68                         label = "LS-SPI0";
69                         status = "okay";
70                 };
71
72                 i2c@075b5000 {
73                 /* On High speed expansion */
74                         label = "HS-I2C2";
75                         status = "okay";
76                 };
77
78                 spi@075ba000{
79                 /* On High speed expansion */
80                         label = "HS-SPI1";
81                         status = "okay";
82                 };
83
84                 sdhci@74a4900 {
85                 /* External SD card */
86                         pinctrl-names = "default", "sleep";
87                         pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
88                         pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
89                         cd-gpios = <&msmgpio 38 0x1>;
90                         status = "okay";
91                 };
92
93                 phy@34000 {
94                         status = "okay";
95                 };
96
97                 phy@7410000 {
98                         status = "okay";
99                 };
100
101                 phy@7411000 {
102                         status = "okay";
103                 };
104
105                 phy@7412000 {
106                         status = "okay";
107                 };
108
109                 usb@6a00000 {
110                         status = "okay";
111
112                         dwc3@6a00000 {
113                                 extcon = <&usb3_id>;
114                                 dr_mode = "otg";
115                         };
116                 };
117
118                 usb3_id: usb3-id {
119                         compatible = "linux,extcon-usb-gpio";
120                         id-gpio = <&pm8994_gpios 22 GPIO_ACTIVE_HIGH>;
121                         pinctrl-names = "default";
122                         pinctrl-0 = <&usb3_vbus_det_gpio>;
123                 };
124
125                 usb@7600000 {
126                         status = "okay";
127
128                         dwc3@7600000 {
129                                 extcon = <&usb2_id>;
130                                 dr_mode = "otg";
131                                 maximum-speed = "high-speed";
132                         };
133                 };
134
135                 usb2_id: usb2-id {
136                         compatible = "linux,extcon-usb-gpio";
137                         id-gpio = <&pmi8994_gpios 6 GPIO_ACTIVE_HIGH>;
138                         pinctrl-names = "default";
139                         pinctrl-0 = <&usb2_vbus_det_gpio>;
140                 };
141         };
142
143
144         gpio_keys {
145                 compatible = "gpio-keys";
146                 #address-cells = <1>;
147                 #size-cells = <0>;
148                 autorepeat;
149
150                 pinctrl-names = "default";
151                 pinctrl-0 = <&volume_up_gpio>;
152
153                 button@0 {
154                         label = "Volume Up";
155                         linux,code = <KEY_VOLUMEUP>;
156                         gpios = <&pm8994_gpios 2 GPIO_ACTIVE_LOW>;
157                 };
158         };
159
160         rpm-glink {
161                 rpm_requests {
162                         pm8994-regulators {
163                                 vdd_l1-supply = <&pm8994_s3>;
164                                 vdd_l2_l26_l28-supply = <&pm8994_s3>;
165                                 vdd_l3_l11-supply = <&pm8994_s3>;
166                                 vdd_l4_l27_l31-supply = <&pm8994_s3>;
167                                 vdd_l5_l7-supply = <&pm8994_s5>;
168                                 vdd_l14_l15-supply = <&pm8994_s5>;
169                                 vdd_l20_l21-supply = <&pm8994_s5>;
170                                 vdd_l25-supply = <&pm8994_s3>;
171
172                                 s3 {
173                                         regulator-min-microvolt = <1300000>;
174                                         regulator-max-microvolt = <1300000>;
175                                 };
176                                 s4 {
177                                         regulator-min-microvolt = <1800000>;
178                                         regulator-max-microvolt = <1800000>;
179                                 };
180                                 s5 {
181                                         regulator-min-microvolt = <2150000>;
182                                         regulator-max-microvolt = <2150000>;
183                                 };
184                                 s7 {
185                                         regulator-min-microvolt = <800000>;
186                                         regulator-max-microvolt = <800000>;
187                                 };
188
189                                 l1 {
190                                         regulator-min-microvolt = <1000000>;
191                                         regulator-max-microvolt = <1000000>;
192                                 };
193                                 l2 {
194                                         regulator-min-microvolt = <1250000>;
195                                         regulator-max-microvolt = <1250000>;
196                                 };
197                                 l3 {
198                                         regulator-min-microvolt = <850000>;
199                                         regulator-max-microvolt = <850000>;
200                                 };
201                                 l4 {
202                                         regulator-min-microvolt = <1225000>;
203                                         regulator-max-microvolt = <1225000>;
204                                 };
205                                 l6 {
206                                         regulator-min-microvolt = <1200000>;
207                                         regulator-max-microvolt = <1200000>;
208                                 };
209                                 l8 {
210                                         regulator-min-microvolt = <1800000>;
211                                         regulator-max-microvolt = <1800000>;
212                                 };
213                                 l9 {
214                                         regulator-min-microvolt = <1800000>;
215                                         regulator-max-microvolt = <1800000>;
216                                 };
217                                 l10 {
218                                         regulator-min-microvolt = <1800000>;
219                                         regulator-max-microvolt = <1800000>;
220                                 };
221                                 l11 {
222                                         regulator-min-microvolt = <1150000>;
223                                         regulator-max-microvolt = <1150000>;
224                                 };
225                                 l12 {
226                                         regulator-min-microvolt = <1800000>;
227                                         regulator-max-microvolt = <1800000>;
228                                 };
229                                 l13 {
230                                         regulator-min-microvolt = <1800000>;
231                                         regulator-max-microvolt = <2950000>;
232                                 };
233                                 l14 {
234                                         regulator-min-microvolt = <1800000>;
235                                         regulator-max-microvolt = <1800000>;
236                                 };
237                                 l15 {
238                                         regulator-min-microvolt = <1800000>;
239                                         regulator-max-microvolt = <1800000>;
240                                 };
241                                 l16 {
242                                         regulator-min-microvolt = <2700000>;
243                                         regulator-max-microvolt = <2700000>;
244                                 };
245                                 l17 {
246                                         regulator-min-microvolt = <2500000>;
247                                         regulator-max-microvolt = <2500000>;
248                                 };
249                                 l18 {
250                                         regulator-min-microvolt = <2700000>;
251                                         regulator-max-microvolt = <2900000>;
252                                 };
253                                 l19 {
254                                         regulator-min-microvolt = <3000000>;
255                                         regulator-max-microvolt = <3000000>;
256                                 };
257                                 l20 {
258                                         regulator-min-microvolt = <2950000>;
259                                         regulator-max-microvolt = <2950000>;
260                                         regulator-allow-set-load;
261                                 };
262                                 l21 {
263                                         regulator-min-microvolt = <2950000>;
264                                         regulator-max-microvolt = <2950000>;
265                                 };
266                                 l22 {
267                                         regulator-min-microvolt = <3300000>;
268                                         regulator-max-microvolt = <3300000>;
269                                 };
270                                 l23 {
271                                         regulator-min-microvolt = <2800000>;
272                                         regulator-max-microvolt = <2800000>;
273                                 };
274                                 l24 {
275                                         regulator-min-microvolt = <3075000>;
276                                         regulator-max-microvolt = <3075000>;
277                                 };
278                                 l25 {
279                                         regulator-min-microvolt = <1200000>;
280                                         regulator-max-microvolt = <1200000>;
281                                         regulator-allow-set-load;
282                                 };
283                                 l27 {
284                                         regulator-min-microvolt = <1000000>;
285                                         regulator-max-microvolt = <1000000>;
286                                 };
287                                 l28 {
288                                         regulator-min-microvolt = <925000>;
289                                         regulator-max-microvolt = <925000>;
290                                         regulator-allow-set-load;
291                                 };
292                                 l29 {
293                                         regulator-min-microvolt = <2800000>;
294                                         regulator-max-microvolt = <2800000>;
295                                 };
296                                 l30 {
297                                         regulator-min-microvolt = <1800000>;
298                                         regulator-max-microvolt = <1800000>;
299                                 };
300                                 l32 {
301                                         regulator-min-microvolt = <1800000>;
302                                         regulator-max-microvolt = <1800000>;
303                                 };
304                         };
305                 };
306         };
307 };