]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/arm64/boot/dts/qcom/apq8016-sbc.dtsi
arm64: dts: Add apq8016-sbc hdmi audio support
[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 <dt-bindings/gpio/gpio.h>
15 #include <dt-bindings/sound/apq8016-lpass.h>
16 #include "msm8916.dtsi"
17 #include "pm8916.dtsi"
18 #include "apq8016-sbc-soc-pins.dtsi"
19 #include "apq8016-sbc-pmic-pins.dtsi"
20 #include "msm8916-mdss.dtsi"
21 / {
22         aliases {
23                 serial0 = &blsp1_uart2;
24                 serial1 = &blsp1_uart1;
25                 usid0 = &pm8916_0;
26                 i2c0    = &blsp_i2c2;
27                 i2c1    = &blsp_i2c6;
28                 i2c3    = &blsp_i2c4;
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
134         usb2513 {
135                 compatible = "smsc,usb3503";
136                 reset-gpios = <&pm8916_gpios 1 GPIO_ACTIVE_LOW>;
137                 initial-mode = <1>;
138         };
139
140         usb_id: usb-id {
141                 interrupt-parent = <&msmgpio>;
142                 compatible = "linux,extcon-usb-gpio";
143                 id-gpio = <&msmgpio 121 GPIO_ACTIVE_HIGH>;
144                 pinctrl-names = "default";
145                 pinctrl-0 = <&usb_id_default>;
146         };
147 };
148 &blsp_dma {
149         status = "okay";
150 };
151
152 &blsp_spi3 {
153         status = "okay";
154 };
155
156 &sdhc_1 {
157         vmmc-supply = <&pm8916_l8>;
158         vqmmc-supply = <&pm8916_l5>;
159
160         pinctrl-names = "active", "sleep";
161         pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
162         pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
163         status = "okay";
164 };
165
166 &sdhc_2 {
167         vmmc-supply = <&pm8916_l11>;
168         vqmmc-supply = <&pm8916_l12>;
169
170         pinctrl-names = "active", "sleep";
171         pinctrl-0 = <&sdc2_clk_on &sdc2_cmd_on &sdc2_data_on &sdc2_cd_on>;
172         pinctrl-1 = <&sdc2_clk_off &sdc2_cmd_off &sdc2_data_off &sdc2_cd_off>;
173         #address-cells = <0>;
174         interrupt-parent = <&sdhc_2>;
175         interrupts = <0 1 2>;
176         #interrupt-cells = <1>;
177         interrupt-map-mask = <0xffffffff>;
178         interrupt-map = <0 &intc 0 125 0
179                         1 &intc 0 221 0
180                         2 &msmgpio 38 0>;
181         interrupt-names = "hc_irq", "pwr_irq", "status_irq";
182         cd-gpios = <&msmgpio 38 0x1>;
183
184         //status = "okay";
185 };
186
187 &usb_dev {
188         extcon = <&usb_id>, <&usb_id>;
189         status = "okay";
190 };
191
192 &usb_host {
193         status = "okay";
194 };
195
196 &sdhc_1 {
197         status = "okay";
198 };
199
200 &usb_otg {
201         extcon = <&usb_id>, <&usb_id>;
202         dr_mode = "otg";
203         status = "okay";
204 };
205
206 &blsp_i2c4 {
207         status = "ok";
208
209         adv_bridge: bridge@39 {
210                 status = "ok";
211                 compatible = "adi,adv7533";
212                 reg = <0x39>;
213                 interrupt-parent = <&msmgpio>;
214                 //interrupts = <31 2>;
215                 adi,dsi-lanes = <4>;
216                 pd-gpios = <&msmgpio 32 0>;
217                 pinctrl-names = "default","sleep";
218                 pinctrl-0 = <&adv7533_int_active &adv7533_switch_active>;
219                 pinctrl-1 = <&adv7533_int_suspend &adv7533_switch_suspend>;
220                 #sound-dai-cells = <0>;
221
222                 port {
223                         adv_in: endpoint {
224                                 remote-endpoint = <&dsi_out>;
225                         };
226                 };
227
228         };
229 };
230
231 &mdss_dsi0 {
232         status = "ok";
233
234         port {
235                 dsi_out: endpoint {
236                         remote-endpoint = <&adv_in>;
237                 };
238         };
239 };
240
241 &lpass {
242         status = "okay";
243 };
244         /*
245         Internal Codec
246                 playback - Primary MI2S
247                 capture - Ter MI2S
248
249         External Primary:
250                 playback - secondary MI2S
251                 capture - Quat MI2S
252
253         External Secondary:
254                 playback - Quat MI2S
255                 capture - Quat MI2S
256
257         */
258 &sound {
259         status = "okay";
260         pinctrl-0 = <&cdc_pdm_lines_act &ext_sec_tlmm_lines_act &ext_mclk_tlmm_lines_act>;
261         pinctrl-1 = <&cdc_pdm_lines_sus &ext_sec_tlmm_lines_sus &ext_mclk_tlmm_lines_sus>;
262         pinctrl-names = "default", "sleep";
263         qcom,model = "DB410c";
264
265
266         /* External Primary or External Secondary -ADV7533 HDMI */
267         external-dai-link@0 {
268                 link-name = "ADV7533";
269
270                 cpu { /* QUAT */
271                         sound-dai = <&lpass MI2S_QUATERNARY>;
272                 };
273                 codec {
274                         sound-dai = <&adv_bridge 0>;
275                 };
276         };
277 };