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