]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/arm64/boot/dts/qcom/apq8016-txsd-410e.dts
arm64: dts: add support for Ka-Ro electronics TXSD-410E module
[karo-tx-linux.git] / arch / arm64 / boot / dts / qcom / apq8016-txsd-410e.dts
1 /*
2  * Copyright (C) 2016, Lothar Waßmann <LW@KARO-electronics.de>
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  *  a) This file is free software; you can redistribute it and/or
10  *     modify it under the terms of the GNU General Public License
11  *     version 2 as published by the Free Software Foundation.
12  *
13  *     This file is distributed in the hope that it will be useful,
14  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
15  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  *     GNU General Public License for more details.
17  *
18  * Or, alternatively,
19  *
20  *  b) Permission is hereby granted, free of charge, to any person
21  *     obtaining a copy of this software and associated documentation
22  *     files (the "Software"), to deal in the Software without
23  *     restriction, including without limitation the rights to use,
24  *     copy, modify, merge, publish, distribute, sublicense, and/or
25  *     sell copies of the Software, and to permit persons to whom the
26  *     Software is furnished to do so, subject to the following
27  *     conditions:
28  *
29  *     The above copyright notice and this permission notice shall be
30  *     included in all copies or substantial portions of the Software.
31  *
32  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
33  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
34  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
35  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
36  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
37  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
38  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
39  *     OTHER DEALINGS IN THE SOFTWARE.
40  */
41
42 /dts-v1/;
43
44 #include <dt-bindings/gpio/gpio.h>
45 #include "msm8916.dtsi"
46 #include "pm8916.dtsi"
47 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
48 #include "msm8916-mdss.dtsi"
49
50 / {
51         model = "Ka-Ro electronics GmbH TXSD-410E (Qualcomm Technologies, Inc. APQ 8016)";
52         compatible = "karo,txsd-410e", "qcom,apq8016-sbc", "qcom,apq8016", "qcom,sbc";
53
54         aliases {
55                 display = &mdss_dsi0;
56                 i2c0 = &i2c_gpio;
57                 i2c1 = &blsp_i2c5;
58                 serial0 = &blsp1_uart2;
59                 serial1 = &blsp1_uart1;
60                 spi0 = &blsp_spi3;
61                 usbdev = &usb_dev;
62                 usbhost = &usb_host;
63                 usbphy = &usb_otg;
64                 usid0 = &pm8916_0;
65         };
66
67         chosen {
68                 stdout-path = "serial0";
69         };
70
71         lvds_backlight: lvds-backlight {
72                 compatible = "gpio-backlight";
73                 pinctrl-names = "default";
74                 pinctrl-0 = <&backlight_pins>;
75                 backlight-gpios = <&msmgpio 98 GPIO_ACTIVE_LOW>;
76         };
77
78         lvds_display: lvds-panel {
79                 compatible = "hannstar,hsd100pxn1", "panel-simple";
80                 power-supply = <&pm8916_l6>;
81                 pinctrl-names = "default";
82                 pinctrl-0 = <&msmgpio_lvds_panel>;
83                 enable-gpios = <&msmgpio 25 GPIO_ACTIVE_LOW>;
84                 backlight = <&lvds_backlight>;
85         };
86
87         soc {
88                 blsp_i2c5: i2c@78b9000 {
89                         compatible = "qcom,i2c-qup-v2.2.1";
90                         reg = <0x078b9000 0x1000>;
91                         interrupts = <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>;
92                         clocks = <&gcc GCC_BLSP1_QUP5_I2C_APPS_CLK>,
93                                  <&gcc GCC_BLSP1_AHB_CLK>;
94                         clock-names = "core", "iface";
95                         pinctrl-names = "default", "sleep";
96                         pinctrl-0 = <&i2c5_default_pins>;
97                         pinctrl-1 = <&i2c5_sleep_pins>;
98                         #address-cells = <1>;
99                         #size-cells = <0>;
100                         status = "okay";
101                 };
102
103                 i2c_gpio: i2c-gpio {
104                         compatible = "i2c-gpio";
105                         #address-cells = <1>;
106                         #size-cells = <0>;
107                         pinctrl-names = "default";
108                         pinctrl-0 = <&i2c0_pins>;
109                         gpios = <&msmgpio 53 GPIO_ACTIVE_HIGH>, /* SDA */
110                                 <&msmgpio 54 GPIO_ACTIVE_HIGH>; /* CLK */
111                 };
112
113                 leds {
114                         compatible = "gpio-leds";
115                         pinctrl-names = "default";
116                         pinctrl-0 = <&msmgpio_leds>;
117
118                         led@1 {
119                                 label = "txsd-410e:green:user1";
120                                 gpios = <&msmgpio 71 GPIO_ACTIVE_HIGH>;
121                                 linux,default-trigger = "heartbeat";
122                                 default-state = "off";
123                         };
124                 };
125
126                 lpass@07708000 {
127                         status = "okay";
128                 };
129         };
130
131         lvds: lvds-out {
132                 port {
133                         lvds_con: endpoint {
134                                 remote-endpoint = <&dsi83_out>;
135                         };
136                 };
137         };
138
139         usb_id: usb-id {
140                 compatible = "linux,extcon-usb-gpio";
141                 interrupt-parent = <&msmgpio>;
142                 id-gpio = <&msmgpio 61 GPIO_ACTIVE_HIGH>;
143                 pinctrl-names = "default";
144                 pinctrl-0 = <&usb_id_pins>;
145         };
146 };
147
148 &blsp_dma {
149         /* BAM-DMA hangs the system, so keep it disabled for now */
150         status = "disabled";
151 };
152
153 &blsp_spi3 {
154         num-cs = <3>;
155         cs-gpios = <&msmgpio 10 GPIO_ACTIVE_LOW>,
156                    <&msmgpio 120 GPIO_ACTIVE_LOW>,
157                    <&msmgpio 69 GPIO_ACTIVE_LOW>;
158         status = "okay";
159
160         /* due to disabled BAM DMA the driver would always return EPROBE_DEFER otherwise */
161         /delete-property/ dmas;
162         /delete-property/ dma-names;
163
164         spidev0: spi@0 {
165                 compatible = "spidev";
166                 reg = <0>;
167                 spi-max-frequency = <54000000>;
168         };
169
170         spidev1: spi@1 {
171                 compatible = "spidev";
172                 reg = <1>;
173                 spi-max-frequency = <54000000>;
174         };
175
176         spidev2: spi@2 {
177                 compatible = "spidev";
178                 reg = <2>;
179                 spi-max-frequency = <54000000>;
180         };
181 };
182
183 &spi3_default {
184         pinmux {
185                 function = "blsp_spi3";
186                 pins = "gpio8", "gpio9", "gpio11";
187         };
188
189         pinmux_cs {
190                 function = "gpio";
191                 pins = "gpio10", "gpio120", "gpio69";
192         };
193
194         pinconf {
195                 pins = "gpio8", "gpio9", "gpio11";
196                 drive-strength = <12>;
197                 bias-disable;
198         };
199
200         pinconf_cs {
201                 pins = "gpio10", "gpio120", "gpio69";
202                 drive-strength = <2>;
203                 bias-disable;
204                 output-high;
205         };
206 };
207
208 &spi3_sleep {
209         pinmux {
210                 function = "gpio";
211                 pins = "gpio8", "gpio9", "gpio10", "gpio11", "gpio120", "gpio69";
212         };
213
214         pinconf {
215                 pins = "gpio8", "gpio9", "gpio10", "gpio11", "gpio120", "gpio69";
216                 drive-strength = <2>;
217                 bias-pull-down;
218         };
219 };
220
221 &blsp1_uart1 {
222         label = "LS-UART0";
223         pinctrl-names = "default", "sleep";
224         pinctrl-0 = <&blsp1_uart1_default>;
225         pinctrl-1 = <&blsp1_uart1_sleep>;
226         status = "okay";
227 };
228
229 &blsp1_uart2 {
230         label = "LS-UART1";
231         pinctrl-names = "default", "sleep";
232         pinctrl-0 = <&blsp1_uart2_default>;
233         pinctrl-1 = <&blsp1_uart2_sleep>;
234         status = "okay";
235 };
236
237 &i2c_gpio {
238         dsi83: sn65dsi83@2c {
239                 compatible = "ti,sn65dsi83";
240                 reg = <0x2c>;
241                 pinctrl-names = "default";
242                 pinctrl-0 = <&msmgpio_dsi83 &dsi83_pins>;
243                 vcc-supply = <&pm8916_l6>;
244                 enable-gpios = <&msmgpio 55 GPIO_ACTIVE_HIGH>;
245                 interrupts-extended = <&msmgpio 111 IRQ_TYPE_LEVEL_HIGH>;
246                 data-equalization = <0>;
247                 clock-equalization = <0>;
248                 lvds-data-mapping = "spwg";
249                 lvds-data-width = <18>;
250                 panel = <&lvds_display>;
251
252                 ports {
253                         #address-cells = <1>;
254                         #size-cells = <0>;
255
256                         port@0 {
257                                 reg = <0>;
258
259                                 dsi83_in: endpoint {
260                                         remote-endpoint = <&mdss_dsi0_out>;
261                                 };
262                         };
263
264                         port@1 {
265                                 reg = <1>;
266
267                                 dsi83_out: endpoint {
268                                         remote-endpoint = <&lvds_con>;
269                                 };
270                         };
271                 };
272
273                 display-timings {
274                         native-mode = <&lvds_timing0>;
275
276                         lvds_timing0: hsd100pxn1 {
277                                 clock-frequency = <65000000>;
278                                 hactive = <1024>;
279                                 vactive = <768>;
280                                 hback-porch = <220>;
281                                 hfront-porch = <40>;
282                                 vback-porch = <21>;
283                                 vfront-porch = <7>;
284                                 hsync-len = <60>;
285                                 vsync-len = <10>;
286                                 de-active = <1>;
287                                 pixelclk-active = <1>;
288                         };
289
290                         nl12880bc20 {
291                                 clock-frequency = <71000000>;
292                                 hactive = <1280>;
293                                 vactive = <800>;
294                                 hback-porch = <50>;
295                                 hsync-len = <60>;
296                                 hfront-porch = <50>;
297                                 vback-porch = <5>;
298                                 vsync-len = <13>;
299                                 vfront-porch = <5>;
300                                 hsync-active = <0>;
301                                 vsync-active = <0>;
302                                 de-active = <1>;
303                                 pixelclk-active = <1>;
304                         };
305
306                         ETML101001DKA {
307                                 /* same as nl12880bc20 */
308                                 clock-frequency = <71000000>;
309                                 hactive = <1280>;
310                                 vactive = <800>;
311                                 hback-porch = <50>;
312                                 hsync-len = <60>;
313                                 hfront-porch = <50>;
314                                 vback-porch = <5>;
315                                 vsync-len = <13>;
316                                 vfront-porch = <5>;
317                                 hsync-active = <0>;
318                                 vsync-active = <0>;
319                                 de-active = <1>;
320                                 pixelclk-active = <1>;
321                         };
322
323                         VGA {
324                                 clock-frequency = <25200000>;
325                                 hactive = <640>;
326                                 vactive = <480>;
327                                 hback-porch = <48>;
328                                 hsync-len = <96>;
329                                 hfront-porch = <16>;
330                                 vback-porch = <31>;
331                                 vsync-len = <2>;
332                                 vfront-porch = <12>;
333                                 hsync-active = <0>;
334                                 vsync-active = <0>;
335                                 de-active = <1>;
336                                 pixelclk-active = <0>;
337                         };
338
339                         ETV570 {
340                                 clock-frequency = <25200000>;
341                                 hactive = <640>;
342                                 vactive = <480>;
343                                 hback-porch = <114>;
344                                 hsync-len = <30>;
345                                 hfront-porch = <16>;
346                                 vback-porch = <32>;
347                                 vsync-len = <3>;
348                                 vfront-porch = <10>;
349                                 hsync-active = <0>;
350                                 vsync-active = <0>;
351                                 de-active = <1>;
352                                 pixelclk-active = <0>;
353                         };
354
355                         ET0350 {
356                                 clock-frequency = <6413760>;
357                                 hactive = <320>;
358                                 vactive = <240>;
359                                 hback-porch = <34>;
360                                 hsync-len = <34>;
361                                 hfront-porch = <20>;
362                                 vback-porch = <15>;
363                                 vsync-len = <3>;
364                                 vfront-porch = <4>;
365                                 hsync-active = <0>;
366                                 vsync-active = <0>;
367                                 de-active = <1>;
368                                 pixelclk-active = <0>;
369                         };
370
371                         ET0430 {
372                                 clock-frequency = <9009000>;
373                                 hactive = <480>;
374                                 vactive = <272>;
375                                 hback-porch = <2>;
376                                 hsync-len = <41>;
377                                 hfront-porch = <2>;
378                                 vback-porch = <2>;
379                                 vsync-len = <10>;
380                                 vfront-porch = <2>;
381                                 hsync-active = <0>;
382                                 vsync-active = <0>;
383                                 de-active = <1>;
384                                 pixelclk-active = <1>;
385                         };
386
387                         ET0500 {
388                                 clock-frequency = <33264000>;
389                                 hactive = <800>;
390                                 vactive = <480>;
391                                 hback-porch = <88>;
392                                 hsync-len = <128>;
393                                 hfront-porch = <40>;
394                                 vback-porch = <33>;
395                                 vsync-len = <2>;
396                                 vfront-porch = <10>;
397                                 hsync-active = <0>;
398                                 vsync-active = <0>;
399                                 de-active = <1>;
400                                 pixelclk-active = <0>;
401                         };
402
403                         ET0700 { /* same as ET0500 */
404                                 clock-frequency = <33264000>;
405                                 hactive = <800>;
406                                 vactive = <480>;
407                                 hback-porch = <88>;
408                                 hsync-len = <128>;
409                                 hfront-porch = <40>;
410                                 vback-porch = <33>;
411                                 vsync-len = <2>;
412                                 vfront-porch = <10>;
413                                 hsync-active = <0>;
414                                 vsync-active = <0>;
415                                 de-active = <1>;
416                                 pixelclk-active = <0>;
417                         };
418
419                         ETQ570 {
420                                 clock-frequency = <6596040>;
421                                 hactive = <320>;
422                                 vactive = <240>;
423                                 hback-porch = <38>;
424                                 hsync-len = <30>;
425                                 hfront-porch = <30>;
426                                 vback-porch = <16>;
427                                 vsync-len = <3>;
428                                 vfront-porch = <4>;
429                                 hsync-active = <0>;
430                                 vsync-active = <0>;
431                                 de-active = <1>;
432                                 pixelclk-active = <0>;
433                         };
434                 };
435         };
436 };
437
438 &mdss_dsi0 {
439         vdda-supply = <&pm8916_l2>;
440         vddio-supply = <&pm8916_l6>;
441         status = "okay";
442
443         port {
444                 mdss_dsi0_out: endpoint {
445                         remote-endpoint = <&dsi83_in>;
446                         data-lanes = <0 1 2 3>;
447                 };
448         };
449 };
450
451 &msmgpio {
452         msmgpio_dsi83: msmgpio-dsi83 {
453                 pinmux {
454                         pins = "gpio111";
455                         function = "gpio";
456                 };
457
458                 pinconf {
459                         pins = "gpio111";
460                         function = "gpio";
461                         input-enable;
462                         bias-pull-down;
463                 };
464         };
465
466         msmgpio_leds: msmgpio-leds {
467                 pinmux {
468                         pins = "gpio71";
469                         function = "gpio";
470                 };
471
472                 pinconf {
473                         pins = "gpio71";
474                         function = "gpio";
475                         output-low;
476                 };
477         };
478
479         msmgpio_lvds_panel: msmgpio-lvds-panel {
480                 pinmux {
481                         pins = "gpio25";
482                         function = "gpio";
483                 };
484
485                 pinconf {
486                         pins = "gpio25";
487                         function = "gpio";
488                         output-high;
489                 };
490         };
491
492         backlight_pins: backlight-pins {
493                 pinmux {
494                         pins = "gpio98";
495                         function = "gpio";
496                 };
497
498                 pinconf {
499                         pins = "gpio98";
500                         function = "gpio";
501                         output-high;
502                 };
503         };
504
505         dsi83_pins: dsi83-pins {
506                 pinmux {
507                         pins = "gpio55";
508                         function = "gpio";
509                 };
510
511                 pinconf {
512                         pins = "gpio55";
513                         function = "gpio";
514                         output-high;
515                 };
516         };
517
518         usb_id_pins: usb-id-pins {
519                 pinmux {
520                         pins = "gpio61";
521                         function = "gpio";
522                 };
523
524                 pinconf {
525                         pins = "gpio61";
526                         drive-strength = <8>;
527                         input-enable;
528                         bias-pull-up;
529                 };
530         };
531
532         usb_vbus: usb-vbus {
533                 pinmux {
534                         pins = "gpio61";
535                         function = "gpio";
536                 };
537
538                 pinconf {
539                         pins = "gpio61";
540                         drive-strength = <8>;
541                         input-enable;
542                         bias-pull-up;
543                 };
544         };
545
546         i2c0_pins: i2c0-pins {
547                 pinmux {
548                         pins = "gpio53", "gpio54";
549                         function = "gpio";
550                 };
551
552                 pinconf {
553                         pins = "gpio53", "gpio54";
554                         drive-strength = <16>;
555                         bias-pull-up;
556                 };
557         };
558
559         i2c5_default_pins: i2c5-default-pins {
560                 pinmux {
561                         pins = "gpio18", "gpio19";
562                         function = "blsp_i2c5";
563                 };
564
565                 pinconf {
566                         pins = "gpio18", "gpio19";
567                         drive-strength = <16>;
568                         bias-disable = <0>;
569                 };
570         };
571
572         i2c5_sleep_pins: i2c5-sleep-pins {
573                 pinmux {
574                         pins = "gpio18", "gpio19";
575                         function = "gpio";
576                 };
577
578                 pinconf {
579                         pins = "gpio18", "gpio19";
580                         drive-strength = <2>;
581                         bias-disable = <0>;
582                 };
583         };
584 };
585
586 &pm8916_mpps {
587         pm8916_mpp_leds: pm8916-mpp-leds {
588                 pinconf {
589                         pins = "mpp2", "mpp3";
590                         function = "digital";
591                         power-source = <PM8916_GPIO_VPH>;
592                         output-low;
593                 };
594         };
595 };
596
597 &pm8916_spmi_s2 {
598         regulator-always-on;
599 };
600
601 &sdhc_1 {
602         vmmc-supply = <&pm8916_l8>;
603         vqmmc-supply = <&pm8916_l5>;
604
605         pinctrl-names = "default", "sleep";
606         pinctrl-0 = <&sdc1_clk_on &sdc1_cmd_on &sdc1_data_on>;
607         pinctrl-1 = <&sdc1_clk_off &sdc1_cmd_off &sdc1_data_off>;
608         status = "okay";
609 };
610
611 &smd_rpm_regulators {
612         vdd_l1_l2_l3-supply = <&pm8916_s3>;
613         vdd_l5-supply = <&pm8916_s3>;
614         vdd_l4_l5_l6-supply = <&pm8916_s4>;
615         vdd_l7-supply = <&pm8916_s4>;
616
617         s1 {
618                 regulator-min-microvolt = <375000>;
619                 regulator-max-microvolt = <1562000>;
620         };
621
622         s3 {
623                 regulator-min-microvolt = <375000>;
624                 regulator-max-microvolt = <1562000>;
625         };
626
627         s4 {
628                 regulator-min-microvolt = <1800000>;
629                 regulator-max-microvolt = <1800000>;
630
631                 regulator-always-on;
632                 regulator-boot-on;
633         };
634
635         l1 {
636                 regulator-min-microvolt = <375000>;
637                 regulator-max-microvolt = <1525000>;
638         };
639
640         l2 {
641                 regulator-min-microvolt = <375000>;
642                 regulator-max-microvolt = <1525000>;
643         };
644
645         l3 {
646                 regulator-min-microvolt = <375000>;
647                 regulator-max-microvolt = <1525000>;
648         };
649
650         l4 {
651                 regulator-min-microvolt = <1750000>;
652                 regulator-max-microvolt = <3337000>;
653         };
654
655         l5 {
656                 regulator-min-microvolt = <1750000>;
657                 regulator-max-microvolt = <3337000>;
658         };
659
660         l6 {
661                 regulator-min-microvolt = <1750000>;
662                 regulator-max-microvolt = <3337000>;
663         };
664
665         l7 {
666                 regulator-min-microvolt = <1750000>;
667                 regulator-max-microvolt = <3337000>;
668         };
669
670         l8 {
671                 regulator-min-microvolt = <1750000>;
672                 regulator-max-microvolt = <3337000>;
673         };
674
675         l9 {
676                 regulator-min-microvolt = <1750000>;
677                 regulator-max-microvolt = <3337000>;
678         };
679
680         l10 {
681                 regulator-min-microvolt = <1750000>;
682                 regulator-max-microvolt = <3337000>;
683         };
684
685         l11 {
686                 regulator-min-microvolt = <1750000>;
687                 regulator-max-microvolt = <3337000>;
688         };
689
690         l12 {
691                 regulator-min-microvolt = <1750000>;
692                 regulator-max-microvolt = <3337000>;
693         };
694
695         l13 {
696                 regulator-min-microvolt = <1750000>;
697                 regulator-max-microvolt = <3337000>;
698         };
699
700         l14 {
701                 regulator-min-microvolt = <1750000>;
702                 regulator-max-microvolt = <3337000>;
703         };
704
705         l15 {
706                 regulator-min-microvolt = <1750000>;
707                 regulator-max-microvolt = <3337000>;
708                 regulator-always-on;
709         };
710
711         l16 {
712                 regulator-min-microvolt = <1750000>;
713                 regulator-max-microvolt = <3337000>;
714         };
715
716         l17 {
717                 regulator-min-microvolt = <1750000>;
718                 regulator-max-microvolt = <3337000>;
719         };
720
721         l18 {
722                 regulator-min-microvolt = <1750000>;
723                 regulator-max-microvolt = <3337000>;
724         };
725 };
726
727 &usb_dev {
728         extcon = <&usb_id>, <&usb_id>;
729         status = "disabled";
730 };
731
732 &usb_host {
733         status = "okay";
734 };
735
736 &usb_otg {
737         compatible = "qcom,usb-8x16-phy";
738         //vddcx-supply = <&pm8916_s1>;
739         extcon = <&usb_id>, <&usb_id>;
740         dr_mode = "otg";
741         status = "okay";
742 };
743
744 &vidc {
745         status = "okay";
746 };
747
748 &vidc_rproc {
749         status = "okay";
750 };