]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
arm64: dts: exynos: Add clocks to Exynos5433 LPASS module
[karo-tx-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 #include <dt-bindings/sound/apq8016-lpass.h>
19
20 / {
21         aliases {
22                 serial0 = &blsp1_uart2;
23                 serial1 = &blsp1_uart1;
24                 usid0 = &pm8916_0;
25                 i2c0    = &blsp_i2c2;
26                 i2c1    = &blsp_i2c6;
27                 i2c3    = &blsp_i2c4;
28                 spi0    = &blsp_spi5;
29                 spi1    = &blsp_spi3;
30         };
31
32         chosen {
33                 stdout-path = "serial0";
34         };
35
36         soc {
37                 dma@7884000 {
38                         status = "okay";
39                 };
40
41                 serial@78af000 {
42                         label = "LS-UART0";
43                         status = "okay";
44                         pinctrl-names = "default", "sleep";
45                         pinctrl-0 = <&blsp1_uart1_default>;
46                         pinctrl-1 = <&blsp1_uart1_sleep>;
47                 };
48
49                 serial@78b0000 {
50                         label = "LS-UART1";
51                         status = "okay";
52                         pinctrl-names = "default", "sleep";
53                         pinctrl-0 = <&blsp1_uart2_default>;
54                         pinctrl-1 = <&blsp1_uart2_sleep>;
55                 };
56
57                 i2c@78b6000 {
58                 /* On Low speed expansion */
59                         label = "LS-I2C0";
60                         status = "okay";
61                 };
62
63                 i2c@78b8000 {
64                 /* On High speed expansion */
65                         label = "HS-I2C2";
66                         status = "okay";
67
68                         adv_bridge: bridge@39 {
69                                 status = "okay";
70
71                                 compatible = "adi,adv7533";
72                                 reg = <0x39>;
73
74                                 interrupt-parent = <&msmgpio>;
75                                 interrupts = <31 2>;
76
77                                 adi,dsi-lanes = <4>;
78
79                                 pd-gpios = <&msmgpio 32 0>;
80
81                                 avdd-supply = <&pm8916_l6>;
82                                 v1p2-supply = <&pm8916_l6>;
83                                 v3p3-supply = <&pm8916_l17>;
84
85                                 pinctrl-names = "default","sleep";
86                                 pinctrl-0 = <&adv7533_int_active &adv7533_switch_active>;
87                                 pinctrl-1 = <&adv7533_int_suspend &adv7533_switch_suspend>;
88
89                                 ports {
90                                         #address-cells = <1>;
91                                         #size-cells = <0>;
92
93                                         port@0 {
94                                                 reg = <0>;
95                                                 adv7533_in: endpoint {
96                                                         remote-endpoint = <&dsi0_out>;
97                                                 };
98                                         };
99
100                                         port@1 {
101                                                 reg = <1>;
102                                                 adv7533_out: endpoint {
103                                                         remote-endpoint = <&hdmi_con>;
104                                                 };
105                                         };
106                                 };
107                         };
108                 };
109
110                 i2c@78ba000 {
111                 /* On Low speed expansion */
112                         label = "LS-I2C1";
113                         status = "okay";
114                 };
115
116                 spi@78b7000 {
117                 /* On High speed expansion */
118                         label = "HS-SPI1";
119                         status = "okay";
120                 };
121
122                 spi@78b9000 {
123                 /* On Low speed expansion */
124                         label = "LS-SPI0";
125                         status = "okay";
126                 };
127
128                 leds {
129                         pinctrl-names = "default";
130                         pinctrl-0 = <&msmgpio_leds>,
131                                     <&pm8916_gpios_leds>,
132                                     <&pm8916_mpps_leds>;
133
134                         compatible = "gpio-leds";
135
136                         led@1 {
137                                 label = "apq8016-sbc:green:user1";
138                                 gpios = <&msmgpio 21 GPIO_ACTIVE_HIGH>;
139                                 linux,default-trigger = "heartbeat";
140                                 default-state = "off";
141                         };
142
143                         led@2 {
144                                 label = "apq8016-sbc:green:user2";
145                                 gpios = <&msmgpio 120 GPIO_ACTIVE_HIGH>;
146                                 linux,default-trigger = "mmc0";
147                                 default-state = "off";
148                         };
149
150                         led@3 {
151                                 label = "apq8016-sbc:green:user3";
152                                 gpios = <&pm8916_gpios 1 GPIO_ACTIVE_HIGH>;
153                                 linux,default-trigger = "mmc1";
154                                 default-state = "off";
155                         };
156
157                         led@4 {
158                                 label = "apq8016-sbc:green:user4";
159                                 gpios = <&pm8916_gpios 2 GPIO_ACTIVE_HIGH>;
160                                 linux,default-trigger = "none";
161                                 default-state = "off";
162                         };
163
164                         led@5 {
165                                 label = "apq8016-sbc:yellow:wlan";
166                                 gpios = <&pm8916_mpps 2 GPIO_ACTIVE_HIGH>;
167                                 linux,default-trigger = "wlan";
168                                 default-state = "off";
169                         };
170
171                         led@6 {
172                                 label = "apq8016-sbc:blue:bt";
173                                 gpios = <&pm8916_mpps 3 GPIO_ACTIVE_HIGH>;
174                                 linux,default-trigger = "bt";
175                                 default-state = "off";
176                         };
177                 };
178
179                 sdhci@07824000 {
180                         vmmc-supply = <&pm8916_l8>;
181                         vqmmc-supply = <&pm8916_l5>;
182
183                         pinctrl-names = "default", "sleep";
184                         pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
185                         pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
186                         status = "okay";
187                 };
188
189                 sdhci@07864000 {
190                         vmmc-supply = <&pm8916_l11>;
191                         vqmmc-supply = <&pm8916_l12>;
192
193                         pinctrl-names = "default", "sleep";
194                         pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
195                         pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
196
197                         cd-gpios = <&msmgpio 38 0x1>;
198                         status = "okay";
199                 };
200
201                 usb@78d9000 {
202                         extcon = <&usb_id>, <&usb_id>;
203                         status = "okay";
204                 };
205
206                 ehci@78d9000 {
207                         status = "okay";
208                 };
209
210                 phy@78d9000 {
211                         v1p8-supply = <&pm8916_l7>;
212                         v3p3-supply = <&pm8916_l13>;
213                         vddcx-supply = <&pm8916_s1>;
214                         extcon = <&usb_id>, <&usb_id>;
215                         dr_mode = "otg";
216                         status = "okay";
217                         switch-gpio = <&pm8916_gpios 4 GPIO_ACTIVE_HIGH>;
218                         pinctrl-names = "default";
219                         pinctrl-0 = <&usb_sw_sel_pm>;
220                 };
221
222                 lpass@07708000 {
223                         status = "okay";
224                 };
225
226                 mdss@1a00000 {
227                         status = "okay";
228
229                         mdp@1a01000 {
230                                 status = "okay";
231                         };
232
233                         dsi@1a98000 {
234                                 status = "okay";
235
236                                 vdda-supply = <&pm8916_l2>;
237                                 vddio-supply = <&pm8916_l6>;
238
239                                 ports {
240                                         port@1 {
241                                                 endpoint {
242                                                         remote-endpoint = <&adv7533_in>;
243                                                         data-lanes = <0 1 2 3>;
244                                                 };
245                                         };
246                                 };
247                         };
248
249                         dsi-phy@1a98300 {
250                                 status = "okay";
251
252                                 vddio-supply = <&pm8916_l6>;
253                         };
254                 };
255
256                 lpass_codec: codec{
257                         status = "okay";
258                 };
259
260                 /*
261                 Internal Codec
262                         playback - Primary MI2S
263                         capture - Ter MI2S
264
265                 External Primary:
266                         playback - secondary MI2S
267                         capture - Quat MI2S
268
269                 External Secondary:
270                         playback - Quat MI2S
271                         capture - Quat MI2S
272
273                 */
274
275                 sound: sound {
276                         compatible = "qcom,apq8016-sbc-sndcard";
277                         reg = <0x07702000 0x4>, <0x07702004 0x4>;
278                         reg-names = "mic-iomux", "spkr-iomux";
279
280                         status = "okay";
281                         pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
282                         pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
283                         pinctrl-names = "default", "sleep";
284                         qcom,model = "DB410c";
285                         qcom,audio-routing =
286                                 "AMIC2", "MIC BIAS Internal2",
287                                 "AMIC3", "MIC BIAS External1";
288
289                         internal-codec-playback-dai-link@0 {            /* I2S - Internal codec */
290                                 link-name = "WCD";
291                                 cpu { /* PRIMARY */
292                                         sound-dai = <&lpass MI2S_PRIMARY>;
293                                 };
294                                 codec {
295                                         sound-dai = <&lpass_codec 0>, <&wcd_codec 0>;
296                                 };
297                         };
298
299                         internal-codec-capture-dai-link@0 {             /* I2S - Internal codec */
300                                 link-name = "WCD-Capture";
301                                 cpu { /* PRIMARY */
302                                         sound-dai = <&lpass MI2S_TERTIARY>;
303                                 };
304                                 codec {
305                                         sound-dai = <&lpass_codec 1>, <&wcd_codec 1>;
306                                 };
307                         };
308                 };
309         };
310
311         usb2513 {
312                 compatible = "smsc,usb3503";
313                 reset-gpios = <&pm8916_gpios 3 GPIO_ACTIVE_LOW>;
314                 initial-mode = <1>;
315         };
316
317         usb_id: usb-id {
318                 compatible = "linux,extcon-usb-gpio";
319                 id-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>;
320                 pinctrl-names = "default";
321                 pinctrl-0 = <&usb_id_default>;
322         };
323
324         hdmi-out {
325                 compatible = "hdmi-connector";
326                 type = "a";
327
328                 port {
329                         hdmi_con: endpoint {
330                                 remote-endpoint = <&adv7533_out>;
331                         };
332                 };
333         };
334 };
335
336 &wcd_codec {
337         status = "okay";
338         clocks = <&gcc GCC_CODEC_DIGCODEC_CLK>;
339         clock-names = "mclk";
340 };
341
342 &smd_rpm_regulators {
343         vdd_l1_l2_l3-supply = <&pm8916_s3>;
344         vdd_l5-supply = <&pm8916_s3>;
345         vdd_l4_l5_l6-supply = <&pm8916_s4>;
346         vdd_l7-supply = <&pm8916_s4>;
347
348         s1 {
349                 regulator-min-microvolt = <375000>;
350                 regulator-max-microvolt = <1562000>;
351         };
352
353         s3 {
354                 regulator-min-microvolt = <375000>;
355                 regulator-max-microvolt = <1562000>;
356         };
357
358         s4 {
359                 regulator-min-microvolt = <1800000>;
360                 regulator-max-microvolt = <1800000>;
361
362                 regulator-always-on;
363                 regulator-boot-on;
364         };
365
366         l1 {
367                 regulator-min-microvolt = <375000>;
368                 regulator-max-microvolt = <1525000>;
369         };
370
371         l2 {
372                 regulator-min-microvolt = <1200000>;
373                 regulator-max-microvolt = <1200000>;
374         };
375
376         l3 {
377                 regulator-min-microvolt = <375000>;
378                 regulator-max-microvolt = <1525000>;
379         };
380
381         l4 {
382                 regulator-min-microvolt = <1750000>;
383                 regulator-max-microvolt = <3337000>;
384         };
385
386         l5 {
387                 regulator-min-microvolt = <1750000>;
388                 regulator-max-microvolt = <3337000>;
389         };
390
391         l6 {
392                 regulator-min-microvolt = <1800000>;
393                 regulator-max-microvolt = <1800000>;
394         };
395
396         l7 {
397                 regulator-min-microvolt = <1750000>;
398                 regulator-max-microvolt = <3337000>;
399         };
400
401         l8 {
402                 regulator-min-microvolt = <1750000>;
403                 regulator-max-microvolt = <3337000>;
404         };
405
406         l9 {
407                 regulator-min-microvolt = <1750000>;
408                 regulator-max-microvolt = <3337000>;
409         };
410
411         l10 {
412                 regulator-min-microvolt = <1750000>;
413                 regulator-max-microvolt = <3337000>;
414         };
415
416         l11 {
417                 regulator-min-microvolt = <1750000>;
418                 regulator-max-microvolt = <3337000>;
419         };
420
421         l12 {
422                 regulator-min-microvolt = <1750000>;
423                 regulator-max-microvolt = <3337000>;
424         };
425
426         l13 {
427                 regulator-min-microvolt = <1750000>;
428                 regulator-max-microvolt = <3337000>;
429         };
430
431         l14 {
432                 regulator-min-microvolt = <1750000>;
433                 regulator-max-microvolt = <3337000>;
434         };
435
436         /**
437          * 1.8v required on LS expansion
438          * for mezzanine boards
439          */
440         l15 {
441                 regulator-min-microvolt = <1750000>;
442                 regulator-max-microvolt = <3337000>;
443                 regulator-always-on;
444         };
445
446         l16 {
447                 regulator-min-microvolt = <1750000>;
448                 regulator-max-microvolt = <3337000>;
449         };
450
451         l17 {
452                 regulator-min-microvolt = <3300000>;
453                 regulator-max-microvolt = <3300000>;
454         };
455
456         l18 {
457                 regulator-min-microvolt = <1750000>;
458                 regulator-max-microvolt = <3337000>;
459         };
460 };