2 * arch/arm64/boot/dts/amlogic/kvim3_linux.dts
4 * Copyright (C) 2019 Wesion, Inc. All rights reserved.
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
11 * This program is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
20 #include "mesong12b.dtsi"
21 #include "partition_linux.dtsi"
22 #include "khadas-ts050-panel.dtsi"
23 #include "mesong12b_drm.dtsi"
26 model = "Khadas VIM3";
27 amlogic-dt-id = "g12b_kvim3";
28 compatible = "amlogic, g12b";
29 interrupt-parent = <&gic>;
46 tsensor0 = &p_tsensor;
47 tsensor1 = &d_tsensor;
52 // device_type = "memory";
53 // linux,usable-memory = <0x0 0x0 0x0 0x80000000>;
60 /* global autoconfigured region for contiguous allocations */
62 compatible = "ramoops";
63 reg = <0x0 0x07400000 0x0 0x00100000>;
64 record-size = <0x8000>;
65 console-size = <0x8000>;
66 ftrace-size = <0x40000>;
69 secmon_reserved:linux,secmon {
70 compatible = "shared-dma-pool";
72 size = <0x0 0x400000>;
73 alignment = <0x0 0x400000>;
74 alloc-ranges = <0x0 0x05000000 0x0 0x400000>;
78 secos_reserved:linux,secos {
80 compatible = "amlogic, aml_secos_memory";
81 reg = <0x0 0x05300000 0x0 0x2000000>;
84 logo_reserved:linux,meson-fb {
85 compatible = "shared-dma-pool";
87 size = <0x0 0x800000>;
88 alignment = <0x0 0x400000>;
89 alloc-ranges = <0x0 0x7f800000 0x0 0x800000>;
91 ion_cma_reserved:linux,ion-dev {
92 compatible = "shared-dma-pool";
94 size = <0x0 0x10000000>;
95 alignment = <0x0 0x400000>;
98 //di_reserved:linux,di {
99 //compatible = "amlogic, di-mem";
100 /* buffer_size = 3621952(yuv422 8bit) */
101 /* 4179008(yuv422 10bit full pack mode) */
102 /** 10x3621952=34.6M(0x23) support 8bit **/
103 /** 10x4736064=45.2M(0x2e) support 12bit **/
104 /** 10x4179008=40M(0x28) support 10bit **/
105 //size = <0x0 0x2800000>;
109 di_cma_reserved:linux,di_cma {
110 compatible = "shared-dma-pool";
112 /* buffer_size = 3621952(yuv422 8bit)
113 * | 4736064(yuv422 10bit)
114 * | 4074560(yuv422 10bit full pack mode)
115 * 10x3621952=34.6M(0x23) support 8bit
116 * 10x4736064=45.2M(0x2e) support 12bit
117 * 10x4074560=40M(0x28) support 10bit
119 size = <0x0 0x02800000>;
120 alignment = <0x0 0x400000>;
122 /* POST PROCESS MANAGER */
123 ppmgr_reserved:linux,ppmgr {
125 compatible = "shared-dma-pool";
128 codec_mm_cma:linux,codec_mm_cma {
129 compatible = "shared-dma-pool";
131 /* ion_codec_mm max can alloc size 80M*/
132 size = <0x0 0x13400000>;
133 alignment = <0x0 0x400000>;
134 linux,contiguous-region;
136 /* codec shared reserved */
137 codec_mm_reserved:linux,codec_mm_reserved {
139 compatible = "amlogic, codec-mm-reserved";
141 alignment = <0x0 0x100000>;
145 vdin0_cma_reserved:linux,vdin0_cma {
146 compatible = "shared-dma-pool";
148 /* 1920x1080x2x4 =16+4 M */
149 size = <0x0 0x04000000>;
150 alignment = <0x0 0x400000>;
153 vdin1_cma_reserved:linux,vdin1_cma {
154 compatible = "shared-dma-pool";
156 /* 1920x1080x2x4 =16 M */
157 size = <0x0 0x04000000>;
158 alignment = <0x0 0x400000>;
160 galcore_reserved:linux,galcore {
161 compatible = "shared-dma-pool";
163 size = <0x0 0x1000000>;
164 alignment = <0x0 0x400000>;
165 linux,contiguous-region;
168 isp_cma_reserved:linux,isp_cma {
169 compatible = "shared-dma-pool";
172 size = <0x0 0x1f000000>;
173 alignment = <0x0 0x400000>;
176 adapt_cma_reserved:linux,adapt_cma {
177 compatible = "shared-dma-pool";
180 size = <0x0 0x03000000>;
181 alignment = <0x0 0x400000>;
183 gdc_cma_reserved:linux,gdc_cma {
184 compatible = "shared-dma-pool";
187 size = <0x0 0x04000000>;
188 alignment = <0x0 0x400000>;
193 memory-region = <&galcore_reserved>;
196 compatible = "gpio-leds";
201 gpios=<&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
203 retain-state-suspended;
204 linux,default-trigger="default-on";
209 gpios = <&gpio_expander 5 GPIO_ACTIVE_HIGH>;
210 default-state ="off";
211 linux,default-trigger="none";
216 compatible = "amlogic, cvbsout-g12b";
217 dev_name = "cvbsout";
219 clocks = <&clkc CLKID_VCLK2_ENCI
220 &clkc CLKID_VCLK2_VENCI0
221 &clkc CLKID_VCLK2_VENCI1
222 &clkc CLKID_DAC_CLK>;
223 clock-names = "venci_top_gate",
228 /* performance: reg_address, reg_value */
230 performance = <0x1bf0 0x9
235 0xffff 0x0>; /* ending flag */
236 performance_sarft = <0x1bf0 0x9
241 0xffff 0x0>; /* ending flag */
245 compatible = "amlogic, bt-dev";
248 gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
249 gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
253 compatible = "amlogic, aml_wifi";
254 dev_name = "aml_wifi";
256 interrupt_pin = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
257 irq_trigger_type = "GPIO_IRQ_LOW";
258 power_on_pin = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>;
259 dhd_static_buf; //if use bcm wifi, config dhd_static_buf
260 pinctrl-names = "default";
261 pinctrl-0 = <&pwm_e_pins>;
262 pwm_config = <&wifi_pwm_conf>;
265 wifi_pwm_conf:wifi_pwm_conf{
267 pwms = <&pwm_ef MESON_PWM_0 30541 0>;
268 duty-cycle = <15270>;
272 pwms = <&pwm_ef MESON_PWM_2 30500 0>;
273 duty-cycle = <15250>;
278 picdec_cma_reserved:linux,picdec {
279 compatible = "shared-dma-pool";
283 linux,contiguous-region;
287 compatible = "amlogic, codec, mm";
288 memory-region = <&codec_mm_cma &codec_mm_reserved>;
289 dev_name = "codec_mm";
294 compatible = "amlogic, ppmgr";
295 memory-region = <&ppmgr_reserved>;
301 compatible = "amlogic, gpiomem";
302 reg = <0x0 0xff634000 0x0 0x1000>;
303 dev_name = "gpiomem";
308 compatible = "amlogic, gpiomem";
309 reg = <0x0 0xff800000 0x0 0x1000>;
310 dev_name = "gpiomem-ao";
315 compatible = "amlogic, picdec";
316 memory-region = <&picdec_cma_reserved>;
322 compatible = "amlogic, deinterlace";
324 /* 0:use reserved; 1:use cma; 2:use cma as reserved */
326 //memory-region = <&di_reserved>;
327 memory-region = <&di_cma_reserved>;
330 interrupt-names = "pre_irq", "post_irq";
331 clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
332 <&clkc CLKID_VPU_CLKB_COMP>;
333 clock-names = "vpu_clkb_tmp_composite",
334 "vpu_clkb_composite";
335 clock-range = <334 667>;
336 /* buffer-size = <3621952>;(yuv422 8bit) */
337 buffer-size = <4074560>;/*yuv422 fullpack*/
338 /* reserve-iomap = "true"; */
339 /* if enable nr10bit, set nr10bit-support to 1 */
340 post-wr-support = <1>;
341 nr10bit-support = <1>;
346 compatible = "amlogic, ionvideo";
347 dev_name = "ionvideo";
352 compatible = "amlogic, amlvideo2";
353 dev_name = "amlvideo2";
360 compatible = "amlogic, amlvideo2";
361 dev_name = "amlvideo2";
368 compatible = "amlogic, gpio_keypad";
374 key-gpios = <&gpio_ao GPIOAO_7 GPIO_ACTIVE_HIGH>; /* GPIOAO_7 */
375 detect_mode = <0>;/*0:polling mode, 1:irq mode*/
379 compatible = "amlogic, adc_keypad";
381 key_name = "vol-", "vol+", "enter";
383 io-channels = <&saradc SARADC_CH2>;
384 io-channel-names = "key-chan-2";
385 key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2>;
386 key_code = <114 115 28>;
387 key_val = <143 266 389>; //val=voltage/1800mV*1023
388 key_tolerance = <40 40 40>;
392 compatible = "amlogic, unifykey";
395 unifykey-index-0 = <&keysn_0>;
396 unifykey-index-1 = <&keysn_1>;
397 unifykey-index-2 = <&keysn_2>;
398 unifykey-index-3 = <&keysn_3>;
399 unifykey-index-4 = <&keysn_4>;
400 unifykey-index-5 = <&keysn_5>;
401 unifykey-index-6 = <&keysn_6>;
402 unifykey-index-7 = <&keysn_7>;
403 unifykey-index-8 = <&keysn_8>;
404 unifykey-index-9 = <&keysn_9>;
405 unifykey-index-10= <&keysn_10>;
406 unifykey-index-11= <&keysn_11>;
407 unifykey-index-12= <&keysn_12>;
408 unifykey-index-13= <&keysn_13>;
409 unifykey-index-14= <&keysn_14>;
410 unifykey-index-15= <&keysn_15>;
414 key-device = "normal";
415 key-permit = "read","write","del";
419 key-device = "normal";
420 key-permit = "read","write","del";
424 key-device = "secure";
426 key-permit = "read","write","del";
429 key-name = "secure_boot_set";
430 key-device = "efuse";
431 key-permit = "write";
435 key-device = "normal";
436 key-permit = "read","write","del";
440 key-name = "mac_wifi";
441 key-device = "normal";
442 key-permit = "read","write","del";
446 key-name = "hdcp2_tx";
447 key-device = "normal";
448 key-permit = "read","write","del";
451 key-name = "hdcp2_rx";
452 key-device = "normal";
453 key-permit = "read","write","del";
456 key-name = "widevinekeybox";
457 key-device = "secure";
458 key-permit = "read","write","del";
461 key-name = "deviceid";
462 key-device = "normal";
463 key-permit = "read","write","del";
466 key-name = "hdcp22_fw_private";
467 key-device = "secure";
468 key-permit = "read","write","del";
471 key-name = "PlayReadykeybox25";
472 key-device = "secure";
473 key-permit = "read","write","del";
476 key-name = "prpubkeybox";// PlayReady
477 key-device = "secure";
478 key-permit = "read","write","del";
481 key-name = "prprivkeybox";// PlayReady
482 key-device = "secure";
483 key-permit = "read","write","del";
486 key-name = "netflix_mgkid";
487 key-device = "secure";
488 key-permit = "read","write","del";
491 key-name = "eth_exphy_para";
492 key-device = "normal";
493 key-permit = "read","write","del";
498 compatible = "amlogic, efuse";
499 read_cmd = <0x82000030>;
500 write_cmd = <0x82000031>;
501 get_max_cmd = <0x82000033>;
517 compatible = "amlogic, vecm";
518 dev_name = "aml_vecm";
520 gamma_en = <0>;/*1:enabel ;0:disable*/
521 wb_en = <0>;/*1:enabel ;0:disable*/
522 cm_en = <0>;/*1:enabel ;0:disable*/
524 interrupts = <0 56 1>;
525 interrupt-names = "vsync2";
528 compatible = "amlogic, dolby_vision_g12a";
529 dev_name = "aml_amdolby_vision_driver";
531 tv_mode = <0>;/*1:enabel ;0:disable*/
534 /* Audio Related start */
536 #sound-dai-cells = <0>;
537 compatible = "amlogic, pdm_dummy_codec";
540 spdif_codec:spdif_dummy{
541 #sound-dai-cells = <0>;
542 compatible = "linux,spdif-dit";
546 #sound-dai-cells = <0>;
547 compatible = "amlogic, aml_dummy_codec";
551 #sound-dai-cells = <0>;
552 compatible = "amlogic, aml_codec_T9015";
553 reg = <0x0 0xFF632000 0x0 0x2000>;
554 is_auge_used = <1>; /* meson or auge chipset used */
560 /*drc_enable = <1>;*/
569 /* max 0xf, each bit for one lane, usually one lane */
571 /* max 0xff, each bit for one channel */
572 channel_mask = <0x3>;
575 compatible = "amlogic, g12a-sound-card";
576 aml-audio-card,name = "AML-AUGESOUND";
578 //aml-audio-card,aux-devs = <&amlogic_codec>;
579 /*for audio effect ,eqdrc */
580 aml-audio-card,effect = <&audio_effect>;
582 aml-audio-card,dai-link@0 {
584 /* suffix-name, sync with android audio hal
585 * what's the dai link used for
587 suffix-name = "alsaPORT-spdif-b";
589 sound-dai = <&aml_spdif_b>;
590 system-clock-frequency = <6144000>;
593 sound-dai = <&spdif_codec>;
597 aml-audio-card,dai-link@1 {
601 //bitclock-inversion;
603 //bitclock-master = <&tdmacodec>;
604 //frame-master = <&tdmacodec>;
605 /* suffix-name, sync with android audio hal
606 * what's the dai link used for
608 suffix-name = "alsaPORT-pcm";
610 sound-dai = <&aml_tdma>;
611 dai-tdm-slot-tx-mask =
613 dai-tdm-slot-rx-mask =
615 dai-tdm-slot-num = <8>;
616 dai-tdm-slot-width = <32>;
617 system-clock-frequency = <24576000>;
620 sound-dai = <&dummy_codec &dummy_codec>;
624 aml-audio-card,dai-link@2 {
628 //bitclock-inversion;
630 bitclock-master = <&aml_tdmb>;
631 frame-master = <&aml_tdmb>;
632 //bitclock-master = <&tdmbcodec>;
633 //frame-master = <&tdmbcodec>;
634 /* suffix-name, sync with android audio hal
635 * what's the dai link used for
637 suffix-name = "alsaPORT-i2s";
639 sound-dai = <&aml_tdmb>;
640 dai-tdm-slot-tx-mask = <1 1>;
641 dai-tdm-slot-rx-mask = <1 1>;
642 dai-tdm-slot-num = <2>;
643 dai-tdm-slot-width = <32>;
644 system-clock-frequency = <12288000>;
647 sound-dai = <&dummy_codec &dummy_codec
652 aml-audio-card,dai-link@3 {
656 //bitclock-inversion;
658 bitclock-master = <&aml_tdmc>;
659 frame-master = <&aml_tdmc>;
660 /* suffix-name, sync with android audio hal
661 * what's the dai link used for
663 //suffix-name = "alsaPORT-tdm";
665 sound-dai = <&aml_tdmc>;
666 dai-tdm-slot-tx-mask = <1 1>;
667 dai-tdm-slot-rx-mask = <1 1>;
668 dai-tdm-slot-num = <2>;
669 dai-tdm-slot-width = <32>;
670 system-clock-frequency = <12288000>;
673 sound-dai = <&dummy_codec &dummy_codec>;
677 aml-audio-card,dai-link@4 {
679 /* suffix-name, sync with android audio hal
680 * what's the dai link used for
682 suffix-name = "alsaPORT-spdif";
684 sound-dai = <&aml_spdif>;
685 system-clock-frequency = <6144000>;
688 sound-dai = <&spdif_codec>;
692 audiolocker: locker {
693 compatible = "amlogic, audiolocker";
694 clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
695 &clkaudio CLKID_AUDIO_LOCKER_IN
696 &clkaudio CLKID_AUDIO_MCLK_D
697 &clkaudio CLKID_AUDIO_MCLK_E
700 clock-names = "lock_out", "lock_in", "out_src",
701 "in_src", "out_calc", "in_ref";
702 interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
703 interrupt-names = "irq";
704 frequency = <49000000>; /* pll */
705 dividor = <49>; /* locker's parent */
708 /* Audio Related end */
710 cpu_opp_table0: cpu_opp_table0 {
711 compatible = "operating-points-v2";
715 opp-hz = /bits/ 64 <500000000>;
716 opp-microvolt = <730000>;
719 opp-hz = /bits/ 64 <667000000>;
720 opp-microvolt = <730000>;
723 opp-hz = /bits/ 64 <1000000000>;
724 opp-microvolt = <760000>;
727 opp-hz = /bits/ 64 <1200000000>;
728 opp-microvolt = <780000>;
731 opp-hz = /bits/ 64 <1398000000>;
732 opp-microvolt = <810000>;
735 opp-hz = /bits/ 64 <1512000000>;
736 opp-microvolt = <860000>;
739 opp-hz = /bits/ 64 <1608000000>;
740 opp-microvolt = <900000>;
743 opp-hz = /bits/ 64 <1704000000>;
744 opp-microvolt = <960000>;
747 opp-hz = /bits/ 64 <1800000000>;
748 opp-microvolt = <1020000>;
751 opp-hz = /bits/ 64 <1908000000>;
752 opp-microvolt = <1030000>;
755 opp-hz = /bits/ 64 <2016000000>;
756 opp-microvolt = <1040000>;
759 opp-hz = /bits/ 64 <2100000000>;
760 opp-microvolt = <1040000>;
763 opp-hz = /bits/ 64 <2208000000>;
764 opp-microvolt = <1040000>;
768 cpu_opp_table1: cpu_opp_table1 {
769 compatible = "operating-points-v2";
773 opp-hz = /bits/ 64 <500000000>;
774 opp-microvolt = <730000>;
777 opp-hz = /bits/ 64 <667000000>;
778 opp-microvolt = <730000>;
781 opp-hz = /bits/ 64 <1000000000>;
782 opp-microvolt = <730000>;
785 opp-hz = /bits/ 64 <1200000000>;
786 opp-microvolt = <750000>;
789 opp-hz = /bits/ 64 <1398000000>;
790 opp-microvolt = <770000>;
793 opp-hz = /bits/ 64 <1512000000>;
794 opp-microvolt = <770000>;
797 opp-hz = /bits/ 64 <1608000000>;
798 opp-microvolt = <780000>;
801 opp-hz = /bits/ 64 <1704000000>;
802 opp-microvolt = <790000>;
805 opp-hz = /bits/ 64 <1800000000>;
806 opp-microvolt = <830000>;
809 opp-hz = /bits/ 64 <1908000000>;
810 opp-microvolt = <860000>;
813 opp-hz = /bits/ 64 <2016000000>;
814 opp-microvolt = <910000>;
817 opp-hz = /bits/ 64 <2100000000>;
818 opp-microvolt = <960000>;
821 opp-hz = /bits/ 64 <2208000000>;
822 opp-microvolt = <1030000>;
825 opp-hz = /bits/ 64 <2304000000>;
826 opp-microvolt = <1030000>;
829 opp-hz = /bits/ 64 <2400000000>;
830 opp-microvolt = <1040000>;
835 compatible = "amlogic, cpufreq-meson";
840 compatible = "w1-gpio";
841 gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
846 compatible = "soc, sensor";
848 sensor-name = "os08a10"; /*imx290;os08a10;imx227*/
849 pinctrl-names="default";
850 pinctrl-0=<&gen_clk_ee_ao>;
851 clocks = <&clkc CLKID_GEN_CLK>;
852 clock-names = "gen_clk";
853 reset = <&gpio_expander 3 GPIO_ACTIVE_HIGH>;
854 ir_cut_gpio = <&gpio_expander 2 GPIO_ACTIVE_HIGH>;
858 compatible = "soc, iq";
860 sensor-name = "os08a10"; /*imx290;os08a10;imx227*/
866 memory-region = <&isp_cma_reserved>;
871 memory-region = <&adapt_cma_reserved>;
876 memory-region = <&gdc_cma_reserved>;
881 display_size_default = <1920 1080 1920 2160 32>;
882 mem_size = <0x00800000 0x4b80000 0x100000 0x100000 0x800000>;
883 logo_addr = "0x7f800000";
885 pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
891 logo_addr = "0x7f800000";
917 pinctrl-names="default";
918 pinctrl-0=<&i2c3_master_pins2>;
919 clock-frequency = <100000>; /* default 100k */
922 compatible = "edt,edt-ft5336", "ft5x06";
924 interrupt_pin = <&gpio GPIOA_5 GPIO_ACTIVE_HIGH>;
925 reset-gpios = <&gpio_expander 6 GPIO_ACTIVE_HIGH>;
932 pinctrl-names="default";
933 pinctrl-0=<&ao_i2c_master_pins1>;
934 clock-frequency = <400000>; /* default 100k */
936 gpio_expander: gpio-controller@20 {
937 compatible = "ti,tca6408";
944 hym8563: hym8563@51 {
945 compatible = "haoyu,hym8563";
952 compatible = "khadas-mcu";
954 fan,trig_temp_level0 = <50>;
955 fan,trig_temp_level1 = <60>;
956 fan,trig_temp_level2 = <70>;
957 hwver = "VIM3.V11"; /* Will be updated in uboot. */
961 compatible = "kxtj3";
966 poll_delay_ms = <30>;
967 irq-gpio = <&gpio_ao GPIOAO_9 IRQ_TYPE_EDGE_RISING>;
974 compatible = "amlogic, g12a-snd-tdma";
975 #sound-dai-cells = <0>;
976 dai-tdm-lane-slot-mask-in = <0 1>;
977 dai-tdm-oe-lane-slot-mask-out = <1 0>;
978 dai-tdm-clk-sel = <0>;
979 clocks = <&clkaudio CLKID_AUDIO_MCLK_A
981 clock-names = "mclk", "clk_srcpll";
982 pinctrl-names = "tdm_pins";
983 pinctrl-0 = <&tdmout_a &tdmin_a>;
987 compatible = "amlogic, g12a-snd-tdmb";
988 #sound-dai-cells = <0>;
989 dai-tdm-lane-slot-mask-in = <0 1 0 0>;
990 dai-tdm-lane-slot-mask-out = <1 0 0 0>;
991 dai-tdm-clk-sel = <1>;
992 clocks = <&clkaudio CLKID_AUDIO_MCLK_B
995 &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
996 clock-names = "mclk", "clk_srcpll",
997 "samesource_srcpll", "samesource_clk";
998 pinctrl-names = "tdm_pins";
999 pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
1000 mclk_pad = <0>; /* 0: mclk_0; 1: mclk_1 */
1008 samesource_sel = <3>;
1012 compatible = "amlogic, g12a-snd-tdmc";
1013 #sound-dai-cells = <0>;
1014 dai-tdm-lane-slot-mask-in = <1 0 0 0>;
1015 #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
1016 #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
1017 #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
1018 dai-tdm-clk-sel = <2>;
1019 clocks = <&clkaudio CLKID_AUDIO_MCLK_C
1021 clock-names = "mclk", "clk_srcpll";
1022 pinctrl-names = "tdm_pins";
1023 pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
1024 mclk_pad = <1>; /* 0: mclk_0; 1: mclk_1 */
1028 compatible = "amlogic, g12a-snd-tdmlb";
1029 #sound-dai-cells = <0>;
1030 dai-tdm-lane-lb-slot-mask-in = <1 0 0 0>;
1031 dai-tdm-clk-sel = <1>;
1032 clocks = <&clkaudio CLKID_AUDIO_MCLK_B
1034 clock-names = "mclk", "clk_srcpll";
1036 * select tdmin_lb src;
1047 status = "disabled";
1051 compatible = "amlogic, g12a-snd-spdif-a";
1052 #sound-dai-cells = <0>;
1053 clocks = <&clkc CLKID_MPLL0
1054 &clkc CLKID_FCLK_DIV4
1055 &clkaudio CLKID_AUDIO_SPDIFIN
1056 &clkaudio CLKID_AUDIO_SPDIFOUT
1057 &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
1058 &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
1059 clock-names = "sysclk", "fixed_clk", "gate_spdifin",
1060 "gate_spdifout", "clk_spdifin", "clk_spdifout";
1062 <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
1064 interrupt-names = "irq_spdifin";
1065 pinctrl-names = "spdif_pins",
1067 pinctrl-0 = <&spdifout>;
1068 pinctrl-1 = <&spdifout_a_mute>;
1071 aml_spdif_b: spdif_b {
1072 compatible = "amlogic, g12a-snd-spdif-b";
1073 #sound-dai-cells = <0>;
1074 clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
1075 &clkaudio CLKID_AUDIO_SPDIFOUTB
1076 &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
1077 clock-names = "sysclk",
1078 "gate_spdifout", "clk_spdifout";
1082 compatible = "amlogic, g12a-snd-pdm";
1083 #sound-dai-cells = <0>;
1084 clocks = <&clkaudio CLKID_AUDIO_PDM
1085 &clkc CLKID_FCLK_DIV3
1087 &clkaudio CLKID_AUDIO_PDMIN0
1088 &clkaudio CLKID_AUDIO_PDMIN1>;
1089 clock-names = "gate",
1094 pinctrl-names = "pdm_pins";
1095 pinctrl-0 = <&pdmin>;
1096 filter_mode = <1>; /* mode 0~4, defalut:1 */
1100 loopback:loopback@0 {
1101 compatible = "amlogic, g12a-loopback";
1102 #sound-dai-cells = <0>;
1104 clocks = <&clkaudio CLKID_AUDIO_PDM
1105 &clkc CLKID_FCLK_DIV3
1107 &clkaudio CLKID_AUDIO_PDMIN0
1108 &clkaudio CLKID_AUDIO_PDMIN1
1110 &clkaudio CLKID_AUDIO_MCLK_A>;
1111 clock-names = "pdm_gate",
1112 "pdm_sysclk_srcpll",
1128 datain_chmask = <0xf>;
1129 /* config which data pin for loopback */
1130 datain-lane-mask-in = <1 0 1 0>;
1132 /* calc mclk for datalb */
1139 * 3: PAD_TDMINA_DIN*, refer to core pinmux
1140 * 4: PAD_TDMINB_DIN*, refer to core pinmux
1141 * 5: PAD_TDMINC_DIN*, refer to core pinmux
1142 * 6: PAD_TDMINA_D*, oe, refer to core pinmux
1143 * 7: PAD_TDMINB_D*, oe, refer to core pinmux
1145 /* if tdmin_lb >= 3, use external loopback */
1148 datalb_chmask = <0x3>;
1149 /* config which data pin as loopback */
1150 datalb-lane-mask-in = <1 0 0 0>;
1152 status = "disabled";
1155 audioresample: resample {
1156 compatible = "amlogic, g12a-resample";
1157 clocks = <&clkc CLKID_MPLL3
1158 &clkaudio CLKID_AUDIO_MCLK_F
1159 &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
1160 clock-names = "resample_pll", "resample_src", "resample_clk";
1161 /*same with toddr_src
1171 resample_module = <4>;
1172 status = "disabled";
1174 aml_pwrdet: pwrdet {
1175 compatible = "amlogic, g12a-power-detect";
1177 interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
1178 interrupt-names = "pwrdet_irq";
1180 /* pwrdet source sel
1195 status = "disabled";
1197 }; /* end of audiobus */
1200 tdmout_a: tdmout_a {
1201 mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
1202 groups = "tdma_sclk",
1205 function = "tdma_out";
1211 groups = "tdma_din1";
1212 function = "tdma_in";
1216 tdmb_mclk: tdmb_mclk {
1220 drive-strength = <2>;
1223 tdmout_b: tdmout_b {
1224 mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
1225 groups = "tdmb_sclk",
1228 function = "tdmb_out";
1229 drive-strength = <2>;
1235 groups = "tdmb_din1"
1236 /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
1237 function = "tdmb_in";
1238 drive-strength = <2>;
1242 tdmc_mclk: tdmc_mclk {
1243 mux { /* GPIOA_11 */
1249 clk12_24_z_pins:clk12_24_z_pins {
1251 groups = "clk12_24_z";
1252 function = "clk12_24_ee";
1253 drive-strength = <3>;
1258 mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/
1259 groups = "tdmc_sclk_a",
1265 function = "tdmc_out";
1270 mux { /* GPIOA_10 */
1271 groups = "tdmc_din0_a";
1272 function = "tdmc_in";
1277 mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
1278 groups = "pdm_din0_a",
1286 }; /* end of pinctrl_periphs */
1289 spdifout: spdifout {
1290 mux { /* gpiao_10 */
1291 groups = "spdif_out_ao";
1292 function = "spdif_out_ao";
1295 spdifout_a_mute: spdifout_a_mute {
1296 mux { /* gpiao_10 */
1297 groups = "GPIOAO_10";
1298 function = "gpio_aobus";
1301 bl_pwm_off_pins:bl_pwm_off_pin {
1304 function = "gpio_aobus";
1309 gen_clk_ee_ao: gen_clk_ee_ao {
1311 groups="gen_clk_ee_ao";
1312 function="gen_clk_ee_ao";
1313 drive-strength = <3>;
1316 }; /* end of pinctrl_aobus */
1319 status = "disabled";
1326 /*if you want to use vdin just modify status to "ok"*/
1328 memory-region = <&vdin0_cma_reserved>;
1330 /*vdin write mem color depth support:
1335 *bit4:support yuv422 10bit full pack mode (from txl new add)
1337 tv_bit_mode = <0x15>;
1340 memory-region = <&vdin1_cma_reserved>;
1342 /*vdin write mem color depth support:
1354 caps = "MMC_CAP_8_BIT_DATA",
1355 "MMC_CAP_MMC_HIGHSPEED",
1356 "MMC_CAP_SD_HIGHSPEED",
1357 "MMC_CAP_NONREMOVABLE",
1358 /* "MMC_CAP_1_8V_DDR", */
1362 "MMC_CAP_DRIVER_TYPE_A";
1363 caps2 = "MMC_CAP2_HS200";
1366 f_max = <200000000>;
1373 caps = "MMC_CAP_4_BIT_DATA",
1374 "MMC_CAP_MMC_HIGHSPEED",
1375 "MMC_CAP_SD_HIGHSPEED";
1384 caps = "MMC_CAP_4_BIT_DATA",
1385 "MMC_CAP_MMC_HIGHSPEED",
1386 "MMC_CAP_SD_HIGHSPEED",
1387 "MMC_CAP_NONREMOVABLE",
1388 "MMC_CAP_UHS_SDR12",
1389 "MMC_CAP_UHS_SDR25",
1390 "MMC_CAP_UHS_SDR50",
1391 "MMC_CAP_UHS_SDR104",
1392 "MMC_PM_KEEP_POWER",
1395 f_max = <200000000>;
1406 gpio-vbus-power = "GPIOA_6";
1407 gpios = <&gpio GPIOA_6 GPIO_ACTIVE_HIGH>;
1418 /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
1419 controller-type = <2>;
1425 pinctrl-names = "external_eth_pins";
1426 pinctrl-0 = <&external_eth_pins>;
1429 cali_val = <0x60000>;
1431 auto_cali_idx = <0>;
1440 reset-gpio = <&gpio GPIOA_8 GPIO_ACTIVE_HIGH>;
1441 status = "disabled";
1449 status = "disabled";
1450 pinctrl-names = "default";
1451 pinctrl-0 = <&spicc1_pins>;
1452 cs-gpios = <&gpio GPIOH_6 0>;
1457 compatible = "linux,spidev";
1458 /* spi default max clock 100Mhz */
1459 spi-max-frequency = <100000000>;
1469 lcd_cpu-gpios = <&gpio_expander 0 GPIO_ACTIVE_HIGH
1470 &gpio_expander 1 GPIO_ACTIVE_HIGH>;
1471 lcd_cpu_gpio_names = "GPIO_EXPANDER_0","GPIO_EXPANDER_1";