Merge branch 'pm-cpufreq-fixes'
[cascardo/linux.git] / arch / arm64 / boot / dts / qcom / apq8016-sbc.dtsi
1 /*
2  * Copyright (c) 2015, 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 "msm8916.dtsi"
15 #include "pm8916.dtsi"
16 #include "apq8016-sbc-soc-pins.dtsi"
17 #include "apq8016-sbc-pmic-pins.dtsi"
18
19 / {
20         aliases {
21                 serial0 = &blsp1_uart2;
22                 serial1 = &blsp1_uart1;
23                 usid0 = &pm8916_0;
24                 i2c0    = &blsp_i2c2;
25                 i2c1    = &blsp_i2c6;
26                 i2c3    = &blsp_i2c4;
27                 spi0    = &blsp_spi5;
28                 spi1    = &blsp_spi3;
29         };
30
31         chosen {
32                 stdout-path = "serial0";
33         };
34
35         soc {
36                 serial@78af000 {
37                         label = "LS-UART0";
38                         status = "okay";
39                         pinctrl-names = "default", "sleep";
40                         pinctrl-0 = <&blsp1_uart1_default>;
41                         pinctrl-1 = <&blsp1_uart1_sleep>;
42                 };
43
44                 serial@78b0000 {
45                         label = "LS-UART1";
46                         status = "okay";
47                         pinctrl-names = "default", "sleep";
48                         pinctrl-0 = <&blsp1_uart2_default>;
49                         pinctrl-1 = <&blsp1_uart2_sleep>;
50                 };
51
52                 i2c@78b6000 {
53                 /* On Low speed expansion */
54                         label = "LS-I2C0";
55                         status = "okay";
56                 };
57
58                 i2c@78b8000 {
59                 /* On High speed expansion */
60                         label = "HS-I2C2";
61                         status = "okay";
62                 };
63
64                 i2c@78ba000 {
65                 /* On Low speed expansion */
66                         label = "LS-I2C1";
67                         status = "okay";
68                 };
69
70                 spi@78b7000 {
71                 /* On High speed expansion */
72                         label = "HS-SPI1";
73                         status = "okay";
74                 };
75
76                 spi@78b9000 {
77                 /* On Low speed expansion */
78                         label = "LS-SPI0";
79                         status = "okay";
80                 };
81
82                 leds {
83                         pinctrl-names = "default";
84                         pinctrl-0 = <&msmgpio_leds>,
85                                     <&pm8916_gpios_leds>,
86                                     <&pm8916_mpps_leds>;
87
88                         compatible = "gpio-leds";
89
90                         led@1 {
91                                 label = "apq8016-sbc:green:user1";
92                                 gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
93                                 linux,default-trigger = "heartbeat";
94                                 default-state = "off";
95                         };
96
97                         led@2 {
98                                 label = "apq8016-sbc:green:user2";
99                                 gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>;
100                                 linux,default-trigger = "mmc0";
101                                 default-state = "off";
102                         };
103
104                         led@3 {
105                                 label = "apq8016-sbc:green:user3";
106                                 gpios = <&pm8916_gpios 1 GPIO_ACTIVE_HIGH>;
107                                 linux,default-trigger = "mmc1";
108                                 default-state = "off";
109                         };
110
111                         led@4 {
112                                 label = "apq8016-sbc:green:user4";
113                                 gpios = <&pm8916_gpios 2 GPIO_ACTIVE_HIGH>;
114                                 linux,default-trigger = "none";
115                                 default-state = "off";
116                         };
117
118                         led@5 {
119                                 label = "apq8016-sbc:yellow:wlan";
120                                 gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>;
121                                 linux,default-trigger = "wlan";
122                                 default-state = "off";
123                         };
124
125                         led@6 {
126                                 label = "apq8016-sbc:blue:bt";
127                                 gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>;
128                                 linux,default-trigger = "bt";
129                                 default-state = "off";
130                         };
131                 };
132
133                 sdhci@07824000 {
134                         vmmc-supply = <&pm8916_l8>;
135                         vqmmc-supply = <&pm8916_l5>;
136
137                         pinctrl-names = "default", "sleep";
138                         pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
139                         pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
140                         status = "okay";
141                 };
142
143                 usb@78d9000 {
144                         extcon = <&usb_id>, <&usb_id>;
145                         status = "okay";
146                 };
147
148                 ehci@78d9000 {
149                         status = "okay";
150                 };
151
152                 phy@78d9000 {
153                         v1p8-supply = <&pm8916_l7>;
154                         v3p3-supply = <&pm8916_l13>;
155                         vddcx-supply = <&pm8916_s1>;
156                         extcon = <&usb_id>, <&usb_id>;
157                         dr_mode = "otg";
158                         status = "okay";
159                         switch-gpio = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>;
160                         pinctrl-names = "default";
161                         pinctrl-0 = <&usb_sw_sel_pm>;
162                 };
163
164                 lpass@07708000 {
165                         status = "okay";
166                 };
167         };
168
169         usb2513 {
170                 compatible = "smsc,usb3503";
171                 reset-gpios = <&pm8916_gpios 3 GPIO_ACTIVE_LOW>;
172                 initial-mode = <1>;
173         };
174
175         usb_id: usb-id {
176                 compatible = "linux,extcon-usb-gpio";
177                 id-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>;
178                 pinctrl-names = "default";
179                 pinctrl-0 = <&usb_id_default>;
180         };
181 };
182
183 &smd_rpm_regulators {
184         vdd_l1_l2_l3-supply = <&pm8916_s3>;
185         vdd_l5-supply = <&pm8916_s3>;
186         vdd_l4_l5_l6-supply = <&pm8916_s4>;
187         vdd_l7-supply = <&pm8916_s4>;
188
189         s1 {
190                 regulator-min-microvolt = <375000>;
191                 regulator-max-microvolt = <1562000>;
192         };
193
194         s3 {
195                 regulator-min-microvolt = <375000>;
196                 regulator-max-microvolt = <1562000>;
197         };
198
199         s4 {
200                 regulator-min-microvolt = <1800000>;
201                 regulator-max-microvolt = <1800000>;
202
203                 regulator-always-on;
204                 regulator-boot-on;
205         };
206
207         l1 {
208                 regulator-min-microvolt = <375000>;
209                 regulator-max-microvolt = <1525000>;
210         };
211
212         l2 {
213                 regulator-min-microvolt = <375000>;
214                 regulator-max-microvolt = <1525000>;
215         };
216
217         l3 {
218                 regulator-min-microvolt = <375000>;
219                 regulator-max-microvolt = <1525000>;
220         };
221
222         l4 {
223                 regulator-min-microvolt = <1750000>;
224                 regulator-max-microvolt = <3337000>;
225         };
226
227         l5 {
228                 regulator-min-microvolt = <1750000>;
229                 regulator-max-microvolt = <3337000>;
230         };
231
232         l6 {
233                 regulator-min-microvolt = <1750000>;
234                 regulator-max-microvolt = <3337000>;
235         };
236
237         l7 {
238                 regulator-min-microvolt = <1750000>;
239                 regulator-max-microvolt = <3337000>;
240         };
241
242         l8 {
243                 regulator-min-microvolt = <1750000>;
244                 regulator-max-microvolt = <3337000>;
245         };
246
247         l9 {
248                 regulator-min-microvolt = <1750000>;
249                 regulator-max-microvolt = <3337000>;
250         };
251
252         l10 {
253                 regulator-min-microvolt = <1750000>;
254                 regulator-max-microvolt = <3337000>;
255         };
256
257         l11 {
258                 regulator-min-microvolt = <1750000>;
259                 regulator-max-microvolt = <3337000>;
260         };
261
262         l12 {
263                 regulator-min-microvolt = <1750000>;
264                 regulator-max-microvolt = <3337000>;
265         };
266
267         l13 {
268                 regulator-min-microvolt = <1750000>;
269                 regulator-max-microvolt = <3337000>;
270         };
271
272         l14 {
273                 regulator-min-microvolt = <1750000>;
274                 regulator-max-microvolt = <3337000>;
275         };
276
277         /**
278          * 1.8v required on LS expansion
279          * for mezzanine boards
280          */
281         l15 {
282                 regulator-min-microvolt = <1750000>;
283                 regulator-max-microvolt = <3337000>;
284                 regulator-always-on;
285         };
286
287         l16 {
288                 regulator-min-microvolt = <1750000>;
289                 regulator-max-microvolt = <3337000>;
290         };
291
292         l17 {
293                 regulator-min-microvolt = <1750000>;
294                 regulator-max-microvolt = <3337000>;
295         };
296
297         l18 {
298                 regulator-min-microvolt = <1750000>;
299                 regulator-max-microvolt = <3337000>;
300         };
301 };