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