arm64: dts: amlogic: VIM3/VIM3L/OdroidC4/OdroidN2: Use 256MB ion_cma heap
[platform/kernel/linux-amlogic.git] / arch / arm64 / boot / dts / amlogic / kvim3_linux.dts
1 /*
2  * arch/arm64/boot/dts/amlogic/kvim3_linux.dts
3  *
4  * Copyright (C) 2019 Wesion, Inc. All rights reserved.
5  *
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.
10  *
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
14  * more details.
15  *
16  */
17
18 /dts-v1/;
19
20 #include "mesong12b.dtsi"
21 #include "partition_linux.dtsi"
22 #include "khadas-ts050-panel.dtsi"
23 #include "mesong12b_drm.dtsi"
24
25 / {
26         model = "Khadas VIM3";
27         amlogic-dt-id = "g12b_kvim3";
28         compatible = "amlogic, g12b";
29         interrupt-parent = <&gic>;
30         #address-cells = <2>;
31         #size-cells = <2>;
32
33         chosen { };
34
35         aliases {
36                 serial0 = &uart_AO;
37                 serial1 = &uart_A;
38                 serial2 = &uart_B;
39                 serial3 = &uart_C;
40                 serial4 = &uart_AO_B;
41                 i2c0 = &i2c0;
42                 i2c1 = &i2c1;
43                 i2c2 = &i2c2;
44                 i2c3 = &i2c3;
45                 i2c4 = &i2c_AO;
46                 tsensor0 = &p_tsensor;
47                 tsensor1 = &d_tsensor;
48                 spi1 = &spicc1;
49         };
50
51 //      memory@00000000 {
52 //              device_type = "memory";
53 //              linux,usable-memory = <0x0 0x0 0x0 0x80000000>;
54 //      };
55
56         reserved-memory {
57                 #address-cells = <2>;
58                 #size-cells = <2>;
59                 ranges;
60                 /* global autoconfigured region for contiguous allocations */
61                 ramoops@0x07400000 {
62                         compatible = "ramoops";
63                         reg = <0x0 0x07400000 0x0 0x00100000>;
64                         record-size = <0x8000>;
65                         console-size = <0x8000>;
66                         ftrace-size = <0x40000>;
67                 };
68
69                 secmon_reserved:linux,secmon {
70                         compatible = "shared-dma-pool";
71                         reusable;
72                         size = <0x0 0x400000>;
73                         alignment = <0x0 0x400000>;
74                         alloc-ranges = <0x0 0x05000000 0x0 0x400000>;
75                         clear-map;
76                 };
77
78                 secos_reserved:linux,secos {
79                         status = "disable";
80                         compatible = "amlogic, aml_secos_memory";
81                         reg = <0x0 0x05300000 0x0 0x2000000>;
82                         no-map;
83                 };
84                 logo_reserved:linux,meson-fb {
85                         compatible = "shared-dma-pool";
86                         reusable;
87                         size = <0x0 0x800000>;
88                         alignment = <0x0 0x400000>;
89                         alloc-ranges = <0x0 0x7f800000 0x0 0x800000>;
90                 };
91                 ion_cma_reserved:linux,ion-dev {
92                         compatible = "shared-dma-pool";
93                         reusable;
94                         size = <0x0 0x10000000>;
95                         alignment = <0x0 0x400000>;
96                 };
97
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>;
106                         //no-map;
107                 //};
108                 /*di CMA pool */
109                 di_cma_reserved:linux,di_cma {
110                         compatible = "shared-dma-pool";
111                         reusable;
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
118                          */
119                         size = <0x0 0x02800000>;
120                         alignment = <0x0 0x400000>;
121                 };
122                 /*  POST PROCESS MANAGER */
123                 ppmgr_reserved:linux,ppmgr {
124                         status = "disable";
125                         compatible = "shared-dma-pool";
126                         size = <0x0 0x0>;
127                 };
128                 codec_mm_cma:linux,codec_mm_cma {
129                         compatible = "shared-dma-pool";
130                         reusable;
131                         /* ion_codec_mm max can alloc size 80M*/
132                         size = <0x0 0x13400000>;
133                         alignment = <0x0 0x400000>;
134                         linux,contiguous-region;
135                 };
136                 /* codec shared reserved */
137                 codec_mm_reserved:linux,codec_mm_reserved {
138                         status = "disable";
139                         compatible = "amlogic, codec-mm-reserved";
140                         size = <0x0 0x0>;
141                         alignment = <0x0 0x100000>;
142                         //no-map;
143                 };
144                 /*  vdin0 CMA pool */
145                 vdin0_cma_reserved:linux,vdin0_cma {
146                         compatible = "shared-dma-pool";
147                         reusable;
148                 /* 1920x1080x2x4  =16+4 M */
149                         size = <0x0 0x04000000>;
150                         alignment = <0x0 0x400000>;
151                 };
152                 /*  vdin1 CMA pool */
153                 vdin1_cma_reserved:linux,vdin1_cma {
154                         compatible = "shared-dma-pool";
155                         reusable;
156                         /* 1920x1080x2x4  =16 M */
157                         size = <0x0 0x04000000>;
158                         alignment = <0x0 0x400000>;
159                 };
160                 galcore_reserved:linux,galcore {
161                         compatible = "shared-dma-pool";
162                         reusable;
163                         size = <0x0 0x1000000>;
164                         alignment = <0x0 0x400000>;
165                         linux,contiguous-region;
166                 };
167
168                 isp_cma_reserved:linux,isp_cma {
169                         compatible = "shared-dma-pool";
170                         reusable;
171                         status = "okay";
172                         size = <0x0 0x1f000000>;
173                         alignment = <0x0 0x400000>;
174                 };
175
176                 adapt_cma_reserved:linux,adapt_cma {
177                         compatible = "shared-dma-pool";
178                         reusable;
179                         status = "okay";
180                         size = <0x0 0x03000000>;
181                         alignment = <0x0 0x400000>;
182                 };
183                 gdc_cma_reserved:linux,gdc_cma {
184                         compatible = "shared-dma-pool";
185                         reusable;
186                         status = "okay";
187                         size = <0x0 0x04000000>;
188                         alignment = <0x0 0x400000>;
189                 };
190         };
191         galcore {
192                 status = "okay";
193                 memory-region = <&galcore_reserved>;
194         };
195         gpioleds {
196                 compatible = "gpio-leds";
197                 status = "okay";
198
199                 sys_led {
200                         label="sys_led";
201                         gpios=<&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
202                         default-state ="on";
203                         retain-state-suspended;
204                         linux,default-trigger="default-on";
205                 };
206
207                 red_led {
208                         label = "red_led";
209                         gpios = <&gpio_expander 5 GPIO_ACTIVE_HIGH>;
210                         default-state ="off";
211                         linux,default-trigger="none";
212                 };
213         };
214
215         cvbsout {
216                 compatible = "amlogic, cvbsout-g12b";
217                 dev_name = "cvbsout";
218                 status = "disabled";
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",
224                         "venci_0_gate",
225                         "venci_1_gate",
226                         "vdac_clk_gate";
227
228                 /* performance: reg_address, reg_value */
229                 /* g12b */
230                 performance = <0x1bf0  0x9
231                         0x1b56  0x333
232                         0x1b12  0x8080
233                         0x1b05  0xfd
234                         0x1c59  0xf850
235                         0xffff  0x0>; /* ending flag */
236                 performance_sarft = <0x1bf0  0x9
237                         0x1b56  0x333
238                         0x1b12  0x0
239                         0x1b05  0x9
240                         0x1c59  0xfc48
241                         0xffff  0x0>; /* ending flag */
242         };
243
244         bt-dev{
245                 compatible = "amlogic, bt-dev";
246                 dev_name = "bt-dev";
247                 status = "okay";
248                 gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
249                 gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
250         };
251
252         wifi{
253                 compatible = "amlogic, aml_wifi";
254                 dev_name = "aml_wifi";
255                 status = "okay";
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>;
263         };
264
265         wifi_pwm_conf:wifi_pwm_conf{
266                 pwm_channel1_conf {
267                         pwms = <&pwm_ef MESON_PWM_0 30541 0>;
268                         duty-cycle = <15270>;
269                         times = <10>;
270                 };
271                 pwm_channel2_conf {
272                         pwms = <&pwm_ef MESON_PWM_2 30500 0>;
273                         duty-cycle = <15250>;
274                         times = <12>;
275                 };
276         };
277
278         picdec_cma_reserved:linux,picdec {
279                 compatible = "shared-dma-pool";
280                 reusable;
281                 size = <0x0>;
282                 alignment = <0x0>;
283                 linux,contiguous-region;
284         };
285
286         codec_mm {
287                 compatible = "amlogic, codec, mm";
288                 memory-region = <&codec_mm_cma &codec_mm_reserved>;
289                 dev_name = "codec_mm";
290                 status = "okay";
291         };
292
293         ppmgr {
294                 compatible = "amlogic, ppmgr";
295                 memory-region = <&ppmgr_reserved>;
296                 dev_name = "ppmgr";
297                 status = "okay";
298         };
299
300         gpiomem {
301                 compatible = "amlogic, gpiomem";
302                 reg = <0x0 0xff634000 0x0 0x1000>;
303                 dev_name = "gpiomem";
304                 status = "okay";
305         };
306
307         gpiomem_ao {
308                 compatible = "amlogic, gpiomem";
309                 reg = <0x0 0xff800000 0x0 0x1000>;
310                 dev_name = "gpiomem-ao";
311                 status = "okay";
312         };
313
314         picdec {
315                 compatible = "amlogic, picdec";
316                 memory-region = <&picdec_cma_reserved>;
317                 dev_name = "picdec";
318                 status = "okay";
319         };
320
321         deinterlace {
322                 compatible = "amlogic, deinterlace";
323                 status = "okay";
324                 /* 0:use reserved; 1:use cma; 2:use cma as reserved */
325                 flag_cma = <1>;
326                 //memory-region = <&di_reserved>;
327                 memory-region = <&di_cma_reserved>;
328                 interrupts = <0 46 1
329                                 0 40 1>;
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>;
342                 nrds-enable = <1>;
343                 pps-enable = <1>;
344         };
345         ionvideo {
346                 compatible = "amlogic, ionvideo";
347                 dev_name = "ionvideo";
348                 status = "okay";
349         };
350
351         amlvideo2_0 {
352                 compatible = "amlogic, amlvideo2";
353                 dev_name = "amlvideo2";
354                 status = "okay";
355                 amlvideo2_id = <0>;
356                 cma_mode = <1>;
357         };
358
359         amlvideo2_1 {
360                 compatible = "amlogic, amlvideo2";
361                 dev_name = "amlvideo2";
362                 status = "okay";
363                 amlvideo2_id = <1>;
364                 cma_mode = <1>;
365         };
366
367         gpio_keypad {
368                 compatible = "amlogic, gpio_keypad";
369                 status = "okay";
370                 scan_period = <20>;
371                 key_num = <1>;
372                 key_name = "power";
373                 key_code = <116>;
374                 key-gpios = <&gpio_ao  GPIOAO_7  GPIO_ACTIVE_HIGH>; /* GPIOAO_7 */
375                 detect_mode = <0>;/*0:polling mode, 1:irq mode*/
376         };
377
378         adc_keypad {
379                 compatible = "amlogic, adc_keypad";
380                 status = "okay";
381                 key_name = "vol-", "vol+", "enter";
382                 key_num = <3>;
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>;
389         };
390
391         unifykey{
392                 compatible = "amlogic, unifykey";
393                 status = "ok";
394                 unifykey-num = <16>;
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>;
411
412                 keysn_0: key_0{
413                         key-name = "usid";
414                         key-device = "normal";
415                         key-permit = "read","write","del";
416                 };
417                 keysn_1:key_1{
418                         key-name = "mac";
419                         key-device = "normal";
420                         key-permit = "read","write","del";
421                 };
422                 keysn_2:key_2{
423                         key-name = "hdcp";
424                         key-device = "secure";
425                         key-type = "sha1";
426                         key-permit = "read","write","del";
427                 };
428                 keysn_3:key_3{
429                         key-name = "secure_boot_set";
430                         key-device = "efuse";
431                         key-permit = "write";
432                 };
433                 keysn_4:key_4{
434                         key-name = "mac_bt";
435                         key-device = "normal";
436                         key-permit = "read","write","del";
437                         key-type  = "mac";
438                 };
439                 keysn_5:key_5{
440                         key-name = "mac_wifi";
441                         key-device = "normal";
442                         key-permit = "read","write","del";
443                         key-type = "mac";
444                 };
445                 keysn_6:key_6{
446                         key-name = "hdcp2_tx";
447                         key-device = "normal";
448                         key-permit = "read","write","del";
449                 };
450                 keysn_7:key_7{
451                         key-name = "hdcp2_rx";
452                         key-device = "normal";
453                         key-permit = "read","write","del";
454                 };
455                 keysn_8:key_8{
456                         key-name = "widevinekeybox";
457                         key-device = "secure";
458                         key-permit = "read","write","del";
459                 };
460                 keysn_9:key_9{
461                         key-name = "deviceid";
462                         key-device = "normal";
463                         key-permit = "read","write","del";
464                 };
465                 keysn_10:key_10{
466                         key-name = "hdcp22_fw_private";
467                         key-device = "secure";
468                         key-permit = "read","write","del";
469                 };
470                 keysn_11:key_11{
471                         key-name = "PlayReadykeybox25";
472                         key-device = "secure";
473                         key-permit = "read","write","del";
474                 };
475                 keysn_12:key_12{
476                         key-name = "prpubkeybox";// PlayReady
477                         key-device = "secure";
478                         key-permit = "read","write","del";
479                 };
480                 keysn_13:key_13{
481                         key-name = "prprivkeybox";// PlayReady
482                         key-device = "secure";
483                         key-permit = "read","write","del";
484                 };
485                 keysn_14:key_14{
486                         key-name = "netflix_mgkid";
487                         key-device = "secure";
488                         key-permit = "read","write","del";
489                 };
490                 keysn_15:key_15{
491                         key-name = "eth_exphy_para";
492                         key-device = "normal";
493                         key-permit = "read","write","del";
494                 };
495         };//End unifykey
496
497         efuse: efuse{
498                 compatible = "amlogic, efuse";
499                 read_cmd = <0x82000030>;
500                 write_cmd = <0x82000031>;
501                 get_max_cmd = <0x82000033>;
502                 key = <&efusekey>;
503                 status = "okay";
504         };
505
506         efusekey:efusekey{
507                 keynum = <1>;
508                 key0 = <&key_0>;
509                 key_0:key_0{
510                         keyname = "mac";
511                         offset = <0>;
512                         size = <6>;
513                 };
514         };//End efusekey
515
516         amlvecm {
517                 compatible = "amlogic, vecm";
518                 dev_name = "aml_vecm";
519                 status = "okay";
520                 gamma_en = <0>;/*1:enabel ;0:disable*/
521                 wb_en = <0>;/*1:enabel ;0:disable*/
522                 cm_en = <0>;/*1:enabel ;0:disable*/
523
524                 interrupts = <0 56 1>;
525                 interrupt-names = "vsync2";
526         };
527         amdolby_vision {
528                 compatible = "amlogic, dolby_vision_g12a";
529                 dev_name = "aml_amdolby_vision_driver";
530                 status = "okay";
531                 tv_mode = <0>;/*1:enabel ;0:disable*/
532         };
533
534         /* Audio Related start */
535         pdm_codec:dummy{
536                 #sound-dai-cells = <0>;
537                 compatible = "amlogic, pdm_dummy_codec";
538                 status = "okay";
539         };
540         spdif_codec:spdif_dummy{
541                 #sound-dai-cells = <0>;
542                 compatible = "linux,spdif-dit";
543                 status = "okay";
544         };
545         dummy_codec:dummy{
546                 #sound-dai-cells = <0>;
547                 compatible = "amlogic, aml_dummy_codec";
548                 status = "okay";
549         };
550         amlogic_codec:t9015{
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 */
555                 tdmout_index = <1>;
556                 status = "okay";
557         };
558         audio_effect:eqdrc{
559                 /*eq_enable = <1>;*/
560                 /*drc_enable = <1>;*/
561                 /*
562                  * 0:tdmout_a
563                  * 1:tdmout_b
564                  * 2:tdmout_c
565                  * 3:spdifout
566                  * 4:spdifout_b
567                  */
568                 eqdrc_module = <1>;
569                 /* max 0xf, each bit for one lane, usually one lane */
570                 lane_mask = <0x1>;
571                 /* max 0xff, each bit for one channel */
572                 channel_mask = <0x3>;
573         };
574         auge_sound {
575                 compatible = "amlogic, g12a-sound-card";
576                 aml-audio-card,name = "AML-AUGESOUND";
577
578                 //aml-audio-card,aux-devs = <&amlogic_codec>;
579                 /*for audio effect ,eqdrc */
580                 aml-audio-card,effect = <&audio_effect>;
581
582                 aml-audio-card,dai-link@0 {
583                         mclk-fs = <128>;
584                         /* suffix-name, sync with android audio hal
585                          * what's the dai link used for
586                          */
587                         suffix-name = "alsaPORT-spdif-b";
588                         cpu {
589                                 sound-dai = <&aml_spdif_b>;
590                                 system-clock-frequency = <6144000>;
591                         };
592                         codec {
593                                 sound-dai = <&spdif_codec>;
594                         };
595                 };
596
597                 aml-audio-card,dai-link@1 {
598                         format = "dsp_a";
599                         mclk-fs = <512>;
600                         //continuous-clock;
601                         //bitclock-inversion;
602                         //frame-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
607                          */
608                         suffix-name = "alsaPORT-pcm";
609                         tdmacpu: cpu {
610                                 sound-dai = <&aml_tdma>;
611                                 dai-tdm-slot-tx-mask =
612                                                         <1 1 1 1 1 1 1 1>;
613                                 dai-tdm-slot-rx-mask =
614                                                         <1 1 1 1 1 1 1 1>;
615                                 dai-tdm-slot-num = <8>;
616                                 dai-tdm-slot-width = <32>;
617                                 system-clock-frequency = <24576000>;
618                         };
619                         tdmacodec: codec {
620                                 sound-dai = <&dummy_codec &dummy_codec>;
621                         };
622                 };
623
624                 aml-audio-card,dai-link@2 {
625                         format = "i2s";
626                         mclk-fs = <256>;
627                         //continuous-clock;
628                         //bitclock-inversion;
629                         //frame-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
636                          */
637                         suffix-name = "alsaPORT-i2s";
638                         cpu {
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>;
645                         };
646                         tdmbcodec: codec {
647                                 sound-dai = <&dummy_codec &dummy_codec
648                                 &amlogic_codec>;
649                         };
650                 };
651
652                 aml-audio-card,dai-link@3 {
653                         format = "i2s";
654                         mclk-fs = <256>;
655                         //continuous-clock;
656                         //bitclock-inversion;
657                         //frame-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
662                          */
663                         //suffix-name = "alsaPORT-tdm";
664                         cpu {
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>;
671                         };
672                         codec {
673                                 sound-dai = <&dummy_codec &dummy_codec>;
674                         };
675                 };
676
677                 aml-audio-card,dai-link@4 {
678                         mclk-fs = <128>;
679                         /* suffix-name, sync with android audio hal
680                          * what's the dai link used for
681                          */
682                         suffix-name = "alsaPORT-spdif";
683                         cpu {
684                                 sound-dai = <&aml_spdif>;
685                                 system-clock-frequency = <6144000>;
686                         };
687                         codec {
688                                 sound-dai = <&spdif_codec>;
689                         };
690                 };
691         };
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
698                                 &clkc CLKID_MPLL1
699                                 &clkc CLKID_MPLL2>;
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 */
706                 status = "okay";
707         };
708         /* Audio Related end */
709
710         cpu_opp_table0: cpu_opp_table0 {
711                 compatible = "operating-points-v2";
712                 opp-shared;
713
714                 opp00 {
715                         opp-hz = /bits/ 64 <500000000>;
716                         opp-microvolt = <730000>;
717                 };
718                 opp01 {
719                         opp-hz = /bits/ 64 <667000000>;
720                         opp-microvolt = <730000>;
721                 };
722                 opp02 {
723                         opp-hz = /bits/ 64 <1000000000>;
724                         opp-microvolt = <760000>;
725                 };
726                 opp03 {
727                         opp-hz = /bits/ 64 <1200000000>;
728                         opp-microvolt = <780000>;
729                 };
730                 opp04 {
731                         opp-hz = /bits/ 64 <1398000000>;
732                         opp-microvolt = <810000>;
733                 };
734                 opp05 {
735                         opp-hz = /bits/ 64 <1512000000>;
736                         opp-microvolt = <860000>;
737                 };
738                 opp06 {
739                         opp-hz = /bits/ 64 <1608000000>;
740                         opp-microvolt = <900000>;
741                 };
742                 opp07 {
743                         opp-hz = /bits/ 64 <1704000000>;
744                         opp-microvolt = <960000>;
745                 };
746                 opp08 {
747                         opp-hz = /bits/ 64 <1800000000>;
748                         opp-microvolt = <1020000>;
749                 };
750                 opp09 {
751                         opp-hz = /bits/ 64 <1908000000>;
752                         opp-microvolt = <1030000>;
753                 };
754                 opp10 {
755                         opp-hz = /bits/ 64 <2016000000>;
756                         opp-microvolt = <1040000>;
757                 };
758                 opp11 {
759                         opp-hz = /bits/ 64 <2100000000>;
760                         opp-microvolt = <1040000>;
761                 };
762                 opp12 {
763                         opp-hz = /bits/ 64 <2208000000>;
764                         opp-microvolt = <1040000>;
765                 };
766         };
767
768         cpu_opp_table1: cpu_opp_table1 {
769                 compatible = "operating-points-v2";
770                 opp-shared;
771
772                 opp00 {
773                         opp-hz = /bits/ 64 <500000000>;
774                         opp-microvolt = <730000>;
775                 };
776                 opp01 {
777                         opp-hz = /bits/ 64 <667000000>;
778                         opp-microvolt = <730000>;
779                 };
780                 opp02 {
781                         opp-hz = /bits/ 64 <1000000000>;
782                         opp-microvolt = <730000>;
783                 };
784                 opp03 {
785                         opp-hz = /bits/ 64 <1200000000>;
786                         opp-microvolt = <750000>;
787                 };
788                 opp04 {
789                         opp-hz = /bits/ 64 <1398000000>;
790                         opp-microvolt = <770000>;
791                 };
792                 opp05 {
793                         opp-hz = /bits/ 64 <1512000000>;
794                         opp-microvolt = <770000>;
795                 };
796                 opp06 {
797                         opp-hz = /bits/ 64 <1608000000>;
798                         opp-microvolt = <780000>;
799                 };
800                 opp07 {
801                         opp-hz = /bits/ 64 <1704000000>;
802                         opp-microvolt = <790000>;
803                 };
804                 opp08 {
805                         opp-hz = /bits/ 64 <1800000000>;
806                         opp-microvolt = <830000>;
807                 };
808                 opp09 {
809                         opp-hz = /bits/ 64 <1908000000>;
810                         opp-microvolt = <860000>;
811                 };
812                 opp10 {
813                         opp-hz = /bits/ 64 <2016000000>;
814                         opp-microvolt = <910000>;
815                 };
816                 opp11 {
817                         opp-hz = /bits/ 64 <2100000000>;
818                         opp-microvolt = <960000>;
819                 };
820                 opp12 {
821                         opp-hz = /bits/ 64 <2208000000>;
822                         opp-microvolt = <1030000>;
823                 };
824                 opp13 {
825                         opp-hz = /bits/ 64 <2304000000>;
826                         opp-microvolt = <1030000>;
827                 };
828                 opp14 {
829                         opp-hz = /bits/ 64 <2400000000>;
830                         opp-microvolt = <1040000>;
831                 };
832         };
833
834         cpufreq-meson {
835                 compatible = "amlogic, cpufreq-meson";
836                 status = "okay";
837         };
838
839     onewire:onewire {
840                 compatible = "w1-gpio";
841                 gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
842                 status = "disabled";
843         };
844
845         sensor: sensor {
846                 compatible = "soc, sensor";
847                 status = "disabled";
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>;
855         };
856
857         iq: iq {
858                 compatible = "soc, iq";
859                 status = "disabled";
860                 sensor-name = "os08a10"; /*imx290;os08a10;imx227*/
861         };
862 }; /* end of / */
863
864 &isp {
865         status = "disabled";
866         memory-region = <&isp_cma_reserved>;
867 };
868
869 &adapter {
870         status = "disabled";
871         memory-region = <&adapt_cma_reserved>;
872 };
873
874 &gdc {
875         status = "okay";
876         memory-region = <&gdc_cma_reserved>;
877 };
878
879 &meson_fb {
880         status = "disabled";
881         display_size_default = <1920 1080 1920 2160 32>;
882         mem_size = <0x00800000 0x4b80000 0x100000 0x100000 0x800000>;
883         logo_addr = "0x7f800000";
884         mem_alloc = <1>;
885         pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
886         4k2k_fb = <1>;
887 };
888
889 &drm_vpu {
890         status = "okay";
891         logo_addr = "0x7f800000";
892 };
893
894 &drm_amhdmitx {
895         status = "okay";
896         hdcp = "disabled";
897 };
898
899 &drm_lcd {
900         status = "disabled";
901 };
902
903 &pwm_ab {
904         status = "okay";
905 };
906
907 &pwm_ef {
908         status = "okay";
909 };
910
911 &pwm_AO_cd {
912         status = "okay";
913 };
914
915 &i2c3 {
916         status = "disabled";
917         pinctrl-names="default";
918         pinctrl-0=<&i2c3_master_pins2>;
919         clock-frequency = <100000>; /* default 100k */
920
921         ft5336@38 {
922                 compatible = "edt,edt-ft5336", "ft5x06";
923                 reg = <0x38>;
924                 interrupt_pin = <&gpio GPIOA_5 GPIO_ACTIVE_HIGH>;
925                 reset-gpios = <&gpio_expander 6 GPIO_ACTIVE_HIGH>;
926                 status = "okay";
927         };
928 };
929
930 &i2c_AO {
931         status = "okay";
932         pinctrl-names="default";
933         pinctrl-0=<&ao_i2c_master_pins1>;
934         clock-frequency = <400000>; /* default 100k */
935
936         gpio_expander: gpio-controller@20 {
937                 compatible = "ti,tca6408";
938                 reg = <0x20>;
939                 gpio-controller;
940                 #gpio-cells = <2>;
941                 status = "okay";
942         };
943
944         hym8563: hym8563@51 {
945                 compatible = "haoyu,hym8563";
946                 reg = <0x51>;
947
948                 #clock-cells = <0>;
949         };
950
951         khadas-mcu {
952                 compatible = "khadas-mcu";
953                 reg = <0x18>;
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. */
958         };
959
960         khadas-kxtj3 {
961                 compatible = "kxtj3";
962                 reg = <0x0E>;
963                 type = <2>;
964                 layout = <2>;
965                 irq_enable = <0>;
966                 poll_delay_ms = <30>;
967                 irq-gpio = <&gpio_ao GPIOAO_9 IRQ_TYPE_EDGE_RISING>;
968                 status = "okay";
969         };
970 };
971
972 &audiobus {
973         aml_tdma: tdma {
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
980                                 &clkc CLKID_MPLL0>;
981                 clock-names = "mclk", "clk_srcpll";
982                 pinctrl-names = "tdm_pins";
983                 pinctrl-0 = <&tdmout_a &tdmin_a>;
984         };
985
986         aml_tdmb: tdmb {
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
993                                 &clkc CLKID_MPLL1
994                                 &clkc CLKID_MPLL0
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 */
1001                 /*
1002                  * 0: tdmout_a;
1003                  * 1: tdmout_b;
1004                  * 2: tdmout_c;
1005                  * 3: spdifout;
1006                  * 4: spdifout_b;
1007                  */
1008                 samesource_sel = <3>;
1009         };
1010
1011         aml_tdmc: tdmc {
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
1020                                 &clkc CLKID_MPLL2>;
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 */
1025         };
1026
1027         tdmlb: tdm@3 {
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
1033                                 &clkc CLKID_MPLL1>;
1034                 clock-names = "mclk", "clk_srcpll";
1035                 /*
1036                  * select tdmin_lb src;
1037                  *0: TDMOUTA
1038                  *1: TDMOUTB
1039                  *2: TDMOUTC
1040                  *3: PAD_TDMINA
1041                  *4: PAD_TDMINB
1042                  *5: PAD_TDMINC
1043                  */
1044                 lb-src-sel = <1>;
1045
1046
1047                 status = "disabled";
1048         };
1049
1050         aml_spdif: spdif {
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";
1061                 interrupts =
1062                                 <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
1063
1064                 interrupt-names = "irq_spdifin";
1065                 pinctrl-names = "spdif_pins",
1066                                         "spdif_pins_mute";
1067                 pinctrl-0 = <&spdifout>;
1068                 pinctrl-1 = <&spdifout_a_mute>;
1069                 status = "okay";
1070         };
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";
1079                 status = "okay";
1080         };
1081         aml_pdm: pdm {
1082                 compatible = "amlogic, g12a-snd-pdm";
1083                 #sound-dai-cells = <0>;
1084                 clocks = <&clkaudio CLKID_AUDIO_PDM
1085                         &clkc CLKID_FCLK_DIV3
1086                         &clkc CLKID_MPLL3
1087                         &clkaudio CLKID_AUDIO_PDMIN0
1088                         &clkaudio CLKID_AUDIO_PDMIN1>;
1089                 clock-names = "gate",
1090                         "sysclk_srcpll",
1091                         "dclk_srcpll",
1092                         "pdm_dclk",
1093                         "pdm_sysclk";
1094                 pinctrl-names = "pdm_pins";
1095                 pinctrl-0 = <&pdmin>;
1096                 filter_mode = <1>; /* mode 0~4, defalut:1 */
1097                 status = "disable";
1098         };
1099
1100         loopback:loopback@0 {
1101                 compatible = "amlogic, g12a-loopback";
1102                 #sound-dai-cells = <0>;
1103
1104                 clocks = <&clkaudio CLKID_AUDIO_PDM
1105                         &clkc CLKID_FCLK_DIV3
1106                         &clkc CLKID_MPLL3
1107                         &clkaudio CLKID_AUDIO_PDMIN0
1108                         &clkaudio CLKID_AUDIO_PDMIN1
1109                         &clkc CLKID_MPLL0
1110                         &clkaudio CLKID_AUDIO_MCLK_A>;
1111                 clock-names = "pdm_gate",
1112                         "pdm_sysclk_srcpll",
1113                         "pdm_dclk_srcpll",
1114                         "pdm_dclk",
1115                         "pdm_sysclk",
1116                         "tdminlb_mpll",
1117                         "tdminlb_mclk";
1118
1119                 /* datain src
1120                  * 0: tdmin_a;
1121                  * 1: tdmin_b;
1122                  * 2: tdmin_c;
1123                  * 3: spdifin;
1124                  * 4: pdmin;
1125                  */
1126                 datain_src = <4>;
1127                 datain_chnum = <4>;
1128                 datain_chmask = <0xf>;
1129                 /* config which data pin for loopback */
1130                 datain-lane-mask-in = <1 0 1 0>;
1131
1132                 /* calc mclk for datalb */
1133                 mclk-fs = <256>;
1134
1135                 /* tdmin_lb src
1136                  * 0: tdmoutA
1137                  * 1: tdmoutB
1138                  * 2: tdmoutC
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
1144                  */
1145                 /* if tdmin_lb >= 3, use external loopback */
1146                 datalb_src = <1>;
1147                 datalb_chnum = <2>;
1148                 datalb_chmask = <0x3>;
1149                 /* config which data pin as loopback */
1150                 datalb-lane-mask-in = <1 0 0 0>;
1151
1152                 status = "disabled";
1153         };
1154
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
1162                  *      TDMIN_A, 0
1163                  *      TDMIN_B, 1
1164                  *      TDMIN_C, 2
1165                  *      SPDIFIN, 3
1166                  *      PDMIN,  4
1167                  *      NONE,
1168                  *      TDMIN_LB, 6
1169                  *      LOOPBACK, 7
1170                  */
1171                 resample_module = <4>;
1172                 status = "disabled";
1173         };
1174         aml_pwrdet: pwrdet {
1175                 compatible = "amlogic, g12a-power-detect";
1176
1177                 interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
1178                 interrupt-names = "pwrdet_irq";
1179
1180                 /* pwrdet source sel
1181                  * 7: loopback;
1182                  * 6: tdmin_lb;
1183                  * 5: reserved;
1184                  * 4: pdmin;
1185                  * 3: spdifin;
1186                  * 2: tdmin_c;
1187                  * 1: tdmin_b;
1188                  * 0: tdmin_a;
1189                  */
1190                 pwrdet_src = <4>;
1191
1192                 hi_th = <0x70000>;
1193                 lo_th = <0x16000>;
1194
1195                 status = "disabled";
1196         };
1197 }; /* end of audiobus */
1198
1199 &pinctrl_periphs {
1200         tdmout_a: tdmout_a {
1201                 mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
1202                         groups = "tdma_sclk",
1203                                 "tdma_fs",
1204                                 "tdma_dout0";
1205                         function = "tdma_out";
1206                 };
1207         };
1208
1209         tdmin_a: tdmin_a {
1210                 mux { /* GPIOX_8 */
1211                         groups = "tdma_din1";
1212                         function = "tdma_in";
1213                 };
1214         };
1215
1216         tdmb_mclk: tdmb_mclk {
1217                 mux {
1218                         groups = "mclk0_a";
1219                         function = "mclk0";
1220                         drive-strength = <2>;
1221                 };
1222         };
1223         tdmout_b: tdmout_b {
1224                 mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
1225                         groups = "tdmb_sclk",
1226                                 "tdmb_fs",
1227                                 "tdmb_dout0";
1228                         function = "tdmb_out";
1229                         drive-strength = <2>;
1230                 };
1231         };
1232
1233         tdmin_b:tdmin_b {
1234                 mux { /* GPIOA_4 */
1235                         groups = "tdmb_din1"
1236                                 /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
1237                         function = "tdmb_in";
1238                         drive-strength = <2>;
1239                 };
1240         };
1241
1242         tdmc_mclk: tdmc_mclk {
1243                 mux { /* GPIOA_11 */
1244                         groups = "mclk1_a";
1245                         function = "mclk1";
1246                 };
1247         };
1248
1249         clk12_24_z_pins:clk12_24_z_pins {
1250                 mux {
1251                         groups = "clk12_24_z";
1252                         function = "clk12_24_ee";
1253                         drive-strength = <3>;
1254                 };
1255         };
1256
1257         tdmout_c:tdmout_c {
1258                 mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/
1259                         groups = "tdmc_sclk_a",
1260                                 "tdmc_fs_a",
1261                                 "tdmc_dout0_a"
1262                                 /*,     "tdmc_dout2",
1263                                  * "tdmc_dout3"
1264                                  */;
1265                         function = "tdmc_out";
1266                 };
1267         };
1268
1269         tdmin_c:tdmin_c {
1270                 mux { /* GPIOA_10 */
1271                         groups = "tdmc_din0_a";
1272                         function = "tdmc_in";
1273                 };
1274         };
1275
1276         pdmin: pdmin {
1277                 mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
1278                         groups = "pdm_din0_a",
1279                         /*"pdm_din1_a",*/
1280                         /*"pdm_din2_a",*/
1281                         /*"pdm_din3_a",*/
1282                         "pdm_dclk_a";
1283                         function = "pdm";
1284                 };
1285         };
1286 }; /* end of pinctrl_periphs */
1287
1288 &pinctrl_aobus {
1289         spdifout: spdifout {
1290                 mux { /* gpiao_10 */
1291                         groups = "spdif_out_ao";
1292                         function = "spdif_out_ao";
1293                 };
1294         };
1295         spdifout_a_mute: spdifout_a_mute {
1296                 mux { /* gpiao_10 */
1297                         groups = "GPIOAO_10";
1298                         function = "gpio_aobus";
1299                 };
1300         };
1301         bl_pwm_off_pins:bl_pwm_off_pin {
1302                 mux {
1303                         pins = "GPIOAO_6";
1304                         function = "gpio_aobus";
1305                         output-low;
1306                 };
1307         };
1308
1309         gen_clk_ee_ao: gen_clk_ee_ao {
1310                 mux {
1311                         groups="gen_clk_ee_ao";
1312                         function="gen_clk_ee_ao";
1313                         drive-strength = <3>;
1314                 };
1315         };
1316 };  /* end of pinctrl_aobus */
1317
1318 &irblaster {
1319         status = "disabled";
1320 };
1321
1322 &audio_data {
1323         status = "okay";
1324 };
1325
1326 /*if you want to use vdin just modify status to "ok"*/
1327 &vdin0 {
1328         memory-region = <&vdin0_cma_reserved>;
1329         status = "okay";
1330         /*vdin write mem color depth support:
1331          *bit0:support 8bit
1332          *bit1:support 9bit
1333          *bit2:support 10bit
1334          *bit3:support 12bit
1335          *bit4:support yuv422 10bit full pack mode (from txl new add)
1336          */
1337         tv_bit_mode = <0x15>;
1338 };
1339 &vdin1 {
1340         memory-region = <&vdin1_cma_reserved>;
1341         status = "okay";
1342         /*vdin write mem color depth support:
1343          *bit0:support 8bit
1344          *bit1:support 9bit
1345          *bit2:support 10bit
1346          *bit3:support 12bit
1347          */
1348         tv_bit_mode = <1>;
1349 };
1350
1351 &sd_emmc_c {
1352         status = "okay";
1353         emmc {
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", */
1359                          "MMC_CAP_HW_RESET",
1360                          "MMC_CAP_ERASE",
1361                          "MMC_CAP_CMD23",
1362                          "MMC_CAP_DRIVER_TYPE_A";
1363                 caps2 = "MMC_CAP2_HS200";
1364                 /*MMC_CAP2_HS400"*/
1365                 f_min = <400000>;
1366                 f_max = <200000000>;
1367         };
1368 };
1369
1370 &sd_emmc_b {
1371         status = "okay";
1372         sd {
1373                 caps = "MMC_CAP_4_BIT_DATA",
1374                          "MMC_CAP_MMC_HIGHSPEED",
1375                          "MMC_CAP_SD_HIGHSPEED";
1376                 f_min = <400000>;
1377                 f_max = <50000000>;
1378         };
1379 };
1380
1381 &sd_emmc_a {
1382         status = "okay";
1383         sdio {
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",
1393                          "MMC_CAP_SDIO_IRQ";
1394                 f_min = <400000>;
1395                 f_max = <200000000>;
1396         };
1397 };
1398
1399 &dwc3 {
1400         status = "okay";
1401 };
1402
1403 &usb2_phy_v2 {
1404         status = "okay";
1405         portnum = <2>;
1406         gpio-vbus-power = "GPIOA_6";
1407         gpios = <&gpio GPIOA_6 GPIO_ACTIVE_HIGH>;
1408 };
1409
1410 &usb3_phy_v2 {
1411         status = "okay";
1412         portnum = <1>;
1413         otg = <1>;
1414 };
1415
1416 &dwc2_a {
1417         status = "okay";
1418         /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
1419         controller-type = <2>;
1420         g-extcon-always-on;
1421 };
1422
1423 &ethmac {
1424         status = "okay";
1425         pinctrl-names = "external_eth_pins";
1426         pinctrl-0 = <&external_eth_pins>;
1427         mc_val = <0x1629>;
1428
1429         cali_val = <0x60000>;
1430         rx_delay = <1>;
1431         auto_cali_idx = <0>;
1432         internal_phy=<0>;
1433 };
1434
1435 &uart_A {
1436         status = "okay";
1437 };
1438
1439 &pcie_A {
1440         reset-gpio = <&gpio GPIOA_8 GPIO_ACTIVE_HIGH>;
1441         status = "disabled";
1442 };
1443
1444 &saradc {
1445         status = "okay";
1446 };
1447
1448 &spicc1 {
1449         status = "disabled";
1450         pinctrl-names = "default";
1451         pinctrl-0 = <&spicc1_pins>;
1452         cs-gpios = <&gpio GPIOH_6 0>;
1453
1454         spidev@0 {
1455                 status = "okay";
1456
1457                 compatible = "linux,spidev";
1458                 /* spi default max clock 100Mhz */
1459                 spi-max-frequency = <100000000>;
1460                 reg = <0>;
1461         };
1462 };
1463
1464 &remote {
1465         status = "okay";
1466 };
1467
1468 &lcd {
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";
1472 };