4ffb77192ff2f655f9fc5ef2766be6424d24baa8
[platform/kernel/linux-amlogic.git] / arch / arm64 / boot / dts / amlogic / gxl_p212_1g.dts
1 /*
2  * arch/arm64/boot/dts/amlogic/gxl_p212_1g.dts
3  *
4  * Copyright (C) 2017 Amlogic, 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 "mesongxl.dtsi"
21 #include "partition_mbox_normal.dtsi"
22 / {
23         model = "Amlogic";
24         amlogic-dt-id = "gxl_p212_1g";
25         compatible = "amlogic, Gxl";
26         interrupt-parent = <&gic>;
27         #address-cells = <2>;
28         #size-cells = <2>;
29
30         aliases {
31                 serial0 = &uart_AO;
32                 serial1 = &uart_A;
33                 serial2 = &uart_B;
34                 serial3 = &uart_C;
35                 serial4 = &uart_AO_B;
36         };
37
38         ion_dev {
39                 compatible = "amlogic, ion_dev";
40                 memory-region = <&ion_reserved>;
41         };
42
43         memory@00000000 {
44                 device_type = "memory";
45                 linux,usable-memory = <0x0 0x0100000 0x0 0x3ff00000>;
46         };
47
48         reserved-memory {
49                 #address-cells = <2>;
50                 #size-cells = <2>;
51                 ranges;
52                 /* global autoconfigured region for contiguous allocations */
53
54                 defendkey_reserved:linux,defendkey {
55                         compatible = "amlogic, defendkey";
56                         reg = <0x0 0x08300000 0x0 0x100000>;
57                 };
58
59                 secmon_reserved:linux,secmon {
60                         compatible = "shared-dma-pool";
61                         reusable;
62                         size = <0x0 0x400000>;
63                         alignment = <0x0 0x400000>;
64                         alloc-ranges = <0x0 0x05000000 0x0 0x400000>;
65                 };
66                 secos_reserved:linux,secos {
67                         status = "disable";
68                         compatible = "amlogic, aml_secos_memory";
69                         reg = <0x0 0x05300000 0x0 0x2000000>;
70                         no-map;
71                 };
72                 logo_reserved:linux,meson-fb {
73                         compatible = "shared-dma-pool";
74                         reusable;
75                         size = <0x0 0x800000>;
76                         alignment = <0x0 0x400000>;
77                         alloc-ranges = <0x0 0x3f800000 0x0 0x800000>;
78                 };
79                 //don't put other dts in front of logo_reserved
80
81                 //di_reserved:linux,di {
82                 //      compatible = "amlogic, di-mem";
83                         /** 10x3133440=30M(0x1e) support 8bit **/
84                 //      size = <0x0 0x1e00000>;
85                         //no-map;
86                 //};
87                 di_cma_reserved:linux,di_cma {
88                         compatible = "shared-dma-pool";
89                         reusable;
90                         /** 10x3133440=30M(0x1e) support 8bit **/
91                         size = <0x0 0x2000000>;
92                         alignment = <0x0 0x400000>;
93                 };
94                 ion_reserved:linux,ion-dev {
95                         compatible = "shared-dma-pool";
96                         reusable;
97                         size = <0x0 0x4C00000>;
98                         alignment = <0x0 0x400000>;
99                 };
100
101                 /*  vdin0 CMA pool */
102                 //vdin0_cma_reserved:linux,vdin0_cma {
103                 //      compatible = "shared-dma-pool";
104                 //      linux,phandle = <4>;
105                 //      reusable;
106                 /* 1920x1080x2x4  =16+4 M */
107                 //      size = <0x0 0x01400000>;
108                 //      alignment = <0x0 0x400000>;
109                 //};
110                 /*  vdin1 CMA pool */
111                 vdin1_cma_reserved:linux,vdin1_cma {
112                         compatible = "shared-dma-pool";
113                         reusable;
114                         /* 1920x1080x2x4  =16 M */
115                         size = <0x0 0x01000000>;
116                         alignment = <0x0 0x400000>;
117                 };
118                 /*  POST PROCESS MANAGER */
119                 ppmgr_reserved:linux,ppmgr {
120                         compatible = "shared-dma-pool";
121                         size = <0x0 0x0>;
122                 };
123
124                 codec_mm_cma:linux,codec_mm_cma {
125                         compatible = "shared-dma-pool";
126                         reusable;
127                         /* ion_codec_mm max can alloc size 80M*/
128                         size = <0x0 0xd000000>;
129                         alignment = <0x0 0x400000>;
130                         linux,contiguous-region;
131                 };
132                 picdec_cma_reserved:linux,picdec {
133                         compatible = "shared-dma-pool";
134                         reusable;
135                         size = <0x0 0x0>;
136                         alignment = <0x0 0x0>;
137                         linux,contiguous-region;
138                 };
139                 /* codec shared reserved */
140                 codec_mm_reserved:linux,codec_mm_reserved {
141                         compatible = "amlogic, codec-mm-reserved";
142                         size = <0x0 0x0>;
143                         alignment = <0x0 0x100000>;
144                         //no-map;
145                 };
146         };
147
148         amlogic_battery:dummy-battery {
149                 compatible = "amlogic, dummy-battery";
150                 status = "disabled";
151         };
152
153         amlogic_charger:dummy-charger {
154                 compatible = "amlogic, dummy-charger";
155                 status = "disabled";
156         };
157
158         bt-dev{
159                 compatible = "amlogic, bt-dev";
160                 dev_name = "bt-dev";
161                 status = "okay";
162                 gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
163         };
164
165         wifi{
166                 compatible = "amlogic, aml_wifi";
167                 dev_name = "aml_wifi";
168                 status = "okay";
169                 interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
170                 irq_trigger_type = "GPIO_IRQ_LOW";
171                 dhd_static_buf;    //dhd_static_buf support
172                 power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
173                 pinctrl-names = "default";
174                 pinctrl-0 = <&wifi_32k_pins>;
175                 pwm_config = <&wifi_pwm_conf>;
176         };
177
178         wifi_pwm_conf:wifi_pwm_conf{
179                 pwm_channel1_conf {
180                         pwms = <&pwm_ef MESON_PWM_0 30541 0>;
181                         duty-cycle = <15270>;
182                         times = <8>;
183                 };
184                 pwm_channel2_conf {
185                         pwms = <&pwm_ef MESON_PWM_2 30500 0>;
186                         duty-cycle = <15250>;
187                         times = <12>;
188                 };
189         };
190
191         sd_emmc_c: emmc@d0074000 {
192                 status = "okay";
193                 compatible = "amlogic, meson-mmc-gxl";
194                 reg = <0x0 0xd0074000 0x0 0x2000>;
195                 interrupts = <0 218 1>;
196                 pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
197                 pinctrl-0 = <&emmc_clk_cmd_pins>;
198                 pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
199                 clocks = <&clkc CLKID_SD_EMMC_C>,
200                            <&clkc CLKID_SD_EMMC_C_P0_COMP>,
201                            <&clkc CLKID_FCLK_DIV2>;
202                 clock-names = "core", "clkin0", "clkin1";
203
204                 bus-width = <8>;
205                 cap-sd-highspeed;
206                 cap-mmc-highspeed;
207                 mmc-ddr-1_8v;
208                 mmc-hs200-1_8v;
209
210                 max-frequency = <200000000>;
211                 non-removable;
212                 disable-wp;
213                 emmc {
214                         pinname = "emmc";
215                         ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
216                         caps = "MMC_CAP_8_BIT_DATA",
217                                  "MMC_CAP_MMC_HIGHSPEED",
218                                  "MMC_CAP_SD_HIGHSPEED",
219                                  "MMC_CAP_NONREMOVABLE",
220                                  "MMC_CAP_1_8V_DDR",
221                                  "MMC_CAP_HW_RESET",
222                                  "MMC_CAP_ERASE",
223                                  "MMC_CAP_CMD23";
224                         caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
225                         f_min = <400000>;
226                         f_max = <100000000>;
227                         max_req_size = <0x20000>; /**128KB*/
228                         gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
229                         hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
230                         card_type = <1>;
231                         /* 1:mmc card(include eMMC),
232                          * 2:sd card(include tSD)
233                          */
234                 };
235         };
236
237         sd_emmc_b:sd@d0072000 {
238                 status = "okay";
239                 compatible = "amlogic, meson-mmc-gxl";
240                 reg = <0x0 0xd0072000 0x0 0x2000>;
241                 interrupts = <0 217 1>;
242                 pinctrl-names = "sd_all_pins",
243                         "sd_clk_cmd_pins",
244                         "sd_1bit_pins",
245                         "sd_clk_cmd_uart_pins",
246                         "sd_1bit_uart_pins",
247                         "sd_to_ao_uart_pins",
248                         "ao_to_sd_uart_pins",
249                         "ao_to_sd_jtag_pins",
250                         "sd_to_ao_jtag_pins";
251                 pinctrl-0 = <&sd_all_pins>;
252                 pinctrl-1 = <&sd_clk_cmd_pins>;
253                 pinctrl-2 = <&sd_1bit_pins>;
254                 pinctrl-3 = <&sd_to_ao_uart_clr_pins
255                         &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
256                 pinctrl-4 = <&sd_to_ao_uart_clr_pins
257                         &sd_1bit_pins &ao_to_sd_uart_pins>;
258                 pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
259                 pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
260                 pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
261                 pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
262                 clocks = <&clkc CLKID_SD_EMMC_B>,
263                            <&clkc CLKID_SD_EMMC_B_P0_COMP>,
264                            <&clkc CLKID_FCLK_DIV2>;
265                 clock-names = "core", "clkin0", "clkin1";
266
267                 bus-width = <4>;
268                 cap-sd-highspeed;
269                 max-frequency = <100000000>;
270                 disable-wp;
271                 sd {
272                         pinname = "sd";
273                         ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
274                         caps = "MMC_CAP_4_BIT_DATA",
275                                  "MMC_CAP_MMC_HIGHSPEED",
276                                  "MMC_CAP_SD_HIGHSPEED";
277                         /* "MMC_CAP_UHS_SDR12",
278                          * "MMC_CAP_UHS_SDR25",
279                          * "MMC_CAP_UHS_SDR50",
280                          * "MMC_CAP_UHS_SDR104";
281                          */
282                         f_min = <400000>;
283                         f_max = <100000000>;
284                         max_req_size = <0x20000>; /**128KB*/
285                         gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
286                         jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
287                         gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
288                         card_type = <5>;
289                         /* 0:unknown,
290                          * 1:mmc card(include eMMC),
291                          * 2:sd card(include tSD),
292                          * 3:sdio device(ie:sdio-wifi),
293                          * 4:SD combo (IO+mem) card,
294                          * 5:NON sdio device(means sd/mmc card),
295                          * other:reserved
296                          */
297                 };
298         };
299
300         sd_emmc_a:sdio@d0070000 {
301                 status = "okay";
302                 compatible = "amlogic, meson-mmc-gxl";
303                 reg = <0x0 0xd0070000 0x0 0x2000>;
304                 interrupts = <0 216 4>;
305                 pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
306                 pinctrl-0 = <&sdio_clk_cmd_pins>;
307                 pinctrl-1 = <&sdio_all_pins>;
308                 clocks = <&clkc CLKID_SD_EMMC_A>,
309                            <&clkc CLKID_SD_EMMC_A_P0_COMP>,
310                            <&clkc CLKID_FCLK_DIV2>;
311                 clock-names = "core", "clkin0", "clkin1";
312
313                 bus-width = <4>;
314                 cap-sd-highspeed;
315                 cap-mmc-highspeed;
316                 max-frequency = <100000000>;
317                 non-removable;
318                 disable-wp;
319                 sdio {
320                         pinname = "sdio";
321                         ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
322                         caps = "MMC_CAP_4_BIT_DATA",
323                                  "MMC_CAP_MMC_HIGHSPEED",
324                                  "MMC_CAP_SD_HIGHSPEED",
325                                  "MMC_CAP_NONREMOVABLE",
326                                  "MMC_CAP_UHS_SDR12",
327                                  "MMC_CAP_UHS_SDR25",
328                                  "MMC_CAP_UHS_SDR50",
329                                  "MMC_CAP_UHS_SDR104",
330                                  "MMC_PM_KEEP_POWER",
331                                  "MMC_CAP_SDIO_IRQ";
332                         f_min = <400000>;
333                         f_max = <200000000>;
334                         max_req_size = <0x20000>; /**128KB*/
335                         card_type = <3>;
336                         /* 3:sdio device(ie:sdio-wifi),
337                          * 4:SD combo (IO+mem) card
338                          */
339                 };
340         };
341         mtd_nand{
342                 compatible = "amlogic, aml_mtd_nand";
343                 dev_name = "mtdnand";
344                 status = "disabled";
345                 reg = <0x0 0xd0074800 0x0 0x200>;
346                 interrupts = <  0 34 1 >;
347                 pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
348                 pinctrl-0 = <&all_nand_pins>;
349                 pinctrl-1 = <&all_nand_pins>;
350                 pinctrl-2 = <&nand_cs_pins>;
351                 device_id = <0>;
352                 plat-names = "bootloader","nandnormal";
353                 plat-num = <2>;
354                 plat-part-0 = <&bootloader>;
355                 plat-part-1 = <&nandnormal>;
356                 bootloader: bootloader{
357                         enable_pad ="ce0";
358                         busy_pad = "rb0";
359                         timming_mode = "mode5";
360                         bch_mode = "bch60_1k";
361                         t_rea = <20>;
362                         t_rhoh = <15>;
363                         chip_num = <1>;
364                         part_num = <0>;
365                         rb_detect = <1>;
366                 };
367                 nandnormal: nandnormal{
368                         enable_pad ="ce0","ce1";
369                         busy_pad = "rb0","rb1";
370                         timming_mode = "mode5";
371                         bch_mode = "bch60_1k";
372                         plane_mode = "twoplane";
373                         t_rea = <20>;
374                         t_rhoh = <15>;
375                         chip_num = <2>;
376                         part_num = <3>;
377                         partition = <&nand_partitions>;
378                         rb_detect = <1>;
379                 };
380                 nand_partitions:nand_partition{
381                         logo{
382                                 offset=<0x0 0x0>;
383                                 size=<0x0 0x200000>;
384                         };
385                         recovery{
386                                 offset=<0x0 0x0>;
387                                 size=<0x0 0x1000000>;
388                         };
389                         boot{
390                                 offset=<0x0 0x0>;
391                                 size=<0x0 0xC00000>;
392                         };
393                         system{
394                                 offset=<0x0 0x0>;
395                                 size=<0x0 0xDC40000>;
396                         };
397                         data{
398                                 offset=<0xffffffff 0xffffffff>;
399                                 size=<0x0 0x0>;
400                         };
401                 };
402         };
403
404         ethmac: ethernet@0xc9410000 {
405                         compatible = "amlogic, gxbb-eth-dwmac";
406                         reg = <0x0 0xc9410000 0x0 0x10000
407                         0x0 0xc8834540 0x0 0x8
408                         0x0 0xc8834558 0x0 0xc>;
409                         interrupts = <0 8 1>;
410                         pinctrl-names = "external_eth_pins";
411                         pinctrl-0 = <&external_eth_pins>;
412                         rst_pin-gpios = <&gpio GPIOZ_14 0>;
413                         GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
414                         GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
415                         mc_val_internal_phy = <0x1800>;
416                         mc_val_external_phy = <0x1621>;
417                         cali_val = <0x20000>;
418                         interrupt-names = "macirq";
419                         clocks = <&clkc CLKID_ETH>;
420                         clock-names = "ethclk81";
421                         internal_phy=<1>;
422         };
423
424         aml_sensor0: aml-sensor@0 {
425                 compatible = "amlogic, aml-thermal";
426                 device_name = "thermal";
427                 #thermal-sensor-cells = <1>;
428                 cooling_devices {
429                         cpufreq_cool_cluster0 {
430                                 min_state = <1000000>;
431                                 dyn_coeff = <140>;
432                                 cluster_id = <0>;
433                                 node_name = "cpufreq_cool0";
434                                 device_type = "cpufreq";
435                         };
436                         cpucore_cool_cluster0 {
437                                 min_state = <1>;
438                                 dyn_coeff = <0>;
439                                 cluster_id = <0>;
440                                 node_name = "cpucore_cool0";
441                                 device_type = "cpucore";
442                         };
443                         gpufreq_cool {
444                                 min_state = <400>;
445                                 dyn_coeff = <437>;
446                                 cluster_id = <0>;
447                                 node_name = "gpufreq_cool0";
448                                 device_type = "gpufreq";
449                         };
450                         gpucore_cool {
451                                 min_state = <1>;
452                                 dyn_coeff = <0>;
453                                 cluster_id = <0>;
454                                 node_name = "gpucore_cool0";
455                                 device_type = "gpucore";
456                         };
457                 };
458                 cpufreq_cool0:cpufreq_cool0 {
459                         #cooling-cells = <2>; /* min followed by max */
460                 };
461                 cpucore_cool0:cpucore_cool0 {
462                         #cooling-cells = <2>; /* min followed by max */
463                 };
464                 gpufreq_cool0:gpufreq_cool0 {
465                         #cooling-cells = <2>; /* min followed by max */
466                 };
467                 gpucore_cool0:gpucore_cool0 {
468                         #cooling-cells = <2>; /* min followed by max */
469                 };
470         };
471         thermal-zones {
472                 soc_thermal {
473                         polling-delay = <1000>;
474                         polling-delay-passive = <100>;
475                         sustainable-power = <2150>;
476
477                         thermal-sensors = <&aml_sensor0 3>;
478
479                         trips {
480                                 switch_on: trip-point@0 {
481                                         temperature = <70000>;
482                                         hysteresis = <1000>;
483                                         type = "passive";
484                                 };
485                                 control: trip-point@1 {
486                                         temperature = <80000>;
487                                         hysteresis = <1000>;
488                                         type = "passive";
489                                 };
490                                 hot: trip-point@2 {
491                                         temperature = <85000>;
492                                         hysteresis = <5000>;
493                                         type = "hot";
494                                 };
495                                 critical: trip-point@3 {
496                                         temperature = <260000>;
497                                         hysteresis = <1000>;
498                                         type = "critical";
499                                 };
500                         };
501
502                         cooling-maps {
503                                 cpufreq_cooling_map {
504                                         trip = <&control>;
505                                         cooling-device = <&cpufreq_cool0 0 4>;
506                                         contribution = <1024>;
507                                 };
508                                 cpucore_cooling_map {
509                                         trip = <&control>;
510                                         cooling-device = <&cpucore_cool0 0 3>;
511                                         contribution = <1024>;
512                                 };
513                                 gpufreq_cooling_map {
514                                         trip = <&control>;
515                                         cooling-device = <&gpufreq_cool0 0 4>;
516                                         contribution = <1024>;
517                                 };
518                                 gpucore_cooling_map {
519                                         trip = <&control>;
520                                         cooling-device = <&gpucore_cool0 0 2>;
521                                         contribution = <1024>;
522                                 };
523                         };
524                 };
525         };
526
527         dwc3: dwc3@c9000000 {
528                 compatible = "synopsys, dwc3";
529                 reg = <0x0 0xc9000000 0x0 0x100000>;
530                 interrupts = <0 30 4>;
531                 usb-phy = <&usb2_phy>, <&usb3_phy>;
532                 cpu-type = "gxl";
533                 clock-src = "usb3.0";
534         };
535
536         usb2_phy: usb2phy@d0078000 {
537                 compatible = "amlogic, amlogic-new-usb2";
538                 portnum = <3>;
539                 reg = <0x0 0xd0078000 0x0 0x80
540                                         0x0 0xc1104408 0x0 0x4>;
541         };
542
543         usb3_phy: usb3phy@d0078080 {
544                 compatible = "amlogic, amlogic-new-usb3";
545                 portnum = <0>;
546                 reg = <0x0 0xd0078080 0x0 0x20>;
547         };
548
549         dwc2_a {
550                 compatible = "amlogic, dwc2";
551                 device_name = "dwc2_a";
552                 reg = <0x0 0xc9100000 0x0 0x40000>;
553                 status = "okay";
554                 interrupts = <0 31 4>;
555                 pl-periph-id = <0>; /** lm name */
556                 clock-src = "usb0"; /** clock src */
557                 port-id = <0>;  /** ref to mach/usb.h */
558                 port-type = <2>;        /** 0: otg, 1: host, 2: slave */
559                 port-speed = <0>; /** 0: default, high, 1: full */
560                 port-config = <0>; /** 0: default */
561                 port-dma = <0>; /** 0: default ... 6: disable*/
562                 port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
563                 usb-fifo = <728>;
564                 cpu-type = "gxl";
565                 controller-type = <1>; /** 0: normal, 1: host, 2: device*/
566                 phy-reg = <0xd0078000>;
567                 phy-reg-size = <0xa0>;
568                 clocks = <&clkc CLKID_USB_GENERAL
569                         &clkc CLKID_USB1_TO_DDR
570                         &clkc CLKID_USB1>;
571                 clock-names = "usb_general",
572                                                 "usb1",
573                                                 "usb1_to_ddr";
574         };
575
576         meson-amvideom {
577                 compatible = "amlogic, amvideom";
578                 dev_name = "amvideom";
579                 status = "okay";
580                 interrupts = <0 3 1>;
581                 interrupt-names = "vsync";
582         };
583
584         vout {
585                 compatible = "amlogic, vout";
586                 dev_name = "vout";
587                 status = "okay";
588                 fr_auto_policy = <0>;
589         };
590
591         cvbsout {
592                 compatible = "amlogic, cvbsout-gxl";
593                 dev_name = "cvbsout";
594                 status = "okay";
595                 clocks = <&clkc CLKID_VCLK2_ENCI
596                         &clkc CLKID_VCLK2_VENCI0
597                         &clkc CLKID_VCLK2_VENCI1
598                         &clkc CLKID_DAC_CLK>;
599                 clock-names = "venci_top_gate",
600                         "venci_0_gate",
601                         "venci_1_gate",
602                         "vdac_clk_gate";
603
604                 /* performance: reg_address, reg_value */
605                 /* s905x */
606                 performance = <0x1bf0  0x9
607                         0x1b56  0x343
608                         0x1b12  0x8080
609                         0x1b05  0xfd
610                         0x1c59  0xf752
611                         0xffff  0x0>; /* ending flag */
612         };
613
614         amhdmitx: amhdmitx{
615                 compatible = "amlogic, amhdmitx";
616                 dev_name = "amhdmitx";
617                 status = "okay";
618                 vend-data = <&vend_data>;
619                 pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
620                 pinctrl-0=<&hdmitx_hpd>;
621                 pinctrl-1=<&hdmitx_ddc>;
622                 /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
623                 interrupts = <0 57 1>;
624                 interrupt-names = "hdmitx_hpd";
625                 /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
626                  * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
627                  */
628                 ic_type = <3>;
629                 vend_data: vend_data{ /* Should modified by Customer */
630                         vendor_name = "Amlogic"; /* Max Chars: 8 */
631                         /* standards.ieee.org/develop/regauth/oui/oui.txt */
632                         vendor_id = <0x000000>;
633                         product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
634                 };
635         };
636
637         aocec: aocec{
638                 compatible = "amlogic, amlogic-aocec";
639                 device_name = "aocec";
640                 status = "okay";
641                 vendor_id = <0x000000>;
642                 cec_osd_string = "MBox"; /* Max Chars: 14    */
643                 cec_version = <5>; /* 5: 1.4, 6: 2.0 */
644                 port_num = <1>;
645                 arc_port_mask = <0x0>;
646                 interrupts = <0 199 1>;
647                 interrupt-names = "hdmi_aocec";
648                 pinctrl-names = "default";
649                 pinctrl-0=<&hdmitx_aocec>;
650                 reg = <0x0 0xc810023c 0x0 0x4
651                        0x0 0xc8100000 0x0 0x200>;
652                 reg-names = "ao_exit","ao";
653         };
654
655         sysled {
656                 compatible = "amlogic, sysled";
657                 dev_name = "sysled";
658                 status = "disabled";
659                 led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
660                 led_active_low = <1>;
661         };
662
663         codec_io {
664                 compatible = "amlogic, codec_io";
665                 #address-cells=<2>;
666                 #size-cells=<2>;
667                 ranges;
668                 io_cbus_base{
669                         reg = <0x0 0xC1100000 0x0 0x100000>;
670                 };
671                 io_dos_base{
672                         reg = <0x0 0xc8820000 0x0 0x10000>;
673                 };
674                 io_hiubus_base{
675                         reg = <0x0 0xc883c000 0x0 0x2000>;
676                 };
677                 io_aobus_base{
678                         reg = <0x0 0xc8100000 0x0 0x100000>;
679                 };
680                 io_vcbus_base{
681                         reg = <0x0 0xd0100000 0x0 0x40000>;
682                 };
683                 io_dmc_base{
684                         reg = <0x0 0xc8838000 0x0 0x400>;
685                 };
686         };
687
688         codec_mm {
689                 compatible = "amlogic, codec, mm";
690                 memory-region = <&codec_mm_cma &codec_mm_reserved>;
691                 dev_name = "codec_mm";
692                 /*no-cmatvp;*/
693                 status = "okay";
694         };
695
696         canvas{
697                 compatible = "amlogic, meson, canvas";
698                 dev_name = "amlogic-canvas";
699                 status = "ok";
700                 reg = <0x0 0xc8838000 0x0 0x400>;
701         };
702
703         mesonstream {
704                 compatible = "amlogic, codec, streambuf";
705                 dev_name = "mesonstream";
706                 status = "okay";
707                 clocks = <&clkc CLKID_DOS_PARSER
708                         &clkc CLKID_DEMUX
709                         &clkc CLKID_DOS
710                         &clkc CLKID_CLK81
711                         &clkc CLKID_VDEC_MUX
712                         &clkc CLKID_HCODEC_MUX
713                         &clkc CLKID_HEVC_MUX>;
714                 clock-names = "parser_top",
715                         "demux",
716                         "vdec",
717                         "clk_81",
718                         "clk_vdec_mux",
719                         "clk_hcodec_mux",
720                         "clk_hevc_mux";
721         };
722
723         vdec {
724                 compatible = "amlogic, vdec";
725                 dev_name = "vdec.0";
726                 status = "okay";
727                 interrupts = <0 3 1
728                         0 23 1
729                         0 32 1
730                         0 43 1
731                         0 44 1
732                         0 45 1>;
733                 interrupt-names = "vsync",
734                         "demux",
735                         "parser",
736                         "mailbox_0",
737                         "mailbox_1",
738                         "mailbox_2";
739         };
740
741         gpio_keypad{
742                 compatible = "amlogic, gpio_keypad";
743                 status = "okay";
744                 scan_period = <20>;
745                 key_num = <1>;
746                 key_name = "power";
747                 key_code = <116>;
748                 key-gpios = <&gpio_ao  GPIOAO_2  GPIO_ACTIVE_HIGH>;
749                 detect_mode = <0>;/*0:polling mode, 1:irq mode*/
750         };
751         meson-fb {
752                 compatible = "amlogic, meson-gxl";
753                 memory-region = <&logo_reserved>;
754                 dev_name = "meson-fb";
755                 status = "okay";
756                 interrupts = <0 3 1
757                         0 89 1>;
758                 interrupt-names = "viu-vsync", "rdma";
759                 mem_size = <0x00800000 0x01800000 0x00100000>;
760                 /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
761                 display_mode_default = "1080p60hz";
762                 scale_mode = <1>;
763                 /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
764                 display_size_default = <1920 1080 1920 3240 32>;
765                 /*1920*1080*4*3 = 0x17BB000*/
766                 logo_addr = "0x3f800000";
767         };
768         ge2d {
769                 compatible = "amlogic, ge2d-gxl";
770                 dev_name = "ge2d";
771                 status = "okay";
772                 interrupts = <0 150 1>;
773                 interrupt-names = "ge2d";
774                 clocks = <&clkc CLKID_VAPB_MUX>,
775                         <&clkc CLKID_G2D>,
776                         <&clkc CLKID_GE2D_GATE>;
777                 clock-names = "clk_vapb_0",
778                         "clk_ge2d",
779                         "clk_ge2d_gate";
780         };
781
782
783         /* AUDIO MESON DEVICES */
784         i2s_dai: I2S {
785                 #sound-dai-cells = <0>;
786                 compatible = "amlogic, aml-i2s-dai";
787                 clocks =
788                         <&clkc CLKID_MPLL2>,
789                         <&clkc CLKID_AMCLK_COMP>,
790                         <&clkc CLKID_AIU_GLUE>,
791                         <&clkc CLKID_IEC958>,
792                         <&clkc CLKID_I2S_OUT>,
793                         <&clkc CLKID_AMCLK>,
794                         <&clkc CLKID_AIFIFO2>,
795                         <&clkc CLKID_MIXER>,
796                         <&clkc CLKID_MIXER_IFACE>,
797                         <&clkc CLKID_ADC>,
798                         <&clkc CLKID_AIU_TOP>,
799                         <&clkc CLKID_AOCLK_GATE>,
800                         <&clkc CLKID_I2S_SPDIF>;
801                 clock-names =
802                         "mpll",
803                         "mclk",
804                         "top_glue",
805                         "aud_buf",
806                         "i2s_out",
807                         "amclk_measure",
808                         "aififo2",
809                         "aud_mixer",
810                         "mixer_reg",
811                         "adc",
812                         "top_level",
813                         "aoclk",
814                         "aud_in";
815                 i2s_pos_sync = <0>;
816                 /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
817         };
818         dmic:snd_dmic {
819                 #sound-dai-cells = <0>;
820                 compatible = "aml, aml_snd_dmic";
821                 reg = <0x0 0xd0042000 0x0 0x2000>;
822                 status = "disabled";
823                 resets = <
824                         &clkc CLKID_PDM_GATE
825                 >;
826                 reset-names =   "pdm";
827                 pinctrl-names = "audio_dmic";
828                 pinctrl-0 = <&aml_dmic_pins>;
829                 clocks = <&clkc CLKID_PDM_COMP>,
830                         <&clkc CLKID_AMCLK_COMP>;
831                 clock-names = "pdm", "mclk";
832         };
833         spdif_dai: SPDIF {
834                 #sound-dai-cells = <0>;
835                 compatible = "amlogic, aml-spdif-dai";
836                 clocks =
837                         <&clkc CLKID_MPLL1>,
838                         <&clkc CLKID_I958_COMP>,
839                         <&clkc CLKID_AMCLK_COMP>,
840                         <&clkc CLKID_I958_COMP_SPDIF>,
841                         <&clkc CLKID_CLK81>,
842                         <&clkc CLKID_IEC958>,
843                         <&clkc CLKID_IEC958_GATE>;
844                 clock-names =
845                         "mpll1",
846                         "i958",
847                         "mclk",
848                         "spdif",
849                         "clk_81",
850                         "iec958",
851                         "iec958_amclk";
852         };
853         pcm_dai: PCM {
854                 #sound-dai-cells = <0>;
855                 compatible = "amlogic, aml-pcm-dai";
856                 pinctrl-names = "audio_pcm";
857                 pinctrl-0 = <&audio_pcm_pins>;
858                 clocks =
859                         <&clkc CLKID_MPLL0>,
860                         <&clkc CLKID_PCM_MCLK_COMP>,
861                         <&clkc CLKID_PCM_SCLK_GATE>;
862                 clock-names =
863                         "mpll0",
864                         "pcm_mclk",
865                         "pcm_sclk";
866                 pcm_mode = <1>; /* 0=slave mode, 1=master mode */
867         };
868         i2s_plat: i2s_platform {
869                 compatible = "amlogic, aml-i2s";
870                 interrupts = <0 29 1>;
871         };
872         pcm_plat: pcm_platform {
873                 compatible = "amlogic, aml-pcm";
874         };
875         spdif_codec: spdif_codec{
876                 #sound-dai-cells = <0>;
877                 compatible = "amlogic, aml-spdif-codec";
878                 pinctrl-names = "audio_spdif";
879                 pinctrl-0 = <&audio_spdif_pins>;
880         };
881         pcm_codec: pcm_codec{
882                 #sound-dai-cells = <0>;
883                 compatible = "amlogic, pcm2BT-codec";
884         };
885         /* endof AUDIO MESON DEVICES */
886
887         /* AUDIO board specific */
888         dummy_codec:dummy{
889                 #sound-dai-cells = <0>;
890                 compatible = "amlogic, aml_dummy_codec";
891                 status = "disable";
892         };
893         amlogic_codec:t9015{
894                 #sound-dai-cells = <0>;
895                 compatible = "amlogic, aml_codec_T9015";
896                 reg = <0x0 0xc8832000 0x0 0x14>;
897                 status = "okay";
898         };
899         aml_sound_meson {
900                 compatible = "aml, meson-snd-card";
901                 status = "okay";
902                 aml-sound-card,format = "i2s";
903                 aml_sound_card,name = "AML-MESONAUDIO";
904                 aml,audio-routing =
905                                 "Ext Spk","LOUTL",
906                                 "Ext Spk","LOUTR";
907
908                 mute_gpio-gpios = <&gpio GPIOH_5 0>;
909                 mute_inv;
910                 hp_disable;
911                 hp_paraments = <800 300 0 5 1>;
912                 pinctrl-names = "audio_i2s";
913                 pinctrl-0 = <&audio_i2s_pins>;
914                 cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
915                 codec_list = <&codec0 &codec1 &codec2>;
916                 plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
917                 cpudai0: cpudai0 {
918                         sound-dai = <&i2s_dai>;
919                 };
920                 cpudai1: cpudai1 {
921                         sound-dai = <&spdif_dai>;
922                 };
923                 cpudai2: cpudai2 {
924                         sound-dai = <&pcm_dai>;
925                 };
926                 codec0: codec0 {
927                         sound-dai = <&amlogic_codec>;
928                 };
929                 codec1: codec1 {
930                         sound-dai = <&spdif_codec>;
931                 };
932                 codec2: codec2 {
933                         sound-dai = <&pcm_codec>;
934                 };
935         };
936         /* END OF AUDIO board specific */
937         rdma{
938                 compatible = "amlogic, meson, rdma";
939                 dev_name = "amlogic-rdma";
940                 status = "ok";
941                 interrupts = <0 89 1>;
942                 interrupt-names = "rdma";
943         };
944
945         amvenc_avc{
946                 compatible = "amlogic, amvenc_avc";
947                 dev_name = "amvenc_avc";
948                 status = "okay";
949                 interrupts = <0 45 1>;
950                 interrupt-names = "mailbox_2";
951         };
952
953         hevc_enc{
954                 compatible = "cnm, HevcEnc";
955                 dev_name = "HevcEnc";
956                 status = "okay";
957                 interrupts = <0 187 1>;
958                 interrupt-names = "wave420l_irq";
959                 #address-cells=<2>;
960                 #size-cells=<2>;
961                 ranges;
962                 io_reg_base{
963                         reg = <0x0 0xc8810000 0x0 0x4000>;
964                 };
965         };
966
967         picdec {
968                 compatible = "amlogic, picdec";
969                 memory-region = <&picdec_cma_reserved>;
970                 dev_name = "picdec";
971                 status = "okay";
972         };
973
974         ppmgr {
975                 compatible = "amlogic, ppmgr";
976                 memory-region = <&ppmgr_reserved>;
977                 dev_name = "ppmgr";
978                 status = "okay";
979         };
980
981         deinterlace {
982                 compatible = "amlogic, deinterlace";
983                 status = "okay";
984                 flag_cma = <1>;/*0:use reserved;1:use cma*/
985                 //memory-region = <&di_reserved>;
986                 memory-region = <&di_cma_reserved>;
987                 interrupts = <0 46 1 0 6 1>;
988                 interrupt-names = "de_irq",     "timerc";
989                 /*
990                  * nr_size(byte) = 1920*544*2(yuv422 8bit) |
991                  * 1920*544*2*12/8(yuv422 10bit)
992                  * | 1920*544*2*10/8(yuv422 10bit full pack mode)
993                  */
994                 /* mtn_size(byte) = 1920*544/2 */
995                 /* count_size(byte) = 1920*544/2 */
996                 buffer-size = <3133440>;
997                 hw-version = <2>;
998         };
999
1000         ionvideo {
1001                 compatible = "amlogic, ionvideo";
1002                 dev_name = "ionvideo";
1003                 status = "okay";
1004         };
1005
1006         amlvideo {
1007                 compatible = "amlogic, amlvideo";
1008                 dev_name = "amlvideo";
1009                 status = "okay";
1010         };
1011
1012         amlvideo2_0 {
1013                 compatible = "amlogic, amlvideo2";
1014                 dev_name = "amlvideo2";
1015                 status = "okay";
1016                 amlvideo2_id = <0>;
1017                 cma_mode = <1>;
1018         };
1019
1020         amlvideo2_1 {
1021                 compatible = "amlogic, amlvideo2";
1022                 dev_name = "amlvideo2";
1023                 status = "okay";
1024                 amlvideo2_id = <1>;
1025                 cma_mode = <1>;
1026         };
1027
1028         /*if you want to use vdin just modify status to "ok"*/
1029         vdin0 {
1030                 compatible = "amlogic, vdin";
1031                 /*memory-region = <&vdin0_cma_reserved>;*/
1032                 dev_name = "vdin0";
1033                 status = "ok";
1034                 reserve-iomap = "true";
1035                 flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
1036                 /*MByte, if 10bit disable: 64M(YUV422),
1037                  *if 10bit enable: 64*1.5 = 96M(YUV422)
1038                  *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
1039                  *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
1040                  *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
1041                  *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
1042                  */
1043                 cma_size = <16>;
1044                 interrupts = <0 83 1>;
1045                 rdma-irq = <2>;
1046                 /*clocks = <&clock CLK_FPLL_DIV5>,
1047                  *      <&clock CLK_VDIN_MEAS_CLK>;
1048                  *clock-names = "fclk_div5", "cts_vdin_meas_clk";
1049                  */
1050                 vdin_id = <0>;
1051                 /*vdin write mem color depth support:
1052                  *bit0:support 8bit
1053                  *bit1:support 9bit
1054                  *bit2:support 10bit
1055                  *bit3:support 12bit
1056                  *bit4:support yuv422 10bit full pack mode (from txl new add)
1057                  */
1058                 tv_bit_mode = <1>;
1059         };
1060         vdin1 {
1061                 compatible = "amlogic, vdin";
1062                 memory-region = <&vdin1_cma_reserved>;
1063                 dev_name = "vdin1";
1064                 status = "ok";
1065                 reserve-iomap = "true";
1066                 flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
1067                 interrupts = <0 85 1>;
1068                 rdma-irq = <4>;
1069                 /*clocks = <&clock CLK_FPLL_DIV5>,
1070                  *      <&clock CLK_VDIN_MEAS_CLK>;
1071                  *clock-names = "fclk_div5", "cts_vdin_meas_clk";
1072                  */
1073                 vdin_id = <1>;
1074                 /*vdin write mem color depth support:
1075                  *bit0:support 8bit
1076                  *bit1:support 9bit
1077                  *bit2:support 10bit
1078                  *bit3:support 12bit
1079                  */
1080                 tv_bit_mode = <1>;
1081         };
1082
1083         amlvecm {
1084                 compatible = "amlogic, vecm";
1085                 dev_name = "aml_vecm";
1086                 status = "okay";
1087                 gamma_en = <0>;/*1:enabel ;0:disable*/
1088                 wb_en = <0>;/*1:enabel ;0:disable*/
1089                 cm_en = <0>;/*1:enabel ;0:disable*/
1090                 /*1:enabel osd lut 100 table;0:disable*/
1091                 cfg_en_osd_100 = <1>;
1092                 /*0: 709/601  1: bt2020*/
1093                 tx_op_color_primary = <0>;
1094         };
1095
1096         unifykey{
1097                 compatible = "amlogic, unifykey";
1098                 status = "ok";
1099
1100                 unifykey-num = <16>;
1101                 unifykey-index-0 = <&keysn_0>;
1102                 unifykey-index-1 = <&keysn_1>;
1103                 unifykey-index-2 = <&keysn_2>;
1104                 unifykey-index-3 = <&keysn_3>;
1105                 unifykey-index-4 = <&keysn_4>;
1106                 unifykey-index-5 = <&keysn_5>;
1107                 unifykey-index-6 = <&keysn_6>;
1108                 unifykey-index-7 = <&keysn_7>;
1109                 unifykey-index-8 = <&keysn_8>;
1110                 unifykey-index-9 = <&keysn_9>;
1111                 unifykey-index-10= <&keysn_10>;
1112                 unifykey-index-11= <&keysn_11>;
1113                 unifykey-index-12= <&keysn_12>;
1114                 unifykey-index-13= <&keysn_13>;
1115                 unifykey-index-14= <&keysn_14>;
1116                 unifykey-index-15= <&keysn_15>;
1117
1118                 keysn_0: key_0{
1119                         key-name = "usid";
1120                         key-device = "normal";
1121                         key-permit = "read","write","del";
1122                 };
1123                 keysn_1:key_1{
1124                         key-name = "mac";
1125                         key-device = "normal";
1126                         key-permit = "read","write","del";
1127                 };
1128                 keysn_2:key_2{
1129                         key-name = "hdcp";
1130                         key-device = "secure";
1131                         key-type = "sha1";
1132                         key-permit = "read","write","del";
1133                 };
1134                 keysn_3:key_3{
1135                         key-name = "secure_boot_set";
1136                         key-device = "efuse";
1137                         key-permit = "write";
1138                 };
1139                 keysn_4:key_4{
1140                         key-name = "mac_bt";
1141                         key-device = "normal";
1142                         key-permit = "read","write","del";
1143                         key-type  = "mac";
1144                 };
1145                 keysn_5:key_5{
1146                         key-name = "mac_wifi";
1147                         key-device = "normal";
1148                         key-permit = "read","write","del";
1149                         key-type = "mac";
1150                 };
1151                 keysn_6:key_6{
1152                         key-name = "hdcp2_tx";
1153                         key-device = "normal";
1154                         key-permit = "read","write","del";
1155                 };
1156                 keysn_7:key_7{
1157                         key-name = "hdcp2_rx";
1158                         key-device = "normal";
1159                         key-permit = "read","write","del";
1160                 };
1161                 keysn_8:key_8{
1162                         key-name = "widevinekeybox";
1163                         key-device = "secure";
1164                         key-permit = "read","write","del";
1165                 };
1166                 keysn_9:key_9{
1167                         key-name = "deviceid";
1168                         key-device = "normal";
1169                         key-permit = "read","write","del";
1170                 };
1171                 keysn_10:key_10{
1172                         key-name = "hdcp22_fw_private";
1173                         key-device = "secure";
1174                         key-permit = "read","write","del";
1175                 };
1176                 keysn_11:key_11{
1177                         key-name = "PlayReadykeybox25";
1178                         key-device = "secure";
1179                         key-permit = "read","write","del";
1180                 };
1181                 keysn_12:key_12{
1182                         key-name = "prpubkeybox";// PlayReady
1183                         key-device = "secure";
1184                         key-permit = "read","write","del";
1185                 };
1186                 keysn_13:key_13{
1187                         key-name = "prprivkeybox";// PlayReady
1188                         key-device = "secure";
1189                         key-permit = "read","write","del";
1190                 };
1191                 keysn_14:key_14{
1192                         key-name = "attestationkeybox";// attestation key
1193                         key-device = "secure";
1194                         key-permit = "read","write","del";
1195                 };
1196                 keysn_15:key_15{
1197                         key-name = "region_code";
1198                         key-device = "normal";
1199                         key-permit = "read","write","del";
1200                 };
1201         };//End unifykey
1202
1203 };
1204 &efuse {
1205         status = "ok";
1206 };
1207
1208 &pwm_ef {
1209         status = "okay";
1210 };
1211
1212 &audio_data{
1213         status = "okay";
1214 };
1215 &spicc{
1216         status = "disabled";
1217         pinctrl-names = "spicc_pulldown","spicc_pullup";
1218         pinctrl-0 = <&spicc_pulldown_x8x9x11>;
1219         pinctrl-1 = <&spicc_pullup_x8x9x11>;
1220         num_chipselect = <1>;
1221         cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_HIGH>;
1222         dma_en = <0>;
1223         dma_tx_threshold = <3>;
1224         dma_rx_threshold = <3>;
1225         dma_num_per_read_burst = <3>;
1226         dma_num_per_write_burst = <3>;
1227         delay_control = <0x15>;
1228         ssctl = <0>;
1229 };
1230
1231 &defendkey {
1232         memory-region = <&defendkey_reserved>;
1233         status = "okay";
1234 };
1235