dts: modify the remaining 64bit dts to support 32bit [1/1]
authorJianxiong Pan <jianxiong.pan@amlogic.com>
Wed, 14 Nov 2018 02:11:35 +0000 (10:11 +0800)
committerJianxin Pan <jianxin.pan@amlogic.com>
Fri, 16 Nov 2018 12:08:21 +0000 (04:08 -0800)
PD#SWPL-2046

Problem:
some of the remaining 64bit boards do not support 32bit.

Solution:
modify the dts to support 32bit.

Verify:
axg, g12a, g12b, gxl, gxm, txl, txlx.

Change-Id: I951f8d32b18243a64e2abc5008bbb015c2e21e7a
Signed-off-by: Jianxiong Pan <jianxiong.pan@amlogic.com>
54 files changed:
arch/arm/boot/dts/amlogic/axg_a113d_skt.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/axg_a113x_skt.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/axg_pxp.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/axg_s400_v03.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/axg_s400_v03gva.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/axg_s400emmc_512m.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/axg_s420_128m.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/axg_s420_v03.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/axg_s420_v03gva.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12a_pxp.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12a_s905d2_skt.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12a_s905d2_skt_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12a_s905d2_u200_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12a_s905d2_u200_buildroot_vccktest.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12a_s905d2_u200_drm_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12a_s905x2_u211.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12a_s905x2_u211_1g.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12a_s905x2_u211_512m.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12a_s905x2_u211_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12a_s905x2_u212_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12a_s905y2_u220.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12b_a311d_skt.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12b_a311d_w400_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12b_a311d_w400_buildroot_vccktest.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/g12b_pxp.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_p212_1g_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_p212_1g_hd.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_p212_2g_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_p230_2g_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_p231_1g.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_p231_2g.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_p231_2g_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_p241_1g_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_p241_v2_1g_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_p400_2g.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_p401_2g.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_sei210_1g.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_sei210_2g.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxl_skt.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxm_q200_2g.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxm_q200_2g_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxm_q201_1g.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/gxm_skt.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/meson_drm.dtsi [new file with mode: 0644]
arch/arm/boot/dts/amlogic/mesong12a_drm.dtsi [new file with mode: 0644]
arch/arm/boot/dts/amlogic/mesongxl_p212-panel.dtsi [new file with mode: 0644]
arch/arm/boot/dts/amlogic/mesongxl_sei210.dtsi [new file with mode: 0644]
arch/arm/boot/dts/amlogic/partition_mbox_normal_sei32bit.dtsi [new file with mode: 0644]
arch/arm/boot/dts/amlogic/partition_tv_4G.dtsi [new file with mode: 0644]
arch/arm/boot/dts/amlogic/txl_t950_p341.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/txl_t960_p346.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/txl_t962_p320.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/txlx_t962e_r321_buildroot.dts [new file with mode: 0644]
arch/arm/boot/dts/amlogic/txlx_t962x_r311_720p.dts [new file with mode: 0644]

diff --git a/arch/arm/boot/dts/amlogic/axg_a113d_skt.dts b/arch/arm/boot/dts/amlogic/axg_a113d_skt.dts
new file mode 100644 (file)
index 0000000..96e74c9
--- /dev/null
@@ -0,0 +1,998 @@
+/*
+ * arch/arm/boot/dts/amlogic/axg_a113d_skt.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesonaxg.dtsi"
+
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "axg_a113d_skt_v1";
+       compatible = "amlogic, axg";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_AO_B;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+};
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+       };
+
+       mtd_nand {
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "okay";
+               reg = <0xFFE07800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+
+               /*fip/tpl configurations, must be same
+                * with uboot if bl_mode was set as 1
+                * bl_mode: 0 compact mode; 1 descrete mode
+                * if bl_mode was set as 1, fip configeration will work
+                */
+               bl_mode = <1>;
+               /*copy count of fip*/
+               fip_copies = <4>;
+               /*size of each fip copy */
+               fip_size = <0x200000>;
+               nand_clk_ctrl = <0xFFE07000>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       /*
+                        * if bl_mode is 1, tpl size was generate by
+                        * fip_copies * fip_size which
+                        * will not skip bad when calculating
+                        * the partition size;
+                        *
+                        * if bl_mode is 0,
+                        * tpl partition must be comment out.
+                        */
+                       tpl{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x0>;
+                       };
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xF00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC40000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xff3f0000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       status = "disable";
+                       reg = <0xff3f0000 0x10000
+                       0xff634540 0x8>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH_CORE>;
+                       clock-names = "ethclk81";
+                       internal_phy=<0>;
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <1050>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@ff500000 {
+               compatible = "synopsys, dwc3";
+               status = "okay";
+               reg = <0xff500000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+               clocks = <&clkc CLKID_USB_GENERAL>;
+               clock-names = "dwc_general";
+       };
+
+       usb2_phy: usb2phy@ffe09000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               status = "okay";
+               portnum = <4>;
+               reg = <0xffe09000 0x80
+                                       0xffd01008 0x4>;
+       };
+       usb3_phy: usb3phy@ffe09080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               status = "okay";
+               portnum = <0>;
+               reg = <0xffe09080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xff400000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               /*0:default,1:single,2:incr,3:incr4,4:incr8,5:incr16,6:disable*/
+               port-dma = <0>;
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+               controller-type = <3>;
+               phy-reg = <0xffe09000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+       };
+
+       pcie_A: pcieA@f9800000 {
+               compatible = "amlogic, amlogic-pcie", "snps,dw-pcie";
+               reg = <0xf9800000 0x400000
+                               0xff646000 0x2000
+                               0xf9f00000 0x100000
+                               PCIE_PHY_REG PCIE_PHY_SIZE
+                               PCIE_RESET_REG PCIE_RESET_SIZE>;
+               reg-names = "elbi", "cfg", "config", "phy", "reset";
+               reset-gpio = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
+               interrupts = <0 177 0>;
+               #interrupt-cells = <1>;
+               bus-range = <0x0 0xff>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 179 IRQ_TYPE_EDGE_RISING>;
+               device_type = "pci";
+               ranges = <0x82000000 0 0 0xf9c00000 0 0x00300000>;
+                       /* non-prefetchable memory */
+               num-lanes = <1>;
+               pcie-num = <1>;
+
+               clocks = <&clkc CLKID_USB_GENERAL
+               &clkc CLKID_PCIE_PLL
+               &clkc CLKID_MIPI_ENABLE_GATE
+               &clkc CLKID_MIPI_BANDGAP_GATE
+               &clkc CLKID_PCIE_A
+               &clkc CLKID_PCIE_CML_EN0>;
+               clock-names = "pcie_general",
+                               "pcie_refpll",
+                               "pcie_mipi_enable_gate",
+                               "pcie_mipi_bandgap_gate",
+                               "pcie",
+                               "port";
+               /*reset-gpio-type 0:Shared pad(no reset)1:OD pad2:Normal pad*/
+               gpio-type = <2>;
+               status = "okay";
+       };
+
+       pcie_B: pcieB@fa000000 {
+               compatible = "amlogic, amlogic-pcie", "snps,dw-pcie";
+               reg = <0xfa000000 0x400000
+                               0xff648000 0x2000
+                               0xfa400000 0x100000
+                               PCIE_PHY_REG PCIE_PHY_SIZE
+                               PCIE_RESET_REG PCIE_RESET_SIZE>;
+               reg-names = "elbi", "cfg", "config", "phy", "reset";
+               reset-gpio = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
+               interrupts = <0 167 0>;
+               #interrupt-cells = <1>;
+               bus-range = <0x0 0xff>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
+               device_type = "pci";
+               ranges = <0x81000000 0 0 0xfa500000 0x0 0x10000
+                       /* downstream I/O */
+                       0x82000000 0 0xfa510000 0xfa510000 0 0x002f0000>;
+                       /* non-prefetchable memory */
+               num-lanes = <1>;
+               pcie-num = <2>;
+
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_PCIE_PLL
+                       &clkc CLKID_MIPI_ENABLE_GATE
+                       &clkc CLKID_MIPI_BANDGAP_GATE
+                       &clkc CLKID_PCIE_B
+                       &clkc CLKID_PCIE_CML_EN1>;
+               clock-names = "pcie_general",
+                       "pcie_refpll",
+                       "pcie_mipi_enable_gate",
+                       "pcie_mipi_bandgap_gate",
+                       "pcie",
+                       "port";
+               /*reset-gpio-type 0:Shared pad(no reset)1:OD pad2:Normal pad*/
+               gpio-type = <0>;
+               status = "okay";
+       };
+
+       uart_A: serial@ffd24000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd24000 0x18>;
+               interrupts = <0 26 1>;
+               status = "disable";
+               clocks = <&xtal
+                       &clkc CLKID_UART0>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 128 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&a_uart_pins>;
+       };
+
+       uart_B: serial@ffd23000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd23000 0x18>;
+               interrupts = <0 75 1>;
+               status = "disable";
+               clocks = <&xtal
+                       &clkc CLKID_UART1>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&b_uart_pins>;
+       };
+       /* Sound iomap */
+       aml_snd_iomap {
+               compatible = "amlogic, snd-iomap";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               pdm_bus {
+                       reg = <0xFF632000 0x2000>;
+               };
+               audiobus_base {
+                       reg = <0xFF642000 0x2000>;
+               };
+       };
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+
+       auge_sound {
+               compatible = "amlogic, axg-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&aml_tdmb>;
+                       //frame-master = <&aml_tdmb>;
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&aml_tdmc>;
+                       //frame-master = <&aml_tdmc>;
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&tas5707_36 &tas5707_3a>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       sd_emmc_c: emmc@ffe07000 {
+               status = "disable";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe07000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       /*caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";*/
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       partitions: partitions{
+               parts = <11>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&instaboot>;
+               part-7 = <&boot>;
+               part-8 = <&system>;
+               part-9 = <&cache>;
+               part-10 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               instaboot:instaboot{
+                       pname = "instaboot";
+                       size = <0x0 0x400000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "power", "vol-", "vol+", "wifi", "<<", ">>";
+               key_num = <6>;
+               io-channels = <&saradc SARADC_CH0>;
+               io-channel-names = "key-chan-0";
+               key_chan = <SARADC_CH0 SARADC_CH0 SARADC_CH0
+                                       SARADC_CH0 SARADC_CH0 SARADC_CH0>;
+               key_code = <116 114 115 139 105 106>;
+               key_val = <0 143 266 389 512 635>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40 40>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <6>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_3:key_3{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+}; /* end of / */
+&efuse {
+       status = "ok";
+};
+
+/* Audio Related start */
+/* for spk board */
+&i2c1 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&b_i2c_master>;
+       tlv320adc3101_32: tlv320adc3101_32@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x32>;
+               status = "disabled";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "okay";
+               reset_pin = <&gpio_ao GPIOAO_4 0>;
+       };
+
+       tas5707_3a: tas5707_3a@3a {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1d>;
+               status = "okay";
+       };
+};
+
+/* for mic board */
+&i2c_AO {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&ao_i2c_master_pin2>;
+
+       tlv320adc3101_30: tlv320adc3101_30@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x30>;
+               status = "okay";
+       };
+       tlv320adc3101_34: tlv320adc3101_34@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x34>;
+               status = "okay";
+       };
+       tlv320adc3101_36: tlv320adc3101_36@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x36>;
+               status = "okay";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, axg-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask = <1>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, axg-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask = <1 1 1 1>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, axg-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c>;// &tdmin_c>;
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, axg-snd-spdif";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, axg-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux {
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0_x15";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux {
+                       groups = "tdma_din0";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk_b";
+                       function = "mclk_b";
+               };
+       };
+
+       tdmout_b: tdmout_b {
+               mux {
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0",
+                               "tdmb_dout1",
+                               "tdmb_dout2_a12",
+                               "tdmb_dout3_a13";
+                       function = "tdmb_out";
+               };
+       };
+
+       // tdmin and tdmout are the same pins. can't use at same time
+       /*
+        *tdmin_b:tdmin_b {
+        *      mux {
+        *              groups = "tdmb_din0",
+        *                      "tdmb_din1",
+        *                      "tdmb_din2_a12",
+        *                      "tdmb_din3_a13";
+        *              function = "tdmb_in";
+        *      };
+        *};
+        */
+
+       tdmc_mclk: tdmc_mclk {
+               mux {
+                       groups = "mclk_a";
+                       function = "mclk_a";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux {
+                       groups = "tdmc_sclk",
+                               "tdmc_fs",
+                               "tdmc_dout0",
+                               "tdmc_dout1",
+                               "tdmc_dout2_a6",
+                               "tdmc_dout3_a7";
+                       function = "tdmc_out";
+               };
+       };
+
+       //tdmin_c:tdmin_c {
+       //      mux {
+       //              groups = "tdmc_din0",
+       //                      "tdmc_din1",
+       //                      "tdmc_din2_a6",
+       //                      "tdmc_din3_a7";
+       //              function = "tdmc_in";
+       //      };
+       //};
+
+       spdifout: spidfout {
+               mux {
+                       groups = "spdif_out_a20";
+                       function = "spdif_out";
+               };
+       };
+
+       spdifin: spidfin {
+               mux {
+                       groups = "spdif_in_a19";
+                       function = "spdif_in";
+               };
+       };
+
+       pdmin: pdmin {
+               mux {
+                       groups = "pdm_dclk_a14",
+                               "pdm_din0",
+                               "pdm_din1",
+                               "pdm_din2",
+                               "pdm_din3";
+                       function = "pdm";
+               };
+       };
+}; /* end of pinctrl_periphs */
+/* Audio Related End */
+
+&spicc0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi0_pins>;
+       cs-gpios = <&gpio GPIOZ_3 0>;
+};
+
+&spicc1 {
+       status = "disabled";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi1_x_pins>;
+       cs-gpios = <&gpio GPIOX_16 0>;
+};
+
+&aobus{
+       uart_AO: serial@3000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x3000 0x18>;
+               interrupts = <0 193 1>;
+               status = "okay";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               xtal_tick_en = <1>;
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_uart_pins>;
+               support-sysrq = <0>;    /* 0 not support , 1 support */
+       };
+
+       uart_AO_B: serial@4000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x4000 0x18>;
+               interrupts = <0 197 1>;
+               status = "disable";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_b_uart_pins>;
+       };
+};
+&audio_data{
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/axg_a113x_skt.dts b/arch/arm/boot/dts/amlogic/axg_a113x_skt.dts
new file mode 100644 (file)
index 0000000..23aac38
--- /dev/null
@@ -0,0 +1,971 @@
+/*
+ * arch/arm/boot/dts/amlogic/axg_a113x_skt.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesonaxg.dtsi"
+
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "axg_a113x_skt_v1";
+       compatible = "amlogic, axg";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x000000 0x20000000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+       };
+       mtd_nand {
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "okay";
+               reg = <0xFFE07800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+
+               /*fip/tpl configurations, must be same
+                * with uboot if bl_mode was set as 1
+                * bl_mode: 0 compact mode; 1 descrete mode
+                * if bl_mode was set as 1, fip configeration will work
+                */
+               bl_mode = <1>;
+               /*copy count of fip*/
+               fip_copies = <4>;
+               /*size of each fip copy */
+               fip_size = <0x200000>;
+               nand_clk_ctrl = <0xFFE07000>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       /*
+                        * if bl_mode is 1, tpl size was generate by
+                        * fip_copies * fip_size which
+                        * will not skip bad when calculating
+                        * the partition size;
+                        *
+                        * if bl_mode is 0,
+                        * tpl partition must be comment out.
+                        */
+                       tpl{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x0>;
+                       };
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xF00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC40000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <1050>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@ff500000 {
+               compatible = "synopsys, dwc3";
+               status = "okay";
+               reg = <0xff500000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+               clocks = <&clkc CLKID_USB_GENERAL>;
+               clock-names = "dwc_general";
+       };
+
+       usb2_phy: usb2phy@ffe09000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               status = "okay";
+               portnum = <4>;
+               reg = <0xffe09000 0x80
+                                       0xffd01008 0x4>;
+       };
+
+       usb3_phy: usb3phy@ffe09080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               status = "okay";
+               portnum = <0>;
+               reg = <0xffe09080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xff400000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               /*0:default,1:single,2:incr,3:incr4,4:incr8,5:incr16,6:disable*/
+               port-dma = <0>;
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+               controller-type = <3>;
+               phy-reg = <0xffe09000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+       };
+
+       uart_A: serial@ffd24000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd24000 0x18>;
+               interrupts = <0 26 1>;
+               status = "okay";
+               clocks = <&xtal
+                       &clkc CLKID_UART0>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 128 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&a_uart_pins>;
+       };
+
+       uart_B: serial@ffd23000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd23000 0x18>;
+               interrupts = <0 75 1>;
+               status = "disable";
+               clocks = <&xtal
+                       &clkc CLKID_UART1>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&b_uart_pins>;
+       };
+
+       /* Sound iomap */
+       aml_snd_iomap {
+               compatible = "amlogic, snd-iomap";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               pdm_bus {
+                       reg = <0xFF632000 0x2000>;
+               };
+               audiobus_base {
+                       reg = <0xFF642000 0x2000>;
+               };
+       };
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+
+       auge_sound {
+               compatible = "amlogic, axg-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <256>;//512
+                       //continuous-clock;
+                       bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdma>;
+                       frame-master = <&aml_tdma>;
+                       cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&tas5707_36 &tlv320adc3101_32>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       /* tdmb clk using tdmc so no bclk-inv */
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <256>;
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               /*aml-audio-card,dai-link@4 {
+                *      mclk-fs = <128>;
+                *      cpu {
+                *              sound-dai = <&aml_spdif>;
+                *      };
+                *      codec {
+                *              sound-dai = <&dummy_codec>;
+                *      };
+                *};
+                */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_21       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ab MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ab MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+       sd_emmc_c: emmc@ffe07000 {
+               status = "disabled";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe07000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       /*caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";*/
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sdio@ffe05000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe05000 0x2000>;
+               interrupts = <0 217 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "power", "vol-", "vol+", "wifi", "<<", ">>";
+               key_num = <6>;
+               io-channels = <&saradc SARADC_CH0>;
+               io-channel-names = "key-chan-0";
+               key_chan = <SARADC_CH0 SARADC_CH0 SARADC_CH0
+                                       SARADC_CH0 SARADC_CH0 SARADC_CH0>;
+               key_code = <116 114 115 139 105 106>;
+               key_val = <0 143 266 389 512 635>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40 40>;
+       };
+
+       partitions: partitions{
+               parts = <11>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&instaboot>;
+               part-7 = <&boot>;
+               part-8 = <&system>;
+               part-9 = <&cache>;
+               part-10 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               instaboot:instaboot{
+                       pname = "instaboot";
+                       size = <0x0 0x400000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <6>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_3:key_3{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+}; /* end of / */
+
+&efuse {
+       status = "ok";
+};
+
+&pwm_ab {
+       status = "okay";
+};
+/* Audio Related start */
+/* for spk board */
+&i2c1 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&b_i2c_master>;
+       tlv320adc3101_32: tlv320adc3101_32@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               status = "okay";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "okay";
+               reset_pin = <&gpio_ao GPIOAO_4 0>;
+       };
+
+       tas5707_3a: tas5707_3a@3a {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1d>;
+               status = "disable";
+       };
+};
+
+/* for mic board */
+&i2c_AO {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&ao_i2c_master_pin2>;
+
+       pca9557:pca9557@0x1f {
+               compatible = "nxp,pca9557";
+               reg = <0x1f>;
+               status = "okay";
+       };
+       tlv320adc3101_30: tlv320adc3101_30@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x18>;
+               status = "disable";
+       };
+       tlv320adc3101_34: tlv320adc3101_34@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1a>;
+               status = "disable";
+       };
+       tlv320adc3101_36: tlv320adc3101_36@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disable";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, axg-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask = <1 1 1 1>;
+               /* select tdm lr/bclk src, see aml_axg_tdm.c */
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmin_a &tdmout_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, axg-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, axg-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, axg-snd-spdif";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "disabled";
+       };
+
+       aml_pdm: pdm {
+               compatible = "amlogic, axg-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux {
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0_x15";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux {
+                       groups = "tdma_din0";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk_b";
+                       function = "mclk_b";
+               };
+       };
+
+       tdmout_b: tdmout_b {
+               mux {
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+               };
+       };
+
+       // tdmin and tdmout are the same pins. can't use at same time
+       /*
+        *tdmin_b:tdmin_b {
+        *      mux {
+        *              groups = "tdmb_din0",
+        *                      "tdmb_din1",
+        *                      "tdmb_din2_a12",
+        *                      "tdmb_din3_a13";
+        *              function = "tdmb_in";
+        *      };
+        *};
+        */
+
+       tdmin_b: tdmin_b {
+               mux {
+                       groups = "tdmb_din1";
+                       function = "tdmb_in";
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux {
+                       groups = "mclk_a";
+                       function = "mclk_a";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux {
+                       groups = "tdmc_sclk",
+                               "tdmc_fs",
+                               "tdmc_dout0";
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux {
+                       groups = "tdmc_din1";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifout: spidfout {
+               mux {
+                       groups = "spdif_out_a20";
+                       function = "spdif_out";
+               };
+       };
+
+       spdifin: spidfin {
+               mux {
+                       groups = "spdif_in_a19";
+                       function = "spdif_in";
+               };
+       };
+
+       pdmin: pdmin {
+               mux {
+                       groups = "pdm_dclk_a14",
+                               "pdm_din0",
+                               "pdm_din1",
+                               "pdm_din2",
+                               "pdm_din3";
+                       function = "pdm";
+               };
+       };
+}; /* end of pinctrl_periphs */
+/* Audio Related End */
+
+&aobus{
+       uart_AO: serial@3000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x3000 0x18>;
+               interrupts = <0 193 1>;
+               status = "okay";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               xtal_tick_en = <1>;
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_uart_pins>;
+               support-sysrq = <0>;    /* 0 not support , 1 support */
+       };
+
+       uart_AO_B: serial@4000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x4000 0x18>;
+               interrupts = <0 197 1>;
+               status = "disable";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_b_uart_pins>;
+       };
+};
+
+&audio_data{
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/axg_pxp.dts b/arch/arm/boot/dts/amlogic/axg_pxp.dts
new file mode 100644 (file)
index 0000000..702352d
--- /dev/null
@@ -0,0 +1,628 @@
+/*
+ * arch/arm/boot/dts/amlogic/axg_pxp.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesonaxg.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, axg";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               fb_reserved:linux,meson-fb {
+                       //compatible = "amlogic, fb-memory";
+                       //reg = <0x3e000000 0x1f00000>;
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3e000000 0x2000000>;
+               };
+       };
+
+
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <1050>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       pcie_A: pcie@f9800000 {
+               compatible = "amlogic, amlogic-pcie", "snps,dw-pcie";
+               reg = <0xf9800000 0x400000
+                               0xff644000 0x2000
+                               0xff646000 0x2000
+                               0xffd01080 0x10
+                               0xf9c00000 0x100000>;
+               reg-names = "elbi", "phy", "cfg", "reset", "config";
+               reset-gpio = <&gpio GPIOX_19 0>;
+               interrupts = <0 177 0>;
+               #interrupt-cells = <1>;
+               bus-range = <0x0 0xff>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 179 IRQ_TYPE_EDGE_RISING>;
+               device_type = "pci";
+               ranges = <0x81000000 0 0          0xf9d00000 0x0 0x10000
+                       /*downstream I/O */
+                         0x82000000 0 0xf9d10000 0xf9d10000 0 0x002f0000>;
+                       /* non-prefetchable memory */
+               num-lanes = <1>;
+               pcie-num = <1>;
+
+               //clocks = <&clkc CLKID_PCIE_REFPLL
+               //&clkc CLKID_PCIE_A>;
+               //clock-names = "pcie_refpll",
+               //              "pcie_a";
+
+               status = "disable";
+       };
+       pcie_B: pcie@fa000000 {
+               compatible = "amlogic, amlogic-pcie", "snps,dw-pcie";
+               reg = <0xfa000000 0x400000
+                               0xff644000 0x2000
+                               0xff648000 0x2000
+                               0xffd01080 0x10
+                               0xfa400000 0x100000>;
+               reg-names = "elbi", "phy-unuse", "cfg", "reset-unuse", "config";
+               interrupts = <0 167 0>;
+               #interrupt-cells = <1>;
+               bus-range = <0x0 0xff>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
+               device_type = "pci";
+               ranges = <0x81000000 0 0          0xfa500000 0x0 0x10000
+                       /* downstream I/O */
+                       0x82000000 0 0xfa510000 0xfa510000 0 0x002f0000>;
+                       /* non-prefetchable memory */
+               num-lanes = <1>;
+               pcie-num = <2>;
+
+               //clocks = <&clkc CLKID_PCIE_REFPLL
+               //      &clkc CLKID_PCIE_B>;
+               //clock-names = "pcie_refpll",
+               //      "pcie_b";
+
+               status = "disable";
+       };
+
+       vpu {
+               compatible = "amlogic, vpu";
+               dev_name = "vpu";
+               status = "ok";
+               clocks = <&clkc CLKID_VAPB_MUX
+                       &clkc CLKID_VPU_INTR
+                       &clkc CLKID_VPU_P0_MUX
+                       &clkc CLKID_VPU_P1_MUX
+                       &clkc CLKID_VPU_MUX>;
+               clock-names = "vapb_clk",
+                       "vpu_intr_gate",
+                       "vpu_clk0",
+                       "vpu_clk1",
+                       "vpu_clk";
+               clk_level = <3>;
+               /* 0: 100.0M    1: 166.7M    2: 200.0M    3: 250.0M */
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-axg";
+               memory-region = <&fb_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x006AF000 0x01851000 0x00000000>;
+               /* uboot logo,fb0/fb1 memory size */
+               display_mode_default = "1080p60hz";
+               scale_mode = <0>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               mem_alloc = <1>;
+               logo_addr = "0x3e000000";
+               pxp_mode = <1>; /** 0:normal mode 1:pxp mode */
+       };
+
+       ge2d {
+               compatible = "amlogic, ge2d-axg";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+               reg = <0xff940000 0x10000>;
+       };
+
+       /* Sound iomap */
+       aml_snd_iomap {
+               compatible = "amlogic, snd_iomap";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               pdm_bus {
+                       reg = <0xFF632000 0x2000>;
+               };
+               audiobus_base {
+                       reg = <0xFF642000 0x2000>;
+               };
+       };
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+
+       auge_sound {
+               compatible = "amlogic, axg-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&aml_tdmc>;
+                       //frame-master = <&aml_tdmc>;
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               //sound-dai = <&tas5707_36 &tas5707_3a>;
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+
+}; /* end of / */
+
+/* Audio Related start */
+/* for spk board */
+&i2c1 {
+       status = "okay";
+       //pinctrl-names="default";
+       //pinctrl-0=<&b_i2c_master>;
+       tlv320adc3101_32: tlv320adc3101_32@32 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               status = "disabled";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+               reset_pin = <&gpio_ao GPIOAO_4 0>;
+       };
+
+       tas5707_3a: tas5707_3a@3a {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1d>;
+               status = "disabled";
+       };
+};
+
+/* for mic board */
+&i2c_AO {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&ao_i2c_master_pin2>;
+
+       tlv320adc3101_30: tlv320adc3101_30@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x18>;
+               status = "disabled";
+       };
+       tlv320adc3101_34: tlv320adc3101_34@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1a>;
+               status = "disabled";
+       };
+       tlv320adc3101_36: tlv320adc3101_36@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, axg-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0>;
+               dai-tdm-lane-slot-mask-out = <0 1>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a &tdmout_a_data>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, axg-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 1 1 1>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, axg-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, axg-snd-spdif";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, axg-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux {
+                       groups = "tdma_sclk",
+                               "tdma_fs";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmout_a_data: tdmout_a_data {
+               mux {
+                       groups = "tdma_dout1_x15";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux {
+                       groups = "tdma_din0";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk_b";
+                       function = "mclk_b";
+               };
+       };
+
+       tdmout_b: tdmout_b {
+               mux {
+                       groups = "tdmb_sclk",
+                               "tdmb_fs";
+                       function = "tdmb_out";
+               };
+       };
+       // tdmin and tdmout are the same pins. can't use at same time
+       tdmin_b:tdmin_b {
+               mux {
+                       groups = "tdmb_din0",
+                               "tdmb_din1",
+                               "tdmb_din2_a12",
+                               "tdmb_din3_a13";
+                       function = "tdmb_in";
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux {
+                       groups = "mclk_a";
+                       function = "mclk_a";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux {
+                       groups = "tdmc_sclk",
+                               "tdmc_fs",
+                               "tdmc_dout0",
+                               "tdmc_dout2_a6",
+                               "tdmc_dout3_a7";
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux {
+                       groups = "tdmc_din1";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifout: spidfout {
+               mux {
+                       groups = "spdif_out_a20";
+                       function = "spdif_out";
+               };
+       };
+
+       spdifin: spidfin {
+               mux {
+                       groups = "spdif_in_a19";
+                       function = "spdif_in";
+               };
+       };
+
+       pdmin: pdmin {
+               mux {
+                       groups = "pdm_dclk_a14",
+                               "pdm_din0",
+                               "pdm_din1",
+                               "pdm_din2",
+                               "pdm_din3";
+                       function = "pdm";
+               };
+       };
+}; /* end of pinctrl_periphs */
+/* Audio Related End */
+
+&aobus{
+       uart_AO: serial@3000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x3000 0x18>;
+               interrupts = <0 193 1>;
+               status = "okay";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               xtal_tick_en = <1>;
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_uart_pins>;
+               support-sysrq = <0>;    /* 0 not support , 1 support */
+       };
+};
+
+&audio_data{
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/axg_s400_v03.dts b/arch/arm/boot/dts/amlogic/axg_s400_v03.dts
new file mode 100644 (file)
index 0000000..002962a
--- /dev/null
@@ -0,0 +1,1414 @@
+/*
+ * arch/arm/boot/dts/amlogic/axg_s400_v03.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesonaxg.dtsi"
+#include "mesonaxg_s400-panel.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "axg_s400_v03";
+       compatible = "amlogic, axg";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x000000 0x40000000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               fb_reserved:linux,meson-fb {
+                       //compatible = "amlogic, fb-memory";
+                       //reg = <0x3e000000 0x1f00000>;
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3e000000 0x2000000>;
+               };
+       };
+       mtd_nand {
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "okay";
+               reg = <0xFFE07800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+
+               /*fip/tpl configurations, must be same
+                * with uboot if bl_mode was set as 1
+                * bl_mode: 0 compact mode; 1 descrete mode
+                * if bl_mode was set as 1, fip configeration will work
+                */
+               bl_mode = <1>;
+               /*copy count of fip*/
+               fip_copies = <4>;
+               /*size of each fip copy */
+               fip_size = <0x200000>;
+               nand_clk_ctrl = <0xFFE07000>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       /*
+                        * if bl_mode is 1, tpl size was generate by
+                        * fip_copies * fip_size which
+                        * will not skip bad when calculating
+                        * the partition size;
+                        *
+                        * if bl_mode is 0,
+                        * tpl partition must be comment out.
+                        */
+                       tpl{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x0>;
+                       };
+                       misc{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xF00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x11800000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+
+       ethmac: ethernet@0xff3f0000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xff3f0000 0x10000
+                       0xff634540 0x8>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH_CORE>;
+                       clock-names = "ethclk81";
+                       internal_phy=<0>;
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <1050>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@ff500000 {
+               compatible = "synopsys, dwc3";
+               status = "okay";
+               reg = <0xff500000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+               clocks = <&clkc CLKID_USB_GENERAL>;
+               clock-names = "dwc_general";
+       };
+
+       usb2_phy: usb2phy@ffe09000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               status = "okay";
+               portnum = <4>;
+               reg = <0xffe09000 0x80
+                                       0xffd01008 0x4>;
+       };
+
+       usb3_phy: usb3phy@ffe09080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               status = "okay";
+               portnum = <0>;
+               reg = <0xffe09080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xff400000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               /*0:default,1:single,2:incr,3:incr4,4:incr8,5:incr16,6:disable*/
+               port-dma = <0>;
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+               controller-type = <3>;
+               phy-reg = <0xffe09000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+       };
+
+       pcie_A: pcieA@f9800000 {
+               compatible = "amlogic, amlogic-pcie", "snps,dw-pcie";
+               reg = <0xf9800000 0x400000
+                               0xff646000 0x2000
+                               0xf9f00000 0x100000
+                               PCIE_PHY_REG PCIE_PHY_SIZE
+                               PCIE_RESET_REG PCIE_RESET_SIZE>;
+               reg-names = "elbi", "cfg", "config", "phy", "reset";
+               reset-gpio = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
+               interrupts = <0 177 0>;
+               #interrupt-cells = <1>;
+               bus-range = <0x0 0xff>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 179 IRQ_TYPE_EDGE_RISING>;
+               device_type = "pci";
+               ranges = <0x82000000 0 0 0xf9c00000 0 0x00300000>;
+                       /* non-prefetchable memory */
+               num-lanes = <1>;
+               pcie-num = <1>;
+
+               clocks = <&clkc CLKID_USB_GENERAL
+               &clkc CLKID_PCIE_PLL
+               &clkc CLKID_MIPI_ENABLE_GATE
+               &clkc CLKID_MIPI_BANDGAP_GATE
+               &clkc CLKID_PCIE_A
+               &clkc CLKID_PCIE_CML_EN0>;
+               clock-names = "pcie_general",
+                               "pcie_refpll",
+                               "pcie_mipi_enable_gate",
+                               "pcie_mipi_bandgap_gate",
+                               "pcie",
+                               "port";
+               /*reset-gpio-type 0:Shared pad(no reset)1:OD pad2:Normal pad*/
+               gpio-type = <2>;
+               status = "okay";
+       };
+
+        pcie_B: pcieB@fa000000 {
+               compatible = "amlogic, amlogic-pcie", "snps,dw-pcie";
+               reg = <0xfa000000 0x400000
+                               0xff648000 0x2000
+                               0xfa400000 0x100000
+                               PCIE_PHY_REG PCIE_PHY_SIZE
+                               PCIE_RESET_REG PCIE_RESET_SIZE>;
+               reg-names = "elbi", "cfg", "config", "phy", "reset";
+               reset-gpio = <&gpio GPIOZ_10 GPIO_ACTIVE_HIGH>;
+               interrupts = <0 167 0>;
+               #interrupt-cells = <1>;
+               bus-range = <0x0 0xff>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
+               device_type = "pci";
+               ranges = <0x81000000 0 0 0xfa500000 0x0 0x10000
+                       /* downstream I/O */
+                       0x82000000 0 0xfa510000 0xfa510000 0 0x002f0000>;
+                       /* non-prefetchable memory */
+               num-lanes = <1>;
+               pcie-num = <2>;
+
+               clocks = <&clkc CLKID_USB_GENERAL
+                               &clkc CLKID_PCIE_PLL
+                               &clkc CLKID_MIPI_ENABLE_GATE
+                               &clkc CLKID_MIPI_BANDGAP_GATE
+                               &clkc CLKID_PCIE_B
+                               &clkc CLKID_PCIE_CML_EN1>;
+               clock-names = "pcie_general",
+                               "pcie_refpll",
+                               "pcie_mipi_enable_gate",
+                               "pcie_mipi_bandgap_gate",
+                               "pcie",
+                               "port";
+               /*reset-gpio-type 0:Shared pad(no reset)1:OD pad2:Normal pad*/
+               gpio-type = <1>;
+               status = "okay";
+       };
+
+
+       uart_A: serial@ffd24000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd24000 0x18>;
+               interrupts = <0 26 1>;
+               status = "okay";
+               clocks = <&xtal
+                       &clkc CLKID_UART0>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 128 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&a_uart_pins>;
+       };
+
+       uart_B: serial@ffd23000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd23000 0x18>;
+               interrupts = <0 75 1>;
+               status = "disable";
+               clocks = <&xtal
+                       &clkc CLKID_UART1>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&b_uart_pins>;
+       };
+
+       vpu {
+               compatible = "amlogic, vpu-axg";
+               dev_name = "vpu";
+               status = "okay";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_VPU_INTR>,
+                       <&clkc CLKID_VPU_P0_COMP>,
+                       <&clkc CLKID_VPU_P1_COMP>,
+                       <&clkc CLKID_VPU_MUX>;
+               clock-names = "vapb_clk",
+                       "vpu_intr_gate",
+                       "vpu_clk0",
+                       "vpu_clk1",
+                       "vpu_clk";
+               clk_level = <3>;
+               /* 0: 100.0M    1: 166.7M    2: 200.0M    3: 250.0M */
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+       };
+
+       /* Sound iomap */
+       aml_snd_iomap {
+               compatible = "amlogic, snd-iomap";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               pdm_bus {
+                       reg = <0xFF632000 0x2000>;
+               };
+               audiobus_base {
+                       reg = <0xFF642000 0x2000>;
+               };
+       };
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+
+       auge_sound {
+               compatible = "amlogic, axg-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+
+               aml-audio-card,hp-det-gpio = <&gpio GPIOZ_7 GPIO_ACTIVE_LOW>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1>;
+                               dai-tdm-slot-num = <1>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <512000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               /*
+                                * prefix-names = "3101_A", "3101_B",
+                                * "3101_C", "3101_D";
+                                * sound-dai = <&tlv320adc3101_32
+                                * &tlv320adc3101_30
+                                * &tlv320adc3101_34
+                                * &tlv320adc3101_36>;
+                                */
+                               sound-dai = <&tlv320adc3101_32 &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&aml_tdmc>;
+                       //frame-master = <&aml_tdmc>;
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               prefix-names = "5707_A", "5707_B";
+                               sound-dai = <&tas5707_36 &tas5707_3a
+                                               &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <256>;
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               /*
+                                *enable external loopback
+                                *and tlv320adc3101 as loopback
+                                */
+                               /*sound-dai = <&pdm_codec &tlv320adc3101_32>;*/
+                               /*
+                                * enable internal loopback
+                                * or disable loopback
+                                */
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_21       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               interrupts = <  0 67 4>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin2 = <&gpio       GPIOX_16       GPIO_ACTIVE_HIGH>;
+               power_on_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ab MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ab MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@ffe07000 {
+               status = "disabled";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe07000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       tx_delay = <4>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sdio@ffe05000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe05000 0x2000>;
+               interrupts = <0 217 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+
+       partitions: partitions{
+               parts = <11>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&instaboot>;
+               part-7 = <&boot>;
+               part-8 = <&system>;
+               part-9 = <&cache>;
+               part-10 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               instaboot:instaboot{
+                       pname = "instaboot";
+                       size = <0x0 0x400000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-axg";
+               memory-region = <&fb_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00300000 0x1800000 0x00000000>;
+               /* uboot logo,fb0/fb1 memory size */
+               display_mode_default = "1080p60hz";
+               scale_mode = <0>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <768 1024 768 2048 32>;
+               /*768*1024*4*2 = 0x600000*/
+               mem_alloc = <1>;
+               logo_addr = "0x3e000000";
+               pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+       };
+
+       ge2d {
+               compatible = "amlogic, ge2d-axg";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+               reg = <0xff940000 0x10000>;
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "power", "vol-", "vol+", "wifi", "<<", ">>";
+               key_num = <6>;
+               io-channels = <&saradc SARADC_CH0>;
+               io-channel-names = "key-chan-0";
+               key_chan = <SARADC_CH0 SARADC_CH0 SARADC_CH0
+                                       SARADC_CH0 SARADC_CH0 SARADC_CH0>;
+               key_code = <116 114 115 139 105 106>;
+               key_val = <0 143 266 389 512 635>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40 40>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <6>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_3:key_3{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+}; /* end of / */
+&efuse {
+       status = "ok";
+};
+
+&pwm_ab {
+       status = "okay";
+};
+/* Audio Related start */
+/* for spk board */
+&i2c1 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&b_i2c_master>;
+
+       tlv320adc3101_32: tlv320adc3101_32@32 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "okay";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "okay";
+               reset_pin = <&gpio_ao GPIOAO_4 0>;
+       };
+
+       tas5707_3a: tas5707_3a@3a {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1d>;
+               status = "okay";
+       };
+};
+
+/* for mic board */
+&i2c_AO {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&ao_i2c_master_pin2>;
+
+       aml_pca9557: aml_pca9557@0x1f {
+               compatible = "aml, ledring";
+               reg = <0x1f>;
+               mode = <0>; /*0: 6-led 1: 4key+2led */
+               key_num = <4>;
+               led_dev_name = "aml_ledring";
+               key_dev_name = "aml_pca_key";
+               key_name = "mute", "pause", "vol+", "vol-";
+               key_value = <200 201 202 203>;
+               status = "okay";
+       };
+
+       tlv320adc3101_30: tlv320adc3101_30@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x18>;
+               status = "disable";
+       };
+       tlv320adc3101_34: tlv320adc3101_34@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1a>;
+               status = "disable";
+       };
+       tlv320adc3101_36: tlv320adc3101_36@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disable";
+       };
+
+       es7243_10: es7243_10@10 {
+               compatible = "MicArray_0";
+               #sound-dai-cells = <0>;
+               reg = <0x10>;
+               status = "disable";
+       };
+       es7243_12: es7243_12@12 {
+               compatible = "MicArray_1";
+               #sound-dai-cells = <0>;
+               reg = <0x12>;
+               status = "disable";
+       };
+       es7243_13: es7243_13@13 {
+               compatible = "MicArray_2";
+               #sound-dai-cells = <0>;
+               reg = <0x13>;
+               status = "disable";
+       };
+       is31fl3236a: is31f3236a@0x78 {
+               compatible = "issi,is31fl3236";
+               reg = <0x3c>;
+               status = "disable";
+               led1_r {
+                       label="LED1_R";
+                       reg_offset = <24>;
+               };
+               led1_g {
+                       label="LED1_G";
+                       reg_offset = <23>;
+               };
+               led1_b {
+                       label="LED1_B";
+                       reg_offset = <22>;
+               };
+               led2_r {
+                       label="LED2_R";
+                       reg_offset = <21>;
+               };
+               led2_g {
+                       label="LED2_G";
+                       reg_offset = <20>;
+               };
+               led2_b {
+                       label="LED2_B";
+                       reg_offset = <19>;
+               };
+               led3_r {
+                       label="LED3_R";
+                       reg_offset = <18>;
+               };
+               led3_g {
+                       label="LED3_G";
+                       reg_offset = <17>;
+               };
+               led3_b {
+                       label="LED3_B";
+                       reg_offset = <16>;
+               };
+               led4_r {
+                       label="LED4_R";
+                       reg_offset = <15>;
+               };
+               led4_g {
+                       label="LED4_G";
+                       reg_offset = <14>;
+               };
+               led4_b {
+                       label="LED4_B";
+                       reg_offset = <13>;
+               };
+               led5_r {
+                       label="LED5_R";
+                       reg_offset = <36>;
+               };
+               led5_g {
+                       label="LED5_G";
+                       reg_offset = <35>;
+               };
+               led5_b {
+                       label="LED5_B";
+                       reg_offset = <34>;
+               };
+               led6_r {
+                       label="LED6_R";
+                       reg_offset = <33>;
+               };
+               led6_g {
+                       label="LED6_G";
+                       reg_offset = <32>;
+               };
+               led6_b {
+                       label="LED6_B";
+                       reg_offset = <31>;
+               };
+               led7_r {
+                       label="LED7_R";
+                       reg_offset = <30>;
+               };
+               led7_g {
+                       label="LED7_G";
+                       reg_offset = <29>;
+               };
+               led7_b {
+                       label="LED7_B";
+                       reg_offset = <28>;
+               };
+               led8_r {
+                       label="LED8_R";
+                       reg_offset = <27>;
+               };
+               led8_g {
+                       label="LED8_G";
+                       reg_offset = <26>;
+               };
+               led8_b {
+                       label="LED8_B";
+                       reg_offset = <25>;
+               };
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, axg-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0>;
+               dai-tdm-lane-slot-mask-out = <0 1>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a &tdmout_a_data>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, axg-snd-tdmb";
+               #sound-dai-cells = <0>;
+               /*dai-tdm-lane-slot-mask-in = <1 1 1 1>;*/
+               dai-tdm-lane-slot-mask-in = <0 0 0 1>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, axg-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <0 0 1 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, axg-snd-spdif";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+
+               /*
+                * whether do asrc for pcm.
+                * if raw data, asrc is disabled automatically
+                * 0: "Disable",
+                * 1: "Enable:32K",
+                * 2: "Enable:44K",
+                * 3: "Enable:48K",
+                * 4: "Enable:88K",
+                * 5: "Enable:96K",
+                * 6: "Enable:176K",
+                * 7: "Enable:192K",
+                */
+               auto_asrc = <0>;
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, axg-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+
+               /*
+                * external loopback clock config
+                * enable clk while pdm record data
+                */
+               /*clocks = <&clkc CLKID_MPLL1>;*/
+               /*clock-names = "datalb_mpll";*/
+
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x7f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+
+               /*if tdmin_lb >= 3, use external loopback*/
+               datalb_src = <2>;
+               datalb_chnum = <2>;
+               /*config which data pin as loopback*/
+               /*datalb-lane-mask-in = <0 0 0 1>;*/
+               datalb_chmask = <0x1>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, axg-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A,
+                *      TDMIN_B,
+                *      TDMIN_C,
+                *      SPDIFIN,
+                *      PDMIN,
+                *      NONE,
+                *      TDMIN_LB,
+                *      LOOPBACK,
+                */
+               resample_module = <3>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, axg-power-detect";
+
+               interrupts = <GIC_SPI 91 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "disabled";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux {
+                       groups = "tdma_sclk",
+                               "tdma_fs";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmout_a_data: tdmout_a_data {
+               mux {
+                       groups = "tdma_dout1_x15";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux {
+                       groups = "tdma_din0";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk_b";
+                       function = "mclk_b";
+               };
+       };
+
+       tdmout_b: tdmout_b {
+               mux {
+                       groups = "tdmb_sclk",
+                               "tdmb_fs";
+                       function = "tdmb_out";
+               };
+       };
+       // tdmin and tdmout are the same pins. can't use at same time
+       tdmin_b:tdmin_b {
+               mux {
+                       groups = "tdmb_din0",
+                               "tdmb_din1",
+                               "tdmb_din2_a12",
+                               "tdmb_din3_a13";
+                       function = "tdmb_in";
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux {
+                       groups = "mclk_a";
+                       function = "mclk_a";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux {
+                       groups = "tdmc_sclk",
+                               "tdmc_fs",
+                               "tdmc_dout0",
+                               "tdmc_dout2_a6",
+                               "tdmc_dout3_a7";
+                       function = "tdmc_out";
+               };
+       };
+
+
+       tdmin_c:tdmin_c {
+               mux {
+                       groups = "tdmc_din1";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifout: spidfout {
+               mux {
+                       groups = "spdif_out_a20";
+                       function = "spdif_out";
+               };
+       };
+
+       spdifin: spidfin {
+               mux {
+                       groups = "spdif_in_a19";
+                       function = "spdif_in";
+               };
+       };
+
+       pdmin: pdmin {
+               mux {
+                       groups = "pdm_dclk_a14",
+                               "pdm_din0",
+                               "pdm_din1",
+                               "pdm_din2",
+                               "pdm_din3";
+                       function = "pdm";
+               };
+       };
+
+       bl_pwm_on_pins: bl_pwm_on_pin {
+               mux {
+                       groups = "pwm_b_z";
+                       function = "pwm_b";
+               };
+       };
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOZ_4";
+                       function = "gpio_periphs";
+                       output-high;
+               };
+       };
+}; /* end of pinctrl_periphs */
+/* Audio Related End */
+
+&aobus{
+       uart_AO: serial@3000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x3000 0x18>;
+               interrupts = <0 193 1>;
+               status = "okay";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               xtal_tick_en = <1>;
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_uart_pins>;
+               support-sysrq = <0>;    /* 0 not support , 1 support */
+       };
+
+       uart_AO_B: serial@4000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x4000 0x18>;
+               interrupts = <0 197 1>;
+               status = "disable";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_b_uart_pins>;
+       };
+};
+
+&audio_data{
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/axg_s400_v03gva.dts b/arch/arm/boot/dts/amlogic/axg_s400_v03gva.dts
new file mode 100644 (file)
index 0000000..fb3949b
--- /dev/null
@@ -0,0 +1,1321 @@
+/*
+ * arch/arm/boot/dts/amlogic/axg_s400_v03gva.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesonaxg.dtsi"
+#include "mesonaxg_s400-panel.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "axg_s400_v03gva";
+       compatible = "amlogic, axg";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x000000 0x40000000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               fb_reserved:linux,meson-fb {
+                       //compatible = "amlogic, fb-memory";
+                       //reg = <0x3e000000 0x1f00000>;
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3e000000 0x2000000>;
+               };
+       };
+       mtd_nand {
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "okay";
+               reg = <0xFFE07800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+
+               /*fip/tpl configurations, must be same
+                * with uboot if bl_mode was set as 1
+                * bl_mode: 0 compact mode; 1 descrete mode
+                * if bl_mode was set as 1, fip configeration will work
+                */
+               bl_mode = <1>;
+               /*copy count of fip*/
+               fip_copies = <4>;
+               /*size of each fip copy */
+               fip_size = <0x200000>;
+               nand_clk_ctrl = <0xFFE07000>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       /*
+                        * if bl_mode is 1, tpl size was generate by
+                        * fip_copies * fip_size which
+                        * will not skip bad when calculating
+                        * the partition size;
+                        *
+                        * if bl_mode is 0,
+                        * tpl partition must be comment out.
+                        */
+                       tpl{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x0>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x11800000>;
+                       };
+                       factory{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+
+       ethmac: ethernet@0xff3f0000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xff3f0000 0x10000
+                       0xff634540 0x8>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH_CORE>;
+                       clock-names = "ethclk81";
+                       internal_phy=<0>;
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <1050>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@ff500000 {
+               compatible = "synopsys, dwc3";
+               status = "okay";
+               reg = <0xff500000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+               clocks = <&clkc CLKID_USB_GENERAL>;
+               clock-names = "dwc_general";
+       };
+
+       usb2_phy: usb2phy@ffe09000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               status = "okay";
+               portnum = <4>;
+               reg = <0xffe09000 0x80
+                                       0xffd01008 0x4>;
+       };
+
+       usb3_phy: usb3phy@ffe09080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               status = "okay";
+               portnum = <0>;
+               reg = <0xffe09080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xff400000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               /*0:default,1:single,2:incr,3:incr4,4:incr8,5:incr16,6:disable*/
+               port-dma = <0>;
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+               controller-type = <3>;
+               phy-reg = <0xffe09000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+       };
+
+       pcie_A: pcieA@f9800000 {
+               compatible = "amlogic, amlogic-pcie", "snps,dw-pcie";
+               reg = <0xf9800000 0x400000
+                               0xff646000 0x2000
+                               0xf9f00000 0x100000
+                               PCIE_PHY_REG PCIE_PHY_SIZE
+                               PCIE_RESET_REG PCIE_RESET_SIZE>;
+               reg-names = "elbi", "cfg", "config", "phy", "reset";
+               reset-gpio = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
+               interrupts = <0 177 0>;
+               #interrupt-cells = <1>;
+               bus-range = <0x0 0xff>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 179 IRQ_TYPE_EDGE_RISING>;
+               device_type = "pci";
+               ranges = <0x82000000 0 0 0xf9c00000 0 0x00300000>;
+                       /* non-prefetchable memory */
+               num-lanes = <1>;
+               pcie-num = <1>;
+
+               clocks = <&clkc CLKID_USB_GENERAL
+               &clkc CLKID_PCIE_PLL
+               &clkc CLKID_MIPI_ENABLE_GATE
+               &clkc CLKID_MIPI_BANDGAP_GATE
+               &clkc CLKID_PCIE_A
+               &clkc CLKID_PCIE_CML_EN0>;
+               clock-names = "pcie_general",
+                               "pcie_refpll",
+                               "pcie_mipi_enable_gate",
+                               "pcie_mipi_bandgap_gate",
+                               "pcie",
+                               "port";
+               /*reset-gpio-type 0:Shared pad(no reset)1:OD pad2:Normal pad*/
+               gpio-type = <2>;
+               status = "okay";
+       };
+
+        pcie_B: pcieB@fa000000 {
+               compatible = "amlogic, amlogic-pcie", "snps,dw-pcie";
+               reg = <0xfa000000 0x400000
+                               0xff648000 0x2000
+                               0xfa400000 0x100000
+                               PCIE_PHY_REG PCIE_PHY_SIZE
+                               PCIE_RESET_REG PCIE_RESET_SIZE>;
+               reg-names = "elbi", "cfg", "config", "phy", "reset";
+               reset-gpio = <&gpio GPIOZ_10 GPIO_ACTIVE_HIGH>;
+               interrupts = <0 167 0>;
+               #interrupt-cells = <1>;
+               bus-range = <0x0 0xff>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
+               device_type = "pci";
+               ranges = <0x81000000 0 0 0xfa500000 0x0 0x10000
+                       /* downstream I/O */
+                       0x82000000 0 0xfa510000 0xfa510000 0 0x002f0000>;
+                       /* non-prefetchable memory */
+               num-lanes = <1>;
+               pcie-num = <2>;
+
+               clocks = <&clkc CLKID_USB_GENERAL
+                               &clkc CLKID_PCIE_PLL
+                               &clkc CLKID_MIPI_ENABLE_GATE
+                               &clkc CLKID_MIPI_BANDGAP_GATE
+                               &clkc CLKID_PCIE_B
+                               &clkc CLKID_PCIE_CML_EN1>;
+               clock-names = "pcie_general",
+                               "pcie_refpll",
+                               "pcie_mipi_enable_gate",
+                               "pcie_mipi_bandgap_gate",
+                               "pcie",
+                               "port";
+               /*reset-gpio-type 0:Shared pad(no reset)1:OD pad2:Normal pad*/
+               gpio-type = <1>;
+               status = "okay";
+       };
+
+
+       uart_A: serial@ffd24000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd24000 0x18>;
+               interrupts = <0 26 1>;
+               status = "okay";
+               clocks = <&xtal
+                       &clkc CLKID_UART0>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 128 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&a_uart_pins>;
+       };
+
+       uart_B: serial@ffd23000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd23000 0x18>;
+               interrupts = <0 75 1>;
+               status = "disable";
+               clocks = <&xtal
+                       &clkc CLKID_UART1>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&b_uart_pins>;
+       };
+
+       meson-irblaster {
+               compatible = "amlogic, am_irblaster";
+               dev_name = "meson-irblaster";
+               status = "disable";
+               pinctrl-names = "default";
+               pinctrl-0 = <&irblaster_pins>;
+       };
+
+       vpu {
+               compatible = "amlogic, vpu-axg";
+               dev_name = "vpu";
+               status = "okay";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_VPU_INTR>,
+                       <&clkc CLKID_VPU_P0_COMP>,
+                       <&clkc CLKID_VPU_P1_COMP>,
+                       <&clkc CLKID_VPU_MUX>;
+               clock-names = "vapb_clk",
+                       "vpu_intr_gate",
+                       "vpu_clk0",
+                       "vpu_clk1",
+                       "vpu_clk";
+               clk_level = <3>;
+               /* 0: 100.0M    1: 166.7M    2: 200.0M    3: 250.0M */
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+       };
+
+       /* Sound iomap */
+       aml_snd_iomap {
+               compatible = "amlogic, snd-iomap";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               pdm_bus {
+                       reg = <0xFF632000 0x2000>;
+               };
+               audiobus_base {
+                       reg = <0xFF642000 0x2000>;
+               };
+       };
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+
+       auge_sound {
+               compatible = "amlogic, axg-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+
+               aml-audio-card,hp-det-gpio = <&gpio GPIOZ_7 GPIO_ACTIVE_LOW>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1>;
+                               dai-tdm-slot-num = <1>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <512000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               /*
+                                * prefix-names = "3101_A", "3101_B",
+                                * "3101_C", "3101_D";
+                                * sound-dai = <&tlv320adc3101_32
+                                * &tlv320adc3101_30
+                                * &tlv320adc3101_34
+                                * &tlv320adc3101_36>;
+                                */
+                               sound-dai = <&tlv320adc3101_32 &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&aml_tdmc>;
+                       //frame-master = <&aml_tdmc>;
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               prefix-names = "5707_A", "5707_B";
+                               sound-dai = <&tas5707_36 &tas5707_3a
+                                               &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <256>;
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               /*
+                                *enable external loopback
+                                *and tlv320adc3101 as loopback
+                                */
+                               /*sound-dai = <&pdm_codec &tlv320adc3101_32>;*/
+                               /*
+                                * enable internal loopback
+                                * or disable loopback
+                                */
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_21       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               interrupts = <  0 67 4>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin2 = <&gpio       GPIOX_16       GPIO_ACTIVE_HIGH>;
+               power_on_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ab MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ab MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@ffe07000 {
+               status = "disabled";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe07000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sdio@ffe05000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe05000 0x2000>;
+               interrupts = <0 217 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+
+       partitions: partitions{
+               parts = <11>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&instaboot>;
+               part-7 = <&boot>;
+               part-8 = <&system>;
+               part-9 = <&cache>;
+               part-10 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               instaboot:instaboot{
+                       pname = "instaboot";
+                       size = <0x0 0x400000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-axg";
+               memory-region = <&fb_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00300000 0x1800000 0x00000000>;
+               /* uboot logo,fb0/fb1 memory size */
+               display_mode_default = "1080p60hz";
+               scale_mode = <0>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <768 1024 768 2048 32>;
+               /*768*1024*4*2 = 0x600000*/
+               mem_alloc = <1>;
+               logo_addr = "0x3e000000";
+               pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+       };
+
+       ge2d {
+               compatible = "amlogic, ge2d-axg";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+               reg = <0xff940000 0x10000>;
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "power", "vol-", "vol+", "wifi", "<<", ">>";
+               key_num = <6>;
+               io-channels = <&saradc SARADC_CH0>;
+               io-channel-names = "key-chan-0";
+               key_chan = <SARADC_CH0 SARADC_CH0 SARADC_CH0
+                                       SARADC_CH0 SARADC_CH0 SARADC_CH0>;
+               key_code = <116 114 115 139 105 106>;
+               key_val = <0 143 266 389 512 635>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40 40>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <6>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_3:key_3{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+       audio_data: audio_data {
+               compatible = "amlogic, audio_data";
+               query_licence_cmd = <0x82000050>;
+               status = "okay";
+       };
+}; /* end of / */
+&efuse {
+       status = "ok";
+};
+
+&pwm_ab {
+       status = "okay";
+};
+/* Audio Related start */
+/* for spk board */
+&i2c1 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&b_i2c_master>;
+
+       tlv320adc3101_32: tlv320adc3101_32@32 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "okay";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "okay";
+               reset_pin = <&gpio_ao GPIOAO_4 0>;
+       };
+
+       tas5707_3a: tas5707_3a@3a {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1d>;
+               status = "okay";
+       };
+};
+
+/* for mic board */
+&i2c_AO {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&ao_i2c_master_pin2>;
+
+       aml_pca9557: aml_pca9557@0x1f {
+               compatible = "amlogic,pca9557_keypad";
+               reg = <0x1f>;
+               key_num = <4>;
+               key_name = "fdr", "hotword", "pause", "mute";
+               key_value = <106 105 139 116>;
+               key_index_mask = <0x4 0x8 0x10 0x20>;
+               key_input_mask = <0x3C>;
+               status = "okay";
+       };
+
+       tlv320adc3101_30: tlv320adc3101_30@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x18>;
+               status = "disable";
+       };
+       tlv320adc3101_34: tlv320adc3101_34@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1a>;
+               status = "disable";
+       };
+       tlv320adc3101_36: tlv320adc3101_36@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disable";
+       };
+
+       es7243_10: es7243_10@10 {
+             compatible = "MicArray_0";
+             #sound-dai-cells = <0>;
+             reg = <0x10>;
+             status = "disable";
+       };
+       es7243_12: es7243_12@12 {
+             compatible = "MicArray_1";
+             #sound-dai-cells = <0>;
+             reg = <0x12>;
+             status = "disable";
+       };
+       es7243_13: es7243_13@13 {
+             compatible = "MicArray_2";
+             #sound-dai-cells = <0>;
+             reg = <0x13>;
+             status = "disable";
+       };
+       cy8c4014_08: cy8c4014_08@08 {
+            compatible = "cy8c4014";
+            #sound-dai-cells = <0>;
+            reg = <0x8>;
+            status = "okay";
+       };
+       is31fl3236a: is31f3236a@0x78 {
+               compatible = "issi,is31fl3236,gva";
+               reg = <0x3c>;
+               status = "okay";
+               led1_b {
+                       label="LED1_B";
+                       reg_offset = <1>;
+               };
+               led1_g {
+                       label="LED1_G";
+                       reg_offset = <2>;
+               };
+               led1_r {
+                       label="LED1_R";
+                       reg_offset = <3>;
+               };
+               led2_b {
+                       label="LED2_B";
+                       reg_offset = <4>;
+               };
+               led2_g {
+                       label="LED2_G";
+                       reg_offset = <5>;
+               };
+               led2_r {
+                       label="LED2_R";
+                       reg_offset = <6>;
+               };
+               led3_b {
+                       label="LED3_B";
+                       reg_offset = <7>;
+               };
+               led3_g {
+                       label="LED3_G";
+                       reg_offset = <8>;
+               };
+               led3_r {
+                       label="LED3_R";
+                       reg_offset = <9>;
+               };
+               led4_b {
+                       label="LED4_B";
+                       reg_offset = <10>;
+               };
+               led4_g {
+                       label="LED4_G";
+                       reg_offset = <11>;
+               };
+               led4_r {
+                       label="LED4_R";
+                       reg_offset = <12>;
+               };
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, axg-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0>;
+               dai-tdm-lane-slot-mask-out = <0 1>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a &tdmout_a_data>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, axg-snd-tdmb";
+               #sound-dai-cells = <0>;
+               /*dai-tdm-lane-slot-mask-in = <1 1 1 1>;*/
+               dai-tdm-lane-slot-mask-in = <0 0 0 1>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, axg-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <0 0 1 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, axg-snd-spdif";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, axg-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+
+               /*
+                * external loopback clock config
+                * enable clk while pdm record data
+                */
+               /*clocks = <&clkc CLKID_MPLL1>;*/
+               /*clock-names = "datalb_mpll";*/
+
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <4>;
+               datain_chmask = <0x3>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+
+               /*if tdmin_lb >= 3, use external loopback*/
+               datalb_src = <2>;
+               datalb_chnum = <2>;
+               /*config which data pin as loopback*/
+               /*datalb-lane-mask-in = <0 0 0 1>;*/
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux {
+                       groups = "tdma_sclk",
+                               "tdma_fs";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmout_a_data: tdmout_a_data {
+               mux {
+                       groups = "tdma_dout1_x15";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux {
+                       groups = "tdma_din0";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk_b";
+                       function = "mclk_b";
+               };
+       };
+
+       tdmout_b: tdmout_b {
+               mux {
+                       groups = "tdmb_sclk",
+                               "tdmb_fs";
+                       function = "tdmb_out";
+               };
+       };
+       // tdmin and tdmout are the same pins. can't use at same time
+       tdmin_b:tdmin_b {
+               mux {
+                       groups = "tdmb_din0",
+                               "tdmb_din1",
+                               "tdmb_din2_a12",
+                               "tdmb_din3_a13";
+                       function = "tdmb_in";
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux {
+                       groups = "mclk_a";
+                       function = "mclk_a";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux {
+                       groups = "tdmc_sclk",
+                               "tdmc_fs",
+                               "tdmc_dout0",
+                               "tdmc_dout2_a6",
+                               "tdmc_dout3_a7";
+                       function = "tdmc_out";
+               };
+       };
+
+
+       tdmin_c:tdmin_c {
+               mux {
+                       groups = "tdmc_din1";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifout: spidfout {
+               mux {
+                       groups = "spdif_out_a20";
+                       function = "spdif_out";
+               };
+       };
+
+       spdifin: spidfin {
+               mux {
+                       groups = "spdif_in_a19";
+                       function = "spdif_in";
+               };
+       };
+
+       pdmin: pdmin {
+               mux {
+                       groups = "pdm_dclk_a14",
+                               "pdm_din0",
+                               "pdm_din1",
+                               "pdm_din2",
+                               "pdm_din3";
+                       function = "pdm";
+               };
+       };
+
+       bl_pwm_on_pins: bl_pwm_on_pin {
+               mux {
+                       groups = "pwm_b_z";
+                       function = "pwm_b";
+               };
+       };
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOZ_4";
+                       function = "gpio_periphs";
+                       output-high;
+               };
+       };
+}; /* end of pinctrl_periphs */
+/* Audio Related End */
+
+&aobus{
+       uart_AO: serial@3000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x3000 0x18>;
+               interrupts = <0 193 1>;
+               status = "okay";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               xtal_tick_en = <1>;
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_uart_pins>;
+               support-sysrq = <0>;    /* 0 not support , 1 support */
+       };
+
+       uart_AO_B: serial@4000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x4000 0x18>;
+               interrupts = <0 197 1>;
+               status = "disable";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_b_uart_pins>;
+       };
+};
+
+&audio_data{
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/axg_s400emmc_512m.dts b/arch/arm/boot/dts/amlogic/axg_s400emmc_512m.dts
new file mode 100644 (file)
index 0000000..d965570
--- /dev/null
@@ -0,0 +1,1331 @@
+/*
+ * arch/arm/boot/dts/amlogic/axg_s400emmc.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesonaxg.dtsi"
+#include "mesonaxg_s400-panel.dtsi"
+#include "partition_mbox_normal.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "axg_s400emmc_512m";
+       compatible = "amlogic, axg";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x000000 0x20000000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               fb_reserved:linux,meson-fb {
+                       //compatible = "amlogic, fb-memory";
+                       //reg = <0x3e000000 0x1f00000>;
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3e000000 0x2000000>;
+               };
+
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+       };
+       mtd_nand {
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disable";
+               reg = <0xFFE07800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+
+               /*fip/tpl configurations, must be same
+                * with uboot if bl_mode was set as 1
+                * bl_mode: 0 compact mode; 1 descrete mode
+                * if bl_mode was set as 1, fip configeration will work
+                */
+               bl_mode = <1>;
+               /*copy count of fip*/
+               fip_copies = <4>;
+               /*size of each fip copy */
+               fip_size = <0x200000>;
+               nand_clk_ctrl = <0xFFE07000>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       /*
+                        * if bl_mode is 1, tpl size was generate by
+                        * fip_copies * fip_size which
+                        * will not skip bad when calculating
+                        * the partition size;
+                        *
+                        * if bl_mode is 0,
+                        * tpl partition must be comment out.
+                        */
+                       tpl{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x0>;
+                       };
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xF00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x11800000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+
+       ethmac: ethernet@0xff3f0000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xff3f0000 0x10000
+                       0xff634540 0x8>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH_CORE>;
+                       clock-names = "ethclk81";
+                       internal_phy=<0>;
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <1050>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@ff500000 {
+               compatible = "synopsys, dwc3";
+               status = "okay";
+               reg = <0xff500000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+               clocks = <&clkc CLKID_USB_GENERAL>;
+               clock-names = "dwc_general";
+       };
+
+       usb2_phy: usb2phy@ffe09000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               status = "okay";
+               portnum = <4>;
+               reg = <0xffe09000 0x80
+                                       0xffd01008 0x4>;
+       };
+
+       usb3_phy: usb3phy@ffe09080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               status = "okay";
+               portnum = <0>;
+               reg = <0xffe09080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xff400000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               /*0:default,1:single,2:incr,3:incr4,4:incr8,5:incr16,6:disable*/
+               port-dma = <0>;
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+               controller-type = <3>;
+               phy-reg = <0xffe09000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+       };
+
+       pcie_A: pcieA@f9800000 {
+               compatible = "amlogic, amlogic-pcie", "snps,dw-pcie";
+               reg = <0xf9800000 0x400000
+                               0xff646000 0x2000
+                               0xf9f00000 0x100000
+                               PCIE_PHY_REG PCIE_PHY_SIZE
+                               PCIE_RESET_REG PCIE_RESET_SIZE>;
+               reg-names = "elbi", "cfg", "config", "phy", "reset";
+               reset-gpio = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
+               interrupts = <0 177 0>;
+               #interrupt-cells = <1>;
+               bus-range = <0x0 0xff>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 179 IRQ_TYPE_EDGE_RISING>;
+               device_type = "pci";
+               ranges = <0x82000000 0 0 0xf9c00000 0 0x00300000>;
+                       /* non-prefetchable memory */
+               num-lanes = <1>;
+               pcie-num = <1>;
+
+               clocks = <&clkc CLKID_USB_GENERAL
+               &clkc CLKID_PCIE_PLL
+               &clkc CLKID_MIPI_ENABLE_GATE
+               &clkc CLKID_MIPI_BANDGAP_GATE
+               &clkc CLKID_PCIE_A
+               &clkc CLKID_PCIE_CML_EN0>;
+               clock-names = "pcie_general",
+                               "pcie_refpll",
+                               "pcie_mipi_enable_gate",
+                               "pcie_mipi_bandgap_gate",
+                               "pcie",
+                               "port";
+               /*reset-gpio-type 0:Shared pad(no reset)1:OD pad2:Normal pad*/
+               gpio-type = <2>;
+               status = "okay";
+       };
+
+        pcie_B: pcieB@fa000000 {
+               compatible = "amlogic, amlogic-pcie", "snps,dw-pcie";
+               reg = <0xfa000000 0x400000
+                               0xff648000 0x2000
+                               0xfa400000 0x100000
+                               PCIE_PHY_REG PCIE_PHY_SIZE
+                               PCIE_RESET_REG PCIE_RESET_SIZE>;
+               reg-names = "elbi", "cfg", "config", "phy", "reset";
+               reset-gpio = <&gpio GPIOZ_10 GPIO_ACTIVE_HIGH>;
+               interrupts = <0 167 0>;
+               #interrupt-cells = <1>;
+               bus-range = <0x0 0xff>;
+               #address-cells = <3>;
+               #size-cells = <2>;
+               interrupt-map-mask = <0 0 0 0>;
+               interrupt-map = <0 0 0 0 &gic GIC_SPI 169 IRQ_TYPE_EDGE_RISING>;
+               device_type = "pci";
+               ranges = <0x81000000 0 0 0xfa500000 0x0 0x10000
+                       /* downstream I/O */
+                       0x82000000 0 0xfa510000 0xfa510000 0 0x002f0000>;
+                       /* non-prefetchable memory */
+               num-lanes = <1>;
+               pcie-num = <2>;
+
+               clocks = <&clkc CLKID_USB_GENERAL
+                               &clkc CLKID_PCIE_PLL
+                               &clkc CLKID_MIPI_ENABLE_GATE
+                               &clkc CLKID_MIPI_BANDGAP_GATE
+                               &clkc CLKID_PCIE_B
+                               &clkc CLKID_PCIE_CML_EN1>;
+               clock-names = "pcie_general",
+                               "pcie_refpll",
+                               "pcie_mipi_enable_gate",
+                               "pcie_mipi_bandgap_gate",
+                               "pcie",
+                               "port";
+               /*reset-gpio-type 0:Shared pad(no reset)1:OD pad2:Normal pad*/
+               gpio-type = <1>;
+               status = "okay";
+       };
+
+
+       uart_A: serial@ffd24000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd24000 0x18>;
+               interrupts = <0 26 1>;
+               status = "okay";
+               clocks = <&xtal
+                       &clkc CLKID_UART0>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 128 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&a_uart_pins>;
+       };
+
+       uart_B: serial@ffd23000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd23000 0x18>;
+               interrupts = <0 75 1>;
+               status = "disable";
+               clocks = <&xtal
+                       &clkc CLKID_UART1>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&b_uart_pins>;
+       };
+
+       vpu {
+               compatible = "amlogic, vpu-axg";
+               dev_name = "vpu";
+               status = "okay";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_VPU_INTR>,
+                       <&clkc CLKID_VPU_P0_COMP>,
+                       <&clkc CLKID_VPU_P1_COMP>,
+                       <&clkc CLKID_VPU_MUX>;
+               clock-names = "vapb_clk",
+                       "vpu_intr_gate",
+                       "vpu_clk0",
+                       "vpu_clk1",
+                       "vpu_clk";
+               clk_level = <3>;
+               /* 0: 100.0M    1: 166.7M    2: 200.0M    3: 250.0M */
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+       };
+
+       /* Sound iomap */
+       aml_snd_iomap {
+               compatible = "amlogic, snd-iomap";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               pdm_bus {
+                       reg = <0xFF632000 0x2000>;
+               };
+               audiobus_base {
+                       reg = <0xFF642000 0x2000>;
+               };
+       };
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+
+       auge_sound {
+               compatible = "amlogic, axg-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               /*
+                                * prefix-names = "3101_A", "3101_B",
+                                * "3101_C", "3101_D";
+                                * sound-dai = <&tlv320adc3101_32
+                                * &tlv320adc3101_30
+                                * &tlv320adc3101_34
+                                * &tlv320adc3101_36>;
+                                */
+                               sound-dai = <&tlv320adc3101_32 &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&aml_tdmc>;
+                       //frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               prefix-names = "5707_A", "5707_B";
+                               sound-dai = <&tas5707_36 &tas5707_3a
+                                               &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               /*
+                                *enable external loopback
+                                *and tlv320adc3101 as loopback
+                                */
+                               /*sound-dai = <&pdm_codec &tlv320adc3101_32>;*/
+                               /*
+                                * enable internal loopback
+                                * or disable loopback
+                                */
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_21       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin2 = <&gpio       GPIOX_16       GPIO_ACTIVE_HIGH>;
+               power_on_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ab MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ab MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@ffe07000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe07000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       tx_delay = <8>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sdio@ffe05000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe05000 0x2000>;
+               interrupts = <0 217 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+
+       partitions: partitions{
+               parts = <14>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&instaboot>;
+               part-7 = <&boot>;
+               part-8 = <&vendor>;
+               part-9 = <&odm>;
+               part-10 = <&system>;
+               part-11 = <&cache>;
+               part-12 = <&udisk>;
+               part-13 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               instaboot:instaboot{
+                       pname = "instaboot";
+                       size = <0x0 0x400000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               vendor:vendor
+               {
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm
+               {
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x82000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               udisk:udisk
+               {
+                       pname = "udisk";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-axg";
+               memory-region = <&fb_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00300000 0x1800000 0x00000000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x0b51000*/
+               display_mode_default = "720p60hz";
+               scale_mode = <0>;
+               /*1280*720*4*2 = 0xA8C000*/
+               display_size_default = <1280 720 1280 1440 32>;
+               /*768*1024*4*2 = 0x600000*/
+               logo_addr = "0x3e000000";
+               pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+       };
+
+       ge2d {
+               compatible = "amlogic, ge2d-axg";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+               reg = <0xff940000 0x10000>;
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "power", "vol-", "vol+", "wifi", "<<", ">>";
+               key_num = <6>;
+               io-channels = <&saradc SARADC_CH0>;
+               io-channel-names = "key-chan-0";
+               key_chan = <SARADC_CH0 SARADC_CH0 SARADC_CH0
+                                       SARADC_CH0 SARADC_CH0 SARADC_CH0>;
+               key_code = <116 114 115 139 105 106>;
+               key_val = <0 143 266 389 512 635>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40 40>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <6>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_3:key_3{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+}; /* end of / */
+&efuse {
+       status = "ok";
+};
+
+&pwm_ab {
+       status = "okay";
+};
+/* Audio Related start */
+/* for spk board */
+&i2c1 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&b_i2c_master>;
+
+       tlv320adc3101_32: tlv320adc3101_32@32 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "okay";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "okay";
+               reset_pin = <&gpio_ao GPIOAO_4 0>;
+       };
+
+       tas5707_3a: tas5707_3a@3a {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1d>;
+               status = "okay";
+       };
+};
+
+/* for mic board */
+&i2c_AO {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&ao_i2c_master_pin2>;
+
+       pca9557: pca9557@0x1f {
+                compatible = "nxp,pca9557";
+                reg = <0x1f>;
+                status = "okay";
+       };
+       tlv320adc3101_30: tlv320adc3101_30@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x18>;
+               status = "disable";
+       };
+       tlv320adc3101_34: tlv320adc3101_34@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1a>;
+               status = "disable";
+       };
+       tlv320adc3101_36: tlv320adc3101_36@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disable";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, axg-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0>;
+               dai-tdm-lane-slot-mask-out = <0 1>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a &tdmout_a_data>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, axg-snd-tdmb";
+               #sound-dai-cells = <0>;
+               /*dai-tdm-lane-slot-mask-in = <1 1 1 1>;*/
+               dai-tdm-lane-slot-mask-in = <0 0 0 1>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, axg-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <0 0 1 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, axg-snd-spdif";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+
+               /*
+                * whether do asrc for pcm.
+                * if raw data, asrc is disabled automatically
+                * 0: "Disable",
+                * 1: "Enable:32K",
+                * 2: "Enable:44K",
+                * 3: "Enable:48K",
+                * 4: "Enable:88K",
+                * 5: "Enable:96K",
+                * 6: "Enable:176K",
+                * 7: "Enable:192K",
+                */
+               auto_asrc = <0>;
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, axg-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * external loopback clock config
+                * enable clk while pdm record data
+                */
+               /*clocks = <&clkc CLKID_MPLL1>;*/
+               /*clock-names = "datalb_mpll";*/
+
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x7f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               /*if tdmin_lb >= 3, use external loopback*/
+               datalb_src = <2>;
+               datalb_chnum = <2>;
+               /*config which data pin as loopback*/
+               /*datalb-lane-mask-in = <0 0 0 1>;*/
+               datalb_chmask = <0x1>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, axg-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A,
+                *      TDMIN_B,
+                *      TDMIN_C,
+                *      SPDIFIN,
+                *      PDMIN,
+                *      NONE,
+                *      TDMIN_LB,
+                *      LOOPBACK,
+                */
+               resample_module = <3>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, axg-power-detect";
+
+               interrupts = <GIC_SPI 91 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "disabled";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux {
+                       groups = "tdma_sclk",
+                               "tdma_fs";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmout_a_data: tdmout_a_data {
+               mux {
+                       groups = "tdma_dout1_x15";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux {
+                       groups = "tdma_din0";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk_b";
+                       function = "mclk_b";
+               };
+       };
+
+       tdmout_b: tdmout_b {
+               mux {
+                       groups = "tdmb_sclk",
+                               "tdmb_fs";
+                       function = "tdmb_out";
+               };
+       };
+       // tdmin and tdmout are the same pins. can't use at same time
+       tdmin_b:tdmin_b {
+               mux {
+                       groups = "tdmb_din0",
+                               "tdmb_din1",
+                               "tdmb_din2_a12",
+                               "tdmb_din3_a13";
+                       function = "tdmb_in";
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux {
+                       groups = "mclk_a";
+                       function = "mclk_a";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux {
+                       groups = "tdmc_sclk",
+                               "tdmc_fs",
+                               "tdmc_dout0",
+                               "tdmc_dout2_a6",
+                               "tdmc_dout3_a7";
+                       function = "tdmc_out";
+               };
+       };
+
+
+       tdmin_c:tdmin_c {
+               mux {
+                       groups = "tdmc_din1";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifout: spidfout {
+               mux {
+                       groups = "spdif_out_a20";
+                       function = "spdif_out";
+               };
+       };
+
+       spdifin: spidfin {
+               mux {
+                       groups = "spdif_in_a19";
+                       function = "spdif_in";
+               };
+       };
+
+       pdmin: pdmin {
+               mux {
+                       groups = "pdm_dclk_a14",
+                               "pdm_din0",
+                               "pdm_din1",
+                               "pdm_din2",
+                               "pdm_din3";
+                       function = "pdm";
+               };
+       };
+
+       bl_pwm_on_pins: bl_pwm_on_pin {
+               mux {
+                       groups = "pwm_b_z";
+                       function = "pwm_b";
+               };
+       };
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOZ_4";
+                       function = "gpio_periphs";
+                       output-high;
+               };
+       };
+}; /* end of pinctrl_periphs */
+/* Audio Related End */
+
+&aobus{
+       uart_AO: serial@3000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x3000 0x18>;
+               interrupts = <0 193 1>;
+               status = "okay";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               xtal_tick_en = <1>;
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_uart_pins>;
+               support-sysrq = <0>;    /* 0 not support , 1 support */
+       };
+
+       uart_AO_B: serial@4000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x4000 0x18>;
+               interrupts = <0 197 1>;
+               status = "disable";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_b_uart_pins>;
+       };
+};
+
+&audio_data{
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/axg_s420_128m.dts b/arch/arm/boot/dts/amlogic/axg_s420_128m.dts
new file mode 100644 (file)
index 0000000..d9be9f0
--- /dev/null
@@ -0,0 +1,1063 @@
+/*
+ * arch/arm/boot/dts/amlogic/axg_s420_128m.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesonaxg.dtsi"
+
+/ {
+       model = "Amlogic";
+       amlogic-dt-id= "axg_s420_128m";
+       compatible = "amlogic, axg";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x000000 0x8000000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x300000>;
+                       alignment = <0x300000>;
+                       alloc-ranges = <0x05000000 0x300000>;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+       };
+       mtd_nand {
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "okay";
+               reg = <0xFFE07800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+
+               /*fip/tpl configurations, must be same
+                * with uboot if bl_mode was set as 1
+                * bl_mode: 0 compact mode; 1 descrete mode
+                * if bl_mode was set as 1, fip configeration will work
+                */
+               bl_mode = <1>;
+               /*copy count of fip*/
+               fip_copies = <4>;
+               /*size of each fip copy */
+               fip_size = <0x200000>;
+               nand_clk_ctrl = <0xFFE07000>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       /*
+                        * if bl_mode is 1, tpl size was generate by
+                        * fip_copies * fip_size which
+                        * will not skip bad when calculating
+                        * the partition size;
+                        *
+                        * if bl_mode is 0,
+                        * tpl partition must be comment out.
+                        */
+                       tpl{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x0>;
+                       };
+                       misc{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xF00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x11800000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <1050>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@ff500000 {
+               compatible = "synopsys, dwc3";
+               status = "okay";
+               reg = <0xff500000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+               clocks = <&clkc CLKID_USB_GENERAL>;
+               clock-names = "dwc_general";
+       };
+
+       usb2_phy: usb2phy@ffe09000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               status = "okay";
+               portnum = <4>;
+               reg = <0xffe09000 0x80
+                                       0xffd01008 0x4>;
+       };
+
+       usb3_phy: usb3phy@ffe09080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               status = "okay";
+               portnum = <0>;
+               reg = <0xffe09080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xff400000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               /*0:default,1:single,2:incr,3:incr4,4:incr8,5:incr16,6:disable*/
+               port-dma = <0>;
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+               controller-type = <3>;
+               phy-reg = <0xffe09000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+       };
+
+       uart_A: serial@ffd24000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd24000 0x18>;
+               interrupts = <0 26 1>;
+               status = "okay";
+               clocks = <&xtal
+                       &clkc CLKID_UART0>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 128 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&a_uart_pins>;
+       };
+
+       uart_B: serial@ffd23000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd23000 0x18>;
+               interrupts = <0 75 1>;
+               status = "disable";
+               clocks = <&xtal
+                       &clkc CLKID_UART1>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&b_uart_pins>;
+       };
+
+       /* Sound iomap */
+       aml_snd_iomap {
+               compatible = "amlogic, snd-iomap";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               pdm_bus {
+                       reg = <0xFF632000 0x2000>;
+               };
+               audiobus_base {
+                       reg = <0xFF642000 0x2000>;
+               };
+       };
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+
+       auge_sound {
+               compatible = "amlogic, axg-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <256>;//512
+                       continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdma>;
+                       frame-master = <&aml_tdma>;
+                       cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                       };
+                       codec {
+                               sound-dai = <&tlv320adc3101_32>;
+                                       /*&tlv320adc3101_30>;*/
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       continuous-clock;
+                       /* tdmb clk using tdmc so no bclk-inv */
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&tas5707_36 &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <256>;
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               /*
+                                *enable external loopback
+                                *and tlv320adc3101 as loopback
+                                */
+                               /*sound-dai = <&pdm_codec &tlv320adc3101_32>;*/
+                               /*
+                                * enable internal loopback
+                                * or disable loopback
+                                */
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_21       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf;    //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ab MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ab MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+       sd_emmc_c: emmc@ffe07000 {
+               status = "disabled";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe07000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       /*caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";*/
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sdio@ffe05000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe05000 0x2000>;
+               interrupts = <0 217 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "power", "vol-", "vol+", "wifi", "<<", ">>";
+               key_num = <6>;
+               io-channels = <&saradc SARADC_CH0>;
+               io-channel-names = "key-chan-0";
+               key_chan = <SARADC_CH0 SARADC_CH0 SARADC_CH0
+                                       SARADC_CH0 SARADC_CH0 SARADC_CH0>;
+               key_code = <116 114 115 139 105 106>;
+               key_val = <0 143 266 389 512 635>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40 40>;
+       };
+
+       partitions: partitions{
+               parts = <11>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&instaboot>;
+               part-7 = <&boot>;
+               part-8 = <&system>;
+               part-9 = <&cache>;
+               part-10 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               instaboot:instaboot{
+                       pname = "instaboot";
+                       size = <0x0 0x400000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <6>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_3:key_3{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+}; /* end of / */
+
+&efuse {
+       status = "ok";
+};
+
+&pwm_ab {
+       status = "okay";
+};
+/* Audio Related start */
+/* for spk board */
+&i2c1 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&b_i2c_master>;
+
+       tlv320adc3101_32: tlv320adc3101_32@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "okay";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "okay";
+               reset_pin = <&gpio_ao GPIOAO_4 0>;
+       };
+
+       tas5707_3a: tas5707_3a@3a {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1d>;
+               status = "disable";
+       };
+};
+
+/* for mic board */
+&i2c_AO {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&ao_i2c_master_pin2>;
+
+       pca9557:pca9557@0x1f {
+               compatible = "nxp,pca9557";
+               reg = <0x1f>;
+               status = "okay";
+       };
+       tlv320adc3101_30: tlv320adc3101_30@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x18>;
+               status = "disable";
+       };
+       tlv320adc3101_34: tlv320adc3101_34@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1a>;
+               status = "disable";
+       };
+       tlv320adc3101_36: tlv320adc3101_36@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disable";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, axg-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0>;
+               dai-tdm-lane-slot-mask-out = <0 1>;
+               /* select tdm lr/bclk src, see aml_axg_tdm.c */
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmin_a &tdmout_a  &tdmout_a_data>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, axg-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, axg-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, axg-snd-spdif";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+
+               /*
+                * whether do asrc for pcm.
+                * if raw data, asrc is disabled automatically
+                * 0: "Disable",
+                * 1: "Enable:32K",
+                * 2: "Enable:44K",
+                * 3: "Enable:48K",
+                * 4: "Enable:88K",
+                * 5: "Enable:96K",
+                * 6: "Enable:176K",
+                * 7: "Enable:192K",
+                */
+               auto_asrc = <0>;
+               status = "okay";
+       };
+
+       aml_pdm: pdm {
+               compatible = "amlogic, axg-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * external loopback clk config
+                * enable clk while pdm record data
+                */
+               /*clocks = <&clkc CLKID_MPLL1>;*/
+               /*clock-names = "datalb_mpll";*/
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x7f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               /*if tdmin_lb >= 3, use external loopback*/
+               datalb_src = <2>;
+               datalb_chnum = <2>;
+               /*config which data pin as loopback*/
+               /*datalb-lane-mask-in = <0 1>;*/
+               datalb_chmask = <0x1>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, axg-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A,
+                *      TDMIN_B,
+                *      TDMIN_C,
+                *      SPDIFIN,
+                *      PDMIN,
+                *      NONE,
+                *      TDMIN_LB,
+                *      LOOPBACK,
+                */
+               resample_module = <3>;
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux {
+                       groups = "tdma_sclk",
+                               "tdma_fs";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmout_a_data: tdmout_a_data {
+               mux {
+                       groups = "tdma_dout1_x15";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux {
+                       groups = "tdma_din0";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk_b";
+                       function = "mclk_b";
+               };
+       };
+
+       tdmout_b: tdmout_b {
+               mux {
+                       groups = "tdmb_sclk",
+                               "tdmb_fs";
+                       function = "tdmb_out";
+               };
+       };
+
+       // tdmin and tdmout are the same pins. can't use at same time
+       /*
+        *tdmin_b:tdmin_b {
+        *      mux {
+        *              groups = "tdmb_din0",
+        *                      "tdmb_din1",
+        *                      "tdmb_din2_a12",
+        *                      "tdmb_din3_a13";
+        *              function = "tdmb_in";
+        *      };
+        *};
+        */
+
+       tdmin_b: tdmin_b {
+               mux {
+                       groups = "tdmb_din0",
+                               "tdmb_din1";
+                       function = "tdmb_in";
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux {
+                       groups = "mclk_a";
+                       function = "mclk_a";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux {
+                       groups = "tdmc_sclk",
+                               "tdmc_fs",
+                               "tdmc_dout0";
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux {
+                       groups = "tdmc_din1";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifout: spidfout {
+               mux {
+                       groups = "spdif_out_a20";
+                       function = "spdif_out";
+               };
+       };
+
+       spdifin: spidfin {
+               mux {
+                       groups = "spdif_in_a19";
+                       function = "spdif_in";
+               };
+       };
+
+       pdmin: pdmin {
+               mux {
+                       groups = "pdm_dclk_a14",
+                               "pdm_din0",
+                               "pdm_din1",
+                               "pdm_din2",
+                               "pdm_din3";
+                       function = "pdm";
+               };
+       };
+}; /* end of pinctrl_periphs */
+/* Audio Related End */
+
+&aobus{
+       uart_AO: serial@3000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x3000 0x18>;
+               interrupts = <0 193 1>;
+               status = "okay";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               xtal_tick_en = <1>;
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_uart_pins>;
+               support-sysrq = <0>;    /* 0 not support , 1 support */
+       };
+
+       uart_AO_B: serial@4000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x4000 0x18>;
+               interrupts = <0 197 1>;
+               status = "disable";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_b_uart_pins>;
+       };
+};
+
+&audio_data{
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/axg_s420_v03.dts b/arch/arm/boot/dts/amlogic/axg_s420_v03.dts
new file mode 100644 (file)
index 0000000..9a308bb
--- /dev/null
@@ -0,0 +1,1202 @@
+/*
+ * arch/arm/boot/dts/amlogic/axg_s420_v03.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesonaxg.dtsi"
+
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "axg_s420_v03";
+       compatible = "amlogic, axg";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x000000 0x20000000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+       };
+       mtd_nand {
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "okay";
+               reg = <0xFFE07800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+
+               /*fip/tpl configurations, must be same
+                * with uboot if bl_mode was set as 1
+                * bl_mode: 0 compact mode; 1 descrete mode
+                * if bl_mode was set as 1, fip configeration will work
+                */
+               bl_mode = <1>;
+               /*copy count of fip*/
+               fip_copies = <4>;
+               /*size of each fip copy */
+               fip_size = <0x200000>;
+               nand_clk_ctrl = <0xFFE07000>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       /*
+                        * if bl_mode is 1, tpl size was generate by
+                        * fip_copies * fip_size which
+                        * will not skip bad when calculating
+                        * the partition size;
+                        *
+                        * if bl_mode is 0,
+                        * tpl partition must be comment out.
+                        */
+                       tpl{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x0>;
+                       };
+                       misc{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xF00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x11800000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <1050>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@ff500000 {
+               compatible = "synopsys, dwc3";
+               status = "okay";
+               reg = <0xff500000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+               clocks = <&clkc CLKID_USB_GENERAL>;
+               clock-names = "dwc_general";
+       };
+
+       usb2_phy: usb2phy@ffe09000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               status = "okay";
+               portnum = <4>;
+               reg = <0xffe09000 0x80
+                                       0xffd01008 0x4>;
+       };
+
+       usb3_phy: usb3phy@ffe09080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               status = "okay";
+               portnum = <0>;
+               reg = <0xffe09080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xff400000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               /*0:default,1:single,2:incr,3:incr4,4:incr8,5:incr16,6:disable*/
+               port-dma = <0>;
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+               controller-type = <3>;
+               phy-reg = <0xffe09000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+       };
+
+       uart_A: serial@ffd24000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd24000 0x18>;
+               interrupts = <0 26 1>;
+               status = "okay";
+               clocks = <&xtal
+                       &clkc CLKID_UART0>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 128 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&a_uart_pins>;
+       };
+
+       uart_B: serial@ffd23000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd23000 0x18>;
+               interrupts = <0 75 1>;
+               status = "disable";
+               clocks = <&xtal
+                       &clkc CLKID_UART1>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&b_uart_pins>;
+       };
+
+       /* Sound iomap */
+       aml_snd_iomap {
+               compatible = "amlogic, snd-iomap";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               pdm_bus {
+                       reg = <0xFF632000 0x2000>;
+               };
+               audiobus_base {
+                       reg = <0xFF642000 0x2000>;
+               };
+       };
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+
+       auge_sound {
+               compatible = "amlogic, axg-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+
+               aml-audio-card,hp-det-gpio = <&gpio GPIOZ_7 GPIO_ACTIVE_LOW>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <256>;//512
+                       continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdma>;
+                       frame-master = <&aml_tdma>;
+                       cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask = <1>;
+                               dai-tdm-slot-rx-mask = <1>;
+                               dai-tdm-slot-num = <1>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <512000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&tlv320adc3101_32>;
+                                       /*&tlv320adc3101_30>;*/
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       continuous-clock;
+                       /* tdmb clk using tdmc so no bclk-inv */
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&tas5707_36 &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <256>;
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               /*
+                                *enable external loopback
+                                *and tlv320adc3101 as loopback
+                                */
+                               /*sound-dai = <&pdm_codec &tlv320adc3101_32>;*/
+                               /*
+                                * enable internal loopback
+                                * or disable loopback
+                                */
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_21       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf;    //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ab MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ab MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+       sd_emmc_c: emmc@ffe07000 {
+               status = "disabled";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe07000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       /*caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";*/
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sdio@ffe05000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe05000 0x2000>;
+               interrupts = <0 217 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "power", "vol-", "vol+", "wifi", "<<", ">>";
+               key_num = <6>;
+               io-channels = <&saradc SARADC_CH0>;
+               io-channel-names = "key-chan-0";
+               key_chan = <SARADC_CH0 SARADC_CH0 SARADC_CH0
+                                       SARADC_CH0 SARADC_CH0 SARADC_CH0>;
+               key_code = <116 114 115 139 105 106>;
+               key_val = <0 143 266 389 512 635>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40 40>;
+       };
+
+       partitions: partitions{
+               parts = <11>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&instaboot>;
+               part-7 = <&boot>;
+               part-8 = <&system>;
+               part-9 = <&cache>;
+               part-10 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               instaboot:instaboot{
+                       pname = "instaboot";
+                       size = <0x0 0x400000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <6>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_3:key_3{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+}; /* end of / */
+
+&efuse {
+       status = "ok";
+};
+
+&pwm_ab {
+       status = "okay";
+};
+/* Audio Related start */
+/* for spk board */
+&i2c1 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&b_i2c_master>;
+
+       tlv320adc3101_32: tlv320adc3101_32@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "okay";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "okay";
+               reset_pin = <&gpio_ao GPIOAO_4 0>;
+       };
+
+       tas5707_3a: tas5707_3a@3a {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1d>;
+               status = "disable";
+       };
+};
+
+/* for mic board */
+&i2c_AO {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&ao_i2c_master_pin2>;
+
+       aml_pca9557: aml_pca9557@0x1f {
+               compatible = "aml, ledring";
+               reg = <0x1f>;
+               mode = <0>; /*0: 6-led 1: 4key+2led */
+               key_num = <4>;
+               led_dev_name = "aml_ledring";
+               key_dev_name = "aml_pca_key";
+               key_name = "mute", "pause", "vol+", "vol-";
+               key_value = <200 201 202 203>;
+               status = "okay";
+       };
+
+       tlv320adc3101_30: tlv320adc3101_30@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x18>;
+               status = "disable";
+       };
+       tlv320adc3101_34: tlv320adc3101_34@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1a>;
+               status = "disable";
+       };
+       tlv320adc3101_36: tlv320adc3101_36@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disable";
+       };
+       es7243_10: es7243_10@10 {
+               compatible = "MicArray_0";
+               #sound-dai-cells = <0>;
+               reg = <0x10>;
+               status = "disable";
+       };
+       es7243_12: es7243_12@12 {
+               compatible = "MicArray_1";
+               #sound-dai-cells = <0>;
+               reg = <0x12>;
+               status = "disable";
+       };
+       es7243_13: es7243_13@13 {
+               compatible = "MicArray_2";
+               #sound-dai-cells = <0>;
+               reg = <0x13>;
+               status = "disable";
+       };
+       is31fl3236a: is31f3236a@0x78 {
+               compatible = "issi,is31fl3236";
+               reg = <0x3c>;
+               status = "disable";
+               led1_r {
+                       label="LED1_R";
+                       reg_offset = <24>;
+               };
+               led1_g {
+                       label="LED1_G";
+                       reg_offset = <23>;
+               };
+               led1_b {
+                       label="LED1_B";
+                       reg_offset = <22>;
+               };
+               led2_r {
+                       label="LED2_R";
+                       reg_offset = <21>;
+               };
+               led2_g {
+                       label="LED2_G";
+                       reg_offset = <20>;
+               };
+               led2_b {
+                       label="LED2_B";
+                       reg_offset = <19>;
+               };
+               led3_r {
+                       label="LED3_R";
+                       reg_offset = <18>;
+               };
+               led3_g {
+                       label="LED3_G";
+                       reg_offset = <17>;
+               };
+               led3_b {
+                       label="LED3_B";
+                       reg_offset = <16>;
+               };
+               led4_r {
+                       label="LED4_R";
+                       reg_offset = <15>;
+               };
+               led4_g {
+                       label="LED4_G";
+                       reg_offset = <14>;
+               };
+               led4_b {
+                       label="LED4_B";
+                       reg_offset = <13>;
+               };
+               led5_r {
+                       label="LED5_R";
+                       reg_offset = <36>;
+               };
+               led5_g {
+                       label="LED5_G";
+                       reg_offset = <35>;
+               };
+               led5_b {
+                       label="LED5_B";
+                       reg_offset = <34>;
+               };
+               led6_r {
+                       label="LED6_R";
+                       reg_offset = <33>;
+               };
+               led6_g {
+                       label="LED6_G";
+                       reg_offset = <32>;
+               };
+               led6_b {
+                       label="LED6_B";
+                       reg_offset = <31>;
+               };
+               led7_r {
+                       label="LED7_R";
+                       reg_offset = <30>;
+               };
+               led7_g {
+                       label="LED7_G";
+                       reg_offset = <29>;
+               };
+               led7_b {
+                       label="LED7_B";
+                       reg_offset = <28>;
+               };
+               led8_r {
+                       label="LED8_R";
+                       reg_offset = <27>;
+               };
+               led8_g {
+                       label="LED8_G";
+                       reg_offset = <26>;
+               };
+               led8_b {
+                       label="LED8_B";
+                       reg_offset = <25>;
+               };
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, axg-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0>;
+               dai-tdm-lane-slot-mask-out = <0 1>;
+               /* select tdm lr/bclk src, see aml_axg_tdm.c */
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmin_a &tdmout_a  &tdmout_a_data>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, axg-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, axg-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, axg-snd-spdif";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+
+               /*
+                * whether do asrc for pcm.
+                * if raw data, asrc is disabled automatically
+                * 0: "Disable",
+                * 1: "Enable:32K",
+                * 2: "Enable:44K",
+                * 3: "Enable:48K",
+                * 4: "Enable:88K",
+                * 5: "Enable:96K",
+                * 6: "Enable:176K",
+                * 7: "Enable:192K",
+                */
+               auto_asrc = <0>;
+               status = "okay";
+       };
+
+       aml_pdm: pdm {
+               compatible = "amlogic, axg-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * external loopback clk config
+                * enable clk while pdm record data
+                */
+               /*clocks = <&clkc CLKID_MPLL1>;*/
+               /*clock-names = "datalb_mpll";*/
+
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x7f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+
+               /*if tdmin_lb >= 3, use external loopback*/
+               datalb_src = <2>;
+               datalb_chnum = <2>;
+               /*config which data pin as loopback*/
+               /*datalb-lane-mask-in = <0 1>;*/
+               datalb_chmask = <0x1>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, axg-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A,
+                *      TDMIN_B,
+                *      TDMIN_C,
+                *      SPDIFIN,
+                *      PDMIN,
+                *      NONE,
+                *      TDMIN_LB,
+                *      LOOPBACK,
+                */
+               resample_module = <3>;
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux {
+                       groups = "tdma_sclk",
+                               "tdma_fs";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmout_a_data: tdmout_a_data {
+               mux {
+                       groups = "tdma_dout1_x15";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux {
+                       groups = "tdma_din0";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk_b";
+                       function = "mclk_b";
+               };
+       };
+
+       tdmout_b: tdmout_b {
+               mux {
+                       groups = "tdmb_sclk",
+                               "tdmb_fs";
+                       function = "tdmb_out";
+               };
+       };
+
+       // tdmin and tdmout are the same pins. can't use at same time
+       /*
+        *tdmin_b:tdmin_b {
+        *      mux {
+        *              groups = "tdmb_din0",
+        *                      "tdmb_din1",
+        *                      "tdmb_din2_a12",
+        *                      "tdmb_din3_a13";
+        *              function = "tdmb_in";
+        *      };
+        *};
+        */
+
+       tdmin_b: tdmin_b {
+               mux {
+                       groups = "tdmb_din0",
+                               "tdmb_din1";
+                       function = "tdmb_in";
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux {
+                       groups = "mclk_a";
+                       function = "mclk_a";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux {
+                       groups = "tdmc_sclk",
+                               "tdmc_fs",
+                               "tdmc_dout0";
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux {
+                       groups = "tdmc_din1";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifout: spidfout {
+               mux {
+                       groups = "spdif_out_a20";
+                       function = "spdif_out";
+               };
+       };
+
+       spdifin: spidfin {
+               mux {
+                       groups = "spdif_in_a19";
+                       function = "spdif_in";
+               };
+       };
+
+       pdmin: pdmin {
+               mux {
+                       groups = "pdm_dclk_a14",
+                               "pdm_din0",
+                               "pdm_din1",
+                               "pdm_din2",
+                               "pdm_din3";
+                       function = "pdm";
+               };
+       };
+}; /* end of pinctrl_periphs */
+/* Audio Related End */
+
+&aobus{
+       uart_AO: serial@3000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x3000 0x18>;
+               interrupts = <0 193 1>;
+               status = "okay";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               xtal_tick_en = <1>;
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_uart_pins>;
+               support-sysrq = <0>;    /* 0 not support , 1 support */
+       };
+
+       uart_AO_B: serial@4000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x4000 0x18>;
+               interrupts = <0 197 1>;
+               status = "disable";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_b_uart_pins>;
+       };
+};
+&audio_data{
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/axg_s420_v03gva.dts b/arch/arm/boot/dts/amlogic/axg_s420_v03gva.dts
new file mode 100644 (file)
index 0000000..2a72e9d
--- /dev/null
@@ -0,0 +1,1135 @@
+/*
+ * arch/arm/boot/dts/amlogic/axg_s420_v03gva.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesonaxg.dtsi"
+
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "axg_s420_v03gva";
+       compatible = "amlogic, axg";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x000000 0x20000000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+       };
+       mtd_nand {
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "okay";
+               reg = <0xFFE07800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+
+               /*fip/tpl configurations, must be same
+                * with uboot if bl_mode was set as 1
+                * bl_mode: 0 compact mode; 1 descrete mode
+                * if bl_mode was set as 1, fip configeration will work
+                */
+               bl_mode = <1>;
+               /*copy count of fip*/
+               fip_copies = <4>;
+               /*size of each fip copy */
+               fip_size = <0x200000>;
+               nand_clk_ctrl = <0xFFE07000>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch8_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       /*
+                        * if bl_mode is 1, tpl size was generate by
+                        * fip_copies * fip_size which
+                        * will not skip bad when calculating
+                        * the partition size;
+                        *
+                        * if bl_mode is 0,
+                        * tpl partition must be comment out.
+                        */
+                       tpl{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x0>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x11800000>;
+                       };
+                       factory{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <1050>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@ff500000 {
+               compatible = "synopsys, dwc3";
+               status = "okay";
+               reg = <0xff500000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+               clocks = <&clkc CLKID_USB_GENERAL>;
+               clock-names = "dwc_general";
+       };
+
+       usb2_phy: usb2phy@ffe09000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               status = "okay";
+               portnum = <4>;
+               reg = <0xffe09000 0x80
+                                       0xffd01008 0x4>;
+       };
+
+       usb3_phy: usb3phy@ffe09080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               status = "okay";
+               portnum = <0>;
+               reg = <0xffe09080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xff400000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               /*0:default,1:single,2:incr,3:incr4,4:incr8,5:incr16,6:disable*/
+               port-dma = <0>;
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+               controller-type = <3>;
+               phy-reg = <0xffe09000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+       };
+
+       uart_A: serial@ffd24000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd24000 0x18>;
+               interrupts = <0 26 1>;
+               status = "okay";
+               clocks = <&xtal
+                       &clkc CLKID_UART0>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 128 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&a_uart_pins>;
+       };
+
+       uart_B: serial@ffd23000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xffd23000 0x18>;
+               interrupts = <0 75 1>;
+               status = "disable";
+               clocks = <&xtal
+                       &clkc CLKID_UART1>;
+               clock-names = "clk_uart",
+                       "clk_gate";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&b_uart_pins>;
+       };
+
+       meson-irblaster {
+               compatible = "amlogic, am_irblaster";
+               dev_name = "meson-irblaster";
+               status = "disable";
+               pinctrl-names = "default";
+               pinctrl-0 = <&irblaster_pins>;
+       };
+
+       /* Sound iomap */
+       aml_snd_iomap {
+               compatible = "amlogic, snd-iomap";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               pdm_bus {
+                       reg = <0xFF632000 0x2000>;
+               };
+               audiobus_base {
+                       reg = <0xFF642000 0x2000>;
+               };
+       };
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+
+       auge_sound {
+               compatible = "amlogic, axg-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+
+               aml-audio-card,hp-det-gpio = <&gpio GPIOZ_7 GPIO_ACTIVE_LOW>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <256>;//512
+                       continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdma>;
+                       frame-master = <&aml_tdma>;
+                       cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask = <1>;
+                               dai-tdm-slot-rx-mask = <1>;
+                               dai-tdm-slot-num = <1>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <512000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&tlv320adc3101_32>;
+                                       /*&tlv320adc3101_30>;*/
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       continuous-clock;
+                       /* tdmb clk using tdmc so no bclk-inv */
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&tas5707_36 &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <256>;
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               /*
+                                *enable external loopback
+                                *and tlv320adc3101 as loopback
+                                */
+                               /*sound-dai = <&pdm_codec &tlv320adc3101_32>;*/
+                               /*
+                                * enable internal loopback
+                                * or disable loopback
+                                */
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               /*aml-audio-card,dai-link@4 {
+                *      mclk-fs = <128>;
+                *      cpu {
+                *              sound-dai = <&aml_spdif>;
+                *      };
+                *      codec {
+                *              sound-dai = <&dummy_codec>;
+                *      };
+                *};
+                */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_21       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf;    //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ab MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ab MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+       sd_emmc_c: emmc@ffe07000 {
+               status = "disabled";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe07000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       /*caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";*/
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sdio@ffe05000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-axg";
+               reg = <0xffe05000 0x2000>;
+               interrupts = <0 217 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "power", "vol-", "vol+", "wifi", "<<", ">>";
+               key_num = <6>;
+               io-channels = <&saradc SARADC_CH0>;
+               io-channel-names = "key-chan-0";
+               key_chan = <SARADC_CH0 SARADC_CH0 SARADC_CH0
+                                       SARADC_CH0 SARADC_CH0 SARADC_CH0>;
+               key_code = <116 114 115 139 105 106>;
+               key_val = <0 143 266 389 512 635>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40 40>;
+       };
+
+       partitions: partitions{
+               parts = <11>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&instaboot>;
+               part-7 = <&boot>;
+               part-8 = <&system>;
+               part-9 = <&cache>;
+               part-10 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               instaboot:instaboot{
+                       pname = "instaboot";
+                       size = <0x0 0x400000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <6>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_3:key_3{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+       audio_data: audio_data {
+               compatible = "amlogic, audio_data";
+               query_licence_cmd = <0x82000050>;
+               status = "okay";
+       };
+}; /* end of / */
+
+&efuse {
+       status = "ok";
+};
+
+&pwm_ab {
+       status = "okay";
+};
+/* Audio Related start */
+/* for spk board */
+&i2c1 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&b_i2c_master>;
+
+       tlv320adc3101_32: tlv320adc3101_32@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "okay";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "okay";
+               reset_pin = <&gpio_ao GPIOAO_4 0>;
+       };
+
+       tas5707_3a: tas5707_3a@3a {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1d>;
+               status = "disable";
+       };
+};
+
+/* for mic board */
+&i2c_AO {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&ao_i2c_master_pin2>;
+
+       aml_pca9557: aml_pca9557@0x1f {
+               compatible = "amlogic,pca9557_keypad";
+               reg = <0x1f>;
+               key_num = <4>;
+               key_name = "fdr", "hotword", "pause", "mute";
+               key_value = <106 105 139 116>;
+               key_index_mask = <0x4 0x8 0x10 0x20>;
+               key_input_mask = <0x3C>;
+               status = "okay";
+       };
+
+       tlv320adc3101_30: tlv320adc3101_30@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x18>;
+               status = "disable";
+       };
+       tlv320adc3101_34: tlv320adc3101_34@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1a>;
+               status = "disable";
+       };
+       tlv320adc3101_36: tlv320adc3101_36@30 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disable";
+       };
+       es7243_10: es7243_10@10 {
+             compatible = "MicArray_0";
+             #sound-dai-cells = <0>;
+             reg = <0x10>;
+             status = "disable";
+       };
+       es7243_12: es7243_12@12 {
+             compatible = "MicArray_1";
+             #sound-dai-cells = <0>;
+             reg = <0x12>;
+             status = "disable";
+       };
+       es7243_13: es7243_13@13 {
+             compatible = "MicArray_2";
+             #sound-dai-cells = <0>;
+             reg = <0x13>;
+             status = "disable";
+       };
+       cy8c4014_08: cy8c4014_08@08 {
+            compatible = "cy8c4014";
+            #sound-dai-cells = <0>;
+            reg = <0x8>;
+            status = "okay";
+       };
+       is31fl3236a: is31f3236a@0x78 {
+               compatible = "issi,is31fl3236,gva";
+               reg = <0x3c>;
+               status = "okay";
+               led1_b {
+                       label="LED1_B";
+                       reg_offset = <1>;
+               };
+               led1_g {
+                       label="LED1_G";
+                       reg_offset = <2>;
+               };
+               led1_r {
+                       label="LED1_R";
+                       reg_offset = <3>;
+               };
+               led2_b {
+                       label="LED2_B";
+                       reg_offset = <4>;
+               };
+               led2_g {
+                       label="LED2_G";
+                       reg_offset = <5>;
+               };
+               led2_r {
+                       label="LED2_R";
+                       reg_offset = <6>;
+               };
+               led3_b {
+                       label="LED3_B";
+                       reg_offset = <7>;
+               };
+               led3_g {
+                       label="LED3_G";
+                       reg_offset = <8>;
+               };
+               led3_r {
+                       label="LED3_R";
+                       reg_offset = <9>;
+               };
+               led4_b {
+                       label="LED4_B";
+                       reg_offset = <10>;
+               };
+               led4_g {
+                       label="LED4_G";
+                       reg_offset = <11>;
+               };
+               led4_r {
+                       label="LED4_R";
+                       reg_offset = <12>;
+               };
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, axg-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0>;
+               dai-tdm-lane-slot-mask-out = <0 1>;
+               /* select tdm lr/bclk src, see aml_axg_tdm.c */
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmin_a &tdmout_a  &tdmout_a_data>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, axg-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, axg-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, axg-snd-spdif";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+
+       aml_pdm: pdm {
+               compatible = "amlogic, axg-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * external loopback clk config
+                * enable clk while pdm record data
+                */
+               /*clocks = <&clkc CLKID_MPLL1>;*/
+               /*clock-names = "datalb_mpll";*/
+
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <4>;
+               datain_chmask = <0x3>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+
+               /*if tdmin_lb >= 3, use external loopback*/
+               datalb_src = <2>;
+               datalb_chnum = <2>;
+               /*config which data pin as loopback*/
+               /*datalb-lane-mask-in = <0 1>;*/
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux {
+                       groups = "tdma_sclk",
+                               "tdma_fs";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmout_a_data: tdmout_a_data {
+               mux {
+                       groups = "tdma_dout1_x15";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux {
+                       groups = "tdma_din0";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk_b";
+                       function = "mclk_b";
+               };
+       };
+
+       tdmout_b: tdmout_b {
+               mux {
+                       groups = "tdmb_sclk",
+                               "tdmb_fs";
+                       function = "tdmb_out";
+               };
+       };
+
+       // tdmin and tdmout are the same pins. can't use at same time
+       /*
+        *tdmin_b:tdmin_b {
+        *      mux {
+        *              groups = "tdmb_din0",
+        *                      "tdmb_din1",
+        *                      "tdmb_din2_a12",
+        *                      "tdmb_din3_a13";
+        *              function = "tdmb_in";
+        *      };
+        *};
+        */
+
+       tdmin_b: tdmin_b {
+               mux {
+                       groups = "tdmb_din0",
+                               "tdmb_din1";
+                       function = "tdmb_in";
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux {
+                       groups = "mclk_a";
+                       function = "mclk_a";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux {
+                       groups = "tdmc_sclk",
+                               "tdmc_fs",
+                               "tdmc_dout0";
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux {
+                       groups = "tdmc_din1";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifout: spidfout {
+               mux {
+                       groups = "spdif_out_a20";
+                       function = "spdif_out";
+               };
+       };
+
+       spdifin: spidfin {
+               mux {
+                       groups = "spdif_in_a19";
+                       function = "spdif_in";
+               };
+       };
+
+       pdmin: pdmin {
+               mux {
+                       groups = "pdm_dclk_a14",
+                               "pdm_din0",
+                               "pdm_din1",
+                               "pdm_din2",
+                               "pdm_din3";
+                       function = "pdm";
+               };
+       };
+}; /* end of pinctrl_periphs */
+/* Audio Related End */
+
+&aobus{
+       uart_AO: serial@3000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x3000 0x18>;
+               interrupts = <0 193 1>;
+               status = "okay";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               xtal_tick_en = <1>;
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_uart_pins>;
+               support-sysrq = <0>;    /* 0 not support , 1 support */
+       };
+
+       uart_AO_B: serial@4000 {
+               compatible = "amlogic, meson-uart";
+               reg = <0x4000 0x18>;
+               interrupts = <0 197 1>;
+               status = "disable";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_b_uart_pins>;
+       };
+};
+&audio_data{
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/g12a_pxp.dts b/arch/arm/boot/dts/amlogic/g12a_pxp.dts
new file mode 100644 (file)
index 0000000..28c98cb
--- /dev/null
@@ -0,0 +1,729 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12a_pxp.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12a.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12a";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12a";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12a */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+               performance_revB_telecom = <0x1bf0  0x9
+                       0x1b56  0x546
+                       0x1b12  0x8080
+                       0x1b05  0x9
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <0>;
+               status = "disabled";
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "disabled";
+       };
+       /* Audio Related end */
+
+       /*DCDC for MP8756GD*/
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1908000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_ao_d_pins3>;
+               status = "okay";
+       };
+
+
+}; /* end of / */
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x7f800000";
+       mem_alloc = <1>;
+       pxp_mode = <1>; /** 0:normal mode 1:pxp mode */
+};
+
+&pwm_AO_cd {
+               status = "okay";
+       };
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0>;
+               dai-tdm-lane-slot-mask-out = <0 1>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 1 1 1>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk /*&tdmout_b &tdmin_b*/>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout_b>;
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "disabled";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_8 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout1";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_9 */
+                       groups = "tdma_din0";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOZ_8 */
+                       groups = "mclk1_z";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* gpioz_7, gpioz_6, GPIOZ_2, GPIOZ_4, GPIOZ_5*/
+                       groups = "tdmc_sclk_z",
+                               "tdmc_fs_z",
+                               "tdmc_dout0_z"
+                               /*,"tdmc_dout2_z",
+                                *"tdmc_dout3_z"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOZ_3 */
+                       groups = "tdmc_din1_z";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* gpioa_10 */
+                       groups = "spdif_in_a10";
+                       function = "spdif_in";
+               };
+       };
+
+       spdifout: spdifout {
+               mux {/* gpioa_11 */
+                       groups = "spdif_out_a11";
+                       function = "spdif_out";
+               };
+       };
+
+       spdifout_b: spdifout_b {
+               mux { /* gpioa_13 */
+                       groups = "spdif_out_a13";
+                       function = "spdif_out";
+               };
+       };
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       "pdm_din1_a",
+                       "pdm_din2_a",
+                       "pdm_din3_a",
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+}; /* end of pinctrl_periphs */
+
+&pinctrl_aobus {
+       tdmout_b: tdmout_b {
+               mux { /* GPIOAO_7, GPIOAO_8, GPIOAO_4 */
+                       groups = "tdmb_fs_ao",
+                               "tdmb_fs_ao",
+                               "tdmb_dout0_ao";
+                       function = "tdmb_out_ao";
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux {
+                       groups = "tdmb_din2_ao";
+                       function = "tdmb_in_ao";
+               };
+       };
+};  /* end of pinctrl_aobus */
+/* Audio Related End */
+
+&aobus{
+
+};
+
+&irblaster {
+       status = "disabled";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+&sd_emmc_b1 {
+       status = "okay";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_NONREMOVABLE"; /**ptm debug */
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+
+&defendkey {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/g12a_s905d2_skt.dts b/arch/arm/boot/dts/amlogic/g12a_s905d2_skt.dts
new file mode 100644 (file)
index 0000000..398dccf
--- /dev/null
@@ -0,0 +1,1298 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12a_s905d2_skt.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12a.dtsi"
+#include "partition_mbox_normal.dtsi"
+#include "mesong12a_skt-panel.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12a";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12a";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               /* clk path */
+               /* 0:vid_pll vid2_clk */
+               /* 1:gp0_pll vid2_clk */
+               /* 2:vid_pll vid1_clk */
+               /* 3:gp0_pll vid1_clk */
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12a */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+               performance_revB_telecom = <0x1bf0  0x9
+                       0x1b56  0x546
+                       0x1b12  0x8080
+                       0x1b05  0x9
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio       GPIOX_19       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+               aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";// "dsp_a";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               /*
+                                * dai-tdm-slot-tx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-rx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-num = <8>;
+                                */
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                               &amlogic_codec &ad82584f_62>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&tlv320adc3101_32 &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /* spdif_b to hdmi, only playback */
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdifb2hdmi";
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       /*DCDC for MP8756GD*/
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_ao_d_pins3>;
+               status = "okay";
+       };
+
+}; /* end of / */
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x7f800000";
+       mem_alloc = <0>;
+       pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+};
+
+&pwm_AO_cd {
+               status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       gt9xx@5d {
+               compatible = "goodix,gt9xx";
+               status = "disabled";
+               reg = <0x5d>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+       };
+
+       ftxx@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+               x_max = <600>;
+               y_max = <1024>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "okay";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tlv320adc3101_32: tlv320adc3101_32@32 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "okay";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       bl_extern_i2c {
+               compatible = "amlogic, bl_extern_i2c";
+               status = "disabled";
+               reg = <0x2c>; /*reg_address for lp8556*/
+               dev_name = "lp8556";
+       };
+
+       lcd_extern_i2c0: lcd_extern_i2c@0 {
+               compatible = "lcd_ext, i2c";
+               dev_name = "i2c_LT8912_0";
+               reg = <0x48>;
+               status = "disabled";
+       };
+
+       lcd_extern_i2c1: lcd_extern_i2c@1 {
+               compatible = "lcd_ext, i2c";
+               dev_name = "i2c_LT8912_1";
+               reg = <0x49>;
+               status = "disabled";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <4>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "disabled";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_10, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_9 */
+                       groups = "tdmc_din1_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       /*
+        * spdifout: spdifout {
+        *      mux {
+        *              groups = "spdif_out_h";
+        *              function = "spdif_out";
+        *      };
+        *};
+        */
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOH_5";
+                       function = "gpio_periphs";
+                       output-high;
+               };
+       };
+
+}; /* end of pinctrl_periphs */
+&pinctrl_aobus {
+       spdifout: spdifout {
+               mux { /* gpiao_10 */
+                       groups = "spdif_out_ao";
+                       function = "spdif_out_ao";
+               };
+       };
+};  /* end of pinctrl_aobus */
+
+&audio_data {
+       status = "okay";
+};
+
+/* Audio Related End */
+
+&spicc0 {
+       status = "disabled";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spicc0_pins_x>;
+       cs-gpios = <&gpio GPIOX_10 0>;
+};
+
+&spicc1 {
+       status = "disabled";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spicc1_pins>;
+       cs-gpios = <&gpio GPIOH_6 0>;
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <0>;
+       otg = <1>;
+       gpio-vbus-power = "GPIOH_6";
+       gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <3>;
+};
+&ethmac {
+       status = "okay";
+       pinctrl-names = "internal_eth_pins", "internal_gpio_pins";
+       pinctrl-0 = <&internal_eth_pins>;
+       pinctrl-1 = <&internal_gpio_pins>;
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b1 {
+       status = "disable";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_b2 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "disabled";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "disable";
+};
+
+&meson_cooldev {
+       status = "okay";
+};
+
+&defendkey {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/g12a_s905d2_skt_buildroot.dts b/arch/arm/boot/dts/amlogic/g12a_s905d2_skt_buildroot.dts
new file mode 100644 (file)
index 0000000..5565a1c
--- /dev/null
@@ -0,0 +1,1240 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12a_s905d2_skt_buildroot.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12a.dtsi"
+#include "partition_mbox_normal.dtsi"
+#include "mesong12a_skt-panel.dtsi"
+#include "mesong12a_drm.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12a";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12a";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12a */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+               performance_revB_telecom = <0x1bf0  0x9
+                       0x1b56  0x546
+                       0x1b12  0x8080
+                       0x1b05  0x9
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio       GPIOX_19       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+               aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";// "dsp_a";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               /*
+                                * dai-tdm-slot-tx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-rx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-num = <8>;
+                                */
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                               &amlogic_codec /*&ad82584f_62*/>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       /*DCDC for MP8756GD*/
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_ao_d_pins3>;
+               status = "okay";
+       };
+
+}; /* end of / */
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x7f800000";
+       mem_alloc = <1>;
+       pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       gt9xx@5d {
+               compatible = "goodix,gt9xx";
+               status = "disabled";
+               reg = <0x5d>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+       };
+
+       ftxx@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+               x_max = <600>;
+               y_max = <1024>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "okay";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       bl_extern_i2c {
+               compatible = "amlogic, bl_extern_i2c";
+               status = "disabled";
+               reg = <0x2c>; /*reg_address for lp8556*/
+               dev_name = "lp8556";
+       };
+
+       lcd_extern_i2c0: lcd_extern_i2c@0 {
+               compatible = "lcd_ext, i2c";
+               dev_name = "i2c_LT8912_0";
+               reg = <0x48>;
+               status = "disabled";
+       };
+
+       lcd_extern_i2c1: lcd_extern_i2c@1 {
+               compatible = "lcd_ext, i2c";
+               dev_name = "i2c_LT8912_1";
+               reg = <0x49>;
+               status = "disabled";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <4>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_10, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_9 */
+                       groups = "tdmc_din1_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       /*
+        * spdifout: spdifout {
+        *      mux {
+        *              groups = "spdif_out_h";
+        *              function = "spdif_out";
+        *      };
+        *};
+        */
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOH_5";
+                       function = "gpio_periphs";
+                       output-high;
+               };
+       };
+
+}; /* end of pinctrl_periphs */
+&pinctrl_aobus {
+       spdifout: spdifout {
+               mux { /* gpiao_10 */
+                       groups = "spdif_out_ao";
+                       function = "spdif_out_ao";
+               };
+       };
+};  /* end of pinctrl_aobus */
+
+&audio_data {
+       status = "okay";
+};
+
+/* Audio Related End */
+
+&spicc0 {
+       status = "disabled";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spicc0_pins_x>;
+       cs-gpios = <&gpio GPIOX_10 0>;
+};
+
+&spicc1 {
+       status = "disabled";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spicc1_pins>;
+       cs-gpios = <&gpio GPIOH_6 0>;
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <0>;
+       otg = <1>;
+       gpio-vbus-power = "GPIOH_6";
+       gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <3>;
+};
+&ethmac {
+       status = "okay";
+       pinctrl-names = "internal_eth_pins";
+       pinctrl-0 = <&internal_eth_pins>;
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /*"MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b1 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_b2 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "disabled";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&meson_cooldev {
+       status = "okay";
+};
+
+&defendkey {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/g12a_s905d2_u200_buildroot.dts b/arch/arm/boot/dts/amlogic/g12a_s905d2_u200_buildroot.dts
new file mode 100644 (file)
index 0000000..cecbd80
--- /dev/null
@@ -0,0 +1,1374 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12a_s905d2_u200.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12a.dtsi"
+#include "mesong12a_skt-panel.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12a";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               sys_led {
+                       label="sys_led";
+                       gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
+                       default-state ="on";
+                       retain-state-suspended;
+                       linux,default-trigger="cpu0";
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12a";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12a */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+               performance_revB_telecom = <0x1bf0  0x9
+                       0x1b56  0x546
+                       0x1b12  0x8080
+                       0x1b05  0x9
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio       GPIOX_19       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       gpio_keypad{
+               compatible = "amlogic, gpio_keypad";
+               status = "okay";
+               scan_period = <20>;
+               key_num = <1>;
+               key_name = "power";
+               key_code = <116>;
+               key-gpios = <&gpio_ao  GPIOAO_3  GPIO_ACTIVE_HIGH>;
+               detect_mode = <0>;/*0:polling mode, 1:irq mode*/
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "vol-", "vol+", "enter";
+               key_num = <3>;
+               io-channels = <&saradc SARADC_CH2>;
+               io-channel-names = "key-chan-2";
+               key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2>;
+               key_code = <114 115 28>;
+               key_val = <143 266 389>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40>;
+       };
+
+       partitions: partitions{
+               parts = <14>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&misc>;
+               part-3 = <&dto>;
+               part-4 = <&cri_data>;
+               part-5 = <&param>;
+               part-6 = <&boot>;
+               part-7 = <&rsv>;
+               part-8 = <&tee>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&system>;
+               part-12 = <&cache>;
+               part-13 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x1800000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               dto:dto{
+                       pname = "dto";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               cri_data:cri_data{
+                       pname = "cri_data";
+                       size = <0x0 0x800000>;
+                       mask = <2>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               param:param{
+                       pname = "param";
+                       size = <0x0 0x1000000>;
+                       mask = <2>;
+               };
+               boot:boot{
+                       pname = "boot";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               vendor:vendor{
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm{
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               system:system{
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache{
+                       pname = "cache";
+                       size = <0x0 0x46000000>;
+                       mask = <2>;
+               };
+               data:data{
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <14>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+               aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";// "dsp_a";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               /*
+                                * dai-tdm-slot-tx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-rx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-num = <8>;
+                                */
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                               &amlogic_codec &ad82584f_62>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&tlv320adc3101_32 &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /* spdif_b to hdmi, only playback */
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdifb2hdmi";
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       /*DCDC for MP8756GD*/
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_ao_d_pins3>;
+               status = "okay";
+       };
+
+}; /* end of / */
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x7f800000";
+       mem_alloc = <1>;
+       pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+};
+
+&pwm_AO_cd {
+               status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       gt9xx@5d {
+               compatible = "goodix,gt9xx";
+               status = "disabled";
+               reg = <0x5d>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+       };
+
+       ftxx@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+               x_max = <600>;
+               y_max = <1024>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "okay";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tlv320adc3101_32: tlv320adc3101_32@32 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "okay";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       bl_extern_i2c {
+               compatible = "bl_extern, i2c";
+               dev_name = "lp8556";
+               reg = <0x2c>;
+               status = "disabled";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <3>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_10 */
+                       groups = "tdmc_din0_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       /*
+        * spdifout: spdifout {
+        *      mux {
+        *              groups = "spdif_out_h";
+        *              function = "spdif_out";
+        *      };
+        *};
+        */
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOH_5";
+                       function = "gpio_periphs";
+                       output-high;
+               };
+       };
+
+
+}; /* end of pinctrl_periphs */
+&pinctrl_aobus {
+       spdifout: spdifout {
+               mux { /* gpiao_10 */
+                       groups = "spdif_out_ao";
+                       function = "spdif_out_ao";
+               };
+       };
+};  /* end of pinctrl_aobus */
+
+&audio_data {
+       status = "okay";
+};
+
+/* Audio Related End */
+
+&pwm_ef {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <1>;
+       otg = <1>;
+       gpio-vbus-power = "GPIOH_6";
+       gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <3>;
+};
+&ethmac {
+       status = "okay";
+       pinctrl-names = "internal_eth_pins";
+       pinctrl-0 = <&internal_eth_pins>;
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b1 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_b2 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "disabled";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "disable";
+};
+
+&meson_cooldev {
+       status = "okay";
+};
+
+&defendkey {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/g12a_s905d2_u200_buildroot_vccktest.dts b/arch/arm/boot/dts/amlogic/g12a_s905d2_u200_buildroot_vccktest.dts
new file mode 100644 (file)
index 0000000..8815f07
--- /dev/null
@@ -0,0 +1,1393 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12a_s905d2_u200.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12a.dtsi"
+#include "mesong12a_skt-panel.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12a";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       sustainable-power = <1460>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               sys_led {
+                       label="sys_led";
+                       gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
+                       default-state ="on";
+                       retain-state-suspended;
+                       linux,default-trigger="cpu0";
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12a";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12a */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+               performance_revB_telecom = <0x1bf0  0x9
+                       0x1b56  0x546
+                       0x1b12  0x8080
+                       0x1b05  0x9
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio       GPIOX_19       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       gpio_keypad{
+               compatible = "amlogic, gpio_keypad";
+               status = "okay";
+               scan_period = <20>;
+               key_num = <1>;
+               key_name = "power";
+               key_code = <116>;
+               key-gpios = <&gpio_ao  GPIOAO_3  GPIO_ACTIVE_HIGH>;
+               detect_mode = <0>;/*0:polling mode, 1:irq mode*/
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "vol-", "vol+", "enter";
+               key_num = <3>;
+               io-channels = <&saradc SARADC_CH2>;
+               io-channel-names = "key-chan-2";
+               key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2>;
+               key_code = <114 115 28>;
+               key_val = <143 266 389>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40>;
+       };
+
+       partitions: partitions{
+               parts = <14>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&misc>;
+               part-3 = <&dto>;
+               part-4 = <&cri_data>;
+               part-5 = <&param>;
+               part-6 = <&boot>;
+               part-7 = <&rsv>;
+               part-8 = <&tee>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&system>;
+               part-12 = <&cache>;
+               part-13 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x1800000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               dto:dto{
+                       pname = "dto";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               cri_data:cri_data{
+                       pname = "cri_data";
+                       size = <0x0 0x800000>;
+                       mask = <2>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               param:param{
+                       pname = "param";
+                       size = <0x0 0x1000000>;
+                       mask = <2>;
+               };
+               boot:boot{
+                       pname = "boot";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               vendor:vendor{
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm{
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               system:system{
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache{
+                       pname = "cache";
+                       size = <0x0 0x46000000>;
+                       mask = <2>;
+               };
+               data:data{
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <14>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+               aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";// "dsp_a";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               /*
+                                * dai-tdm-slot-tx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-rx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-num = <8>;
+                                */
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                               &amlogic_codec &ad82584f_62>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&tlv320adc3101_32 &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /* spdif_b to hdmi, only playback */
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdifb2hdmi";
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       /*DCDC for MP8756GD*/
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+               opp11 {
+                       opp-hz = /bits/ 64 <1908000000>;
+                       opp-microvolt = <1010000>;
+               };
+               opp12 {
+                       opp-hz = /bits/ 64 <2016000000>;
+                       opp-microvolt = <1010000>;
+               };
+               opp13 {
+                       opp-hz = /bits/ 64 <2100000000>;
+                       opp-microvolt = <1010000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_ao_d_pins3>;
+               status = "okay";
+       };
+
+}; /* end of / */
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x7f800000";
+       mem_alloc = <1>;
+       pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+};
+
+&pwm_AO_cd {
+               status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       gt9xx@5d {
+               compatible = "goodix,gt9xx";
+               status = "disabled";
+               reg = <0x5d>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+       };
+
+       ftxx@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+               x_max = <600>;
+               y_max = <1024>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "okay";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tlv320adc3101_32: tlv320adc3101_32@32 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "okay";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       bl_extern_i2c {
+               compatible = "amlogic, bl_extern_i2c";
+               status = "disabled";
+               reg = <0x2c>; /*reg_address for lp8556*/
+               dev_name = "lp8556";
+       };
+       lcd_extern_i2c {
+               compatible = "amlogic, lcd_i2c_T5800Q";
+               status = "disabled";
+               reg = <0x1c>; /*reg_address for i2c_T5800Q*/
+               dev_name = "i2c_T5800Q";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <3>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_10 */
+                       groups = "tdmc_din0_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       /*
+        * spdifout: spdifout {
+        *      mux {
+        *              groups = "spdif_out_h";
+        *              function = "spdif_out";
+        *      };
+        *};
+        */
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOH_5";
+                       function = "gpio_periphs";
+                       output-high;
+               };
+       };
+
+
+}; /* end of pinctrl_periphs */
+&pinctrl_aobus {
+       spdifout: spdifout {
+               mux { /* gpiao_10 */
+                       groups = "spdif_out_ao";
+                       function = "spdif_out_ao";
+               };
+       };
+};  /* end of pinctrl_aobus */
+
+&audio_data {
+       status = "okay";
+};
+
+/* Audio Related End */
+
+&pwm_ef {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <1>;
+       otg = <1>;
+       gpio-vbus-power = "GPIOH_6";
+       gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <3>;
+};
+&ethmac {
+       status = "okay";
+       pinctrl-names = "internal_eth_pins";
+       pinctrl-0 = <&internal_eth_pins>;
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b1 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_b2 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "disabled";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "disable";
+};
+
+&meson_cooldev {
+       status = "disbaled";
+};
+
+&defendkey {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/g12a_s905d2_u200_drm_buildroot.dts b/arch/arm/boot/dts/amlogic/g12a_s905d2_u200_drm_buildroot.dts
new file mode 100644 (file)
index 0000000..9f3f0a5
--- /dev/null
@@ -0,0 +1,1391 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12a_s905d2_u200.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12a.dtsi"
+#include "mesong12a_skt-panel.dtsi"
+#include "mesong12a_drm.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12a";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               sys_led {
+                       label="sys_led";
+                       gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
+                       default-state ="on";
+                       retain-state-suspended;
+                       linux,default-trigger="cpu0";
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12a";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12a */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+               performance_revB_telecom = <0x1bf0  0x9
+                       0x1b56  0x546
+                       0x1b12  0x8080
+                       0x1b05  0x9
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio       GPIOX_19       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       gpio_keypad{
+               compatible = "amlogic, gpio_keypad";
+               status = "okay";
+               scan_period = <20>;
+               key_num = <1>;
+               key_name = "power";
+               key_code = <116>;
+               key-gpios = <&gpio_ao  GPIOAO_3  GPIO_ACTIVE_HIGH>;
+               detect_mode = <0>;/*0:polling mode, 1:irq mode*/
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "vol-", "vol+", "enter";
+               key_num = <3>;
+               io-channels = <&saradc SARADC_CH2>;
+               io-channel-names = "key-chan-2";
+               key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2>;
+               key_code = <114 115 28>;
+               key_val = <143 266 389>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40>;
+       };
+
+       partitions: partitions{
+               parts = <14>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&misc>;
+               part-3 = <&dto>;
+               part-4 = <&cri_data>;
+               part-5 = <&param>;
+               part-6 = <&boot>;
+               part-7 = <&rsv>;
+               part-8 = <&tee>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&system>;
+               part-12 = <&cache>;
+               part-13 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x1800000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               dto:dto{
+                       pname = "dto";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               cri_data:cri_data{
+                       pname = "cri_data";
+                       size = <0x0 0x800000>;
+                       mask = <2>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               param:param{
+                       pname = "param";
+                       size = <0x0 0x1000000>;
+                       mask = <2>;
+               };
+               boot:boot{
+                       pname = "boot";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               vendor:vendor{
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm{
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               system:system{
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache{
+                       pname = "cache";
+                       size = <0x0 0x46000000>;
+                       mask = <2>;
+               };
+               data:data{
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <14>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+               aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";// "dsp_a";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               /*
+                                * dai-tdm-slot-tx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-rx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-num = <8>;
+                                */
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                               &amlogic_codec &ad82584f_62>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&tlv320adc3101_32 &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /* spdif_b to hdmi, only playback */
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdifb2hdmi";
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       /*DCDC for MP8756GD*/
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_ao_d_pins3>;
+               status = "okay";
+       };
+
+}; /* end of / */
+
+&meson_fb {
+       status = "disable";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x7f800000";
+       mem_alloc = <1>;
+       pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+};
+
+&drm_vpu {
+       status = "okay";
+       logo_addr = "0x7f800000";
+};
+
+&drm_amhdmitx {
+       status = "okay";
+       hdcp = "disabled";
+};
+
+&drm_lcd {
+       status = "okay";
+};
+
+&pwm_AO_cd {
+               status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       gt9xx@5d {
+               compatible = "goodix,gt9xx";
+               status = "disabled";
+               reg = <0x5d>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+       };
+
+       ftxx@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+               x_max = <600>;
+               y_max = <1024>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "okay";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tlv320adc3101_32: tlv320adc3101_32@32 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "okay";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       bl_extern_i2c {
+               compatible = "bl_extern, i2c";
+               dev_name = "lp8556";
+               reg = <0x2c>;
+               status = "disabled";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <3>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_10 */
+                       groups = "tdmc_din0_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       /*
+        * spdifout: spdifout {
+        *      mux {
+        *              groups = "spdif_out_h";
+        *              function = "spdif_out";
+        *      };
+        *};
+        */
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOH_5";
+                       function = "gpio_periphs";
+                       output-high;
+               };
+       };
+
+
+}; /* end of pinctrl_periphs */
+&pinctrl_aobus {
+       spdifout: spdifout {
+               mux { /* gpiao_10 */
+                       groups = "spdif_out_ao";
+                       function = "spdif_out_ao";
+               };
+       };
+};  /* end of pinctrl_aobus */
+
+&audio_data {
+       status = "okay";
+};
+
+/* Audio Related End */
+
+&pwm_ef {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <1>;
+       otg = <1>;
+       gpio-vbus-power = "GPIOH_6";
+       gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <3>;
+};
+&ethmac {
+       status = "okay";
+       pinctrl-names = "internal_eth_pins";
+       pinctrl-0 = <&internal_eth_pins>;
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b1 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_b2 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+
+&sd_emmc_a {
+       status = "disabled";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "disable";
+};
+
+&meson_cooldev {
+       status = "okay";
+};
+
+&defendkey {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/g12a_s905x2_u211.dts b/arch/arm/boot/dts/amlogic/g12a_s905x2_u211.dts
new file mode 100644 (file)
index 0000000..6c64e2c
--- /dev/null
@@ -0,0 +1,1342 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12a_s905x2_u211.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12a.dtsi"
+#include "partition_mbox_normal.dtsi"
+
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "g12a_s905x2_u211";
+       compatible = "amlogic, g12a";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       dummy-battery {
+               compatible = "amlogic, dummy-battery";
+               status = "okay";
+       };
+
+       dummy-charger {
+               compatible = "amlogic, dummy-charger";
+               status = "okay";
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               net_red {
+                       label="net_red";
+                       gpios=<&gpio GPIOA_14 GPIO_ACTIVE_LOW>;
+                       default-state ="on";
+               };
+
+               net_green {
+                       label="net_green";
+                       gpios=<&gpio GPIOA_15 GPIO_ACTIVE_HIGH>;
+                       default-state ="on";
+               };
+
+               remote_led {
+                       label = "remote_led";
+                       gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+                       linux,default-trigger = "rc_feedback";
+               };
+
+               sys_led {
+                       label="sys_led";
+                       gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>;
+                       default-state ="on";
+                       retain-state-suspended;
+                       linux,default-trigger="cpu0";
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12a";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12a */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+               performance_revB_telecom = <0x1bf0  0x9
+                       0x1b56  0x546
+                       0x1b12  0x8080
+                       0x1b05  0x9
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio       GPIOX_19       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+       dvb{
+           compatible = "amlogic, dvb";
+               dev_name = "dvb";
+               status = "ok";
+               /*"parallel","serial","disable"*/
+               ts2 = "parallel";
+               ts2_control = <0>;
+               ts2_invert = <0>;
+       };
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+               aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";// "dsp_a";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               /*
+                                * dai-tdm-slot-tx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-rx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-num = <8>;
+                                */
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                                       &amlogic_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdifb2hdmi";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /* spdif_b to hdmi, only playback */
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /*
+                * dai link for i2s to hdmix,
+                * Notice to select a tdm lane not used by hw
+                */
+               /*
+                * aml-audio-card,dai-link@6 {
+                * format = "i2s";
+                * mclk-fs = <256>;
+                * //continuous-clock;
+                * //bitclock-inversion;
+                * //frame-inversion;
+                * bitclock-master = <&aml_i2s2hdmi>;
+                * frame-master = <&aml_i2s2hdmi>;
+                * suffix-name = "alsaPORT-i2s2hdmi";
+                * cpu {
+                * sound-dai = <&aml_i2s2hdmi>;
+                * dai-tdm-slot-tx-mask = <1 1>;
+                * dai-tdm-slot-num = <2>;
+                * dai-tdm-slot-width = <32>;
+                * system-clock-frequency = <12288000>;
+                * };
+                * codec {
+                * sound-dai = <&dummy_codec>;
+                * };
+                * };
+                */
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       /*DCDC for SY8120B1ABC*/
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <871000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <921000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_ao_d_pins3>;
+               status = "okay";
+       };
+
+}; /* end of / */
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x7f800000";
+       mem_alloc = <0>;
+       pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+};
+
+&pwm_AO_cd {
+               status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       gt9xx@5d {
+               compatible = "goodix,gt9xx";
+               status = "disabled";
+               reg = <0x5d>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+       };
+
+       ftxx@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+               x_max = <600>;
+               y_max = <1024>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "disabled";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       bl_extern_i2c {
+               compatible = "amlogic, bl_extern_i2c";
+               status = "disabled";
+               reg = <0x2c>; /*reg_address for lp8556*/
+               dev_name = "lp8556";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <3>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       /* copy a useless tdm to output for hdmi, no pinmux */
+       aml_i2s2hdmi: i2s2hdmi {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 1 1 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+
+               i2s2hdmi = <1>;
+
+               status = "disabled";
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "disabled";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_10, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_9 */
+                       groups = "tdmc_din1_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       spdifout: spdifout {
+               mux {
+                       groups = "spdif_out_h";
+                       function = "spdif_out";
+               };
+       };
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+
+}; /* end of pinctrl_periphs */
+&pinctrl_aobus {
+       /*gpiao_10*/
+       /*spdifout: spdifout {                    */
+       /*      mux {                                             */
+       /*              groups = "spdif_out_ao";  */
+       /*              function = "spdif_out_ao";*/
+       /*      };                                                        */
+       /*};                                                      */
+};  /* end of pinctrl_aobus */
+
+&audio_data {
+       status = "okay";
+};
+
+/* Audio Related End */
+
+&pwm_ef {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <1>;
+       otg = <0>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <1>;
+};
+&ethmac {
+       status = "okay";
+       pinctrl-names = "internal_eth_pins", "internal_gpio_pins";
+       pinctrl-0 = <&internal_eth_pins>;
+       pinctrl-1 = <&internal_gpio_pins>;
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b1 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_b2 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "disabled";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "disable";
+};
+
+&meson_cooldev {
+       status = "okay";
+};
+
+&saradc {
+       status = "disabled";
+};
+
+&defendkey {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/g12a_s905x2_u211_1g.dts b/arch/arm/boot/dts/amlogic/g12a_s905x2_u211_1g.dts
new file mode 100644 (file)
index 0000000..6bca2a5
--- /dev/null
@@ -0,0 +1,1327 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12a_s905x2_u211.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12a.dtsi"
+#include "partition_mbox_normal.dtsi"
+
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "g12a_s905x2_u211_1g";
+       compatible = "amlogic, g12a";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x3ff00000>;
+
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0xc000000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       dummy-battery {
+               compatible = "amlogic, dummy-battery";
+               status = "okay";
+       };
+
+       dummy-charger {
+               compatible = "amlogic, dummy-charger";
+               status = "okay";
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               net_red {
+                       label="net_red";
+                       gpios=<&gpio GPIOA_14 GPIO_ACTIVE_LOW>;
+                       default-state ="on";
+               };
+
+               net_green {
+                       label="net_green";
+                       gpios=<&gpio GPIOA_15 GPIO_ACTIVE_HIGH>;
+                       default-state ="on";
+               };
+
+               remote_led {
+                       label = "remote_led";
+                       gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+                       linux,default-trigger = "rc_feedback";
+               };
+
+               sys_led {
+                       label="sys_led";
+                       gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>;
+                       default-state ="on";
+                       retain-state-suspended;
+                       linux,default-trigger="cpu0";
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12a";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* g12a */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+               performance_telecom = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio       GPIOX_19       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+       dvb{
+           compatible = "amlogic, dvb";
+               dev_name = "dvb";
+               status = "ok";
+               /*"parallel","serial","disable"*/
+               ts2 = "parallel";
+               ts2_control = <0>;
+               ts2_invert = <0>;
+       };
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+       };
+
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+               aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";// "dsp_a";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               /*
+                                * dai-tdm-slot-tx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-rx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-num = <8>;
+                                */
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                                       &amlogic_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdifb2hdmi";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /* spdif_b to hdmi, only playback */
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /*
+                * dai link for i2s to hdmix,
+                * Notice to select a tdm lane not used by hw
+                */
+               /*
+                * aml-audio-card,dai-link@6 {
+                * format = "i2s";
+                * mclk-fs = <256>;
+                * //continuous-clock;
+                * //bitclock-inversion;
+                * //frame-inversion;
+                * bitclock-master = <&aml_i2s2hdmi>;
+                * frame-master = <&aml_i2s2hdmi>;
+                * suffix-name = "alsaPORT-i2s2hdmi";
+                * cpu {
+                * sound-dai = <&aml_i2s2hdmi>;
+                * dai-tdm-slot-tx-mask = <1 1>;
+                * dai-tdm-slot-num = <2>;
+                * dai-tdm-slot-width = <32>;
+                * system-clock-frequency = <12288000>;
+                * };
+                * codec {
+                * sound-dai = <&dummy_codec>;
+                * };
+                * };
+                */
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <871000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <921000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_ao_d_pins3>;
+               status = "okay";
+       };
+
+}; /* end of / */
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x3f800000";
+       mem_alloc = <0>;
+       pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+};
+
+&pwm_AO_cd {
+               status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       gt9xx@5d {
+               compatible = "goodix,gt9xx";
+               status = "disabled";
+               reg = <0x5d>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+       };
+
+       ftxx@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+               x_max = <600>;
+               y_max = <1024>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "disabled";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       bl_extern_i2c {
+               compatible = "amlogic, bl_extern_i2c";
+               status = "disabled";
+               reg = <0x2c>; /*reg_address for lp8556*/
+               dev_name = "lp8556";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <3>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       /* copy a useless tdm to output for hdmi, no pinmux */
+       aml_i2s2hdmi: i2s2hdmi {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 1 1 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+
+               i2s2hdmi = <1>;
+
+               status = "disabled";
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_10, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_9 */
+                       groups = "tdmc_din1_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       spdifout: spdifout {
+               mux {
+                       groups = "spdif_out_h";
+                       function = "spdif_out";
+               };
+       };
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+
+}; /* end of pinctrl_periphs */
+&pinctrl_aobus {
+       /*gpiao_10*/
+       /*spdifout: spdifout {                    */
+       /*      mux {                                             */
+       /*              groups = "spdif_out_ao";  */
+       /*              function = "spdif_out_ao";*/
+       /*      };                                                        */
+       /*};                                                      */
+};  /* end of pinctrl_aobus */
+
+&audio_data {
+       status = "okay";
+};
+
+/* Audio Related End */
+
+&pwm_ef {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <1>;
+       otg = <0>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <1>;
+};
+&ethmac {
+       status = "okay";
+       pinctrl-names = "internal_eth_pins";
+       pinctrl-0 = <&internal_eth_pins>;
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b1 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_b2 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "disabled";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "disable";
+};
+
+&meson_cooldev {
+       status = "okay";
+};
+
+&saradc {
+       status = "disabled";
+};
diff --git a/arch/arm/boot/dts/amlogic/g12a_s905x2_u211_512m.dts b/arch/arm/boot/dts/amlogic/g12a_s905x2_u211_512m.dts
new file mode 100644 (file)
index 0000000..17c9066
--- /dev/null
@@ -0,0 +1,1328 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12a_s905x2_u211_512m.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12a.dtsi"
+#include "partition_mbox_normal.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12a";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0 0x20000000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x1f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x4000000>;
+                       alignment = <0x400000>;
+               };
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x0>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x4400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x0>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x0>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               net_red {
+                       label="net_red";
+                       gpios=<&gpio GPIOA_14 GPIO_ACTIVE_LOW>;
+                       default-state ="on";
+               };
+
+               net_green {
+                       label="net_green";
+                       gpios=<&gpio GPIOA_15 GPIO_ACTIVE_HIGH>;
+                       default-state ="on";
+               };
+
+               remote_led {
+                       label = "remote_led";
+                       gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+                       linux,default-trigger = "rc_feedback";
+               };
+
+               sys_led {
+                       label="sys_led";
+                       gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>;
+                       default-state ="on";
+                       retain-state-suspended;
+                       linux,default-trigger="cpu0";
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12a";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12a */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+               performance_revB_telecom = <0x1bf0  0x9
+                       0x1b56  0x546
+                       0x1b12  0x8080
+                       0x1b05  0x9
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio       GPIOX_19       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "disable";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+       dvb{
+           compatible = "amlogic, dvb";
+               dev_name = "dvb";
+               status = "ok";
+               /*"parallel","serial","disable"*/
+               ts2 = "parallel";
+               ts2_control = <0>;
+               ts2_invert = <0>;
+       };
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+       };
+
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+               aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";// "dsp_a";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               /*
+                                * dai-tdm-slot-tx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-rx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-num = <8>;
+                                */
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                                       &amlogic_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdifb2hdmi";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /* spdif_b to hdmi, only playback */
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /*
+                * dai link for i2s to hdmix,
+                * Notice to select a tdm lane not used by hw
+                */
+               /*
+                * aml-audio-card,dai-link@6 {
+                * format = "i2s";
+                * mclk-fs = <256>;
+                * //continuous-clock;
+                * //bitclock-inversion;
+                * //frame-inversion;
+                * bitclock-master = <&aml_i2s2hdmi>;
+                * frame-master = <&aml_i2s2hdmi>;
+                * suffix-name = "alsaPORT-i2s2hdmi";
+                * cpu {
+                * sound-dai = <&aml_i2s2hdmi>;
+                * dai-tdm-slot-tx-mask = <1 1>;
+                * dai-tdm-slot-num = <2>;
+                * dai-tdm-slot-width = <32>;
+                * system-clock-frequency = <12288000>;
+                * };
+                * codec {
+                * sound-dai = <&dummy_codec>;
+                * };
+                * };
+                */
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       /*DCDC for SY8120B1ABC*/
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <871000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <921000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_ao_d_pins3>;
+               status = "okay";
+       };
+
+}; /* end of / */
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x1f800000";
+       mem_alloc = <0>;
+       pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+};
+
+&pwm_AO_cd {
+               status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       gt9xx@5d {
+               compatible = "goodix,gt9xx";
+               status = "disabled";
+               reg = <0x5d>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+       };
+
+       ftxx@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+               x_max = <600>;
+               y_max = <1024>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "disabled";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       bl_extern_i2c {
+               compatible = "amlogic, bl_extern_i2c";
+               status = "disabled";
+               reg = <0x2c>; /*reg_address for lp8556*/
+               dev_name = "lp8556";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <3>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       /* copy a useless tdm to output for hdmi, no pinmux */
+       aml_i2s2hdmi: i2s2hdmi {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 1 1 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+
+               i2s2hdmi = <1>;
+
+               status = "disabled";
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "disabled";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_10, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_9 */
+                       groups = "tdmc_din1_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       spdifout: spdifout {
+               mux {
+                       groups = "spdif_out_h";
+                       function = "spdif_out";
+               };
+       };
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+
+}; /* end of pinctrl_periphs */
+&pinctrl_aobus {
+       /*gpiao_10*/
+       /*spdifout: spdifout {                    */
+       /*      mux {                                             */
+       /*              groups = "spdif_out_ao";  */
+       /*              function = "spdif_out_ao";*/
+       /*      };                                                        */
+       /*};                                                      */
+};  /* end of pinctrl_aobus */
+
+&audio_data {
+       status = "okay";
+};
+
+/* Audio Related End */
+
+&pwm_ef {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <1>;
+       otg = <0>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <1>;
+};
+&ethmac {
+       status = "okay";
+       pinctrl-names = "internal_eth_pins";
+       pinctrl-0 = <&internal_eth_pins>;
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "disable";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "disable";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b1 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_b2 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "disabled";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "disable";
+};
+
+&meson_cooldev {
+       status = "okay";
+};
+
+&saradc {
+       status = "disabled";
+};
+
+&defendkey {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/g12a_s905x2_u211_buildroot.dts b/arch/arm/boot/dts/amlogic/g12a_s905x2_u211_buildroot.dts
new file mode 100644 (file)
index 0000000..ba27ad5
--- /dev/null
@@ -0,0 +1,1364 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12a_s905x2_u211_buildroot.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12a.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12a";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               net_red {
+                       label="net_red";
+                       gpios=<&gpio GPIOA_14 GPIO_ACTIVE_LOW>;
+                       default-state ="on";
+               };
+
+               net_green {
+                       label="net_green";
+                       gpios=<&gpio GPIOA_15 GPIO_ACTIVE_HIGH>;
+                       default-state ="on";
+               };
+
+               remote_led {
+                       label = "remote_led";
+                       gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+                       linux,default-trigger = "rc_feedback";
+               };
+
+               sys_led {
+                       label="sys_led";
+                       gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>;
+                       default-state ="on";
+                       retain-state-suspended;
+                       linux,default-trigger="cpu0";
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12a";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12a */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+               performance_telecom = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio       GPIOX_19       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+
+       partitions: partitions{
+               parts = <14>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&misc>;
+               part-3 = <&dto>;
+               part-4 = <&cri_data>;
+               part-5 = <&param>;
+               part-6 = <&boot>;
+               part-7 = <&rsv>;
+               part-8 = <&tee>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&system>;
+               part-12 = <&cache>;
+               part-13 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x1800000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               dto:dto{
+                       pname = "dto";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               cri_data:cri_data{
+                       pname = "cri_data";
+                       size = <0x0 0x800000>;
+                       mask = <2>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               param:param{
+                       pname = "param";
+                       size = <0x0 0x1000000>;
+                       mask = <2>;
+               };
+               boot:boot{
+                       pname = "boot";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               vendor:vendor{
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm{
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               system:system{
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache{
+                       pname = "cache";
+                       size = <0x0 0x46000000>;
+                       mask = <2>;
+               };
+               data:data{
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-g12a";
+               /*memory-region = <&logo_reserved>;*/
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 56 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "viu2-vsync", "rdma";
+               mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 2160 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+               mem_alloc = <1>;
+               logo_addr = "0x3f800000";
+               clocks = <&clkc CLKID_VPU_CLKC_MUX>;
+               clock-names = "vpu_clkc";
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+               aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";// "dsp_a";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               /*
+                                * dai-tdm-slot-tx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-rx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-num = <8>;
+                                */
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                                       &amlogic_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /* spdif_b to hdmi, only playback */
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdifb2hdmi";
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       /*DCDC for SY8120B1ABC*/
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_ao_d_pins3>;
+               status = "okay";
+       };
+
+}; /* end of / */
+
+&pwm_AO_cd {
+               status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       gt9xx@5d {
+               compatible = "goodix,gt9xx";
+               status = "disabled";
+               reg = <0x5d>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+       };
+
+       ftxx@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+               x_max = <600>;
+               y_max = <1024>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "disabled";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       bl_extern_i2c {
+               compatible = "amlogic, bl_extern_i2c";
+               status = "disabled";
+               reg = <0x2c>; /*reg_address for lp8556*/
+               dev_name = "lp8556";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <3>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_10, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_9 */
+                       groups = "tdmc_din1_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       spdifout: spdifout {
+               mux {
+                       groups = "spdif_out_h";
+                       function = "spdif_out";
+               };
+       };
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+
+}; /* end of pinctrl_periphs */
+&pinctrl_aobus {
+       /*gpiao_10*/
+       /*spdifout: spdifout {                    */
+       /*      mux {                                             */
+       /*              groups = "spdif_out_ao";  */
+       /*              function = "spdif_out_ao";*/
+       /*      };                                                        */
+       /*};                                                      */
+};  /* end of pinctrl_aobus */
+
+&audio_data {
+       status = "okay";
+};
+
+/* Audio Related End */
+
+&pwm_ef {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <1>;
+       otg = <0>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <1>;
+};
+&ethmac {
+       status = "okay";
+       pinctrl-names = "internal_eth_pins";
+       pinctrl-0 = <&internal_eth_pins>;
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b1 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_b2 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "disabled";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "disable";
+};
+
+&meson_cooldev {
+       status = "okay";
+};
+
+&defendkey {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/g12a_s905x2_u212_buildroot.dts b/arch/arm/boot/dts/amlogic/g12a_s905x2_u212_buildroot.dts
new file mode 100644 (file)
index 0000000..f70de86
--- /dev/null
@@ -0,0 +1,1364 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12a_s905x2_u212_buildroot.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12a.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12a";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               net_red {
+                       label="net_red";
+                       gpios=<&gpio GPIOA_14 GPIO_ACTIVE_LOW>;
+                       default-state ="on";
+               };
+
+               net_green {
+                       label="net_green";
+                       gpios=<&gpio GPIOA_15 GPIO_ACTIVE_HIGH>;
+                       default-state ="on";
+               };
+
+               remote_led {
+                       label = "remote_led";
+                       gpios = <&gpio_ao GPIOAO_10 GPIO_ACTIVE_LOW>;
+                       default-state = "off";
+                       linux,default-trigger = "rc_feedback";
+               };
+
+               sys_led {
+                       label="sys_led";
+                       gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_LOW>;
+                       default-state ="on";
+                       retain-state-suspended;
+                       linux,default-trigger="cpu0";
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12a";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12a */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+               performance_telecom = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio       GPIOX_19       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+
+       partitions: partitions{
+               parts = <14>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&misc>;
+               part-3 = <&dto>;
+               part-4 = <&cri_data>;
+               part-5 = <&param>;
+               part-6 = <&boot>;
+               part-7 = <&rsv>;
+               part-8 = <&tee>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&system>;
+               part-12 = <&cache>;
+               part-13 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x1800000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               dto:dto{
+                       pname = "dto";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               cri_data:cri_data{
+                       pname = "cri_data";
+                       size = <0x0 0x800000>;
+                       mask = <2>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               param:param{
+                       pname = "param";
+                       size = <0x0 0x1000000>;
+                       mask = <2>;
+               };
+               boot:boot{
+                       pname = "boot";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               vendor:vendor{
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm{
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               system:system{
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache{
+                       pname = "cache";
+                       size = <0x0 0x46000000>;
+                       mask = <2>;
+               };
+               data:data{
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-g12a";
+               /*memory-region = <&logo_reserved>;*/
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 56 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "viu2-vsync", "rdma";
+               mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 2160 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+               mem_alloc = <1>;
+               logo_addr = "0x3f800000";
+               clocks = <&clkc CLKID_VPU_CLKC_MUX>;
+               clock-names = "vpu_clkc";
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+               aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";// "dsp_a";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               /*
+                                * dai-tdm-slot-tx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-rx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-num = <8>;
+                                */
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                                       &amlogic_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /* spdif_b to hdmi, only playback */
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdifb2hdmi";
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       /*DCDC for SY8120B1ABC*/
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_ao_d_pins3>;
+               status = "okay";
+       };
+
+}; /* end of / */
+
+&pwm_AO_cd {
+               status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       gt9xx@5d {
+               compatible = "goodix,gt9xx";
+               status = "disabled";
+               reg = <0x5d>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+       };
+
+       ftxx@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+               x_max = <600>;
+               y_max = <1024>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "disabled";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       bl_extern_i2c {
+               compatible = "amlogic, bl_extern_i2c";
+               status = "disabled";
+               reg = <0x2c>; /*reg_address for lp8556*/
+               dev_name = "lp8556";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <3>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "okay";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_10, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_9 */
+                       groups = "tdmc_din1_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       spdifout: spdifout {
+               mux {
+                       groups = "spdif_out_h";
+                       function = "spdif_out";
+               };
+       };
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+
+}; /* end of pinctrl_periphs */
+&pinctrl_aobus {
+       /*gpiao_10*/
+       /*spdifout: spdifout {                    */
+       /*      mux {                                             */
+       /*              groups = "spdif_out_ao";  */
+       /*              function = "spdif_out_ao";*/
+       /*      };                                                        */
+       /*};                                                      */
+};  /* end of pinctrl_aobus */
+
+&audio_data {
+       status = "okay";
+};
+
+/* Audio Related End */
+
+&pwm_ef {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <1>;
+       otg = <0>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <1>;
+};
+&ethmac {
+       status = "okay";
+       pinctrl-names = "internal_eth_pins";
+       pinctrl-0 = <&internal_eth_pins>;
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b1 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_b2 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "disabled";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "disable";
+};
+
+&meson_cooldev {
+       status = "okay";
+};
+
+&defendkey {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/g12a_s905y2_u220.dts b/arch/arm/boot/dts/amlogic/g12a_s905y2_u220.dts
new file mode 100644 (file)
index 0000000..f5e1c72
--- /dev/null
@@ -0,0 +1,1321 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12a_s905y2_u220.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12a.dtsi"
+#include "partition_mbox_normal.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12a";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12a";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12a */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+               performance_revB_telecom = <0x1bf0  0x9
+                       0x1b56  0x546
+                       0x1b12  0x8080
+                       0x1b05  0x9
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio       GPIOX_19       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       gpio_keypad{
+               compatible = "amlogic, gpio_keypad";
+               status = "okay";
+               scan_period = <20>;
+               key_num = <1>;
+               key_name = "power";
+               key_code = <116>;
+               key-gpios = <&gpio_ao  GPIOAO_3  GPIO_ACTIVE_HIGH>;
+               detect_mode = <0>;/*0:polling mode, 1:irq mode*/
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "vol-", "vol+", "enter";
+               key_num = <3>;
+               io-channels = <&saradc SARADC_CH2>;
+               io-channel-names = "key-chan-2";
+               key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2>;
+               key_code = <114 115 28>;
+               key_val = <143 266 389>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,loopback = <&aml_loopback>;
+               aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";// "dsp_a";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               /*
+                                * dai-tdm-slot-tx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-rx-mask =
+                                *      <1 1 1 1 1 1 1 1>;
+                                * dai-tdm-slot-num = <8>;
+                                */
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                               &amlogic_codec &ad82584f_62>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&tlv320adc3101_32 &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdifb2hdmi";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /* spdif_b to hdmi, only playback */
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       continuous-clock;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               /*
+                * dai link for i2s to hdmix,
+                * Notice to select a tdm lane not used by hw
+                */
+               /*
+                * aml-audio-card,dai-link@6 {
+                * format = "i2s";
+                * mclk-fs = <256>;
+                * //continuous-clock;
+                * //bitclock-inversion;
+                * //frame-inversion;
+                * bitclock-master = <&aml_i2s2hdmi>;
+                * frame-master = <&aml_i2s2hdmi>;
+                * suffix-name = "alsaPORT-i2s2hdmi";
+                * cpu {
+                * sound-dai = <&aml_i2s2hdmi>;
+                * dai-tdm-slot-tx-mask = <1 1>;
+                * dai-tdm-slot-num = <2>;
+                * dai-tdm-slot-width = <32>;
+                * system-clock-frequency = <12288000>;
+                * };
+                * codec {
+                * sound-dai = <&dummy_codec>;
+                * };
+                * };
+                */
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       /*DCDC for SY8120B1ABC*/
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <871000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <921000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_ao_d_pins3>;
+               status = "okay";
+       };
+
+}; /* end of / */
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x7f800000";
+       mem_alloc = <0>;
+       pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+};
+
+&pwm_AO_cd {
+               status = "okay";
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       gt9xx@5d {
+               compatible = "goodix,gt9xx";
+               status = "disabled";
+               reg = <0x5d>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+       };
+
+       ftxx@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 0x00>;
+               irq-gpio = <&gpio GPIOZ_3 0x00>;
+               x_max = <600>;
+               y_max = <1024>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "okay";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tlv320adc3101_32: tlv320adc3101_32@32 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "okay";
+       };
+
+       tas5707_36: tas5707_36@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               reg = <0x1b>;
+               status = "disabled";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       bl_extern_i2c {
+               compatible = "amlogic, bl_extern_i2c";
+               status = "disabled";
+               reg = <0x2c>; /*reg_address for lp8556*/
+               dev_name = "lp8556";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <3>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       /* copy a useless tdm to output for hdmi, no pinmux */
+       aml_i2s2hdmi: i2s2hdmi {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 1 1 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+
+               i2s2hdmi = <1>;
+
+               status = "disabled";
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "okay";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "okay";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "okay";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "disabled";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_10 */
+                       groups = "tdmc_din0_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       /*
+        * spdifout: spdifout {
+        *      mux {
+        *              groups = "spdif_out_h";
+        *              function = "spdif_out";
+        *      };
+        *};
+        */
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+
+}; /* end of pinctrl_periphs */
+&pinctrl_aobus {
+       spdifout: spdifout {
+               mux { /* gpiao_10 */
+                       groups = "spdif_out_ao";
+                       function = "spdif_out_ao";
+               };
+       };
+};  /* end of pinctrl_aobus */
+
+&audio_data {
+       status = "okay";
+};
+
+/* Audio Related End */
+
+&pwm_ef {
+       status = "okay";
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <1>;
+       otg = <1>;
+       gpio-vbus-power = "GPIOH_6";
+       gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <3>;
+};
+&ethmac {
+       status = "okay";
+       pinctrl-names = "external_eth_pins";
+       pinctrl-0 = <&external_eth_pins>;
+       mc_val = <0x1621>;
+
+       internal_phy=<0>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b1 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_b2 {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "okay";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "disable";
+};
+
+&meson_cooldev {
+       status = "okay";
+};
+
+&defendkey {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/g12b_a311d_skt.dts b/arch/arm/boot/dts/amlogic/g12b_a311d_skt.dts
new file mode 100644 (file)
index 0000000..a448a5a
--- /dev/null
@@ -0,0 +1,1379 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12b_a311d_skt.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "partition_mbox_normal.dtsi"
+#include "mesong12b.dtsi"
+#include "mesong12b_skt-panel.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12b";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+                       clear-map;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               galcore_reserved:linux,galcore {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x1000000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+
+               isp_cma_reserved:linux,isp_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x1f000000>;
+                       alignment = <0x400000>;
+               };
+
+               adapt_cma_reserved:linux,adapt_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x03000000>;
+                       alignment = <0x400000>;
+               };
+               gdc_cma_reserved:linux,gdc_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+       galcore {
+               status = "okay";
+               memory-region = <&galcore_reserved>;
+       };
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12b";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12b */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       gpio_keypad {
+               compatible = "amlogic, gpio_keypad";
+               status = "okay";
+               scan_period = <20>;
+               key_num = <1>;
+               key_name = "power";
+               key_code = <116>;
+               key-gpios = <&gpio_ao  GPIOAO_3  GPIO_ACTIVE_HIGH>;
+               detect_mode = <0>;/*0:polling mode, 1:irq mode*/
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "menu", "vol-", "vol+", "esc", "home";
+               key_num = <5>;
+               io-channels = <&saradc SARADC_CH2>;
+               io-channel-names = "key-chan-2";
+               key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2
+                       SARADC_CH2 SARADC_CH2>;
+               key_code = <139 114 115 1 102>;
+               key_val = <0 143 266 389 512>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };//End efusekey
+
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+       };
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               /*compatible = "amlogic, aml_codec_T9015";*/
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "disabled";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               //aml-audio-card,loopback = <&aml_loopback>;
+               //aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                               &dummy_codec &ad82584f_62>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpu_opp_table1: cpu_opp_table1 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <771000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <771000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <821000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <891000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               status = "okay";
+       };
+
+       sensor: sensor {
+               compatible = "soc, sensor";
+               status = "okay";
+               sensor-name = "imx290"; /*imx290;os08a10;imx227*/
+               pinctrl-names="default";
+               pinctrl-0=<&clk12_24_z_pins>;
+               clocks = <&clkc CLKID_24M>;
+               clock-names = "g12a_24m";
+               reset = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>;
+               ir_cut_gpio = <&gpio GPIOZ_11 GPIO_ACTIVE_HIGH
+                               &gpio GPIOZ_7 GPIO_ACTIVE_HIGH>;
+       };
+
+       iq: iq {
+               compatible = "soc, iq";
+               status = "okay";
+               sensor-name = "imx290"; /*imx290;os08a10;imx227*/
+       };
+}; /* end of / */
+&i2c2 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c2_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+       sensor-i2c@6c {
+               compatible = "arm, i2c-sensor";
+               reg = <0x6c>;
+               reg-names = "i2c-sensor";
+               slave-addr = <0x6c>;
+               reg-type = <2>;
+               reg-data-type = <1>;
+               link-device = <&phycsi>;
+       };
+
+       lcd_extern_i2c0: lcd_extern_i2c@0 {
+               compatible = "lcd_ext, i2c";
+               dev_name = "i2c_LT8912_0";
+               reg = <0x48>;
+               status = "disabled";
+       };
+
+       lcd_extern_i2c1: lcd_extern_i2c@1 {
+               compatible = "lcd_ext, i2c";
+               dev_name = "i2c_LT8912_1";
+               reg = <0x49>;
+               status = "disabled";
+       };
+};
+
+&isp {
+       status = "okay";
+       memory-region = <&isp_cma_reserved>;
+};
+
+&adapter {
+       status = "okay";
+       memory-region = <&adapt_cma_reserved>;
+};
+
+&gdc {
+       status = "okay";
+       memory-region = <&gdc_cma_reserved>;
+};
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x7f800000";
+       mem_alloc = <1>;
+       pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+};
+
+&pwm_ab {
+               status = "okay";
+       };
+
+&pwm_ef {
+               status = "okay";
+       };
+
+&pwm_AO_cd {
+               status = "okay";
+       };
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       touchscreen@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 GPIO_ACTIVE_HIGH>;
+               irq-gpio = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>;
+               x_max = <720>;
+               y_max = <1280>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "okay";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tlv320adc3101_32: tlv320adc3101_32@32 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "disabled";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <4>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       /* copy a useless tdm to output for hdmi, no pinmux */
+       aml_i2s2hdmi: i2s2hdmi {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 1 1 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+
+               i2s2hdmi = <1>;
+
+               status = "okay";
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "disabled";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "disabled";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "disabled";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "disabled";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       clk12_24_z_pins:clk12_24_z_pins {
+               mux {
+                       groups = "clk12_24_z";
+                       function = "clk12_24_ee";
+                       drive-strength = <3>;
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_10 */
+                       groups = "tdmc_din0_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       /*
+        * spdifout: spdifout {
+        *      mux {
+        *              groups = "spdif_out_h";
+        *              function = "spdif_out";
+        *      };
+        *};
+        */
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOH_5";
+                       function = "gpio_periphs";
+                       output-high;
+               };
+       };
+
+}; /* end of pinctrl_periphs */
+
+&pinctrl_aobus {
+       spdifout: spdifout {
+               mux { /* gpiao_10 */
+                       groups = "spdif_out_ao";
+                       function = "spdif_out_ao";
+               };
+       };
+};  /* end of pinctrl_aobus */
+
+&irblaster {
+       status = "disabled";
+};
+
+&audio_data {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b {
+       status = "okay";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "okay";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <0>;
+       otg = <1>;
+       gpio-vbus-power = "GPIOH_6";
+       gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <3>;
+};
+&ethmac {
+       status = "okay";
+/*     //conflict with isp i2c
+ *     pinctrl-names = "internal_eth_pins";
+ *     pinctrl-0 = <&internal_eth_pins>;
+ */
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "disabled";
+};
+
+&saradc {
+       status = "okay";
+};
+
+&spicc1 {
+       status = "disabled";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spicc1_pins>;
+       cs-gpios = <&gpio GPIOH_6 0>;
+};
diff --git a/arch/arm/boot/dts/amlogic/g12b_a311d_w400_buildroot.dts b/arch/arm/boot/dts/amlogic/g12b_a311d_w400_buildroot.dts
new file mode 100644 (file)
index 0000000..fe7d3a4
--- /dev/null
@@ -0,0 +1,1436 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12b_a311d_w400_buildroot.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12b.dtsi"
+#include "mesong12b_skt-panel.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12b";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+                       clear-map;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               galcore_reserved:linux,galcore {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x1000000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+
+               isp_cma_reserved:linux,isp_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x1f000000>;
+                       alignment = <0x400000>;
+               };
+
+               adapt_cma_reserved:linux,adapt_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x03000000>;
+                       alignment = <0x400000>;
+               };
+               gdc_cma_reserved:linux,gdc_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       status = "okay";
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+       galcore {
+               status = "okay";
+               memory-region = <&galcore_reserved>;
+       };
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               sys_led {
+                       label="sys_led";
+                       gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
+                       default-state ="on";
+                       retain-state-suspended;
+                       linux,default-trigger="cpu0";
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12b";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* g12b */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+
+       partitions: partitions{
+               parts = <14>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&misc>;
+               part-3 = <&dto>;
+               part-4 = <&cri_data>;
+               part-5 = <&param>;
+               part-6 = <&boot>;
+               part-7 = <&rsv>;
+               part-8 = <&tee>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&system>;
+               part-12 = <&cache>;
+               part-13 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x1800000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               dto:dto{
+                       pname = "dto";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               cri_data:cri_data{
+                       pname = "cri_data";
+                       size = <0x0 0x800000>;
+                       mask = <2>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               param:param{
+                       pname = "param";
+                       size = <0x0 0x1000000>;
+                       mask = <2>;
+               };
+               boot:boot{
+                       pname = "boot";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               vendor:vendor{
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm{
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               system:system{
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache{
+                       pname = "cache";
+                       size = <0x0 0x46000000>;
+                       mask = <2>;
+               };
+               data:data{
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       gpio_keypad {
+               compatible = "amlogic, gpio_keypad";
+               status = "okay";
+               scan_period = <20>;
+               key_num = <1>;
+               key_name = "power";
+               key_code = <116>;
+               key-gpios = <&gpio_ao  GPIOAO_3  GPIO_ACTIVE_HIGH>;
+               detect_mode = <0>;/*0:polling mode, 1:irq mode*/
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "vol-", "vol+", "enter";
+               key_num = <3>;
+               io-channels = <&saradc SARADC_CH2>;
+               io-channel-names = "key-chan-2";
+               key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2>;
+               key_code = <114 115 28>;
+               key_val = <143 266 389>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <14>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+       };
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               //aml-audio-card,loopback = <&aml_loopback>;
+               //aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                               &amlogic_codec &ad82584f_62>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpu_opp_table1: cpu_opp_table1 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <771000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <771000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <821000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <891000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               status = "okay";
+       };
+
+       sensor: sensor {
+               compatible = "soc, sensor";
+               status = "okay";
+               sensor-name = "imx290"; /*imx290;os08a10;imx227*/
+               pinctrl-names="default";
+               pinctrl-0=<&clk12_24_z_pins>;
+               clocks = <&clkc CLKID_24M>;
+               clock-names = "g12a_24m";
+               reset = <&gpio GPIOZ_12 GPIO_ACTIVE_HIGH>;
+       };
+
+       iq: iq {
+               compatible = "soc, iq";
+               status = "okay";
+               sensor-name = "imx290"; /*imx290;os08a10;imx227*/
+       };
+}; /* end of / */
+
+&i2c2 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c2_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+       sensor-i2c@6c {
+               compatible = "arm, i2c-sensor";
+               reg = <0x6c>;
+               reg-names = "i2c-sensor";
+               slave-addr = <0x6c>;
+               reg-type = <2>;
+               reg-data-type = <1>;
+               link-device = <&phycsi>;
+       };
+};
+
+&isp {
+       status = "okay";
+       memory-region = <&isp_cma_reserved>;
+};
+
+&adapter {
+       status = "okay";
+       memory-region = <&adapt_cma_reserved>;
+};
+
+&gdc {
+       status = "okay";
+       memory-region = <&gdc_cma_reserved>;
+};
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x7f800000";
+       mem_alloc = <1>;
+       pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+};
+
+&pwm_ab {
+               status = "okay";
+       };
+
+&pwm_ef {
+               status = "okay";
+       };
+
+&pwm_AO_cd {
+               status = "okay";
+       };
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_master_pins2>;
+       clock-frequency = <400000>;
+
+       touchscreen@38 {
+               compatible = "focaltech,fts";
+               status = "disabled";
+               reg = <0x38>;
+               reset-gpio = <&gpio GPIOZ_9 GPIO_ACTIVE_HIGH>;
+               irq-gpio = <&gpio GPIOZ_3 GPIO_ACTIVE_HIGH>;
+               x_max = <720>;
+               y_max = <1280>;
+               max-touch-number = <10>;
+       };
+};
+
+&i2c3 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "okay";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tlv320adc3101_32: tlv320adc3101_32@32 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "disabled";
+       };
+
+       bl_extern_i2c {
+               compatible = "bl_extern, i2c";
+               dev_name = "lp8556";
+               reg = <0x2c>;
+               status = "disabled";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <3>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       /* copy a useless tdm to output for hdmi, no pinmux */
+       aml_i2s2hdmi: i2s2hdmi {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 1 1 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+
+               i2s2hdmi = <1>;
+
+               status = "okay";
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "disabled";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "disabled";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "disabled";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "disabled";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       clk12_24_z_pins:clk12_24_z_pins {
+               mux {
+                       groups = "clk12_24_z";
+                       function = "clk12_24_ee";
+                       drive-strength = <3>;
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_10 */
+                       groups = "tdmc_din0_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       /*
+        * spdifout: spdifout {
+        *      mux {
+        *              groups = "spdif_out_h";
+        *              function = "spdif_out";
+        *      };
+        *};
+        */
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOH_5";
+                       function = "gpio_periphs";
+                       output-high;
+               };
+       };
+
+}; /* end of pinctrl_periphs */
+
+&pinctrl_aobus {
+       spdifout: spdifout {
+               mux { /* gpiao_10 */
+                       groups = "spdif_out_ao";
+                       function = "spdif_out_ao";
+               };
+       };
+};  /* end of pinctrl_aobus */
+
+&irblaster {
+       status = "disabled";
+};
+
+&audio_data {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b {
+       status = "okay";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "okay";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <0>;
+       otg = <1>;
+       gpio-vbus-power = "GPIOH_6";
+       gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <3>;
+};
+&ethmac {
+       status = "okay";
+/*     //conflict with isp i2c
+ *     pinctrl-names = "internal_eth_pins";
+ *     pinctrl-0 = <&internal_eth_pins>;
+ */
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&saradc {
+       status = "okay";
+};
+
+&spicc1 {
+       status = "disabled";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spicc1_pins>;
+       cs-gpios = <&gpio GPIOH_6 0>;
+};
diff --git a/arch/arm/boot/dts/amlogic/g12b_a311d_w400_buildroot_vccktest.dts b/arch/arm/boot/dts/amlogic/g12b_a311d_w400_buildroot_vccktest.dts
new file mode 100644 (file)
index 0000000..27936bd
--- /dev/null
@@ -0,0 +1,1334 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12b_a311d_w400_buildroot.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12b.dtsi"
+#include "mesong12b_skt-panel.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12b";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+               tsensor0 = &p_tsensor;
+               tsensor1 = &d_tsensor;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               sys_led {
+                       label="sys_led";
+                       gpios=<&gpio_ao GPIOAO_11 GPIO_ACTIVE_HIGH>;
+                       default-state ="on";
+                       retain-state-suspended;
+                       linux,default-trigger="cpu0";
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12b";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* g12b */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
+               gpio_hostwake = <&gpio GPIOX_19 GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio GPIOX_6 GPIO_ACTIVE_HIGH>;
+               dhd_static_buf; //if use bcm wifi, config dhd_static_buf
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwm_e_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+
+       partitions: partitions{
+               parts = <14>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&misc>;
+               part-3 = <&dto>;
+               part-4 = <&cri_data>;
+               part-5 = <&param>;
+               part-6 = <&boot>;
+               part-7 = <&rsv>;
+               part-8 = <&tee>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&system>;
+               part-12 = <&cache>;
+               part-13 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x1800000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               dto:dto{
+                       pname = "dto";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               cri_data:cri_data{
+                       pname = "cri_data";
+                       size = <0x0 0x800000>;
+                       mask = <2>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               param:param{
+                       pname = "param";
+                       size = <0x0 0x1000000>;
+                       mask = <2>;
+               };
+               boot:boot{
+                       pname = "boot";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               vendor:vendor{
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm{
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               system:system{
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache{
+                       pname = "cache";
+                       size = <0x0 0x46000000>;
+                       mask = <2>;
+               };
+               data:data{
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       gpio_keypad {
+               compatible = "amlogic, gpio_keypad";
+               status = "okay";
+               scan_period = <20>;
+               key_num = <1>;
+               key_name = "power";
+               key_code = <116>;
+               key-gpios = <&gpio_ao  GPIOAO_3  GPIO_ACTIVE_HIGH>;
+               detect_mode = <0>;/*0:polling mode, 1:irq mode*/
+       };
+
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "vol-", "vol+", "enter";
+               key_num = <3>;
+               io-channels = <&saradc SARADC_CH2>;
+               io-channel-names = "key-chan-2";
+               key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2>;
+               key_code = <114 115 28>;
+               key_val = <143 266 389>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+               unifykey-num = <14>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+       };
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "okay";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <1>;
+               status = "okay";
+       };
+       audio_effect:eqdrc{
+               /*eq_enable = <1>;*/
+               /*drc_enable = <1>;*/
+               /*
+                * 0:tdmout_a
+                * 1:tdmout_b
+                * 2:tdmout_c
+                * 3:spdifout
+                * 4:spdifout_b
+                */
+               eqdrc_module = <1>;
+               /* max 0xf, each bit for one lane, usually one lane */
+               lane_mask = <0x1>;
+               /* max 0xff, each bit for one channel */
+               channel_mask = <0x3>;
+       };
+       auge_sound {
+               compatible = "amlogic, g12a-sound-card";
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               //aml-audio-card,loopback = <&aml_loopback>;
+               //aml-audio-card,aux-devs = <&amlogic_codec>;
+               /*avout mute gpio*/
+               avout_mute-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               /*for audio effect ,eqdrc */
+               aml-audio-card,effect = <&audio_effect>;
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pcm";
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       //bitclock-master = <&tdmbcodec>;
+                       //frame-master = <&tdmbcodec>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-i2s";
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       tdmbcodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec
+                               &amlogic_codec &ad82584f_62>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       //suffix-name = "alsaPORT-tdm";
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-pdm";
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       /* suffix-name, sync with android audio hal
+                        * what's the dai link used for
+                        */
+                       suffix-name = "alsaPORT-spdif";
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "okay";
+       };
+       /* Audio Related end */
+
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1896000000>;
+                       opp-microvolt = <981000>;
+               };
+               opp11 {
+                       opp-hz = /bits/ 64 <2016000000>;
+                       opp-microvolt = <1011000>;
+               };
+               opp12 {
+                       opp-hz = /bits/ 64 <2100000000>;
+                       opp-microvolt = <1011000>;
+               };
+       };
+
+       cpu_opp_table1: cpu_opp_table1 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <771000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <771000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <821000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <891000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <1011000>;
+               };
+               opp11 {
+                       opp-hz = /bits/ 64 <1908000000>;
+                       opp-microvolt = <1011000>;
+               };
+               opp12 {
+                       opp-hz = /bits/ 64 <2016000000>;
+                       opp-microvolt = <1011000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               status = "okay";
+       };
+
+
+}; /* end of / */
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x7f800000";
+       mem_alloc = <1>;
+       pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+};
+
+&pwm_ab {
+               status = "okay";
+       };
+
+&pwm_ef {
+               status = "okay";
+       };
+
+&pwm_AO_cd {
+               status = "okay";
+       };
+
+&i2c3 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c3_master_pins2>;
+       clock-frequency = <100000>; /* default 100k */
+
+       /* for ref board */
+       ad82584f_62: ad82584f_62@62 {
+               compatible = "ESMT, ad82584f";
+               #sound-dai-cells = <0>;
+               reg = <0x31>;
+               status = "okay";
+               reset_pin = <&gpio GPIOA_5 0>;
+       };
+
+       tlv320adc3101_32: tlv320adc3101_32@32 {
+               compatible = "ti,tlv320adc3101";
+               #sound-dai-cells = <0>;
+               reg = <0x19>;
+               differential_pair = <1>;
+               status = "disabled";
+       };
+};
+
+&audiobus {
+       aml_tdma: tdma {
+               compatible = "amlogic, g12a-snd-tdma";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1>;
+               dai-tdm-oe-lane-slot-mask-out = <1 0>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               compatible = "amlogic, g12a-snd-tdmb";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               dai-tdm-lane-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll", "samesource_sysclk";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk &tdmout_b &tdmin_b>;
+               /*
+                * 0: tdmout_a;
+                * 1: tdmout_b;
+                * 2: tdmout_c;
+                * 3: spdifout;
+                * 4: spdifout_b;
+                */
+               samesource_sel = <3>;
+       };
+
+       aml_tdmc: tdmc {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               #dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       /* copy a useless tdm to output for hdmi, no pinmux */
+       aml_i2s2hdmi: i2s2hdmi {
+               compatible = "amlogic, g12a-snd-tdmc";
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-out = <1 1 1 1>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+
+               i2s2hdmi = <1>;
+
+               status = "okay";
+       };
+
+       aml_spdif: spdif {
+               compatible = "amlogic, g12a-snd-spdif-a";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "okay";
+       };
+       aml_spdif_b: spdif_b {
+               compatible = "amlogic, g12a-snd-spdif-b";
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               status = "disabled";
+       };
+       aml_pdm: pdm {
+               compatible = "amlogic, g12a-snd-pdm";
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "okay";
+       };
+       aml_loopback: loopback {
+               compatible = "amlogic, snd-loopback";
+               /*
+                * 0: out rate = in data rate;
+                * 1: out rate = loopback data rate;
+                */
+               lb_mode = <0>;
+
+               /* datain src
+                * 0: tdmin_a;
+                * 1: tdmin_b;
+                * 2: tdmin_c;
+                * 3: spdifin;
+                * 4: pdmin;
+                */
+               datain_src = <4>;
+               datain_chnum = <8>;
+               datain_chmask = <0x3f>;
+
+               /* tdmin_lb src
+                * 0: tdmoutA
+                * 1: tdmoutB
+                * 2: tdmoutC
+                * 3: PAD_tdminA
+                * 4: PAD_tdminB
+                * 5: PAD_tdminC
+                */
+               datalb_src = <2>;
+               datalb_chnum = <8>;
+               datalb_chmask = <0x3>;
+
+               status = "disabled";
+       };
+
+       audioresample: resample {
+               compatible = "amlogic, g12a-resample";
+               clocks = <&clkc CLKID_MPLL3
+                               &clkaudio CLKID_AUDIO_MCLK_F
+                               &clkaudio CLKID_AUDIO_RESAMPLE_CTRL>;
+               clock-names = "resample_pll", "resample_src", "resample_clk";
+               /*same with toddr_src
+                *      TDMIN_A, 0
+                *      TDMIN_B, 1
+                *      TDMIN_C, 2
+                *      SPDIFIN, 3
+                *      PDMIN,  4
+                *      NONE,
+                *      TDMIN_LB, 6
+                *      LOOPBACK, 7
+                */
+               resample_module = <4>;
+               status = "disabled";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "disabled";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_9 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout0";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_8 */
+                       groups = "tdma_din1";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+                       drive-strength = <2>;
+               };
+       };
+       tdmout_b: tdmout_b {
+               mux { /* GPIOA_1, GPIOA_2, GPIOA_3 */
+                       groups = "tdmb_sclk",
+                               "tdmb_fs",
+                               "tdmb_dout0";
+                       function = "tdmb_out";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux { /* GPIOA_4 */
+                       groups = "tdmb_din1"
+                               /*,"tdmb_slv_sclk", "tdmb_slv_fs"*/;
+                       function = "tdmb_in";
+                       drive-strength = <2>;
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOA_11 */
+                       groups = "mclk1_a";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* GPIOA_12, GPIOA_13, GPIOA_8, GPIOA_7*/
+                       groups = "tdmc_sclk_a",
+                               "tdmc_fs_a",
+                               "tdmc_dout0_a"
+                               /*,     "tdmc_dout2",
+                                * "tdmc_dout3"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOA_10 */
+                       groups = "tdmc_din0_a";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* GPIOH_5 */
+                       groups = "spdif_in_h";
+                       function = "spdif_in";
+               };
+       };
+
+       /* GPIOH_4 */
+       /*
+        * spdifout: spdifout {
+        *      mux {
+        *              groups = "spdif_out_h";
+        *              function = "spdif_out";
+        *      };
+        *};
+        */
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       /*"pdm_din1_a",*/
+                       "pdm_din2_a",
+                       /*"pdm_din3_a",*/
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOH_5";
+                       function = "gpio_periphs";
+                       output-high;
+               };
+       };
+
+}; /* end of pinctrl_periphs */
+
+&pinctrl_aobus {
+       spdifout: spdifout {
+               mux { /* gpiao_10 */
+                       groups = "spdif_out_ao";
+                       function = "spdif_out_ao";
+               };
+       };
+};  /* end of pinctrl_aobus */
+
+&irblaster {
+       status = "disabled";
+};
+
+&audio_data {
+       status = "okay";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "okay";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+
+&sd_emmc_c {
+       status = "okay";
+       emmc {
+               caps = "MMC_CAP_8_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                       /* "MMC_CAP_1_8V_DDR", */
+                        "MMC_CAP_HW_RESET",
+                        "MMC_CAP_ERASE",
+                        "MMC_CAP_CMD23";
+               caps2 = "MMC_CAP2_HS200";
+               /* "MMC_CAP2_HS400";*/
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&sd_emmc_b {
+       status = "okay";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED";
+               f_min = <400000>;
+               f_max = <50000000>;
+       };
+};
+
+&sd_emmc_a {
+       status = "okay";
+       sdio {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_CAP_UHS_SDR104",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_SDIO_IRQ";
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
+&nand {
+       status = "disabled";
+       plat-names = "bootloader","nandnormal";
+       plat-num = <2>;
+       plat-part-0 = <&bootloader>;
+       plat-part-1 = <&nandnormal>;
+       bootloader: bootloader{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <1>;
+               part_num = <0>;
+               rb_detect = <1>;
+       };
+       nandnormal: nandnormal{
+               enable_pad ="ce0";
+               busy_pad = "rb0";
+               timming_mode = "mode5";
+               bch_mode = "bch8_1k";
+               plane_mode = "twoplane";
+               t_rea = <20>;
+               t_rhoh = <15>;
+               chip_num = <2>;
+               part_num = <3>;
+               partition = <&nand_partitions>;
+               rb_detect = <1>;
+       };
+       nand_partitions:nand_partition{
+               /*
+                * if bl_mode is 1, tpl size was generate by
+                * fip_copies * fip_size which
+                * will not skip bad when calculating
+                * the partition size;
+                *
+                * if bl_mode is 0,
+                * tpl partition must be comment out.
+                */
+               tpl{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x0>;
+               };
+               logo{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x200000>;
+               };
+               recovery{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               boot{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x1000000>;
+               };
+               system{
+                       offset=<0x0 0x0>;
+                       size=<0x0 0x4000000>;
+               };
+               data{
+                       offset=<0xffffffff 0xffffffff>;
+                       size=<0x0 0x0>;
+               };
+       };
+};
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy_v2 {
+       status = "okay";
+       portnum = <2>;
+};
+
+&usb3_phy_v2 {
+       status = "okay";
+       portnum = <0>;
+       otg = <1>;
+       gpio-vbus-power = "GPIOH_6";
+       gpios = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <3>;
+};
+&ethmac {
+       status = "okay";
+       pinctrl-names = "internal_eth_pins";
+       pinctrl-0 = <&internal_eth_pins>;
+       mc_val = <0x4be04>;
+
+       internal_phy=<1>;
+};
+
+&uart_A {
+       status = "okay";
+};
+
+&pcie_A {
+       reset-gpio = <&gpio GPIOX_7 GPIO_ACTIVE_HIGH>;
+       status = "okay";
+};
+
+&saradc {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/g12b_pxp.dts b/arch/arm/boot/dts/amlogic/g12b_pxp.dts
new file mode 100644 (file)
index 0000000..e3c6201
--- /dev/null
@@ -0,0 +1,736 @@
+/*
+ * arch/arm/boot/dts/amlogic/g12b_pxp.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesong12b.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, g12b";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3f800000 0x800000>;
+               };
+               ion_cma_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4074560(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4074560=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0xd000000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-g12b";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+               clk_path = <0>;
+
+               /* performance: reg_address, reg_value */
+               /* g12b */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf850
+                       0xffff  0x0>; /* ending flag */
+               performance_sarft = <0x1bf0  0x9
+                       0x1b56  0x333
+                       0x1b12  0x0
+                       0x1b05  0x9
+                       0x1c59  0xfc48
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "disabled";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 40 1>;
+               interrupt-names = "pre_irq", "post_irq";
+               clocks = <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <334 667>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4074560>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               post-wr-support = <1>;
+               nr10bit-support = <1>;
+               nrds-enable = <1>;
+               pps-enable = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "disabled";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+       };
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_g12a";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "disabled";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+
+       /* Audio Related start */
+       pdm_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pdm_dummy_codec";
+               status = "disabled";
+       };
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disabled";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               /*compatible = "amlogic, aml_codec_T9015";*/
+               reg = <0xFF632000 0x2000>;
+               is_auge_used = <1>; /* meson or auge chipset used */
+               tdmout_index = <0>;
+               status = "disabled";
+       };
+       auge_sound {
+               /*compatible = "amlogic, g12a-sound-card";*/
+               aml-audio-card,name = "AML-AUGESOUND";
+
+               aml-audio-card,dai-link@0 {
+                       format = "dsp_a";
+                       mclk-fs = <512>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       //bitclock-master = <&tdmacodec>;
+                       //frame-master = <&tdmacodec>;
+                       tdmacpu: cpu {
+                               sound-dai = <&aml_tdma>;
+                               dai-tdm-slot-tx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-rx-mask =
+                                                       <1 1 1 1 1 1 1 1>;
+                               dai-tdm-slot-num = <8>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <24576000>;
+                       };
+                       tdmacodec: codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@1 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       //continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmb>;
+                       frame-master = <&aml_tdmb>;
+                       cpu {
+                               sound-dai = <&aml_tdmb>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@2 {
+                       format = "i2s";
+                       mclk-fs = <256>;
+                       continuous-clock;
+                       //bitclock-inversion;
+                       //frame-inversion;
+                       bitclock-master = <&aml_tdmc>;
+                       frame-master = <&aml_tdmc>;
+                       cpu {
+                               sound-dai = <&aml_tdmc>;
+                               dai-tdm-slot-tx-mask = <1 1>;
+                               dai-tdm-slot-rx-mask = <1 1>;
+                               dai-tdm-slot-num = <2>;
+                               dai-tdm-slot-width = <32>;
+                               system-clock-frequency = <12288000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec &dummy_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@3 {
+                       mclk-fs = <64>;
+                       cpu {
+                               sound-dai = <&aml_pdm>;
+                       };
+                       codec {
+                               sound-dai = <&pdm_codec>;
+                       };
+               };
+
+               aml-audio-card,dai-link@4 {
+                       mclk-fs = <128>;
+                       cpu {
+                               sound-dai = <&aml_spdif>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+               aml-audio-card,dai-link@5 {
+                       mclk-fs = <128>;
+                       cpu {
+                               sound-dai = <&aml_spdif_b>;
+                               system-clock-frequency = <6144000>;
+                       };
+                       codec {
+                               sound-dai = <&dummy_codec>;
+                       };
+               };
+       };
+       audiolocker: locker {
+               compatible = "amlogic, audiolocker";
+               clocks = <&clkaudio CLKID_AUDIO_LOCKER_OUT
+                               &clkaudio CLKID_AUDIO_LOCKER_IN
+                               &clkaudio CLKID_AUDIO_MCLK_D
+                               &clkaudio CLKID_AUDIO_MCLK_E
+                               &clkc CLKID_MPLL1
+                               &clkc CLKID_MPLL2>;
+               clock-names = "lock_out", "lock_in", "out_src",
+                                       "in_src", "out_calc", "in_ref";
+               interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "irq";
+               frequency = <49000000>; /* pll */
+               dividor = <49>; /* locker's parent */
+               status = "disabled";
+       };
+       /* Audio Related end */
+
+       cpu_opp_table0: cpu_opp_table0 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <731000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <761000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <831000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp10 {
+                       opp-hz = /bits/ 64 <1800000000>;
+                       opp-microvolt = <981000>;
+               };
+       };
+
+       cpu_opp_table1: cpu_opp_table1 {
+               compatible = "operating-points-v2";
+               opp-shared;
+
+               opp00 {
+                       opp-hz = /bits/ 64 <100000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp01 {
+                       opp-hz = /bits/ 64 <250000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp02 {
+                       opp-hz = /bits/ 64 <500000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp03 {
+                       opp-hz = /bits/ 64 <667000000>;
+                       opp-microvolt = <751000>;
+               };
+               opp04 {
+                       opp-hz = /bits/ 64 <1000000000>;
+                       opp-microvolt = <771000>;
+               };
+               opp05 {
+                       opp-hz = /bits/ 64 <1200000000>;
+                       opp-microvolt = <771000>;
+               };
+               opp06 {
+                       opp-hz = /bits/ 64 <1398000000>;
+                       opp-microvolt = <791000>;
+               };
+               opp07 {
+                       opp-hz = /bits/ 64 <1512000000>;
+                       opp-microvolt = <821000>;
+               };
+               opp08 {
+                       opp-hz = /bits/ 64 <1608000000>;
+                       opp-microvolt = <861000>;
+               };
+               opp09 {
+                       opp-hz = /bits/ 64 <1704000000>;
+                       opp-microvolt = <891000>;
+               };
+       };
+
+       cpufreq-meson {
+               compatible = "amlogic, cpufreq-meson";
+               status = "okay";
+       };
+
+
+}; /* end of / */
+
+&meson_fb {
+       status = "okay";
+       display_size_default = <1920 1080 1920 2160 32>;
+       mem_size = <0x00800000 0x1980000 0x100000 0x100000 0x800000>;
+       logo_addr = "0x3f800000";
+       mem_alloc = <1>;
+       pxp_mode = <1>; /** 0:normal mode 1:pxp mode */
+};
+
+&pwm_AO_cd {
+               status = "okay";
+};
+
+&pwm_ab {
+               status = "okay";
+};
+
+
+&audiobus {
+       aml_tdma: tdma {
+               /*compatible = "amlogic, g12a-snd-tdma";*/
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 0>;
+               dai-tdm-lane-slot-mask-out = <0 1>;
+               dai-tdm-clk-sel = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_A
+                               &clkc CLKID_MPLL0>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmout_a &tdmin_a>;
+       };
+
+       aml_tdmb: tdmb {
+               /*compatible = "amlogic, g12a-snd-tdmb";*/
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <1 1 1 1>;
+               dai-tdm-clk-sel = <1>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_B
+                               &clkc CLKID_MPLL1>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmb_mclk /*&tdmout_b &tdmin_b*/>;
+       };
+
+       aml_tdmc: tdmc {
+               /*compatible = "amlogic, g12a-snd-tdmc";*/
+               #sound-dai-cells = <0>;
+               dai-tdm-lane-slot-mask-in = <0 1 0 0>;
+               #dai-tdm-lane-slot-mask-out = <1 0 1 1>;
+               #dai-tdm-lane-oe-slot-mask-in = <0 0 0 0>;
+               dai-tdm-lane-oe-slot-mask-out = <1 0 0 0>;
+               dai-tdm-clk-sel = <2>;
+               clocks = <&clkaudio CLKID_AUDIO_MCLK_C
+                               &clkc CLKID_MPLL2>;
+               clock-names = "mclk", "clk_srcpll";
+               pinctrl-names = "tdm_pins";
+               pinctrl-0 = <&tdmc_mclk &tdmout_c &tdmin_c>;
+       };
+
+       aml_spdif: spdif {
+               /*compatible = "amlogic, g12a-snd-spdif-a";*/
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0
+                               &clkc CLKID_FCLK_DIV4
+                               &clkaudio CLKID_AUDIO_SPDIFIN
+                               &clkaudio CLKID_AUDIO_SPDIFOUT
+                               &clkaudio CLKID_AUDIO_SPDIFIN_CTRL
+                               &clkaudio CLKID_AUDIO_SPDIFOUT_CTRL>;
+               clock-names = "sysclk", "fixed_clk", "gate_spdifin",
+                               "gate_spdifout", "clk_spdifin", "clk_spdifout";
+               interrupts =
+                               <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+
+               interrupt-names = "irq_spdifin";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout &spdifin>;
+               status = "disabled";
+       };
+       aml_spdif_b: spdif_b {
+               /*compatible = "amlogic, g12a-snd-spdif-b";*/
+               #sound-dai-cells = <0>;
+               clocks = <&clkc CLKID_MPLL0 /*CLKID_HIFI_PLL*/
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB
+                               &clkaudio CLKID_AUDIO_SPDIFOUTB_CTRL>;
+               clock-names = "sysclk",
+                               "gate_spdifout", "clk_spdifout";
+               pinctrl-names = "spdif_pins";
+               pinctrl-0 = <&spdifout_b>;
+               status = "disabled";
+       };
+       aml_pdm: pdm {
+               /*compatible = "amlogic, g12a-snd-pdm";*/
+               #sound-dai-cells = <0>;
+               clocks = <&clkaudio CLKID_AUDIO_PDM
+                       &clkc CLKID_FCLK_DIV3
+                       &clkc CLKID_MPLL3
+                       &clkaudio CLKID_AUDIO_PDMIN0
+                       &clkaudio CLKID_AUDIO_PDMIN1>;
+               clock-names = "gate",
+                       "sysclk_srcpll",
+                       "dclk_srcpll",
+                       "pdm_dclk",
+                       "pdm_sysclk";
+               pinctrl-names = "pdm_pins";
+               pinctrl-0 = <&pdmin>;
+               filter_mode = <1>; /* mode 0~4, defalut:1 */
+               status = "disabled";
+       };
+       aml_pwrdet: pwrdet {
+               compatible = "amlogic, g12a-power-detect";
+
+               interrupts = <GIC_SPI 155 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "pwrdet_irq";
+
+               /* pwrdet source sel
+                * 7: loopback;
+                * 6: tdmin_lb;
+                * 5: reserved;
+                * 4: pdmin;
+                * 3: spdifin;
+                * 2: tdmin_c;
+                * 1: tdmin_b;
+                * 0: tdmin_a;
+                */
+               pwrdet_src = <4>;
+
+               hi_th = <0x70000>;
+               lo_th = <0x16000>;
+
+               status = "disabled";
+       };
+}; /* end of audiobus */
+
+&pinctrl_periphs {
+       tdmout_a: tdmout_a {
+               mux { /* GPIOX_11, GPIOX_10, GPIOX_8 */
+                       groups = "tdma_sclk",
+                               "tdma_fs",
+                               "tdma_dout1";
+                       function = "tdma_out";
+               };
+       };
+
+       tdmin_a: tdmin_a {
+               mux { /* GPIOX_9 */
+                       groups = "tdma_din0";
+                       function = "tdma_in";
+               };
+       };
+
+       tdmb_mclk: tdmb_mclk {
+               mux {
+                       groups = "mclk0_a";
+                       function = "mclk0";
+               };
+       };
+
+       tdmc_mclk: tdmc_mclk {
+               mux { /* GPIOZ_8 */
+                       groups = "mclk1_z";
+                       function = "mclk1";
+               };
+       };
+
+       tdmout_c:tdmout_c {
+               mux { /* gpioz_7, gpioz_6, GPIOZ_2, GPIOZ_4, GPIOZ_5*/
+                       groups = "tdmc_sclk_z",
+                               "tdmc_fs_z",
+                               "tdmc_dout0_z"
+                               /*,"tdmc_dout2_z",
+                                *"tdmc_dout3_z"
+                                */;
+                       function = "tdmc_out";
+               };
+       };
+
+       tdmin_c:tdmin_c {
+               mux { /* GPIOZ_3 */
+                       groups = "tdmc_din1_z";
+                       function = "tdmc_in";
+               };
+       };
+
+       spdifin: spdifin {
+               mux {/* gpioa_10 */
+                       groups = "spdif_in_a10";
+                       function = "spdif_in";
+               };
+       };
+
+       spdifout: spdifout {
+               mux {/* gpioa_11 */
+                       groups = "spdif_out_a11";
+                       function = "spdif_out";
+               };
+       };
+
+       spdifout_b: spdifout_b {
+               mux { /* gpioa_13 */
+                       groups = "spdif_out_a13";
+                       function = "spdif_out";
+               };
+       };
+
+       pdmin: pdmin {
+               mux { /* gpioa_5, gpioa_6, gpioa_7, gpioa_8, gpioa_9*/
+                       groups = "pdm_din0_a",
+                       "pdm_din1_a",
+                       "pdm_din2_a",
+                       "pdm_din3_a",
+                       "pdm_dclk_a";
+                       function = "pdm";
+               };
+       };
+
+}; /* end of pinctrl_periphs */
+
+&pinctrl_aobus {
+       tdmout_b: tdmout_b {
+               mux { /* GPIOAO_7, GPIOAO_8, GPIOAO_4 */
+                       groups = "tdmb_fs_ao",
+                               "tdmb_fs_ao",
+                               "tdmb_dout0_ao";
+                       function = "tdmb_out_ao";
+               };
+       };
+
+       tdmin_b:tdmin_b {
+               mux {
+                       groups = "tdmb_din2_ao";
+                       function = "tdmb_in_ao";
+               };
+       };
+};  /* end of pinctrl_aobus */
+/* Audio Related End */
+
+&aobus{
+
+};
+
+&irblaster {
+       status = "disabled";
+};
+
+/*if you want to use vdin just modify status to "ok"*/
+&vdin0 {
+       memory-region = <&vdin0_cma_reserved>;
+       status = "disabled";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        *bit4:support yuv422 10bit full pack mode (from txl new add)
+        */
+       tv_bit_mode = <0x15>;
+};
+&vdin1 {
+       memory-region = <&vdin1_cma_reserved>;
+       status = "disabled";
+       /*vdin write mem color depth support:
+        *bit0:support 8bit
+        *bit1:support 9bit
+        *bit2:support 10bit
+        *bit3:support 12bit
+        */
+       tv_bit_mode = <1>;
+};
+&sd_emmc_b {
+       status = "disabled";
+       sd {
+               caps = "MMC_CAP_4_BIT_DATA",
+                        "MMC_CAP_MMC_HIGHSPEED",
+                        "MMC_CAP_SD_HIGHSPEED",
+                        "MMC_CAP_NONREMOVABLE",
+                        "MMC_CAP_UHS_SDR12",
+                        "MMC_CAP_UHS_SDR25",
+                        "MMC_CAP_UHS_SDR50",
+                        "MMC_PM_KEEP_POWER",
+                        "MMC_CAP_NONREMOVABLE"; /**ptm debug */
+               f_min = <400000>;
+               f_max = <200000000>;
+       };
+};
+
diff --git a/arch/arm/boot/dts/amlogic/gxl_p212_1g_buildroot.dts b/arch/arm/boot/dts/amlogic/gxl_p212_1g_buildroot.dts
new file mode 100644 (file)
index 0000000..a3075d2
--- /dev/null
@@ -0,0 +1,1263 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_p212_1g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesongxl.dtsi"
+#include "meson_drm.dtsi"
+#include "mesongxl_p212-panel.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_p212_1g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+       };
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               fb_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x2400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3dc00000 0x2400000>;
+               };
+               //don't put other dts in front of fb_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x10400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xC00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC40000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <1>; /** 0: normal, 1: host, 2: device*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                                               "usb1",
+                                               "usb1_to_ddr";
+       };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxl";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* s905x */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <3>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <6>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_CLK81
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_81",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               memory-region = <&fb_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x1800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000 */
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               mem_alloc = <1>;
+               logo_addr = "0x3dc00000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "disabled";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       partitions: partitions{
+               parts = <12>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&boot>;
+               part-7 = <&system>;
+               part-8 = <&cache>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               vendor:vendor
+               {
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm
+               {
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+&spicc{
+       status = "disabled";
+       pinctrl-names = "spicc_pulldown","spicc_pullup";
+       pinctrl-0 = <&spicc_pulldown_x8x9x11>;
+       pinctrl-1 = <&spicc_pullup_x8x9x11>;
+       num_chipselect = <1>;
+       cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_HIGH>;
+       dma_en = <0>;
+       dma_tx_threshold = <3>;
+       dma_rx_threshold = <3>;
+       dma_num_per_read_burst = <3>;
+       dma_num_per_write_burst = <3>;
+       delay_control = <0x15>;
+       ssctl = <0>;
+};
diff --git a/arch/arm/boot/dts/amlogic/gxl_p212_1g_hd.dts b/arch/arm/boot/dts/amlogic/gxl_p212_1g_hd.dts
new file mode 100644 (file)
index 0000000..3447aaa
--- /dev/null
@@ -0,0 +1,1207 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_p212_1g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesongxl.dtsi"
+#include "partition_mbox_normal.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_p212_1g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3fc00000 0x400000>;
+               };
+               //don't put other dts in front of logo_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x1000000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x10400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               dhd_static_buf;    //dhd_static_buf support
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xC00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC40000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <1>; /** 0: normal, 1: host, 2: device*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                                               "usb1",
+                                               "usb1_to_ddr";
+       };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxl";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* s905x */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <3>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <5>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_CLK81
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_81",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       gpio_keypad{
+               compatible = "amlogic, gpio_keypad";
+               status = "okay";
+               scan_period = <20>;
+               key_num = <1>;
+               key_name = "power";
+               key_code = <116>;
+               key-gpios = <&gpio_ao  GPIOAO_2  GPIO_ACTIVE_HIGH>;
+               detect_mode = <0>;/*0:polling mode, 1:irq mode*/
+       };
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00400000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "720p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1280 720 1280 2160 32>;
+               /*1920*1080*4*3 = 0xA8C000*/
+               logo_addr = "0x3fc00000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "disabled";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               memory-region = <&picdec_cma_reserved>;
+               dev_name = "picdec";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+&spicc{
+       status = "disabled";
+       pinctrl-names = "spicc_pulldown","spicc_pullup";
+       pinctrl-0 = <&spicc_pulldown_x8x9x11>;
+       pinctrl-1 = <&spicc_pullup_x8x9x11>;
+       num_chipselect = <1>;
+       cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_HIGH>;
+       dma_en = <0>;
+       dma_tx_threshold = <3>;
+       dma_rx_threshold = <3>;
+       dma_num_per_read_burst = <3>;
+       dma_num_per_write_burst = <3>;
+       delay_control = <0x15>;
+       ssctl = <0>;
+};
diff --git a/arch/arm/boot/dts/amlogic/gxl_p212_2g_buildroot.dts b/arch/arm/boot/dts/amlogic/gxl_p212_2g_buildroot.dts
new file mode 100644 (file)
index 0000000..d3c1a0f
--- /dev/null
@@ -0,0 +1,1248 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_p212_2g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "mesongxl.dtsi"
+#include "meson_drm.dtsi"
+#include "mesongxl_p212-panel.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_p212_2g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //don't put other dts in front of fb_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x10400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               dhd_static_buf;    //dhd_static_buf support
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xC00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC40000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_CLK81
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_81",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <1>; /** 0: normal, 1: host, 2: device*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+               };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxl";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* s905x */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <3>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <6>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x1800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000 */
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               mem_alloc = <1>;
+               logo_addr = "0x7dc00000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "disabled";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       partitions: partitions{
+               parts = <12>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&boot>;
+               part-7 = <&system>;
+               part-8 = <&cache>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               vendor:vendor
+               {
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm
+               {
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/gxl_p230_2g_buildroot.dts b/arch/arm/boot/dts/amlogic/gxl_p230_2g_buildroot.dts
new file mode 100644 (file)
index 0000000..85b8147
--- /dev/null
@@ -0,0 +1,1310 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_p230_2g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "mesongxl.dtsi"
+#include "meson_drm.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_p230_2g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               //don't put other dts in front of logo_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x5C00000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+       };
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               //if use bcm wifi, config dhd_static_buf and 32k as bellow
+               dhd_static_buf;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       boot{
+                               offset=<0x0 0x300000>;
+                               size=<0x0 0x800000>;
+                       };
+                       /*
+                        *recovery{
+                        *      offset=<0x0 0xB00000>;
+                        *      size=<0x0 0xA00000>;
+                        *};
+                        */
+                       upgrade{
+                               offset=<0x0 0xB00000>;
+                               size=<0x0 0x5800000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<0>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_CLK81
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_81",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <3>; /** 0: normal,1:host,2:device,3:otg*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+               };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxl";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* s905d */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <3>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <6>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               mem_alloc = <1>;
+               logo_addr = "0x7dc00000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "okay";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       partitions: partitions{
+               parts = <12>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&boot>;
+               part-7 = <&system>;
+               part-8 = <&cache>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               vendor:vendor
+               {
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm
+               {
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+       amvdec_656in {
+               compatible = "amlogic, amvdec_656in";
+               dev_name = "amvdec_656in";
+               status = "disabled";
+               reg = <0xd0048000 0x7c>,
+                       <0xd0050000 0x7c>;
+               clocks = <&clkc CLKID_BT656_CLK1_COMP>,
+                       <&clkc CLKID_BT656>,
+                       <&clkc CLKID_BT656_PCLK1>;
+               clock-names = "cts_bt656_clk1",
+                       "clk_gate_bt656",
+                       "clk_gate_bt656_pclk1";
+
+               /* bt656in1, bt656in2 */
+               bt656in1 {
+                       bt656_id = <1>;
+                       status = "okay";
+               };
+       };
+       hdmirx_ext {
+               compatible = "amlogic, hdmirx_ext";
+               dev_name = "hdmirx_ext";
+               status = "disabled";
+               pinctrl-names = "default";
+               pinctrl-0 = <&hdmirx_ext_pins>;
+               vdin_sel = <0>;
+               bt656_sel = <1>;
+               reset-gpios = <&gpio GPIODV_20 GPIO_ACTIVE_HIGH>;
+               reset_gpio_name = "GPIODV_20";
+               reset_gpio_val = <0 1>; /* reset_on, reset_off */
+
+               ext_dev_name = "sii9135";
+               i2c_addr = <0x30>; /* pull_up: 0x31, pull_down: 0x30 */
+               i2c_bus = "i2c_bus_c";
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+
+&pinctrl_periphs {
+       hdmirx_ext_pins: hdmirx_ext_pins {
+               mux {
+                       groups = "dvp_vs",
+                               "dvp_hs",
+                               "dvp_clk",
+                               "dvp_d2_9";
+                       function = "dvp";
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/amlogic/gxl_p231_1g.dts b/arch/arm/boot/dts/amlogic/gxl_p231_1g.dts
new file mode 100644 (file)
index 0000000..d878812
--- /dev/null
@@ -0,0 +1,1122 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_p231_1g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "mesongxl.dtsi"
+#include "partition_mbox_normal.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_p231_1g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3f800000 0x800000>;
+               };
+               //don't put other dts in front of logo_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x0 0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x7C00000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x0 0x01400000>;
+               //      alignment = <0x0 0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0xc000000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <1>; /** 0: normal, 1: host, 2: device*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+               };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxl";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* s905d */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <3>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <5>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               logo_addr = "0x3f800000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "okay";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               memory-region = <&picdec_cma_reserved>;
+               dev_name = "picdec";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/gxl_p231_2g.dts b/arch/arm/boot/dts/amlogic/gxl_p231_2g.dts
new file mode 100644 (file)
index 0000000..39b32fd
--- /dev/null
@@ -0,0 +1,1121 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_p231_2g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "mesongxl.dtsi"
+#include "partition_mbox_normal.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_p231_2g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               //don't put other dts in front of logo_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x0 0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x7C00000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <1>; /** 0: normal, 1: host, 2: device*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+               };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxl";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* s905d */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <3>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <5>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               logo_addr = "0x7f800000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "okay";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               memory-region = <&picdec_cma_reserved>;
+               dev_name = "picdec";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/gxl_p231_2g_buildroot.dts b/arch/arm/boot/dts/amlogic/gxl_p231_2g_buildroot.dts
new file mode 100644 (file)
index 0000000..2d8efd8
--- /dev/null
@@ -0,0 +1,1190 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_p231_2g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "mesongxl.dtsi"
+#include "meson_drm.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_p231_2g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+       };
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               fb_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x2400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7dc00000 0x2400000>;
+               };
+               //don't put other dts in front of fb_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x10400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               dhd_static_buf;    //dhd_static_buf support
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <1>; /** 0: normal, 1: host, 2: device*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+               };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxl";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* s905d */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <3>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <6>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               memory-region = <&fb_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x1800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000 */
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               mem_alloc = <1>;
+               logo_addr = "0x7dc00000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "okay";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       partitions: partitions{
+               parts = <12>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&boot>;
+               part-7 = <&system>;
+               part-8 = <&cache>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               vendor:vendor
+               {
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm
+               {
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/gxl_p241_1g_buildroot.dts b/arch/arm/boot/dts/amlogic/gxl_p241_1g_buildroot.dts
new file mode 100644 (file)
index 0000000..0c1f5ed
--- /dev/null
@@ -0,0 +1,1357 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_p241_1g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesongxl.dtsi"
+#include "meson_drm.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_p241_1g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_C;
+               serial2 = &uart_B;
+               serial3 = &uart_A;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //don't put other dts in front of fb_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3552320=34M(0x22) support 8bit **/
+                       /** 10x44596800=44M(0x2c) support 12bit **/
+                       /** 10x4074560=39M(0x27) support 10bit **/
+                       size = <0x02400000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x7800000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       vpu {
+               clk_level = <2>;
+               /* 0: 100.0M    1: 166.7M    2: 200.0M    3: 250.0M */
+               /* 4: 333.3M    5: 400.0M    6: 500.0M    7: 666.7M */
+       };
+
+       uart_AO: serial@c81004c0 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc81004c0 0x18>;
+               interrupts = <0 193 1>;
+               status = "okay";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               xtal_tick_en = <1>;
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_uart_pins>;
+               support-sysrq = <0>;    /* 0 not support , 1 support */
+       };
+
+       uart_A: serial@c11084c0 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc11084c0 0x18>;
+               interrupts = <0 26 1>;
+               status = "disable";
+               clocks = <&clkc CLKID_UART0>;
+               clock-names = "clk_uart";
+               fifosize = < 128 >;
+               pinctrl-names = "default";
+               // pinctrl-0 = <&a_uart_pins>;
+       };
+
+       uart_B: serial@c11084dc {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc11084dc 0x18>;
+               interrupts = <0 75 1>;
+               status = "disabled";
+               clocks = <&clkc CLKID_UART1>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&b_uart_pins>;
+       };
+
+       uart_C: serial@c1108700 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc1108700 0x18>;
+               interrupts = <0 93 1>;
+               status = "okay";
+               clocks = <&clkc CLKID_UART2>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&c_uart_pins>;
+       };
+
+       uart_AO_B: serial@c81004e0 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc81004e0 0x18>;
+               interrupts = <0 197 1>;
+               status = "disable";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_b_uart_pins>;
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_12       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               interrupts = <  0 68 4>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               dhd_static_buf;    //dhd_static_buf support
+               power_on_pin = <&gpio       GPIODV_25       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       // caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <300000>;
+                       f_max = <50000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_pins>;
+               pinctrl-4 = <&ao_to_sd_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xC00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC40000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <1>; /** 0: normal, 1: host, 2: device*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                                               "usb1",
+                                               "usb1_to_ddr";
+       };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxl";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* s805x */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <3>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <6>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "okay";
+               led_gpio = <&gpio GPIODV_27 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00300000 0x00b00000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size */
+               display_mode_default = "720p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1280 720 1280 2160 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               mem_alloc = <1>;
+               logo_addr = "0x3f000000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "disabled";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               // pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       partitions: partitions{
+               parts = <14>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&misc>;
+               part-3 = <&dto>;
+               part-4 = <&cri_data>;
+               part-5 = <&param>;
+               part-6 = <&boot>;
+               part-7 = <&rsv>;
+               part-8 = <&tee>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&system>;
+               part-12 = <&cache>;
+               part-13 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x1800000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               dto:dto{
+                       pname = "dto";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               cri_data:cri_data
+               {
+                       pname = "cri_data";
+                       size = <0x0 0x800000>;
+                       mask = <2>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               param:param{
+                       pname = "param";
+                       size = <0x0 0x1000000>;
+                       mask = <2>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               vendor:vendor
+               {
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm
+               {
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x46000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 6 1>;
+               interrupt-names = "de_irq",
+                               "timerc";
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               /* mv_size(byte) = 1920*544*2/5 */
+               /* mc_size(byte) = 544*2 */
+               buffer-size = <3552320>;
+               hw-version = <2>;
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-surpport to 1 */
+               nr10bit-surpport = <0>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+};
+
+&gpu{
+       /*max gpu is 650M*/
+       tbl = <&clk125_cfg &clk285_cfg &clk400_cfg
+                  &clk500_cfg &clk666_cfg &clk666_cfg>;
+};
+
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+&spicc{
+       status = "disabled";
+       pinctrl-names = "spicc_pulldown","spicc_pullup";
+       pinctrl-0 = <&spicc_pulldown_x8x9x11>;
+       pinctrl-1 = <&spicc_pullup_x8x9x11>;
+       num_chipselect = <1>;
+       cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_HIGH>;
+       dma_en = <0>;
+       dma_tx_threshold = <3>;
+       dma_rx_threshold = <3>;
+       dma_num_per_read_burst = <3>;
+       dma_num_per_write_burst = <3>;
+       delay_control = <0x15>;
+       ssctl = <0>;
+};
diff --git a/arch/arm/boot/dts/amlogic/gxl_p241_v2_1g_buildroot.dts b/arch/arm/boot/dts/amlogic/gxl_p241_v2_1g_buildroot.dts
new file mode 100644 (file)
index 0000000..e42f846
--- /dev/null
@@ -0,0 +1,1356 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_p241_v2-1g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesongxl.dtsi"
+#include "meson_drm.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_p241_v2-1g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_C;
+               serial2 = &uart_B;
+               serial3 = &uart_A;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+               //don't put other dts in front of fb_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3552320=34M(0x22) support 8bit **/
+                       /** 10x44596800=44M(0x2c) support 12bit **/
+                       /** 10x4074560=39M(0x27) support 10bit **/
+                       size = <0x02400000>;
+                       alignment = <0x400000>;
+               };
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x7800000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       vpu {
+               clk_level = <2>;
+               /* 0: 100.0M    1: 166.7M    2: 200.0M    3: 250.0M */
+               /* 4: 333.3M    5: 400.0M    6: 500.0M    7: 666.7M */
+       };
+
+       uart_AO: serial@c81004c0 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc81004c0 0x18>;
+               interrupts = <0 193 1>;
+               status = "okay";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               xtal_tick_en = <1>;
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_uart_pins>;
+               support-sysrq = <0>;    /* 0 not support , 1 support */
+       };
+
+       uart_A: serial@c11084c0 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc11084c0 0x18>;
+               interrupts = <0 26 1>;
+               status = "disable";
+               clocks = <&clkc CLKID_UART0>;
+               clock-names = "clk_uart";
+               fifosize = < 128 >;
+               pinctrl-names = "default";
+               // pinctrl-0 = <&a_uart_pins>;
+       };
+
+       uart_B: serial@c11084dc {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc11084dc 0x18>;
+               interrupts = <0 75 1>;
+               status = "disabled";
+               clocks = <&clkc CLKID_UART1>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&b_uart_pins>;
+       };
+
+       uart_C: serial@c1108700 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc1108700 0x18>;
+               interrupts = <0 93 1>;
+               status = "okay";
+               clocks = <&clkc CLKID_UART2>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&c_uart_pins>;
+       };
+
+       uart_AO_B: serial@c81004e0 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc81004e0 0x18>;
+               interrupts = <0 197 1>;
+               status = "disable";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_b_uart_pins>;
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_12       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               interrupts = <  0 68 4>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               dhd_static_buf;    //dhd_static_buf support
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       // caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <300000>;
+                       f_max = <50000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_pins>;
+               pinctrl-4 = <&ao_to_sd_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xC00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC40000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <1>; /** 0: normal, 1: host, 2: device*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                                               "usb1",
+                                               "usb1_to_ddr";
+       };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxl";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* s805x */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <3>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <6>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "okay";
+               led_gpio = <&gpio GPIODV_27 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00300000 0x00b00000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size */
+               display_mode_default = "720p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1280 720 1280 2160 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               mem_alloc = <1>;
+               logo_addr = "0x3f000000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "okay";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               // pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       partitions: partitions{
+               parts = <14>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&misc>;
+               part-3 = <&dto>;
+               part-4 = <&cri_data>;
+               part-5 = <&param>;
+               part-6 = <&boot>;
+               part-7 = <&rsv>;
+               part-8 = <&tee>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&system>;
+               part-12 = <&cache>;
+               part-13 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x1800000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               dto:dto{
+                       pname = "dto";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               cri_data:cri_data
+               {
+                       pname = "cri_data";
+                       size = <0x0 0x800000>;
+                       mask = <2>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               param:param{
+                       pname = "param";
+                       size = <0x0 0x1000000>;
+                       mask = <2>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               vendor:vendor
+               {
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm
+               {
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x46000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 6 1>;
+               interrupt-names = "de_irq",
+                               "timerc";
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               /* mv_size(byte) = 1920*544*2/5 */
+               /* mc_size(byte) = 544*2 */
+               buffer-size = <3552320>;
+               hw-version = <2>;
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-surpport to 1 */
+               nr10bit-surpport = <0>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+};
+
+&gpu{
+       /*max gpu is 650M*/
+       tbl = <&clk125_cfg &clk285_cfg &clk400_cfg
+                  &clk500_cfg &clk666_cfg &clk666_cfg>;
+};
+
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+&spicc{
+       status = "disabled";
+       pinctrl-names = "spicc_pulldown","spicc_pullup";
+       pinctrl-0 = <&spicc_pulldown_x8x9x11>;
+       pinctrl-1 = <&spicc_pullup_x8x9x11>;
+       num_chipselect = <1>;
+       cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_HIGH>;
+       dma_en = <0>;
+       dma_tx_threshold = <3>;
+       dma_rx_threshold = <3>;
+       dma_num_per_read_burst = <3>;
+       dma_num_per_write_burst = <3>;
+       delay_control = <0x15>;
+       ssctl = <0>;
+};
diff --git a/arch/arm/boot/dts/amlogic/gxl_p400_2g.dts b/arch/arm/boot/dts/amlogic/gxl_p400_2g.dts
new file mode 100644 (file)
index 0000000..84cd017
--- /dev/null
@@ -0,0 +1,874 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_p400_2g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "mesongxl.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_p400_2g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               fb_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x2400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7dc00000 0x2400000>;
+               };
+
+
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <3>; /** 0: normal,1:host,2:device,3:otg*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+               };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               memory-region = <&fb_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000 */
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               mem_alloc = <1>;
+               logo_addr = "0x7dc00000";
+       };
+
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <1>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "okay";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "disable";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&dummy_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       partitions: partitions{
+               parts = <11>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&instaboot>;
+               part-7 = <&boot>;
+               part-8 = <&system>;
+               part-9 = <&cache>;
+               part-10 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               instaboot:instaboot{
+                       pname = "instaboot";
+                       size = <0x0 0x400000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+};
+
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_i2s_pins {
+       mux {
+               groups = "i2s_am_clk",
+               "i2s_ao_clk_out",
+               "i2s_lr_clk_out",
+               "i2sout_ch01",
+               "i2sin_ch23",
+               "i2sin_ch45",
+               "i2sin_ch67";
+               function = "i2s";
+       };
+};
+
+&i2c_AO {
+       status = "okay";
+       pca9557:pca9557@0x1f{
+               compatible = "nxp,pca9557";
+               reg = <0x1f>;
+               status = "okay";
+       };
+};
diff --git a/arch/arm/boot/dts/amlogic/gxl_p401_2g.dts b/arch/arm/boot/dts/amlogic/gxl_p401_2g.dts
new file mode 100644 (file)
index 0000000..921a32c
--- /dev/null
@@ -0,0 +1,962 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_p401_2g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "mesongxl.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_p401_2g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               fb_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x2400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7dc00000 0x2400000>;
+               };
+
+
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "disabled";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "okay";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+
+               /*fip/tpl configurations, must be same
+                * with uboot if bl_mode was set as 1
+                * bl_mode: 0 compact mode; 1 descrete mode
+                * if bl_mode was set as 1, fip configeration will work
+                */
+               bl_mode = <1>;
+               /*copy count of fip*/
+               fip_copies = <4>;
+               /*size of each fip copy */
+               fip_size = <0x200000>;
+               nand_clk_ctrl = <0xd0074000>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+
+                       /*
+                        * if bl_mode is 1, tpl size was generate by
+                        * fip_copies * fip_size which
+                        * will not skip bad when calculating
+                        * the partition size;
+                        *
+                        * if bl_mode is 0,
+                        * tpl partition must be comment out.
+                        */
+                       tpl{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x0>;
+                       };
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC00000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <3>; /** 0: normal,1:host,2:device,3:otg*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+               };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               memory-region = <&fb_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000 */
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               mem_alloc = <1>;
+               logo_addr = "0x7dc00000";
+       };
+
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <1>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "okay";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "disable";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&dummy_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       partitions: partitions{
+               parts = <11>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&instaboot>;
+               part-7 = <&boot>;
+               part-8 = <&system>;
+               part-9 = <&cache>;
+               part-10 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               instaboot:instaboot{
+                       pname = "instaboot";
+                       size = <0x0 0x400000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+};
+
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_i2s_pins {
+       mux {
+               groups = "i2s_am_clk",
+               "i2s_ao_clk_out",
+               "i2s_lr_clk_out",
+               "i2sout_ch01",
+               "i2sin_ch23",
+               "i2sin_ch45",
+               "i2sin_ch67";
+               function = "i2s";
+       };
+};
+
+&i2c_AO {
+       status = "okay";
+       pca9557:pca9557@0x1f{
+               compatible = "nxp,pca9557";
+               reg = <0x1f>;
+               status = "okay";
+       };
+};
diff --git a/arch/arm/boot/dts/amlogic/gxl_sei210_1g.dts b/arch/arm/boot/dts/amlogic/gxl_sei210_1g.dts
new file mode 100644 (file)
index 0000000..a3a729a
--- /dev/null
@@ -0,0 +1,1207 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_p212_1g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesongxl.dtsi"
+#include "partition_mbox_normal_sei32bit.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_sei210_1g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3f800000 0x800000>;
+               };
+               //don't put other dts in front of logo_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x7C00000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0xc000000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               dhd_static_buf;    //dhd_static_buf support
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xC00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC40000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <1>; /** 0: normal, 1: host, 2: device*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                                               "usb1",
+                                               "usb1_to_ddr";
+       };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxl";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* s905x */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <3>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <5>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       gpio_keypad{
+               compatible = "amlogic, gpio_keypad";
+               status = "okay";
+               scan_period = <20>;
+               key_num = <1>;
+               key_name = "power";
+               key_code = <116>;
+               key-gpios = <&gpio_ao  GPIOAO_2  GPIO_ACTIVE_HIGH>;
+               detect_mode = <0>;/*0:polling mode, 1:irq mode*/
+       };
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               logo_addr = "0x3f800000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "disabled";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               memory-region = <&picdec_cma_reserved>;
+               dev_name = "picdec";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <16>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+               unifykey-index-15= <&keysn_15>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_15: key_15{
+                       key-name = "region_code";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+&spicc{
+       status = "disabled";
+       pinctrl-names = "spicc_pulldown","spicc_pullup";
+       pinctrl-0 = <&spicc_pulldown_x8x9x11>;
+       pinctrl-1 = <&spicc_pullup_x8x9x11>;
+       num_chipselect = <1>;
+       cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_HIGH>;
+       dma_en = <0>;
+       dma_tx_threshold = <3>;
+       dma_rx_threshold = <3>;
+       dma_num_per_read_burst = <3>;
+       dma_num_per_write_burst = <3>;
+       delay_control = <0x15>;
+       ssctl = <0>;
+};
diff --git a/arch/arm/boot/dts/amlogic/gxl_sei210_2g.dts b/arch/arm/boot/dts/amlogic/gxl_sei210_2g.dts
new file mode 100644 (file)
index 0000000..9d581d6
--- /dev/null
@@ -0,0 +1,1201 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_sei210_2g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "partition_mbox_normal_sei32bit.dtsi"
+#include "mesongxl_sei210.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_sei210_2g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               //don't put other dts in front of logo_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x7C00000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               dhd_static_buf;    //dhd_static_buf support
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "disabled";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <180000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xC00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC40000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       status = "disabled";
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       gpio_keypad{
+               compatible = "amlogic, gpio_keypad";
+               status = "okay";
+               scan_period = <20>;
+               key_num = <1>;
+               key_name = "power";
+               key_code = <116>;
+               key-gpios = <&gpio_ao  GPIOAO_2  GPIO_ACTIVE_HIGH>;
+               detect_mode = <0>;/*0:polling mode, 1:irq mode*/
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <1>; /** 0: normal, 1: host, 2: device*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+               };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxl";
+               dev_name = "cvbsout";
+               status = "disabled";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* s905x */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <3>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <5>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               logo_addr = "0x7f800000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "disabled";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "disabled";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&dummy_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               memory-region = <&picdec_cma_reserved>;
+               dev_name = "picdec";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <16>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+               unifykey-index-15= <&keysn_15>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_15: key_15{
+                       key-name = "region_code";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/gxl_skt.dts b/arch/arm/boot/dts/amlogic/gxl_skt.dts
new file mode 100644 (file)
index 0000000..482ca70
--- /dev/null
@@ -0,0 +1,1213 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxl_skt.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesongxl.dtsi"
+#include "partition_mbox_normal.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxl_p212_1g";
+       compatible = "amlogic, Gxl";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3f800000 0x800000>;
+               };
+               //don't put other dts in front of logo_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x4C00000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0xd000000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       dummy-battery {
+               compatible = "amlogic, dummy-battery";
+               status = "okay";
+       };
+
+       dummy-charger {
+               compatible = "amlogic, dummy-charger";
+               status = "okay";
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+       };
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               dhd_static_buf;    //dhd_static_buf support
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxl";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xC00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC40000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<1>;
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <1>; /** 0: normal, 1: host, 2: device*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                                               "usb1",
+                                               "usb1_to_ddr";
+       };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxl";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               /* s905x */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <3>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <5>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_CLK81
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_81",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxl";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               logo_addr = "0x3f800000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxl";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "disabled";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               memory-region = <&picdec_cma_reserved>;
+               dev_name = "picdec";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <16>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+               unifykey-index-15= <&keysn_15>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_15:key_15{
+                       key-name = "region_code";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+&spicc{
+       status = "disabled";
+       pinctrl-names = "spicc_pulldown","spicc_pullup";
+       pinctrl-0 = <&spicc_pulldown_x8x9x11>;
+       pinctrl-1 = <&spicc_pullup_x8x9x11>;
+       num_chipselect = <1>;
+       cs-gpios = <&gpio GPIOX_10 GPIO_ACTIVE_HIGH>;
+       dma_en = <0>;
+       dma_tx_threshold = <3>;
+       dma_rx_threshold = <3>;
+       dma_num_per_read_burst = <3>;
+       dma_num_per_write_burst = <3>;
+       delay_control = <0x15>;
+       ssctl = <0>;
+};
diff --git a/arch/arm/boot/dts/amlogic/gxm_q200_2g.dts b/arch/arm/boot/dts/amlogic/gxm_q200_2g.dts
new file mode 100644 (file)
index 0000000..24022e7
--- /dev/null
@@ -0,0 +1,1223 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxm_q200_2g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesongxm.dtsi"
+#include "partition_mbox_normal.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxm_q200_2g";
+       compatible = "amlogic, Gxm";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               //don't put other dts in front of logo_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x7C00000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               dhd_static_buf;
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxm";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxm";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxm";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "nandboot","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&nandboot>;
+               plat-part-1 = <&nandnormal>;
+               nandboot: nandboot{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xC00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC40000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<0>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_CLK81
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_81",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpufreq_cool_cluster1 {
+                               min_state = <500000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <1>;
+                               node_name = "cpufreq_cool1";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       cpucore_cool_cluster1 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <1>;
+                               node_name = "cpucore_cool1";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpufreq_cool1:cpufreq_cool1 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool1:cpucore_cool1 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2450>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map0 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpufreq_cooling_map1 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool1 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map0 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map1 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool1 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <3>; /** 0: normal,1:host,2:device,3:otg*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+       };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxm";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <4>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <6>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxm";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01851000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               logo_addr = "0x7f800000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxm";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "okay";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               memory-region = <&picdec_cma_reserved>;
+               dev_name = "picdec";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clkc CLKID_FCLK_DIV5>,
+                *      <&clkc CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_gxm";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <15>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+&i2c1 {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/gxm_q200_2g_buildroot.dts b/arch/arm/boot/dts/amlogic/gxm_q200_2g_buildroot.dts
new file mode 100644 (file)
index 0000000..acb411a
--- /dev/null
@@ -0,0 +1,1289 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxm_q200_2g_buildroot.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesongxm.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxm_q200_2g";
+       compatible = "amlogic, Gxm";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x10400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               dhd_static_buf;
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxm";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       status = "disabled";
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxm";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       status = "disabled";
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxm";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       status = "disabled";
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "nandboot","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&nandboot>;
+               plat-part-1 = <&nandnormal>;
+               nandboot: nandboot{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xC00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x80000000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<0>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_CLK81
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_81",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpufreq_cool_cluster1 {
+                               min_state = <500000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <1>;
+                               node_name = "cpufreq_cool1";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       cpucore_cool_cluster1 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <1>;
+                               node_name = "cpucore_cool1";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpufreq_cool1:cpufreq_cool1 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool1:cpucore_cool1 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2450>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map0 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpufreq_cooling_map1 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool1 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map0 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map1 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool1 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <3>; /** 0: normal,1:host,2:device,3:otg*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+       };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxm";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <4>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <6>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxm";
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               mem_alloc = <1>;
+               logo_addr = "0x7dc00000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxm";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "okay";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               memory-region = <&picdec_cma_reserved>;
+               dev_name = "picdec";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clkc CLKID_FCLK_DIV5>,
+                *      <&clkc CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+
+       partitions: partitions{
+               parts = <12>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&boot>;
+               part-7 = <&system>;
+               part-8 = <&cache>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               vendor:vendor
+               {
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm
+               {
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <14>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+&i2c1 {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/gxm_q201_1g.dts b/arch/arm/boot/dts/amlogic/gxm_q201_1g.dts
new file mode 100644 (file)
index 0000000..e96da97
--- /dev/null
@@ -0,0 +1,1231 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxm_q201_1g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesongxm.dtsi"
+#include "partition_mbox_normal.dtsi"
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "gxm_q201_1g";
+       compatible = "amlogic, Gxm";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x0100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+};
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x7f800000 0x800000>;
+               };
+               //don't put other dts in front of logo_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x7C00000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "amlogic, ppmgr_memory";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0xc000000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       bt-dev{
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio       GPIOX_17       GPIO_ACTIVE_HIGH>;
+       };
+
+       wifi{
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio       GPIOX_7       GPIO_ACTIVE_HIGH>;
+               irq_trigger_type = "GPIO_IRQ_LOW";
+               dhd_static_buf;
+               power_on_pin = <&gpio       GPIOX_6       GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf:wifi_pwm_conf{
+               pwm_channel1_conf {
+                       pwms = <&pwm_ef MESON_PWM_0 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <8>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_ef MESON_PWM_2 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxm";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxm";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxm";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "nandboot","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&nandboot>;
+               plat-part-1 = <&nandnormal>;
+               nandboot: nandboot{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       boot{
+                               offset=<0x0 0x300000>;
+                               size=<0x0 0x800000>;
+                       };
+                       /*
+                        *recovery{
+                        *      offset=<0x0 0xB00000>;
+                        *      size=<0x0 0xA00000>;
+                        *};
+                        */
+                       upgrade{
+                               offset=<0x0 0xB00000>;
+                               size=<0x0 0x5800000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       ethmac: ethernet@0xc9410000 {
+                       compatible = "amlogic, gxbb-eth-dwmac";
+                       reg = <0xc9410000 0x10000
+                       0xc8834540 0x8
+                       0xc8834558 0xc>;
+                       interrupts = <0 8 1>;
+                       pinctrl-names = "external_eth_pins";
+                       pinctrl-0 = <&external_eth_pins>;
+                       rst_pin-gpios = <&gpio GPIOZ_14 0>;
+                       GPIOZ4_pin-gpios = <&gpio GPIOZ_4 0>;
+                       GPIOZ5_pin-gpios = <&gpio GPIOZ_5 0>;
+                       mc_val_internal_phy = <0x1800>;
+                       mc_val_external_phy = <0x1621>;
+                       cali_val = <0x20000>;
+                       interrupt-names = "macirq";
+                       clocks = <&clkc CLKID_ETH>;
+                       clock-names = "ethclk81";
+                       internal_phy=<0>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpufreq_cool_cluster1 {
+                               min_state = <500000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <1>;
+                               node_name = "cpufreq_cool1";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       cpucore_cool_cluster1 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <1>;
+                               node_name = "cpucore_cool1";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpufreq_cool1:cpufreq_cool1 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool1:cpucore_cool1 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2450>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map0 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpufreq_cooling_map1 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool1 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map0 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map1 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool1 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       dwc3: dwc3@c9000000 {
+               compatible = "synopsys, dwc3";
+               reg = <0xc9000000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@d0078000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               portnum = <3>;
+               reg = <0xd0078000 0x80
+                                       0xc1104408 0x4>;
+       };
+
+       usb3_phy: usb3phy@d0078080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               portnum = <0>;
+               reg = <0xd0078080 0x20>;
+               interrupts = <0 16 4>;
+               otg = <1>;
+               gpio-vbus-power = "GPIOAO_5";
+               gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xc9100000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               port-dma = <0>; /** 0: default ... 6: disable*/
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               controller-type = <3>; /** 0: normal,1:host,2:device,3:otg*/
+               phy-reg = <0xd0078000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                       &clkc CLKID_USB1_TO_DDR
+                       &clkc CLKID_USB1>;
+               clock-names = "usb_general",
+                       "usb1",
+                       "usb1_to_ddr";
+       };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxm";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <4>;
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <6>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+       };
+
+       sysled {
+               compatible = "amlogic, sysled";
+               dev_name = "sysled";
+               status = "disabled";
+               led_gpio = <&gpio GPIODV_24 GPIO_ACTIVE_HIGH>;
+               led_active_low = <1>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxm";
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01851000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               logo_addr = "0x7f800000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxm";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "okay";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       amvenc_avc{
+               compatible = "amlogic, amvenc_avc";
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       hevc_enc{
+               compatible = "cnm, HevcEnc";
+               dev_name = "HevcEnc";
+               status = "okay";
+               interrupts = <0 187 1>;
+               interrupt-names = "wave420l_irq";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_reg_base{
+                       reg = <0xc8810000 0x4000>;
+               };
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               memory-region = <&picdec_cma_reserved>;
+               dev_name = "picdec";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clkc CLKID_FCLK_DIV5>,
+                *      <&clkc CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_gxm";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+       unifykey{
+               compatible = "amlogic, unifykey";
+               status = "ok";
+
+               unifykey-num = <16>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11= <&keysn_11>;
+               unifykey-index-12= <&keysn_12>;
+               unifykey-index-13= <&keysn_13>;
+               unifykey-index-14= <&keysn_14>;
+               unifykey-index-15= <&keysn_15>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "PlayReadykeybox25";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_15:key_15{
+                       key-name = "region_code";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       };//End unifykey
+};
+&efuse {
+       status = "ok";
+};
+
+&pwm_ef {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+&i2c1 {
+       status = "okay";
+};
diff --git a/arch/arm/boot/dts/amlogic/gxm_skt.dts b/arch/arm/boot/dts/amlogic/gxm_skt.dts
new file mode 100644 (file)
index 0000000..b6ff2bb
--- /dev/null
@@ -0,0 +1,1053 @@
+/*
+ * arch/arm/boot/dts/amlogic/gxm_skt.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include "mesongxm.dtsi"
+
+/ {
+       model = "Amlogic";
+       compatible = "amlogic, Gxm";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+               secos_reserved:linux,secos {
+                       status = "disable";
+                       compatible = "amlogic, aml_secos_memory";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3f800000 0x800000>;
+               };
+               //don't put other dts in front of logo_reserved
+
+               //di_reserved:linux,di {
+               //      compatible = "amlogic, di-mem";
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+               //      size = <0x1e00000>;
+                       //no-map;
+               //};
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /** 10x3133440=30M(0x1e) support 8bit **/
+                       size = <0x2000000>;
+                       alignment = <0x400000>;
+               };
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x7C00000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin0 CMA pool */
+               //vdin0_cma_reserved:linux,vdin0_cma {
+               //      compatible = "shared-dma-pool";
+               //      linux,phandle = <4>;
+               //      reusable;
+               /* 1920x1080x2x4  =16+4 M */
+               //      size = <0x01400000>;
+               //      alignment = <0x400000>;
+               //};
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x01000000>;
+                       alignment = <0x400000>;
+               };
+               /*  POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "shared-dma-pool";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxm";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxm";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       sd_emmc_a:sdio@d0070000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-gxm";
+               reg = <0xd0070000 0x2000>;
+               interrupts = <0 216 4>;
+               pinctrl-names = "sdio_clk_cmd_pins", "sdio_all_pins";
+               pinctrl-0 = <&sdio_clk_cmd_pins>;
+               pinctrl-1 = <&sdio_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_A>,
+                          <&clkc CLKID_SD_EMMC_A_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sdio {
+                       pinname = "sdio";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        */
+               };
+       };
+       mtd_nand{
+               compatible = "amlogic, aml_mtd_nand";
+               dev_name = "mtdnand";
+               status = "disabled";
+               reg = <0xd0074800 0x200>;
+               interrupts = <  0 34 1 >;
+               pinctrl-names = "nand_rb_mod","nand_norb_mod", "nand_cs_only";
+               pinctrl-0 = <&all_nand_pins>;
+               pinctrl-1 = <&all_nand_pins>;
+               pinctrl-2 = <&nand_cs_pins>;
+               device_id = <0>;
+               plat-names = "bootloader","nandnormal";
+               plat-num = <2>;
+               plat-part-0 = <&bootloader>;
+               plat-part-1 = <&nandnormal>;
+               bootloader: bootloader{
+                       enable_pad ="ce0";
+                       busy_pad = "rb0";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <1>;
+                       part_num = <0>;
+                       rb_detect = <1>;
+               };
+               nandnormal: nandnormal{
+                       enable_pad ="ce0","ce1";
+                       busy_pad = "rb0","rb1";
+                       timming_mode = "mode5";
+                       bch_mode = "bch60_1k";
+                       plane_mode = "twoplane";
+                       t_rea = <20>;
+                       t_rhoh = <15>;
+                       chip_num = <2>;
+                       part_num = <3>;
+                       partition = <&nand_partitions>;
+                       rb_detect = <1>;
+               };
+               nand_partitions:nand_partition{
+                       logo{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x200000>;
+                       };
+                       recovery{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0x1000000>;
+                       };
+                       boot{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xC00000>;
+                       };
+                       system{
+                               offset=<0x0 0x0>;
+                               size=<0x0 0xDC40000>;
+                       };
+                       data{
+                               offset=<0xffffffff 0xffffffff>;
+                               size=<0x0 0x0>;
+                       };
+               };
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xC1100000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xc8820000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vcbus_base{
+                       reg = <0xd0100000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xc8838000 0x400>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       canvas{
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "ok";
+               reg = <0xc8838000 0x400>;
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpufreq_cool0";
+                               device_type = "cpufreq";
+                       };
+                       cpufreq_cool_cluster1 {
+                               min_state = <500000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <1>;
+                               node_name = "cpufreq_cool1";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpucore_cool0";
+                               device_type = "cpucore";
+                       };
+                       cpucore_cool_cluster1 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <1>;
+                               node_name = "cpucore_cool1";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "gpufreq_cool0";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "gpucore_cool0";
+                               device_type = "gpucore";
+                       };
+               };
+               cpufreq_cool0:cpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpufreq_cool1:cpufreq_cool1 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool0:cpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               cpucore_cool1:cpucore_cool1 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpufreq_cool0:gpufreq_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore_cool0:gpucore_cool0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2450>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map0 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpufreq_cooling_map1 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpufreq_cool1 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map0 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map1 {
+                                       trip = <&control>;
+                                       cooling-device = <&cpucore_cool1 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpufreq_cool0 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore_cool0 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-gxm";
+               dev_name = "cvbsout";
+               status = "okay";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               performance = <0x1bf0  0x9
+                       0x1b56  0x343
+                       0x1b12  0x8080
+                       0x1b05  0xfd
+                       0x1c59  0xf752
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx{
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               vend-data = <&vend_data>;
+               pinctrl-names="hdmitx_hpd", "hdmitx_ddc";
+               pinctrl-0=<&hdmitx_hpd>;
+               pinctrl-1=<&hdmitx_ddc>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               vend_data: vend_data{ /* Should modified by Customer */
+                       vendor_name = "Amlogic"; /* Max Chars: 8 */
+                       /* standards.ieee.org/develop/regauth/oui/oui.txt */
+                       vendor_id = <0x000000>;
+                       product_desc = "MBox Meson Ref"; /* Max Chars: 16 */
+               };
+       };
+
+       aocec: aocec{
+               compatible = "amlogic, amlogic-aocec";
+               device_name = "aocec";
+               status = "okay";
+               vendor_id = <0x000000>;
+               cec_osd_string = "MBox"; /* Max Chars: 14    */
+               cec_version = <6>; /* 5: 1.4, 6: 2.0 */
+               port_num = <1>;
+               arc_port_mask = <0x0>;
+               interrupts = <0 199 1>;
+               interrupt-names = "hdmi_aocec";
+               pinctrl-names = "default";
+               pinctrl-0=<&hdmitx_aocec>;
+               reg = <0xc810023c 0x4
+                      0xc8100000 0x200>;
+               reg-names = "ao_exit","ao";
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-gxm";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01851000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               scale_mode = <1>;
+               /** 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               display_size_default = <1920 1080 1920 3240 32>;
+               /*1920*1080*4*3 = 0x17BB000*/
+               logo_addr = "0x3f800000";
+       };
+       ge2d {
+               compatible = "amlogic, ge2d-gxm";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+       };
+
+
+       /* AUDIO MESON DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks =
+                       <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "aud_buf",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+               i2s_pos_sync = <0>;
+               /*DMIC;*/  /* I2s Mic or Dmic, default for I2S mic */
+       };
+       dmic:snd_dmic {
+               #sound-dai-cells = <0>;
+               compatible = "aml, aml_snd_dmic";
+               reg = <0xd0042000 0x2000>;
+               status = "okay";
+               resets = <
+                       &clkc CLKID_PDM_GATE
+               >;
+               reset-names =   "pdm";
+               pinctrl-names = "audio_dmic";
+               pinctrl-0 = <&aml_dmic_pins>;
+               clocks = <&clkc CLKID_PDM_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>;
+               clock-names = "pdm", "mclk";
+       };
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks =
+                       <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_I958_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_I958_COMP_SPDIF>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               pinctrl-0 = <&audio_pcm_pins>;
+               clocks =
+                       <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_GATE>;
+               clock-names =
+                       "mpll0",
+                       "pcm_mclk",
+                       "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif";
+               pinctrl-0 = <&audio_spdif_pins>;
+       };
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* endof AUDIO MESON DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disable";
+       };
+       amlogic_codec:t9015{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015";
+               reg = <0xc8832000 0x14>;
+               status = "okay";
+       };
+       aml_sound_meson {
+               compatible = "aml, meson-snd-card";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-MESONAUDIO";
+               aml,audio-routing =
+                               "Ext Spk","LOUTL",
+                               "Ext Spk","LOUTR";
+
+               mute_gpio-gpios = <&gpio GPIOH_5 0>;
+               mute_inv;
+               hp_disable;
+               hp_paraments = <800 300 0 5 1>;
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&audio_i2s_pins>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+       };
+       /* END OF AUDIO board specific */
+
+       rdma{
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "ok";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               memory-region = <&picdec_cma_reserved>;
+               dev_name = "picdec";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       /*if you want to use vdin just modify status to "ok"*/
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <1>;/*1:share with codec_mm;2:cma alone*/
+               /*MByte, if 10bit disable: 64M(YUV422),
+                *if 10bit enable: 64*1.5 = 96M(YUV422)
+                *if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                *if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                *if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                *if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <16>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <0>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                *bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <1>;
+       };
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "ok";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               /*clocks = <&clock CLK_FPLL_DIV5>,
+                *      <&clock CLK_VDIN_MEAS_CLK>;
+                *clock-names = "fclk_div5", "cts_vdin_meas_clk";
+                */
+               vdin_id = <1>;
+               /*vdin write mem color depth support:
+                *bit0:support 8bit
+                *bit1:support 9bit
+                *bit2:support 10bit
+                *bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+                /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+       };
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_gxm";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+       partitions: partitions{
+               parts = <11>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&instaboot>;
+               part-7 = <&boot>;
+               part-8 = <&system>;
+               part-9 = <&cache>;
+               part-10 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               instaboot:instaboot{
+                       pname = "instaboot";
+                       size = <0x0 0x400000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               flag_cma = <1>;/*0:use reserved;1:use cma*/
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1 0 6 1>;
+               interrupt-names = "de_irq",     "timerc";
+               /*
+                * nr_size(byte) = 1920*544*2(yuv422 8bit) |
+                * 1920*544*2*12/8(yuv422 10bit)
+                * | 1920*544*2*10/8(yuv422 10bit full pack mode)
+                */
+               /* mtn_size(byte) = 1920*544/2 */
+               /* count_size(byte) = 1920*544/2 */
+               buffer-size = <3133440>;
+               hw-version = <2>;
+       };
+
+};
+&efuse {
+       status = "ok";
+};
diff --git a/arch/arm/boot/dts/amlogic/meson_drm.dtsi b/arch/arm/boot/dts/amlogic/meson_drm.dtsi
new file mode 100644 (file)
index 0000000..9f391ba
--- /dev/null
@@ -0,0 +1,104 @@
+/*
+ * arch/arm/boot/dts/amlogic/meson_drm.dtsi
+ *
+ * Copyright (C) 2015 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/ {
+       drm_amhdmitx: drm-amhdmitx {
+               status = "disabled";
+               hdcp = "disabled";
+               compatible = "amlogic,drm-amhdmitx";
+               dev_name = "meson-amhdmitx";
+               interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
+               ports {
+                       port {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               hdmi_in_vpu: endpoint@0 {
+                                       reg = <0>;
+                                       remote-endpoint = <&vpu_out_hdmi>;
+                               };
+                       };
+               };
+       };
+
+       drm_lcd: drm-lcd {
+               status = "disabled";
+               compatible = "amlogic,drm-lcd";
+               dev_name = "meson-lcd";
+               ports {
+                       port {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               lcd_in_vpu: endpoint@0 {
+                                       reg = <0>;
+                                       remote-endpoint = <&vpu_out_lcd>;
+                               };
+                       };
+               };
+       };
+
+       drm_vpu: drm-vpu@0xff900000  {
+               status = "disabled";
+               compatible = "amlogic,meson-gxbb-vpu";
+               reg = <0xd0100000 0x100000>,
+                         <0xc883c000 0x1000>,
+                         <0xc8838000 0x1000>;
+               reg-names = "base", "hhi", "dmc";
+               interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
+               dma-coherent;
+               vpu_out: port {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       vpu_out_hdmi: endpoint@0 {
+                               reg = <0>;
+                               remote-endpoint = <&hdmi_in_vpu>;
+                       };
+                       vpu_out_lcd: endpoint@1 {
+                               reg = <1>;
+                               remote-endpoint = <&lcd_in_vpu>;
+                       };
+               };
+       };
+
+       drm_subsystem: drm-subsystem {
+               status = "okay";
+               compatible = "amlogic,drm-subsystem";
+               ports = <&vpu_out>;
+       };
+};
+
+&gpu{
+       /*gpu max freq is 750M*/
+       def_clk = <1>;
+       tbl = <&clk285_cfg &clk666_cfg &clk750_cfg &clk750_cfg>;
+
+       clk285_cfg:clk285_cfg {
+                keep_count = <2>;
+                threshold = <100 200>;
+       };
+
+       clk666_cfg:clk666_cfg {
+                keep_count = <1>;
+                threshold = <85 200>;
+       };
+
+       clk750_cfg:clk750_cfg {
+                keep_count = <1>;
+                threshold = <179 255>;
+       };
+
+};
diff --git a/arch/arm/boot/dts/amlogic/mesong12a_drm.dtsi b/arch/arm/boot/dts/amlogic/mesong12a_drm.dtsi
new file mode 100644 (file)
index 0000000..b6597c6
--- /dev/null
@@ -0,0 +1,109 @@
+/*
+ * arch/arm/boot/dts/amlogic/meson_drm.dtsi
+ *
+ * Copyright (C) 2015 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/ {
+       venc-cvbs {
+               status = "okay";
+               compatible = "amlogic,meson-gxbb-cvbs";
+
+               ports {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       enc_cvbs_in: port@0 {
+                                #address-cells = <1>;
+                                #size-cells = <0>;
+                                reg = <0>;
+
+                                //venc_cvbs_in_vpu: endpoint@0 {
+                               //       reg = <0>;
+                               //       remote-endpoint = <&vpu_out_venc_cvbs>;
+                               //};
+                       };
+               };
+       };
+
+       drm_amhdmitx: drm-amhdmitx {
+               status = "disabled";
+               hdcp = "disabled";
+               compatible = "amlogic,drm-amhdmitx";
+               dev_name = "meson-amhdmitx";
+               interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
+               ports {
+                       port {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               hdmi_in_vpu: endpoint@0 {
+                                       reg = <0>;
+                                       remote-endpoint = <&vpu_out_hdmi>;
+                               };
+                       };
+               };
+       };
+
+       drm_lcd: drm-lcd {
+               status = "disabled";
+               compatible = "amlogic,drm-lcd";
+               dev_name = "meson-lcd";
+               ports {
+                       port {
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               lcd_in_vpu: endpoint@0 {
+                                       reg = <0>;
+                                       remote-endpoint = <&vpu_out_lcd>;
+                               };
+                       };
+               };
+       };
+
+       drm_vpu: drm-vpu@0xff900000  {
+               status = "disabled";
+               compatible = "amlogic,meson-g12a-vpu";
+               memory-region = <&logo_reserved>;
+               reg = <0xff900000 0x40000>,
+                         <0xff63c000 0x2000>,
+                         <0xff638000 0x2000>;
+               reg-names = "base", "hhi", "dmc";
+               interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>,
+                       <GIC_SPI 56 IRQ_TYPE_EDGE_RISING>;
+               interrupt-names = "viu-vsync", "viu2-vsync";
+               clocks = <&clkc CLKID_VPU_CLKC_MUX>;
+               clock-names = "vpu_clkc";
+               dma-coherent;
+               vpu_out: port {
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+
+                       vpu_out_hdmi: endpoint@0 {
+                               reg = <0>;
+                               remote-endpoint = <&hdmi_in_vpu>;
+                       };
+                       vpu_out_lcd: endpoint@1 {
+                               reg = <1>;
+                               remote-endpoint = <&lcd_in_vpu>;
+                       };
+               };
+       };
+
+       drm_subsystem: drm-subsystem {
+               status = "okay";
+               compatible = "amlogic,drm-subsystem";
+               ports = <&vpu_out>;
+       };
+};
+
diff --git a/arch/arm/boot/dts/amlogic/mesongxl_p212-panel.dtsi b/arch/arm/boot/dts/amlogic/mesongxl_p212-panel.dtsi
new file mode 100644 (file)
index 0000000..655fae9
--- /dev/null
@@ -0,0 +1,148 @@
+/*
+ * arch/arm/boot/dts/amlogic/mesongxl_p212-panel.dtsi
+ *
+ * Copyright (C) 2016 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/ {
+       lcd{
+               compatible = "amlogic, lcd-gxl";
+               mode = "tablet";
+               status = "okay";
+               key_valid = <0>;
+               /* clocks = <&clkc CLKID_VCLK2_ENCL
+                *      &clkc CLKID_VCLK2_VENCL>;
+                * clock-names = "vencl_top_gate",
+                * "vencl_int_gate";
+                */
+               reg = <0xc8834400 0x100>;
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+               pinctrl_version = <1>; /* for uboot */
+               pinctrl-names = "ttl_6bit_hvsync_de_on",
+                       "ttl_6bit_hvsync_on",
+                       "ttl_6bit_de_on",
+                       "ttl_6bit_hvsync_de_off",
+                       "ttl_8bit_hvsync_de_on",
+                       "ttl_8bit_hvsync_on",
+                       "ttl_8bit_de_on",
+                       "ttl_8bit_hvsync_de_off";
+               pinctrl-0 = <&lcd_ttl_rgb_6bit_on_pins
+                       &lcd_ttl_de_hvsync_on_pins>;
+               pinctrl-1 = <&lcd_ttl_rgb_6bit_on_pins
+                       &lcd_ttl_hvsync_on_pins>;
+               pinctrl-2 = <&lcd_ttl_rgb_6bit_on_pins
+                       &lcd_ttl_de_on_pins>;
+               pinctrl-3 = <&lcd_ttl_rgb_6bit_off_pins
+                       &lcd_ttl_de_hvsync_off_pins>;
+               pinctrl-4 = <&lcd_ttl_rgb_8bit_on_pins
+                       &lcd_ttl_de_hvsync_on_pins>;
+               pinctrl-5 = <&lcd_ttl_rgb_8bit_on_pins
+                       &lcd_ttl_hvsync_on_pins>;
+               pinctrl-6 = <&lcd_ttl_rgb_8bit_on_pins
+                       &lcd_ttl_de_on_pins>;
+               pinctrl-7 = <&lcd_ttl_rgb_8bit_off_pins
+                       &lcd_ttl_de_hvsync_off_pins>;
+
+               /* power type:
+                *    (0=cpu_gpio, 1=pmu_gpio, 2=signal,3=extern, 0xff=ending)
+                * power index:
+                *    (point gpios_index, or extern_index,0xff=invalid)
+                * power value:(0=output low, 1=output high, 2=input)
+                * power delay:(unit in ms)
+                */
+               /*lcd_cpu-gpios = <&gpio GPIOX_3 GPIO_ACTIVE_HIGH>;*/
+               /*lcd_cpu_gpio_names = "GPIOX_3";*/
+
+               lcd_0{
+                       model_name = "LCD720P";
+                       interface = "ttl";
+                       basic_setting = <1280 720 /*h_active, v_active*/
+                               1650 750 /*h_period, v_period*/
+                               8      /*lcd_bits */
+                               16 9>; /*screen_widht, screen_height*/
+                       lcd_timing = <40 220 1 /*hs_width, hs_bp, hs_pol*/
+                               5 20 1>; /*vs_width, vs_bp, vs_pol*/
+                       clk_attr = <0 /*fr_adj_type(0=clk, 1=htotal, 2=vtotal)*/
+                               0 /*clk_ss_level*/
+                               1 /*clk_auto_generate*/
+                               74250000>; /*pixel_clk(unit in Hz)*/
+                       ttl_attr = <0 /*clk_pol*/
+                               1 /*de_valid*/
+                               1 /*hvsync_valid*/
+                               0 /*rb_swap*/
+                               0>; /*bit_swap*/
+
+                       /* power step: type, index, value, delay(ms) */
+                       power_on_step = <2 0 0 0
+                               0xff 0 0 0>; /*ending*/
+                       power_off_step = <2 0 0 50
+                               0xff 0 0 0>; /*ending*/
+                       backlight_index = <0xff>;
+               };
+       };
+
+       lcd_extern{
+               compatible = "amlogic, lcd_extern";
+               status = "disabled";
+               i2c_bus = "i2c_bus_d";
+               key_valid = <0>;
+
+               extern_0{
+                       index = <0>;
+                       extern_name = "ext_default";
+                       status = "disabled";
+                       type = <0>; /* 0=i2c, 1=spi, 2=mipi */
+                       i2c_address = <0x1c>; /* 7bit i2c address */
+                       i2c_address2 = <0xff>; /* 0xff for none */
+                       cmd_size = <0xff>; /*0xff for dynamic cmd_size*/
+
+                       /* init on/off:
+                        *  fixed cmd_size: (type, value...);
+                        *                  cmd_size include all data.
+                        *  dynamic cmd_size: (type, cmd_size, value...);
+                        *                    cmd_size include value.
+                        */
+                       /* type: 0x00=cmd with delay(bit[3:0]=1 for address2),
+                        *       0xc0=cmd(bit[3:0]=1 for address2),
+                        *       0xf0=gpio,
+                        *       0xfd=delay,
+                        *       0xff=ending
+                        */
+                       /* value: i2c or spi cmd, or gpio index & level */
+                       /* delay: unit ms */
+                       init_on = <
+                               0xc0 7 0x20 0x01 0x02 0x00 0x40 0xFF 0x00
+                               0xc0 7 0x80 0x02 0x00 0x40 0x62 0x51 0x73
+                               0xc0 7 0x61 0x06 0x00 0x00 0x00 0x00 0x00
+                               0xc0 7 0xC1 0x05 0x0F 0x00 0x08 0x70 0x00
+                               0xc0 7 0x13 0x01 0x00 0x00 0x00 0x00 0x00
+                               0xc0 7 0x3D 0x02 0x01 0x00 0x00 0x00 0x00
+                               0xc0 7 0xED 0x0D 0x01 0x00 0x00 0x00 0x00
+                               0xc0 7 0x23 0x02 0x00 0x00 0x00 0x00 0x00
+                               0xfd 1 10 /* delay 10ms */
+                               0xff 0>; /*ending*/
+                       init_off = <0xff 0>; /*ending*/
+               };
+
+               extern_1{
+                       index = <1>;
+                       extern_name = "i2c_DLPC3439";
+                       status = "disabled";
+                       type = <0>; /* 0=i2c, 1=spi, 2=mipi */
+                       i2c_address = <0x1b>; /* 7bit i2c address */
+               };
+       };
+};/* end of panel */
+
diff --git a/arch/arm/boot/dts/amlogic/mesongxl_sei210.dtsi b/arch/arm/boot/dts/amlogic/mesongxl_sei210.dtsi
new file mode 100644 (file)
index 0000000..2445a5e
--- /dev/null
@@ -0,0 +1,1317 @@
+/*
+ * arch/arm/boot/dts/amlogic/mesongxl.dtsi
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/reset/amlogic,gxl-reset.h>
+#include <dt-bindings/clock/amlogic,gxl-clkc.h>
+#include <dt-bindings/iio/adc/amlogic-saradc.h>
+#include <dt-bindings/gpio/gxl.h>
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/input/meson_rc.h>
+#include <dt-bindings/pwm/pwm.h>
+#include <dt-bindings/pwm/meson.h>
+#include "mesongxbb-gpu-mali450.dtsi"
+/ {
+       cpus:cpus {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               cpu-map {
+                       cluster0:cluster0 {
+                               core0 {
+                                       cpu = <&CPU0>;
+                               };
+                               core1 {
+                                       cpu = <&CPU1>;
+                               };
+                               core2 {
+                                       cpu = <&CPU2>;
+                               };
+                               core3 {
+                                       cpu = <&CPU3>;
+                               };
+                       };
+               };
+               CPU0:cpu@0 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53","arm,armv8";
+                       reg = <0x0>;
+                       enable-method = "psci";
+                       clocks = <&scpi_dvfs 0>;
+                       clock-names = "cpu-cluster.0";
+                       cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       /*cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;*/
+               };
+
+               CPU1:cpu@1 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53","arm,armv8";
+                       reg = <0x1>;
+                       enable-method = "psci";
+                       clocks = <&scpi_dvfs 0>;
+                       clock-names = "cpu-cluster.0";
+                       cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       /*cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;*/
+               };
+               CPU2:cpu@2 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53","arm,armv8";
+                       reg = <0x2>;
+                       enable-method = "psci";
+                       clocks = <&scpi_dvfs 0>;
+                       clock-names = "cpu-cluster.0";
+                       cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       /*cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;*/
+               };
+
+               CPU3:cpu@3 {
+                       device_type = "cpu";
+                       compatible = "arm,cortex-a53","arm,armv8";
+                       reg = <0x3>;
+                       enable-method = "psci";
+                       clocks = <&scpi_dvfs 0>;
+                       clock-names = "cpu-cluster.0";
+                       cpu-idle-states = <&SYSTEM_SLEEP_0>;
+                       /*cpu-idle-states = <&CPU_SLEEP_0 &SYSTEM_SLEEP_0>;*/
+               };
+
+
+               idle-states {
+                       entry-method = "arm,psci";
+/*
+ *                     CPU_SLEEP_0: cpu-sleep-0 {
+ *                             compatible = "arm,idle-state";
+ *                             arm,psci-suspend-param = <0x0010000>;
+ *                             local-timer-stop;
+ *                             entry-latency-us = <3000>;
+ *                             exit-latency-us = <3000>;
+ *                             min-residency-us = <8000>;
+ *                     };
+ */
+                       SYSTEM_SLEEP_0: system-sleep-0 {
+                               compatible = "arm,idle-state";
+                               arm,psci-suspend-param = <0x0010000>;
+                               local-timer-stop;
+                               entry-latency-us = <0x3fffffff>;
+                               exit-latency-us = <0x40000000>;
+                               min-residency-us = <0xffffffff>;
+                       };
+               };
+       };
+
+       timer {
+               compatible = "arm,armv8-timer";
+               interrupts = <GIC_PPI 13 0xff08>,
+                               <GIC_PPI 14 0xff08>,
+                               <GIC_PPI 11 0xff08>,
+                               <GIC_PPI 10 0xff08>;
+       };
+       timer_bc {
+               compatible = "arm, meson-bc-timer";
+               reg=   <0xc1109990 0x4 0xc1109994 0x4>;
+               timer_name = "Meson TimerF";
+               clockevent-rating=<300>;
+               clockevent-shift=<20>;
+               clockevent-features=<0x23>;
+               interrupts = <0 60 1>;
+               bit_enable=<16>;
+               bit_mode=<12>;
+               bit_resolution=<0>;
+       };
+       arm_pmu {
+               compatible = "arm,armv8-pmuv3";
+               interrupts = <0 137 4>,
+                            <0 138 4>,
+                            <0 153 4>,
+                            <0 154 4>;
+       };
+
+       gic: interrupt-controller@2c001000 {
+               compatible = "arm,cortex-a15-gic", "arm,cortex-a9-gic";
+               #interrupt-cells = <3>;
+               #address-cells = <0>;
+               interrupt-controller;
+               reg = <0xc4301000 0 0x1000>,
+                     <0xc4302000 0 0x0100>;
+               interrupts = <GIC_PPI 9 0xf04>;
+       };
+
+       psci {
+               compatible = "arm,psci-0.2";
+               method = "smc";
+       };
+
+       meson_suspend:pm{
+               compatible = "amlogic, pm";
+               device_name = "aml_pm";
+               reg = <0xc81000a8 0x4
+                       0xc810023c 0x4>;
+       };
+
+       secmon {
+               compatible = "amlogic, secmon";
+               memory-region = <&secmon_reserved>;
+               in_base_func = <0x82000020>;
+               out_base_func = <0x82000021>;
+               reserve_mem_size = <0x00300000>;
+       };
+
+       securitykey {
+               compatible = "aml, securitykey";
+               storage_query = <0x82000060>;
+               storage_read = <0x82000061>;
+               storage_write = <0x82000062>;
+               storage_tell = <0x82000063>;
+               storage_verify = <0x82000064>;
+               storage_status = <0x82000065>;
+               storage_list = <0x82000067>;
+               storage_remove = <0x82000068>;
+               storage_in_func = <0x82000023>;
+               storage_out_func = <0x82000024>;
+               storage_block_func = <0x82000025>;
+               storage_size_func = <0x82000027>;
+               storage_set_enctype = <0x8200006A>;
+               storage_get_enctype = <0x8200006B>;
+               storage_version = <0x8200006C>;
+       };
+
+       cpu_iomap{
+               compatible = "amlogic, iomap";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xc1100000 0x100000>;
+               };
+               io_apb_base{
+                       reg = <0xd0050000 0x50000>;
+               };
+               io_aobus_base{
+                       reg = <0xc8100000 0x100000>;
+               };
+               io_vapb_base{
+                       reg = <0xd0100000 0x100000>;
+               };
+               io_hiu_base{
+                       reg = <0xc883c000 0x2000>;
+               };
+       };
+
+       cpu_info{
+               compatible = "amlogic, cpuinfo";
+               cpuinfo_cmd = <0x82000044>;
+               status = "okay";
+       };
+
+       watchdog {
+               compatible = "amlogic, meson-wdt";
+               status = "disabled";
+               default_timeout=<10>;
+               reset_watchdog_method=<1>; /* 0:sysfs,1:kernel */
+               reset_watchdog_time=<2>;
+               shutdown_timeout=<10>;
+               firmware_timeout=<6>;
+               suspend_timeout=<6>;
+               reg = <0xc11098d0 0x10>;
+               clock-names = "xtal";
+               clocks = <&xtal>;
+       };
+
+       jtag {
+               compatible = "amlogic, jtag";
+               status = "okay";
+               select = "apao"; /* disable/apao/apee */
+               jtagao-gpios = <&gpio   GPIOH_6         0
+                               &gpio   GPIOH_7         0
+                               &gpio   GPIOH_8         0
+                               &gpio   GPIOH_9         0>;
+               jtagee-gpios = <&gpio   CARD_0          0
+                               &gpio   CARD_1          0
+                               &gpio   CARD_2          0
+                               &gpio   CARD_3          0>;
+       };
+
+       mailbox: mhu@c883c400 {
+               compatible = "amlogic, meson_mhu";
+               reg = <0xc883c400 0x4c>,   /* MHU registers */
+                     <0xc8013000 0x800>;   /* Payload area */
+               interrupts = <0 209 1>,   /* low priority interrupt */
+                            <0 210 1>;   /* high priority interrupt */
+               #mbox-cells = <1>;
+               mbox-names = "cpu_to_scp_low", "cpu_to_scp_high";
+               mboxes = <&mailbox 0 &mailbox 1>;
+       };
+
+       scpi_clocks {
+               compatible = "arm, scpi-clks";
+
+               scpi_dvfs: scpi_clocks@0 {
+                       compatible = "arm, scpi-clk-indexed";
+                       #clock-cells = <1>;
+                       clock-indices = <0>;
+                       clock-output-names = "vcpu";
+               };
+
+       };
+
+       xtal: xtal-clk {
+               compatible = "fixed-clock";
+               clock-frequency = <24000000>;
+               clock-output-names = "xtal";
+               #clock-cells = <0>;
+       };
+
+       vpu {
+               compatible = "amlogic, vpu-gxl";
+               dev_name = "vpu";
+               status = "okay";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_VPU_INTR>,
+                       <&clkc CLKID_GP0_PLL>,
+                       <&clkc CLKID_VPU_P0_COMP>,
+                       <&clkc CLKID_VPU_P1_COMP>,
+                       <&clkc CLKID_VPU_MUX>;
+               clock-names = "vapb_clk",
+                       "vpu_intr",
+                       "gp_pll",
+                       "vpu_clk0",
+                       "vpu_clk1",
+                       "vpu_clk";
+               clk_level = <7>;
+               /* 0: 100.0M    1: 166.7M    2: 200.0M    3: 250.0M */
+               /* 4: 333.3M    5: 400.0M    6: 500.0M    7: 666.7M */
+       };
+
+       spicc:@c1108d80{
+               compatible = "amlogic, spicc";
+               status = "disabled";
+               reg = <0xc1108d80 0x28>;
+               clocks = <&clkc CLKID_SPICC>;
+               clock-names = "spicc_clk";
+               interrupts = <0 81 1>;
+               device_id = <0>;
+       };
+
+       uart_AO: serial@c81004c0 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc81004c0 0x18>;
+               interrupts = <0 193 1>;
+               status = "okay";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               xtal_tick_en = <1>;
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               /*pinctrl-0 = <&ao_uart_pins>;*/
+               support-sysrq = <0>;    /* 0 not support , 1 support */
+       };
+
+       uart_A: serial@c11084c0 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc11084c0 0x18>;
+               interrupts = <0 26 1>;
+               status = "okay";
+               clocks = <&clkc CLKID_UART0>;
+               clock-names = "clk_uart";
+               fifosize = < 128 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&a_uart_pins>;
+       };
+
+       uart_B: serial@c11084dc {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc11084dc 0x18>;
+               interrupts = <0 75 1>;
+               status = "disabled";
+               clocks = <&clkc CLKID_UART1>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&b_uart_pins>;
+       };
+
+       uart_C: serial@c1108700 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc1108700 0x18>;
+               interrupts = <0 93 1>;
+               status = "disabled";
+               clocks = <&clkc CLKID_UART2>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&c_uart_pins>;
+       };
+
+       uart_AO_B: serial@c81004e0 {
+               compatible = "amlogic, meson-uart";
+               reg = <0xc81004e0 0x18>;
+               interrupts = <0 197 1>;
+               status = "disable";
+               clocks = <&xtal>;
+               clock-names = "clk_uart";
+               fifosize = < 64 >;
+               pinctrl-names = "default";
+               pinctrl-0 = <&ao_b_uart_pins>;
+       };
+
+       pinctrl_aobus: pinctrl@14 {
+               compatible = "amlogic,meson-gxl-aobus-pinctrl";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               gpio_ao: bank@14 {
+                       reg = <0xc8100014 0x8>,
+                             <0xc810002c 0x4>,
+                             <0xc8100024 0x8>;
+                       reg-names = "mux", "pull", "gpio";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+               };
+       };
+
+       pinctrl_periphs: pinctrl@4b0 {
+               compatible = "amlogic,meson-gxl-periphs-pinctrl";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               gpio: bank@4b0 {
+                       reg = <0xc88344b0 0x28>,
+                             <0xc88344e8 0x14>,
+                             <0xc8834520 0x14>,
+                             <0xc8834430 0x40>;
+                       reg-names = "mux", "pull",
+                               "pull-enable", "gpio";
+                       gpio-controller;
+                       #gpio-cells = <2>;
+               };
+       };
+
+       soc {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               cbus: cbus@c1100000 {
+                       compatible = "simple-bus";
+                       reg = <0xc1100000 0x100000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0xc1100000 0x100000>;
+
+                       gpio_intc: interrupt-controller@9880 {
+                               compatible = "amlogic,meson-gpio-intc",
+                                               "amlogic,meson-gxl-gpio-intc";
+                               reg = <0x9880 0x10>;
+                               interrupt-controller;
+                               #interrupt-cells = <2>;
+                               amlogic,channel-interrupts =
+                                       <64 65 66 67 68 69 70 71>;
+                               status = "okay";
+                       };
+
+                       meson_clk_msr{
+                               compatible = "amlogic, gxl_measure";
+                               reg = <0x875c 0x4
+                                       0x8764 0x4>;
+                       };
+
+                       /*i2c-A*/
+                       i2c0: i2c@8500 {
+                               compatible = "amlogic,meson-gx-i2c";
+                               status = "disabled";
+                               reg = <0x8500 0x20>;
+                               interrupts = <GIC_SPI 21 IRQ_TYPE_EDGE_RISING>,
+                                       <GIC_SPI 47 IRQ_TYPE_EDGE_RISING>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&clkc CLKID_I2C>;
+                               clock-names = "clk_i2c";
+                       };
+
+                       /*i2c-B*/
+                       i2c1: i2c@87c0 {
+                               compatible = "amlogic,meson-gx-i2c";
+                               status = "disabled";
+                               reg = <0x87c0 0x20>;
+                               interrupts = <GIC_SPI 214 IRQ_TYPE_EDGE_RISING>,
+                                       <GIC_SPI 48 IRQ_TYPE_EDGE_RISING>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&clkc CLKID_I2C>;
+                               clock-names = "clk_i2c";
+                       };
+
+                       /*i2c-C*/
+                       i2c2: i2c@87e0 {
+                               compatible = "amlogic,meson-gx-i2c";
+                               status = "disabled";
+                               reg = <0x87e0 0x20>;
+                               interrupts = <GIC_SPI 215 IRQ_TYPE_EDGE_RISING>,
+                                       <GIC_SPI 49 IRQ_TYPE_EDGE_RISING>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&clkc CLKID_I2C>;
+                               clock-names = "clk_i2c";
+                       };
+
+                       /*i2c-D*/
+                       i2c3: i2c@8d20 {
+                               compatible = "amlogic,meson-gx-i2c";
+                               status = "disabled";
+                               reg = <0x8d20 0x20>;
+                               interrupts = <GIC_SPI 39 IRQ_TYPE_EDGE_RISING>,
+                                       <GIC_SPI 50 IRQ_TYPE_EDGE_RISING>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&clkc CLKID_I2C>;
+                               clock-names = "clk_i2c";
+                       };
+               };
+
+               aobus: aobus@c8100000 {
+                       compatible = "simple-bus";
+                       reg = <0xc8100000 0x100000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0xc8100000 0x100000>;
+
+                       cpu_version{
+                               reg=<0x0220 0x4>;
+                       };
+
+                       i2c_AO: i2c@0500 {
+                               compatible = "amlogic,meson-gx-i2c";
+                               status = "disabled";
+                               reg = <0x0500 0x20>;
+                               interrupts = <GIC_SPI 195 IRQ_TYPE_EDGE_RISING>;
+                               #address-cells = <1>;
+                               #size-cells = <0>;
+                               clocks = <&clkc CLKID_I2C>;
+                               clock-names = "clk_i2c";
+                       };
+               };
+
+               periphs: periphs@c8834000 {
+                       compatible = "simple-bus";
+                       reg = <0xc8834000 0x2000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0xc8834000 0x2000>;
+               };
+
+               hiubus: hiubus@c883c000 {
+                       compatible = "simple-bus";
+                       reg = <0xc883c000 0x2000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0xc883c000 0x2000>;
+
+                       clkc: clock-controller@0 {
+                               compatible = "amlogic,gxl-clkc";
+                               #clock-cells = <1>;
+                               reg = <0x0 0x3db>;
+                       };
+               };
+
+               apb: apb@d0000000 {
+                       compatible = "simple-bus";
+                       reg = <0xd0000000 0x200000>;
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges = <0x0 0xd0000000 0x200000>;
+               };
+       }; /* end of soc */
+
+       vdac {
+               compatible = "amlogic, vdac-gxl";
+               status = "okay";
+       };
+}; /* end of root */
+
+&pinctrl_aobus {
+       remote_pins:remote_pin {
+               mux {
+                       groups = "remote_input";
+                       function = "remote";
+               };
+       };
+
+       sd_to_ao_uart_clr_pins:sd_to_ao_uart_clr_pins {
+               mux {
+                       groups = "GPIOAO_0",
+                                       "GPIOAO_1";
+                       function = "gpio_aobus";
+               };
+       };
+
+       sd_to_ao_uart_pins:sd_to_ao_uart_pins {
+               mux {
+                       groups = "uart_tx_ao_a_0",
+                                       "uart_rx_ao_a_0";
+                       function = "uart_ao";
+                       bias-pull-up;
+                       input-enable;
+               };
+       };
+
+       ao_uart_pins:ao_uart {
+               mux {
+                       groups = "uart_tx_ao_a_0",
+                               "uart_rx_ao_a_0";
+                       function = "uart_ao";
+               };
+       };
+
+       ao_b_uart_pins:ao_b_uart {
+               mux {
+                       groups = "uart_tx_ao_b_0",
+                                       "uart_rx_ao_b_0";
+                       function = "uart_ao_b";
+               };
+       };
+       ao_i2c_master:ao_i2c{
+               mux {
+                       groups = "i2c_sda_ao",
+                               "i2c_sck_ao";
+                       function = "i2c_ao";
+               };
+       };
+
+       hdmitx_aocec: hdmitx_aocec {
+               mux {
+                       groups = "ao_cec";
+                       function = "ao_cec";
+               };
+       };
+
+       hdmitx_eecec: hdmitx_eecec {
+               mux {
+                       groups = "ee_cec";
+                       function = "ee_cec";
+               };
+       };
+}; /* end of pinctrl_aobus*/
+
+&pinctrl_periphs {
+       external_eth_pins:external_eth_pins {
+               mux {
+                       groups = "eth_mdio",
+                               "eth_mdc",
+                               "eth_clk_rx_clk",
+                               "eth_rx_dv",
+                               "eth_rxd0",
+                               "eth_rxd1",
+                               "eth_rxd2",
+                               "eth_rxd3",
+                               "eth_rgmii_tx_clk",
+                               "eth_tx_en",
+                               "eth_txd0",
+                               "eth_txd1",
+                               "eth_txd2",
+                               "eth_txd3";
+                       function = "eth";
+               };
+       };
+
+       jtag_apao_pins:jtag_apao_pin {
+               mux {
+                       groups = "jtag_tdi_0",
+                               "jtag_tdo_0",
+                               "jtag_clk_0",
+                               "jtag_tms_0";
+                       function = "jtag";
+               };
+       };
+
+       jtag_apee_pins:jtag_apee_pin {
+               mux {
+                       groups ="jtag_tdi_1",
+                               "jtag_tdo_1",
+                               "jtag_clk_1",
+                               "jtag_tms_1";
+                       function = "jtag";
+               };
+       };
+
+       a_uart_pins:a_uart {
+               mux {
+                       groups = "uart_tx_a",
+                               "uart_rx_a",
+                               "uart_rts_a";
+                       function = "uart_a";
+               };
+       };
+
+       b_uart_pins:b_uart {
+               mux {
+                       groups = "uart_tx_b",
+                               "uart_rx_b",
+                               "uart_cts_b",
+                               "uart_rts_b";
+                       function = "uart_b";
+               };
+       };
+
+       c_uart_pins:c_uart {
+               mux {
+                       groups = "uart_tx_c",
+                               "uart_rx_c",
+                               "uart_cts_c",
+                               "uart_rts_c";
+                       function = "uart_c";
+               };
+       };
+
+       wifi_32k_pins:wifi_32k_pins {
+               mux {
+                       groups ="pwm_e";
+                       function = "pwm_e";
+               };
+       };
+
+/*
+ * sd_clk_cmd_pins:sd_clk_cmd_pins{
+ * };
+ * sd_all_pins:sd_all_pins {
+ *  };
+ * sd_1bit_uart_pins:sd_1bit_uart_pins{
+ *  };
+ *  sd_clk_cmd_uart_pins:sd_clk_cmd_uart_pins {
+ * };
+ * sd_to_ao_jtag_pins:sd_to_ao_jtag_pins{
+ * };
+ */
+       ao_to_sd_uart_clr_pins:ao_to_sd_uart_clr_pins {
+               mux {
+                       groups = "sdcard_d2",
+                                       "sdcard_d3";
+                       function = "sdcard";
+                       input-enable;
+                       bias-pull-up;
+               };
+       };
+
+       sd_1bit_pins:sd_1bit_pins {
+               mux {
+                       groups = "sdcard_d0",
+                                       "sdcard_cmd",
+                                       "sdcard_clk";
+                       function = "sdcard";
+                       input-enable;
+                       bias-pull-up;
+               };
+       };
+
+       ao_to_sd_uart_pins:ao_to_sd_uart_pins {
+               mux {
+                       groups = "uart_tx_ao_a_card4",
+                                       "uart_rx_ao_a_card5";
+                       function = "uart_ao_a_card";
+                       bias-pull-up;
+                       input-enable;
+               };
+       };
+
+       emmc_clk_cmd_pins:emmc_clk_cmd_pins {
+               mux {
+                       groups = "emmc_cmd",
+                               "emmc_clk";
+                       function = "emmc";
+                       input-enable;
+                       bias-pull-up;
+               };
+       };
+
+
+       emmc_conf_pull_up:emmc_conf_pull_up {
+               mux {
+                       groups = "emmc_nand_d07",
+                               "emmc_clk",
+                               "emmc_cmd";
+                       function = "emmc";
+                       input-enable;
+                       bias-pull-up;
+               };
+       };
+
+       emmc_conf_pull_done:emmc_conf_pull_done {
+               mux {
+                       groups = "emmc_ds";
+                       function = "emmc";
+                       input-enable;
+                       bias-pull-down;
+               };
+       };
+
+       sd_clk_cmd_pins:sd_clk_cmd_pins{
+               mux {
+                       groups = "sdcard_cmd",
+                               "sdcard_clk";
+                       function = "sdcard";
+                       input-enable;
+                       bias-pull-up;
+               };
+       };
+
+       sd_all_pins:sd_all_pins{
+               mux {
+                       groups = "sdcard_d0",
+                               "sdcard_d1",
+                               "sdcard_d2",
+                               "sdcard_d3",
+                               "sdcard_cmd",
+                               "sdcard_clk";
+                       function = "sdcard";
+                       input-enable;
+                       bias-pull-up;
+               };
+       };
+
+       sdio_clk_cmd_pins:sdio_clk_cmd_pins {
+               mux {
+                       groups = "sdio_clk",
+                               "sdio_cmd";
+                       function = "sdio";
+                       input-enable;
+                       bias-pull-up;
+               };
+       };
+
+       sdio_all_pins:sdio_all_pins {
+               mux {
+                       groups = "sdio_d0",
+                               "sdio_d1",
+                               "sdio_d2",
+                               "sdio_d3",
+                               "sdio_clk",
+                               "sdio_cmd";
+                       function = "sdio";
+                       input-enable;
+                       bias-pull-up;
+               };
+       };
+
+       nand_pulldown: nand_pulldown {
+               mux {
+                       groups = "emmc_nand_d07",
+                               "emmc_ds";
+                       function = "emmc";
+                       bias-pull-down;
+               };
+       };
+
+       nand_pullup: nand_pullup {
+               mux {
+                       groups = "emmc_clk",
+                               "emmc_cmd";
+                       function = "emmc";
+                       bias-pull-up;
+               };
+       };
+
+       all_nand_pins: all_nand_pins {
+               mux {
+                       groups = "emmc_nand_d07",
+                               "nand_ce0",
+                               "nand_ce1",
+                               "nand_rb0",
+                               "nand_ale",
+                               "nand_cle",
+                               "nand_wen_clk",
+                               "nand_ren_wr",
+                               "nand_dqs";
+                       function = "nand";
+                       input-enable;
+               };
+       };
+
+       nand_cs_pins: nand_cs {
+               mux {
+                       groups = "nand_ce0",
+                               "nand_ce1";
+                       function = "nand";
+               };
+       };
+
+       hdmitx_hpd: hdmitx_hpd {
+               mux {
+                       groups = "hdmi_hpd";
+                       function = "hdmi_hpd";
+               };
+       };
+
+       hdmitx_ddc: hdmitx_ddc {
+               mux {
+                       groups = "hdmi_sda",
+                               "hdmi_scl";
+                       function = "hdmi_ddc";
+               };
+       };
+
+       a_i2c_master:a_i2c {
+               mux {
+                       groups = "i2c_sda_a",
+                               "i2c_scl_a";
+                       function = "i2c_a";
+               };
+       };
+
+       b_i2c_master:b_i2c {
+               mux {
+                       groups = "i2c_sda_b",
+                               "i2c_scl_b";
+                       function = "i2c_b";
+               };
+       };
+
+       /* c_i2c_master:          dv28 dv29 */
+       /* c_i2c_master_pin1: dv18 dv19 */
+       c_i2c_master:c_i2c {
+               mux {
+                       groups = "i2c_sda_c_dv28",
+                               "i2c_scl_c_dv29";
+                       function = "i2c_c";
+               };
+       };
+       c_i2c_master_pin1:c_i2c_pin1{
+               mux {
+                       groups = "i2c_sda_c_dv18",
+                               "i2c_scl_c_dv19";
+                       function = "i2c_c";
+               };
+       };
+
+       d_i2c_master:d_i2c {
+               mux {
+               groups = "i2c_sda_d",
+                       "i2c_scl_d";
+               function = "i2c_d";
+               };
+       };
+
+       spicc_pulldown_z11z12z13: spicc_pulldown_z11z12z13 {
+               mux {
+                       groups = "spi_sclk_0",
+                               "spi_miso_0",
+                               "spi_mosi_0";
+                       function = "spi";
+               };
+       };
+
+       spicc_pullup_z11z12z13: spicc_pullup_z11z12z13 {
+               mux {
+                       groups = "spi_sclk_0",
+                               "spi_miso_0",
+                               "spi_mosi_0";
+                       function = "spi";
+               };
+       };
+
+       spicc_pulldown_x8x9x11: spicc_pulldown_x8x9x11 {
+               mux {
+                       groups = "spi_sclk_1",
+                               "spi_miso_1",
+                               "spi_mosi_1";
+                       function = "spi";
+                       bias-pull-down;
+               };
+       };
+
+       spicc_pullup_x8x9x11: spicc_pullup_x8x9x11 {
+               mux {
+                       groups = "spi_sclk_1",
+                               "spi_miso_1",
+                               "spi_mosi_1";
+                       function = "spi";
+                       bias-pull-up;
+               };
+       };
+
+       audio_i2s_pins:audio_i2s {
+               mux {
+                       groups = "i2s_am_clk",
+                               "i2s_ao_clk_out",
+                               "i2s_lr_clk_out",
+                               "i2sout_ch01";
+                       function = "i2s";
+               };
+       };
+
+       audio_spdif_pins:audio_spdif {
+               mux {
+                       groups = "spdif_out";
+                       function = "spdif_out";
+               };
+       };
+
+       audio_spdif_in_pins:audio_spdif_in {
+               mux {
+                       groups = "spdif_in_z14";
+                       function = "spdif_in";
+               };
+       };
+
+       audio_spdif_in_1_pins:audio_spdif_in_1 {
+               mux {
+                       groups = "spdif_in_h4";
+                       function = "spdif_in";
+               };
+       };
+
+       audio_pcm_pins:audio_pcm {
+               mux {
+                       groups = "pcm_out_a",
+                               "pcm_in_a",
+                               "pcm_fs_a",
+                               "pcm_clk_a";
+                       function = "pcm_a";
+               };
+       };
+       aml_dmic_pins:audio_dmic {
+               mux {
+                       groups = "dmic_in_dv24",
+                                       "dmic_clk_dv25";
+                       function = "dmic";
+               };
+       };
+       dvb_p_ts0_pins: dvb_p_ts0_pins {
+                       tsin_a {
+                               groups = "tsin_sop_a_dv9",
+                               "tsin_d_valid_a_dv10",
+                               "tsin_d0_a_dv0",
+                               "tsin_d1_7_a_dv1_7",
+                               "tsin_clk_a_dv8";
+                               function = "tsin_a";
+                       };
+               };
+       dvb_s_ts0_pins: dvb_s_ts0_pins {
+                       tsin_a {
+                               groups = "tsin_sop_a_dv9",
+                                       "tsin_d_valid_a_dv10",
+                                       "tsin_clk_a_dv8",
+                                       "tsin_d0_a_dv0";
+                               function = "tsin_a";
+                       };
+               };
+
+}; /* end of pinctrl_periphs */
+
+&periphs {
+       rng {
+               compatible = "amlogic,meson-rng";
+               reg = <0x0 0x4>;
+       };
+};
+
+&cbus{
+       reset: reset-controller@4404 {
+               compatible = "amlogic,reset";
+               reg = <0x04404 0x20>;
+               #reset-cells = <1>;
+       };
+};
+
+/{
+       aml_dma {
+               compatible = "amlogic,aml_gxl_dma";
+               reg = <0xc883e000 0x28>;
+               interrupts = <0 188 1>;
+
+               aml_aes {
+                       compatible = "amlogic,aes_dma";
+                       dev_name = "aml_aes_dma";
+                       status = "okay";
+               };
+
+               aml_tdes {
+                       compatible = "amlogic,des_dma,tdes_dma";
+                       dev_name = "aml_tdes_dma";
+                       status = "okay";
+               };
+       };
+
+       audio_data:audio_data {
+          compatible = "amlogic, audio_data";
+          query_licence_cmd = <0x82000050>;
+          status = "disabled";
+       };
+
+       saradc: saradc {
+               compatible = "amlogic,meson-gxl-saradc";
+               status = "okay";
+               #io-channel-cells = <1>;
+               clocks = <&xtal>, <&clkc CLKID_SARADC>,
+                               <&clkc CLKID_SARADC_COMP>;
+               clock-names = "xtal", "clk81_gate", "saradc_clk";
+               interrupts = <GIC_SPI 73 IRQ_TYPE_EDGE_RISING>;
+               reg = <0xc1108680 0x38>;
+       };
+
+       efuse: efuse{
+               compatible = "amlogic, efuse";
+               read_cmd = <0x82000030>;
+               write_cmd = <0x82000031>;
+               get_max_cmd = <0x82000033>;
+               key = <&efusekey>;
+               clocks = <&clkc CLKID_EFUSE>;
+               clock-names = "efuse_clk";
+               status = "disabled";
+       };
+
+       efusekey:efusekey{
+               keynum = <4>;
+               key0 = <&key_0>;
+               key1 = <&key_1>;
+               key2 = <&key_2>;
+               key3 = <&key_3>;
+               key_0:key_0{
+                       keyname = "mac";
+                       offset = <0>;
+                       size = <6>;
+               };
+               key_1:key_1{
+                       keyname = "mac_bt";
+                       offset = <6>;
+                       size = <6>;
+               };
+               key_2:key_2{
+                       keyname = "mac_wifi";
+                       offset = <12>;
+                       size = <6>;
+               };
+               key_3:key_3{
+                       keyname = "usid";
+                       offset = <18>;
+                       size = <16>;
+               };
+       };
+
+       remote:rc@c8100580 {
+               compatible = "amlogic, aml_remote";
+               dev_name = "meson-remote";
+               reg = <0xc8100580 0x00 0x44>, /*Multi-format IR controller*/
+                       <0xc8100480 0x00 0x20>; /*Legacy IR controller*/
+               status = "okay";
+               protocol = <REMOTE_TYPE_NEC>;
+               interrupts = <0 196 1>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&remote_pins>;
+               map = <&custom_maps>;
+               max_frame_time = <200>; /*set software decoder max frame time*/
+       };
+
+       custom_maps:custom_maps {
+               mapnum = <3>;
+               map0 = <&map_0>;
+               map1 = <&map_1>;
+               map2 = <&map_2>;
+               map_0: map_0{
+                       mapname = "amlogic-remote-1";
+                       customcode = <0xfb04>;
+                       release_delay = <80>;
+                       size  = <50>;   /*keymap size*/
+                       keymap = <REMOTE_KEY(0x47, KEY_0)
+                               REMOTE_KEY(0x13, KEY_1)
+                               REMOTE_KEY(0x10, KEY_2)
+                               REMOTE_KEY(0x11, KEY_3)
+                               REMOTE_KEY(0x0F, KEY_4)
+                               REMOTE_KEY(0x0C, KEY_5)
+                               REMOTE_KEY(0x0D, KEY_6)
+                               REMOTE_KEY(0x0B, KEY_7)
+                               REMOTE_KEY(0x08, KEY_8)
+                               REMOTE_KEY(0x09, KEY_9)
+                               REMOTE_KEY(0x5C, KEY_RIGHTCTRL)
+                               REMOTE_KEY(0x51, KEY_F3)
+                               REMOTE_KEY(0x50, KEY_F4)
+                               REMOTE_KEY(0x40, KEY_F5)
+                               REMOTE_KEY(0x4d, KEY_F6)
+                               REMOTE_KEY(0x43, KEY_F7)
+                               REMOTE_KEY(0x17, KEY_F8)
+                               REMOTE_KEY(0x00, KEY_F9)
+                               REMOTE_KEY(0x01, KEY_F10)
+                               REMOTE_KEY(0x16, KEY_F11)
+                               REMOTE_KEY(0x49, KEY_BACKSPACE)
+                               REMOTE_KEY(0x06, KEY_PROPS)
+                               REMOTE_KEY(0x14, KEY_UNDO)
+                               REMOTE_KEY(0x44, KEY_UP)
+                               REMOTE_KEY(0x1D, KEY_DOWN)
+                               REMOTE_KEY(0x1C, KEY_LEFT)
+                               REMOTE_KEY(0x48, KEY_RIGHT)
+                               REMOTE_KEY(0x53, KEY_LEFTMETA)
+                               REMOTE_KEY(0x45, KEY_PAGEUP)
+                               REMOTE_KEY(0x19, KEY_PAGEDOWN)
+                               REMOTE_KEY(0x52, KEY_PAUSE)
+                               REMOTE_KEY(0x05, KEY_HANGEUL)
+                               REMOTE_KEY(0x59, KEY_HANJA)
+                               REMOTE_KEY(0x1b, KEY_SCALE)
+                               REMOTE_KEY(0x04, KEY_KPCOMMA)
+                               REMOTE_KEY(0x1A, KEY_POWER)
+                               REMOTE_KEY(0x0A, KEY_TAB)
+                               REMOTE_KEY(0x0e, KEY_MUTE)
+                               REMOTE_KEY(0x1F, KEY_HOME)
+                               REMOTE_KEY(0x1e, KEY_FRONT)
+                               REMOTE_KEY(0x07, KEY_COPY)
+                               REMOTE_KEY(0x12, KEY_OPEN)
+                               REMOTE_KEY(0x54, KEY_PASTE)
+                               REMOTE_KEY(0x02, KEY_FIND)
+                               REMOTE_KEY(0x4f, KEY_A)
+                               REMOTE_KEY(0x42, KEY_B)
+                               REMOTE_KEY(0x5d, KEY_C)
+                               REMOTE_KEY(0x4c, KEY_D)
+                               REMOTE_KEY(0x58, KEY_CUT)
+                               REMOTE_KEY(0x55, KEY_CALC)>;
+               };
+               map_1: map_1{
+                       mapname = "amlogic-remote-2";
+                       customcode = <0xfe01>;
+                       release_delay = <80>;
+                       size  = <53>;
+                       keymap = <REMOTE_KEY(0x01, KEY_1)
+                               REMOTE_KEY(0x02, KEY_2)
+                               REMOTE_KEY(0x03, KEY_3)
+                               REMOTE_KEY(0x04, KEY_4)
+                               REMOTE_KEY(0x05, KEY_5)
+                               REMOTE_KEY(0x06, KEY_6)
+                               REMOTE_KEY(0x07, KEY_7)
+                               REMOTE_KEY(0x08, KEY_8)
+                               REMOTE_KEY(0x09, KEY_9)
+                               REMOTE_KEY(0x0a, KEY_0)
+                               REMOTE_KEY(0x1F, KEY_FN_F1)
+                               REMOTE_KEY(0x15, KEY_MENU)
+                               REMOTE_KEY(0x16, KEY_TAB)
+                               REMOTE_KEY(0x0c, KEY_CHANNELUP)
+                               REMOTE_KEY(0x0d, KEY_CHANNELDOWN)
+                               REMOTE_KEY(0x0e, KEY_VOLUMEUP)
+                               REMOTE_KEY(0x0f, KEY_VOLUMEDOWN)
+                               REMOTE_KEY(0x11, KEY_HOME)
+                               REMOTE_KEY(0x1c, KEY_RIGHT)
+                               REMOTE_KEY(0x1b, KEY_LEFT)
+                               REMOTE_KEY(0x19, KEY_UP)
+                               REMOTE_KEY(0x1a, KEY_DOWN)
+                               REMOTE_KEY(0x1d, KEY_ENTER)
+                               REMOTE_KEY(0x17, KEY_MUTE)
+                               REMOTE_KEY(0x49, KEY_FINANCE)
+                               REMOTE_KEY(0x43, KEY_BACK)
+                               REMOTE_KEY(0x12, KEY_FN_F4)
+                               REMOTE_KEY(0x14, KEY_FN_F5)
+                               REMOTE_KEY(0x18, KEY_FN_F6)
+                               REMOTE_KEY(0x59, KEY_INFO)
+                               REMOTE_KEY(0x5a, KEY_STOPCD)
+                               REMOTE_KEY(0x10, KEY_POWER)
+                               REMOTE_KEY(0x42, KEY_PREVIOUSSONG)
+                               REMOTE_KEY(0x44, KEY_NEXTSONG)
+                               REMOTE_KEY(0x1e, KEY_REWIND)
+                               REMOTE_KEY(0x4b, KEY_FASTFORWARD)
+                               REMOTE_KEY(0x58, KEY_PLAYPAUSE)
+                               REMOTE_KEY(0x46, KEY_PROPS)
+                               REMOTE_KEY(0x40, KEY_UNDO)
+                               REMOTE_KEY(0x38, KEY_SCROLLLOCK)
+                               REMOTE_KEY(0x57, KEY_FN)
+                               REMOTE_KEY(0x5b, KEY_FN_ESC)
+                               REMOTE_KEY(0x54, KEY_RED)
+                               REMOTE_KEY(0x4c, KEY_GREEN)
+                               REMOTE_KEY(0x4e, KEY_YELLOW)
+                               REMOTE_KEY(0x55, KEY_BLUE)
+                               REMOTE_KEY(0x53, KEY_BLUETOOTH)
+                               REMOTE_KEY(0x52, KEY_WLAN)
+                               REMOTE_KEY(0x39, KEY_CAMERA)
+                               REMOTE_KEY(0x41, KEY_SOUND)
+                               REMOTE_KEY(0x0b, KEY_QUESTION)
+                               REMOTE_KEY(0x00, KEY_CHAT)
+                               REMOTE_KEY(0x13, KEY_SEARCH)>;
+               };
+               map_2: map_2{
+                       mapname = "amlogic-remote-3";
+                       customcode = <0xbd02>;
+                       release_delay = <80>;
+                       size  = <17>;
+                       keymap = <REMOTE_KEY(0xca,103)
+                               REMOTE_KEY(0xd2,108)
+                               REMOTE_KEY(0x99,105)
+                               REMOTE_KEY(0xc1,106)
+                               REMOTE_KEY(0xce,97)
+                               REMOTE_KEY(0x45,116)
+                               REMOTE_KEY(0xc5,133)
+                               REMOTE_KEY(0x80,113)
+                               REMOTE_KEY(0xd0,15)
+                               REMOTE_KEY(0xd6,125)
+                               REMOTE_KEY(0x95,102)
+                               REMOTE_KEY(0xdd,104)
+                               REMOTE_KEY(0x8c,109)
+                               REMOTE_KEY(0x89,131)
+                               REMOTE_KEY(0x9c,130)
+                               REMOTE_KEY(0x9a,120)
+                               REMOTE_KEY(0xcd,121)>;
+               };
+       };
+       aml_reboot{
+               compatible = "aml, reboot";
+               sys_reset = <0x84000009>;
+               sys_poweroff = <0x84000008>;
+       };
+
+       rtc{
+               compatible = "amlogic, aml_vrtc";
+               alarm_reg_addr = <0xc81000a8>;
+               timer_e_addr = <0xc1109988>;
+               init_date = "2017/01/01";
+               status = "okay";
+       };
+
+    pwm_ab: pwm@c1108550 {
+               compatible = "amlogic,gx-ee-pwm";
+               reg = <0xc1108550 0x1c>;
+               #pwm-cells = <3>;
+               clocks = <&xtal>,<&xtal>,<&xtal>,<&xtal>;
+               clock-names = "clkin0","clkin1","clkin2","clkin3";
+               status = "disabled";
+       };
+    pwm_cd: pwm@c1108640 {
+               compatible = "amlogic,gx-ee-pwm";
+               reg = <0xc1108640 0x1c>;
+               #pwm-cells = <3>;
+               clocks = <&xtal>,<&xtal>,<&xtal>,<&xtal>;
+               clock-names = "clkin0","clkin1","clkin2","clkin3";
+               status = "disabled";
+       };
+    pwm_ef: pwm@c11086c0 {
+               compatible = "amlogic,gx-ee-pwm";
+               reg = <0xc11086c0 0x1c>;
+               #pwm-cells = <3>;
+               clocks = <&xtal>,<&xtal>,<&xtal>,<&xtal>;
+               clock-names = "clkin0","clkin1","clkin2","clkin3";
+               status = "disabled";
+       };
+    pwm_aoab: pwm@c8100550 {
+               compatible = "amlogic,gx-ao-pwm";
+               reg = <0xc8100550 0x1c>;
+               #pwm-cells = <3>;
+               clocks = <&xtal>,<&xtal>,<&xtal>,<&xtal>;
+               clock-names = "clkin0","clkin1","clkin2","clkin3";
+               status = "disabled";
+       };
+};
+
+&gpu{
+       /*gpu max freq is 750M*/
+       tbl = <&clk125_cfg &clk285_cfg &clk400_cfg
+                  &clk500_cfg &clk500_cfg &clk500_cfg &clk500_cfg>;
+};
diff --git a/arch/arm/boot/dts/amlogic/partition_mbox_normal_sei32bit.dtsi b/arch/arm/boot/dts/amlogic/partition_mbox_normal_sei32bit.dtsi
new file mode 100644 (file)
index 0000000..6ca9cb9
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * Amlogic partition set for normal
+ *
+ * Copyright (c) 2017-2017 Amlogic Ltd
+ *
+ * This file is licensed under a dual GPLv2 or BSD license.
+ *
+ */
+/ {
+    partitions: partitions{
+               parts = <14>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&misc>;
+               part-3 = <&dtbo>;
+               part-4 = <&cri_data>;
+               part-5 = <&param>;
+               part-6 = <&boot>;
+               part-7 = <&rsv>;
+               part-8 = <&tee>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&system>;
+               part-12 = <&cache>;
+               part-13 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x1800000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               dtbo:dtbo{
+                       pname = "dtbo";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               cri_data:cri_data
+               {
+                       pname = "cri_data";
+                       size = <0x0 0x800000>;
+                       mask = <2>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               param:param{
+                       pname = "param";
+                       size = <0x0 0x1000000>;
+                       mask = <2>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               vendor:vendor
+               {
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm
+               {
+                       pname = "odm";
+                       size = <0x0 0x9000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x67000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x32000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       firmware {
+               android {
+                       compatible = "android,firmware";
+                       vbmeta {
+                               compatible = "android,vbmeta";
+                               parts = "boot,system,vendor";
+                               by_name_prefix="/dev/block";
+                       };
+               fstab {
+                       compatible = "android,fstab";
+                       system {
+                               compatible = "android,system";
+                               dev = "/dev/block/system";
+                               type = "ext4";
+                               mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
+                               fsmgr_flags = "wait";
+                               };
+
+                       vendor {
+                               compatible = "android,vendor";
+                               dev = "/dev/block/vendor";
+                               type = "ext4";
+                               mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
+                               fsmgr_flags = "wait";
+                               };
+                       odm {
+                               compatible = "android,odm";
+                               dev = "/dev/block/odm";
+                               type = "ext4";
+                               mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
+                               fsmgr_flags = "wait";
+                               };
+                       };
+               };
+       };
+};/* end of / */
diff --git a/arch/arm/boot/dts/amlogic/partition_tv_4G.dtsi b/arch/arm/boot/dts/amlogic/partition_tv_4G.dtsi
new file mode 100644 (file)
index 0000000..9368933
--- /dev/null
@@ -0,0 +1,141 @@
+/*
+ * Amlogic partition set for normal
+ *
+ * Copyright (c) 2017-2017 Amlogic Ltd
+ *
+ * This file is licensed under a dual GPLv2 or BSD license.
+ *
+ */
+/ {
+    partitions: partitions{
+               parts = <14>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&misc>;
+               part-3 = <&dto>;
+               part-4 = <&cri_data>;
+               part-5 = <&param>;
+               part-6 = <&boot>;
+               part-7 = <&rsv>;
+               part-8 = <&tee>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&system>;
+               part-12 = <&cache>;
+               part-13 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x1800000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               dto:dto{
+                       pname = "dto";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               cri_data:cri_data
+               {
+                       pname = "cri_data";
+                       size = <0x0 0x800000>;
+                       mask = <2>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               param:param{
+                       pname = "param";
+                       size = <0x0 0x1000000>;
+                       mask = <2>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x1000000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               vendor:vendor
+               {
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm
+               {
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x46000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x25000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       firmware {
+               android {
+                       compatible = "android,firmware";
+                       vbmeta {
+                               compatible = "android,vbmeta";
+                               parts = "boot,system,vendor";
+                               by_name_prefix="/dev/block";
+                       };
+               fstab {
+                       compatible = "android,fstab";
+                       system {
+                               compatible = "android,system";
+                               dev = "/dev/block/system";
+                               type = "ext4";
+                               mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
+                               fsmgr_flags = "wait";
+                               };
+
+                       vendor {
+                               compatible = "android,vendor";
+                               dev = "/dev/block/vendor";
+                               type = "ext4";
+                               mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
+                               fsmgr_flags = "wait";
+                               };
+                       odm {
+                               compatible = "android,odm";
+                               dev = "/dev/block/odm";
+                               type = "ext4";
+                               mnt_flags = "ro,barrier=1,inode_readahead_blks=8";
+                               fsmgr_flags = "wait";
+                               };
+                       };
+               };
+       };
+};/* end of / */
diff --git a/arch/arm/boot/dts/amlogic/txl_t950_p341.dts b/arch/arm/boot/dts/amlogic/txl_t950_p341.dts
new file mode 100644 (file)
index 0000000..438c355
--- /dev/null
@@ -0,0 +1,1127 @@
+/*
+ * arch/arm/boot/dts/amlogic/txl_t950_341.dts
+ *
+ * Copyright (C) 2018 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesontxl.dtsi"
+#include "partition_mbox_normal.dtsi"
+#include "mesontxl_p321-panel.dtsi"
+
+/ {
+       model = "Amlogic TXL T950 P341 Reference Board";
+       compatible = "amlogic, txl_t950_p341";
+       amlogic-dt-id = "txl_p341_v1";
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       compatible = "amlogic, aml_secos_memory";
+                       status = "disable";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3f800000 0x800000>;
+               };
+
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       // if no direct render, ion size = fb0_size x 3 + fb1_size + 4 M
+                       size = <0x2400000>;
+                       alignment = <0x400000>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0xd000000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4179008(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4179008=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+
+               /* POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "amlogic, ppmgr_memory";
+                       size = <0x0>;
+               };
+
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+
+               demod_cma_reserved:linux,demod_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 5M */
+                       size = <0x0800000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       }; /* end of reserved-memory */
+
+       secmon {
+               compatible = "amlogic, secmon";
+               memory-region = <&secmon_reserved>;
+               in_base_func = <0x82000020>;
+               out_base_func = <0x82000021>;
+               reserve_mem_size = <0x00300000>;
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "disabled";
+
+               sys_led {
+                       label = "sys_led";
+                       gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
+       /*for external keypad*/
+       adc-keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "menu","down", "up","source","left","right","enter";
+               key_num = <7>;
+               io-channels = <&saradc SARADC_CH2>;
+               io-channel-names = "key-chan-2";
+               key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2 SARADC_CH2
+                               SARADC_CH2 SARADC_CH2 SARADC_CH2>;
+               key_code = <139 108 103 466 105 106 28>;
+               key_val = <152 283 421 557 718 852 0>;
+               key_tolerance = <40 40 40 40 40 40 40>;
+       };
+
+       avin_detect {
+               compatible = "amlogic, avin_detect";
+               status = "okay";
+               avin_device_num = <2>;
+               gpios = <&gpio  GPIODV_8  GPIO_ACTIVE_HIGH>,
+                       <&gpio  GPIODV_6  GPIO_ACTIVE_HIGH>;
+               detect_interval_length = <100>;
+               set_detect_times = <5>;
+               set_fault_tolerance = <1>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-txl";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               /* 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               scale_mode = <1>;
+               /* 1920*1080*4*3 = 0x17BB000 */
+               display_size_default = <1920 1080 1920 3240 32>;
+               pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+               logo_addr = "0x3f800000";
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               status = "okay";
+               memory-region = <&picdec_cma_reserved>;
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               status = "okay";
+               memory-region = <&ppmgr_reserved>;
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 6 1>;
+               interrupt-names = "de_irq";
+               clocks = <&clkc CLKID_VPU_MUX>,
+                       <&clkc CLKID_FCLK_DIV4>,
+                       <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_mux",
+                       "fclk_div4",
+                       "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <333 333>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4179008>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               nr10bit-support = <1>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       hdmirx {
+               compatible = "amlogic, hdmirx-txl";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               dev_name = "hdmirx";
+               pinctrl-names = "hdmirx_pins";
+               pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux
+                       &hdmirx_c_mux>;
+               repeat = <0>;
+               interrupts = <0 56 1>;
+               clocks = <&clkc CLKID_HDMIRX_MODET_COMP>,
+                       <&clkc CLKID_HDMIRX_CFG_COMP>,
+                       <&clkc CLKID_HDMIRX_ACR_COMP>,
+                       <&clkc CLKID_HDMIRX_AUDMEAS_COMP>,
+                       <&xtal>,
+                       <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_FCLK_DIV7>,
+                       <&clkc CLKID_HDCP22_SKP_COMP>,
+                       <&clkc CLKID_HDCP22_ESM_COMP>;
+                       //<&clkc CLK_AUD_PLL2FS>,
+                       //<&clkc CLK_AUD_PLL4FS>,
+                       //<&clkc CLK_AUD_OUT>;
+               clock-names = "hdmirx_modet_clk",
+                       "hdmirx_cfg_clk",
+                       "hdmirx_acr_ref_clk",
+                       "hdmirx_audmeas_clk",
+                       "xtal",
+                       "fclk_div5",
+                       "fclk_div7",
+                       "hdcp_rx22_skp",
+                       "hdcp_rx22_esm";
+                       //"hdmirx_aud_pll2fs",
+                       //"hdmirx_aud_pll4f",
+                       //"clk_aud_out";
+               hdmirx_id = <0>;
+               en_4k_2_2k = <0>;
+               hpd_low_cec_off = <1>;
+               /* bit4: enable feature, bit3~0: port number */
+               disable_port = <0x0>;
+               reg = <0xc0800000 0xa00000
+                       0xC883C000 0x2000
+                       0xd0076000 0x2000
+                       0xc883e000 0x2000
+                       0xda83e000 0x2000
+                       0xc8834000 0x2000
+                       0xda846000 0x2000>;
+       };
+
+       vdin@0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "okay";
+               reserve-iomap = "true";
+               /*bit0:(1:share with codec_mm;0:cma alone)*/
+               /*bit8:(1:alloc in discontinus way;0:alone in continuous way)*/
+               flag_cma = <0x101>;
+               /* MByte, if 10bit disable: 64M(YUV422),
+                * if 10bit enable: 64*1.5 = 96M(YUV422)
+                * if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                * if support 4K2K-YUV444-10bit-WR:3840*2160*4*6 ~= 190M
+                * if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                * if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                * if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <190>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               clocks = <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_VDIN_MEAS_COMP>;
+               clock-names = "fclk_div5", "cts_vdin_meas_clk";
+               vdin_id = <0>;
+               /* vdin write mem color depth support:
+                * bit0:support 8bit
+                * bit1:support 9bit
+                * bit2:support 10bit
+                * bit3:support 12bit
+                * bit4:support yuv422 10bit full pack mode (from txl new add)
+                * bit8:use 8bit  at 4k_50/60hz_10bit
+                * bit9:use 10bit at 4k_50/60hz_10bit
+                */
+               tv_bit_mode = <0x215>;
+       };
+
+       vdin@1 {
+               compatible = "amlogic, vdin";
+               status = "okay";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               clocks = <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_VDIN_MEAS_COMP>;
+               clock-names = "fclk_div5", "cts_vdin_meas_clk";
+               vdin_id = <1>;
+               /* vdin write mem color depth support:
+                * bit0:support 8bit
+                * bit1:support 9bit
+                * bit2:support 10bit
+                * bit3:support 12bit
+                */
+               tv_bit_mode = <21>;
+       };
+
+       tvafe:tvafe@c8842000 {
+               compatible = "amlogic, tvafe-txl";
+               status = "okay";
+               /*memory-region = <&tvafe_cma_reserved>;*/
+               dev_name = "tvafe";
+               flag_cma = <1>;/*1:share with codec_mm;0:cma alone*/
+               cma_size = <5>;/*MByte*/
+               reg = <0xc8842000 0x2000>;/*tvafe reg base*/
+               reserve-iomap = "true";
+               tvafe_id = <0>;
+               //pinctrl-names = "default";
+               /*!!particular sequence, no more and no less!!!*/
+               tvafe_pin_mux = <
+                               3 /* TVAFE_CVBS_IN2, CVBS_IN0 = 0 */
+                               1 /* TVAFE_CVBS_IN0, CVBS_IN1 */
+                               2 /* TVAFE_CVBS_IN1, CVBS_IN2 */
+                               4 /* TVAFE_CVBS_IN3, CVBS_IN3 */
+               >;
+               clocks = <&clkc CLKID_DAC_CLK>;
+               clock-names = "vdac_clk_gate";
+       };
+
+       vecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <1>;/*1:enabel ;0:disable*/
+               wb_en = <1>;/*1:enabel ;0:disable*/
+               cm_en = <1>;/*1:enabel ;0:disable*/
+               wb_sel = <1>;/*1:mtx ;0:gainoff*/
+               vlock_en = <1>;/*1:enable;0:disable*/
+               vlock_mode = <0x4>;
+               /* vlock work mode:
+                *bit0:auto ENC
+                *bit1:auto PLL
+                *bit2:manual PLL
+                *bit3:manual ENC
+                *bit4:manual soft ENC
+                *bit5:manual MIX PLL ENC
+                */
+                vlock_pll_m_limit = <1>;
+                vlock_line_limit = <3>;
+       };
+
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "r842_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0xf6>;
+               tuner_xtal = <1>; /* 0: 16MHz, 1: 24MHz, 3: 27MHz */
+               tuner_xtal_mode = <3>;
+                                       /* NO_SHARE_XTAL(0)
+                                        * MASTER_TO_SLAVE_XTAL_IN(1)
+                                        * MASTER_TO_SLAVE_XTAL_OUT(2)
+                                        * SLAVE_XTAL_OUT(3)
+                                        */
+               tuner_xtal_cap = <0>; /* 0 ~ 41 (pf) */
+       };
+
+       atv-demod {
+               compatible = "amlogic, atv-demod";
+               status = "okay";
+               tuner = <&tuner>;
+               btsc_sap_mode = <1>;
+               pinctrl-names = "atvdemod_agc_pins";
+               pinctrl-0 = <&atvdemod_agc_pins>;
+               reg = <0xc8840000 0x2000 /* demod reg */
+                       0xc883c000 0x2000 /* hiu reg */
+                       0xc8834000 0x2000>; /* periphs reg */
+               reg_23cf = <0x88188832>;
+               /*default:0x88188832;r840 on haier:0x48188832*/
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               compatible = "amlogic, meson-mmc-txl";
+               status = "okay";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       tx_phase = <3>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               compatible = "amlogic, meson-mmc-txl";
+               status = "okay";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       unifykey {
+               compatible = "amlogic, unifykey";
+               status = "okay";
+
+               unifykey-num = <19>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11 = <&keysn_11>;
+               unifykey-index-12 = <&keysn_12>;
+               unifykey-index-13 = <&keysn_13>;
+               unifykey-index-14 = <&keysn_14>;
+               unifykey-index-15 = <&keysn_15>;
+               unifykey-index-16 = <&keysn_16>;
+               unifykey-index-17 = <&keysn_17>;
+               unifykey-index-18 = <&keysn_18>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device  = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type  = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "hdcp22_rx_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "hdcp22_rx_fw";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "hdcp14_rx";
+                       key-device = "normal";
+                       key-type  = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_15:key_15{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_16:key_16{
+                       key-name = "lcd";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_17:key_17{
+                       key-name = "lcd_extern";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_18:key_18{
+                       key-name = "backlight";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       }; /* End unifykey */
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       dvb {
+               compatible = "amlogic, dvb";
+               dev_name = "dvb";
+               status = "okay";
+               fe0_mode = "internal";
+               fe0_tuner = <&tuner>;
+
+               /*"parallel","serial","disable"*/
+               ts2 = "parallel";
+               ts2_control = <0>;
+               ts2_invert = <0>;
+               interrupts = <0 23 1
+                                               0 5 1
+                                               0 53 1
+                                               0 19 1
+                                               0 25 1
+                                               0 18 1
+                                               0 24 1>;
+               interrupt-names = "demux0_irq",
+                                                       "demux1_irq",
+                                                       "demux2_irq",
+                                                       "dvr0_irq",
+                                                       "dvr1_irq",
+                                                       "dvrfill0_fill",
+                                                       "dvrfill1_flush";
+               clocks = <&clkc CLKID_DEMUX
+                                               &clkc CLKID_ASYNC_FIFO
+                                               &clkc CLKID_AHB_ARB0
+                                               &clkc CLKID_DOS_PARSER>;
+               clock-names = "demux", "asyncfifo", "ahbarb0", "uparsertop";
+       };
+
+       meson_sensor: sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpus";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpu_core_cluster0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "mali";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "thermal_gpu_cores";
+                               device_type = "gpucore";
+                       };
+               };
+               cpu_cluster0:cpu_core_cluster0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore:thermal_gpu_cores {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+
+       dtv-demod {
+               compatible = "amlogic, ddemod-txl";
+               status = "okay";
+
+               pinctrl-names = "dtvdemod_agc_pins";
+               pinctrl-0 = <&dtvdemod_agc_pins>;
+
+               clocks = <&clkc CLKID_DAC_CLK>;
+               clock-names = "vdac_clk_gate";
+
+               reg = <0xc8844000 0x2000        /*dtv demod base*/
+                          0xc883c000 0x2000    /*hiu reg base*/
+                          0xc8100000 0x1000    /*io_aobus_base*/
+                          0xc1104400 0x1000    /*reset*/
+                          >;
+               /*move from dvbfe*/
+               dtv_demod0_mem = <0>;   // need move to aml_dtv_demod ?
+               spectrum = <1>;
+               cma_flag = <1>;
+               cma_mem_size = <8>;
+               memory-region = <&demod_cma_reserved>;//<&demod_reserved>;
+       };
+
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+                       thermal-sensors = <&meson_sensor 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpus 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpu_cluster0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpu 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       /* start AUDIO_RELATED */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks = <
+                       &clkc CLKID_MPLL3
+                       &clkc CLKID_AMCLK_COMP
+                       &clkc CLKID_AIU_GLUE
+                       &clkc CLKID_I2S_OUT
+                       &clkc CLKID_AMCLK_MEASURE
+                       &clkc CLKID_AIFIFO2
+                       &clkc CLKID_MIXER
+                       &clkc CLKID_MIXER_IFACE
+                       &clkc CLKID_ADC
+                       &clkc CLKID_AIU_TOP
+                       &clkc CLKID_AOCLK_GATE
+                       &clkc CLKID_I2S_SPDIF
+               >;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+       };
+
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks = <
+                       &clkc CLKID_MPLL1
+                       &clkc CLKID_IEC958_INT_COMP
+                       &clkc CLKID_AMCLK_COMP
+                       &clkc CLKID_IEC958_MUX
+                       &clkc CLKID_CLK81
+                       &clkc CLKID_IEC958
+                       &clkc CLKID_IEC958_GATE
+               >;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               /* disable pcm pin mux temporary, enable it if necessary */
+               /*pinctrl-0 = <&aml_audio_pcm>;*/
+               clocks = <
+                       &clkc CLKID_MPLL0
+                       &clkc CLKID_PCM_MCLK_COMP
+                       &clkc CLKID_PCM_SCLK_COMP
+                       >;
+               clock-names = "mpll0", "pcm_mclk", "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+
+       spdif_codec: spdif_codec {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               status = "okay";
+               pinctrl-names = "audio_spdif_out";
+               pinctrl-0 = <&audio_spdif_out_pins>;
+       };
+
+       pcm_codec: pcm_codec {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+               status = "okay";
+       };
+       /* endof AUDIO MESON8 DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disabled";
+       };
+
+       amlogic_codec:t9015S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015S";
+               status = "okay";
+               reg = <0xc8832000 0x14>;
+       };
+
+       aml_snd_tv {
+               compatible = "amlogic, txl-snd-tv";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-TVAUDIO";
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&aml_audio_i2s>;
+               /*avout mute gpio, if av_mute_inv = 1, invert gpio*/
+               mute_gpio-gpios = <&gpio GPIODV_11 GPIO_ACTIVE_LOW>;
+               av_mute_inv = <0>;
+               /*after sleep time, unmute avout*/
+               sleep_time = <0>;
+               /*analog amp mute pinmux*/
+               amp_mute_gpio-gpios = <&gpio GPIOZ_13 GPIO_ACTIVE_LOW>;
+               amp_mute_inv = <0>;
+               /* if 1, enable switch AV / HS Detect */
+               av_hs_switch = <1>;
+               hp_det-gpios = <&gpio GPIODV_10 GPIO_ACTIVE_HIGH>;
+               hp_det_inv = <0>;
+               /*audio soc*/
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+               Channel_Mask {
+                       /*i2s has 4 pins, 8channel, mux output*/
+                       DAC0_Channel_Mask = "i2s_2/3";
+               };
+       };
+
+       amaudio2 {
+               compatible = "amlogic, aml_amaudio2";
+               status = "okay";
+               interrupts = <0 48 1>;
+       };
+       /* end of AUDIO_RELATED */
+
+       wifi {
+               compatible = "amlogic, aml_wifi";
+               status = "okay";
+               power_on_pin = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+}; /* end of / */
+
+&pinctrl_periphs {
+       /* start AUDIO_RELATED */
+       /*i2s*/
+       aml_audio_i2s: aml_audio_i2s {
+               mux {
+                       groups = "i2s_amclk_z",
+                               "i2s_aoclk_out_z",
+                               "i2s_lrclk_out_z"
+                               /*,"i2s_out_ch01_z"*/
+                               ,"i2s_out_ch23"
+                               ;
+                       function = "i2s";
+               };
+       };
+
+       /*spdif*/
+       audio_spdif_out_pins: audio_spdif_out_pins {
+               mux {
+                       groups = "spdif_out";
+                       function = "spdif_out";
+               };
+       };
+
+       /*pcm*/
+       aml_audio_pcm: aml_audio_pcm {
+               mux {
+                       groups =
+                               "pcm_clk_a",
+                               "pcm_fs_a",
+                               "pcm_in_a",
+                               "pcm_out_a";
+                       function = "pcm_a";
+               };
+       };
+       /* end AUDIO_RELATED */
+
+       /*lcd_extern*/
+       lcd_extern_off_pins:lcd_extern_off_pin {
+               mux {
+                       pins = "GPIOH_2",
+                               "GPIOH_3";
+                       function = "gpio_periphs";
+                       /*output-high;*/
+                       output-low;
+                       /*input-enable;*/
+               };
+       };
+
+       /*backlight*/
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOZ_6";
+                       function = "gpio_periphs";
+                       output-low;
+               };
+       };
+       bl_pwm_combo_off_pins:bl_pwm_combo_off_pin {
+               mux {
+                       pins = "GPIOZ_6",
+                               "GPIOZ_7";
+                       function = "gpio_periphs";
+                       output-low;
+               };
+       };
+};
+
+&i2c1 {
+       status = "okay";
+       clock-frequency = <300000>;
+       pinctrl-names="default";
+       pinctrl-0=<&i2c1_dv_pins>;
+};
+
+&i2c2 {
+       status = "disabled";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c2_h_pins>;
+
+       lcd_extern_i2c0: lcd_extern_i2c@0 {
+               compatible = "lcd_ext, i2c";
+               dev_name = "i2c_T5800Q";
+               reg = <0x1c>;
+               status = "disabled";
+       };
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy {
+       status = "okay";
+};
+
+&usb3_phy {
+       status = "okay";
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <1>;
+};
+
+&audio_data{
+       status = "okay";
+};
+
+&pwm_ab {
+       status = "okay";
+};
+
+&pwm_cd {
+       status = "okay";
+};
+
+&ethmac {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/txl_t960_p346.dts b/arch/arm/boot/dts/amlogic/txl_t960_p346.dts
new file mode 100644 (file)
index 0000000..356ac2f
--- /dev/null
@@ -0,0 +1,1134 @@
+/*
+ * arch/arm/boot/dts/amlogic/txl_t960_p346.dts
+ *
+ * Copyright (C) 2018 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesontxl.dtsi"
+#include "partition_tv_4G.dtsi"
+#include "mesontxl_p321-panel.dtsi"
+
+/ {
+       model = "Amlogic TXL T960 P346 Reference Board";
+       compatible = "amlogic, txl_t960_p346";
+       amlogic-dt-id = "txl_p346_v1";
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       compatible = "amlogic, aml_secos_memory";
+                       status = "disable";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3f800000 0x800000>;
+               };
+
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       // if no direct render, ion size = fb0_size x 3 + fb1_size + 4 M
+                       size = <0x2400000>;
+                       alignment = <0x400000>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0xd000000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4179008(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4179008=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+
+               /* POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "amlogic, ppmgr_memory";
+                       size = <0x0>;
+               };
+
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+
+               demod_cma_reserved:linux,demod_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 5M */
+                       size = <0x0800000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin0 CMA pool */
+               vdin0_cma_reserved:linux,vdin0_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+               /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       }; /* end of reserved-memory */
+
+       secmon {
+               compatible = "amlogic, secmon";
+               memory-region = <&secmon_reserved>;
+               in_base_func = <0x82000020>;
+               out_base_func = <0x82000021>;
+               reserve_mem_size = <0x00300000>;
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "disabled";
+
+               sys_led {
+                       label = "sys_led";
+                       gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
+       /*for external keypad*/
+       adc-keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "power","up", "down","enter","left","right","home";
+               key_num = <7>;
+               io-channels = <&saradc SARADC_CH2>,
+                               <&saradc SARADC_CH3>;
+               io-channel-names = "key-chan-2", "key-chan-3";
+               key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2 SARADC_CH2
+                                       SARADC_CH2 SARADC_CH3 SARADC_CH3>;
+               key_code = <116 103 108 28 105 106 102>;
+               key_val = <0 143 266 389 512 143 266>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40 40 40>;
+       };
+
+       avin_detect {
+               compatible = "amlogic, avin_detect";
+               status = "okay";
+               avin_device_num = <2>;
+               gpios = <&gpio  GPIODV_8  GPIO_ACTIVE_HIGH>,
+                       <&gpio  GPIODV_6  GPIO_ACTIVE_HIGH>;
+               detect_interval_length = <100>;
+               set_detect_times = <5>;
+               set_fault_tolerance = <1>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-txl";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               /* 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               scale_mode = <1>;
+               /* 1920*1080*4*3 = 0x17BB000 */
+               display_size_default = <1920 1080 1920 3240 32>;
+               pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+               logo_addr = "0x3f800000";
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               status = "okay";
+               memory-region = <&picdec_cma_reserved>;
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               status = "okay";
+               memory-region = <&ppmgr_reserved>;
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 6 1>;
+               interrupt-names = "de_irq";
+               clocks = <&clkc CLKID_VPU_MUX>,
+                       <&clkc CLKID_FCLK_DIV4>,
+                       <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_mux",
+                       "fclk_div4",
+                       "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <333 333>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4179008>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               nr10bit-support = <1>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       hdmirx {
+               compatible = "amlogic, hdmirx-txl";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               dev_name = "hdmirx";
+               pinctrl-names = "hdmirx_pins";
+               pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux
+                       &hdmirx_c_mux>;
+               repeat = <0>;
+               interrupts = <0 56 1>;
+               clocks = <&clkc CLKID_HDMIRX_MODET_COMP>,
+                       <&clkc CLKID_HDMIRX_CFG_COMP>,
+                       <&clkc CLKID_HDMIRX_ACR_COMP>,
+                       <&clkc CLKID_HDMIRX_AUDMEAS_COMP>,
+                       <&xtal>,
+                       <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_FCLK_DIV7>,
+                       <&clkc CLKID_HDCP22_SKP_COMP>,
+                       <&clkc CLKID_HDCP22_ESM_COMP>;
+                       //<&clkc CLK_AUD_PLL2FS>,
+                       //<&clkc CLK_AUD_PLL4FS>,
+                       //<&clkc CLK_AUD_OUT>;
+               clock-names = "hdmirx_modet_clk",
+                       "hdmirx_cfg_clk",
+                       "hdmirx_acr_ref_clk",
+                       "hdmirx_audmeas_clk",
+                       "xtal",
+                       "fclk_div5",
+                       "fclk_div7",
+                       "hdcp_rx22_skp",
+                       "hdcp_rx22_esm";
+                       //"hdmirx_aud_pll2fs",
+                       //"hdmirx_aud_pll4f",
+                       //"clk_aud_out";
+               hdmirx_id = <0>;
+               en_4k_2_2k = <0>;
+               hpd_low_cec_off = <1>;
+               /* bit4: enable feature, bit3~0: port number */
+               disable_port = <0x0>;
+               reg = <0xc0800000 0xa00000
+                       0xC883C000 0x2000
+                       0xd0076000 0x2000
+                       0xc883e000 0x2000
+                       0xda83e000 0x2000
+                       0xc8834000 0x2000
+                       0xda846000 0x2000>;
+       };
+
+       vdin@0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "okay";
+               reserve-iomap = "true";
+               /*bit0:(1:share with codec_mm;0:cma alone)*/
+               /*bit8:(1:alloc in discontinus way;0:alone in continuous way)*/
+               flag_cma = <0x101>;
+               /* MByte, if 10bit disable: 64M(YUV422),
+                * if 10bit enable: 64*1.5 = 96M(YUV422)
+                * if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                * if support 4K2K-YUV444-10bit-WR:3840*2160*4*6 ~= 190M
+                * if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                * if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                * if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <190>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               clocks = <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_VDIN_MEAS_COMP>;
+               clock-names = "fclk_div5", "cts_vdin_meas_clk";
+               vdin_id = <0>;
+               /* vdin write mem color depth support:
+                * bit0:support 8bit
+                * bit1:support 9bit
+                * bit2:support 10bit
+                * bit3:support 12bit
+                * bit4:support yuv422 10bit full pack mode (from txl new add)
+                * bit8:use 8bit  at 4k_50/60hz_10bit
+                * bit9:use 10bit at 4k_50/60hz_10bit
+                */
+               tv_bit_mode = <0x215>;
+       };
+
+       vdin@1 {
+               compatible = "amlogic, vdin";
+               status = "okay";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               clocks = <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_VDIN_MEAS_COMP>;
+               clock-names = "fclk_div5", "cts_vdin_meas_clk";
+               vdin_id = <1>;
+               /* vdin write mem color depth support:
+                * bit0:support 8bit
+                * bit1:support 9bit
+                * bit2:support 10bit
+                * bit3:support 12bit
+                */
+               tv_bit_mode = <21>;
+       };
+
+       tvafe:tvafe@c8842000 {
+               compatible = "amlogic, tvafe-txl";
+               status = "okay";
+               /*memory-region = <&tvafe_cma_reserved>;*/
+               dev_name = "tvafe";
+               flag_cma = <1>;/*1:share with codec_mm;0:cma alone*/
+               cma_size = <5>;/*MByte*/
+               reg = <0xc8842000 0x2000>;/*tvafe reg base*/
+               reserve-iomap = "true";
+               tvafe_id = <0>;
+               //pinctrl-names = "default";
+               /*!!particular sequence, no more and no less!!!*/
+               tvafe_pin_mux = <
+                               3 /* TVAFE_CVBS_IN2, CVBS_IN0 = 0 */
+                               1 /* TVAFE_CVBS_IN0, CVBS_IN1 */
+                               2 /* TVAFE_CVBS_IN1, CVBS_IN2 */
+                               4 /* TVAFE_CVBS_IN3, CVBS_IN3 */
+               >;
+               clocks = <&clkc CLKID_DAC_CLK>;
+               clock-names = "vdac_clk_gate";
+       };
+
+       vecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <1>;/*1:enabel ;0:disable*/
+               wb_en = <1>;/*1:enabel ;0:disable*/
+               cm_en = <1>;/*1:enabel ;0:disable*/
+               wb_sel = <1>;/*1:mtx ;0:gainoff*/
+               vlock_en = <1>;/*1:enable;0:disable*/
+               vlock_mode = <0x4>;
+               /* vlock work mode:
+                *bit0:auto ENC
+                *bit1:auto PLL
+                *bit2:manual PLL
+                *bit3:manual ENC
+                *bit4:manual soft ENC
+                *bit5:manual MIX PLL ENC
+                */
+                vlock_pll_m_limit = <1>;
+                vlock_line_limit = <3>;
+       };
+
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "r842_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0xf6>;
+               tuner_xtal = <1>; /* 0: 16MHz, 1: 24MHz, 3: 27MHz */
+               tuner_xtal_mode = <3>;
+                                       /* NO_SHARE_XTAL(0)
+                                        * MASTER_TO_SLAVE_XTAL_IN(1)
+                                        * MASTER_TO_SLAVE_XTAL_OUT(2)
+                                        * SLAVE_XTAL_OUT(3)
+                                        */
+               tuner_xtal_cap = <0>; /* 0 ~ 41 (pf) */
+       };
+
+       atv-demod {
+               compatible = "amlogic, atv-demod";
+               status = "okay";
+               tuner = <&tuner>;
+               btsc_sap_mode = <1>;
+               pinctrl-names = "atvdemod_agc_pins";
+               pinctrl-0 = <&atvdemod_agc_pins>;
+               reg = <0xc8840000 0x2000 /* demod reg */
+                       0xc883c000 0x2000 /* hiu reg */
+                       0xc8834000 0x2000>; /* periphs reg */
+               reg_23cf = <0x88188832>;
+               /*default:0x88188832;r840 on haier:0x48188832*/
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               compatible = "amlogic, meson-mmc-txl";
+               status = "okay";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       tx_phase = <3>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               compatible = "amlogic, meson-mmc-txl";
+               status = "okay";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       unifykey {
+               compatible = "amlogic, unifykey";
+               status = "okay";
+
+               unifykey-num = <17>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11 = <&keysn_11>;
+               unifykey-index-12 = <&keysn_12>;
+               unifykey-index-13 = <&keysn_13>;
+               unifykey-index-14 = <&keysn_14>;
+               unifykey-index-15 = <&keysn_15>;
+               unifykey-index-16 = <&keysn_16>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device  = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type  = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "hdcp22_rx_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "hdcp22_rx_fw";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "hdcp14_rx";
+                       key-device = "normal";
+                       key-type  = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "lcd";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_15:key_15{
+                       key-name = "lcd_extern";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_16:key_16{
+                       key-name = "backlight";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       }; /* End unifykey */
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       dvb {
+               compatible = "amlogic, dvb";
+               dev_name = "dvb";
+               status = "okay";
+               fe0_mode = "internal";
+               fe0_tuner = <&tuner>;
+
+               /*"parallel","serial","disable"*/
+               ts2 = "parallel";
+               ts2_control = <0>;
+               ts2_invert = <0>;
+               interrupts = <0 23 1
+                                               0 5 1
+                                               0 53 1
+                                               0 19 1
+                                               0 25 1
+                                               0 18 1
+                                               0 24 1>;
+               interrupt-names = "demux0_irq",
+                                                       "demux1_irq",
+                                                       "demux2_irq",
+                                                       "dvr0_irq",
+                                                       "dvr1_irq",
+                                                       "dvrfill0_fill",
+                                                       "dvrfill1_flush";
+               clocks = <&clkc CLKID_DEMUX
+                                               &clkc CLKID_ASYNC_FIFO
+                                               &clkc CLKID_AHB_ARB0
+                                               &clkc CLKID_DOS_PARSER>;
+               clock-names = "demux", "asyncfifo", "ahbarb0", "uparsertop";
+       };
+
+       meson_sensor: sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpus";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpu_core_cluster0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "mali";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "thermal_gpu_cores";
+                               device_type = "gpucore";
+                       };
+               };
+               cpu_cluster0:cpu_core_cluster0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore:thermal_gpu_cores {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+
+       dtv-demod {
+               compatible = "amlogic, ddemod-txl";
+               status = "okay";
+
+               pinctrl-names = "dtvdemod_agc_pins";
+               pinctrl-0 = <&dtvdemod_agc_pins>;
+
+               clocks = <&clkc CLKID_DAC_CLK>;
+               clock-names = "vdac_clk_gate";
+
+               reg = <0xc8844000 0x2000        /*dtv demod base*/
+                          0xc883c000 0x2000    /*hiu reg base*/
+                          0xc8100000 0x1000    /*io_aobus_base*/
+                          0xc1104400 0x1000    /*reset*/
+                          >;
+               /*move from dvbfe*/
+               dtv_demod0_mem = <0>;   // need move to aml_dtv_demod ?
+               spectrum = <1>;
+               cma_flag = <1>;
+               cma_mem_size = <8>;
+               memory-region = <&demod_cma_reserved>;//<&demod_reserved>;
+       };
+
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+                       thermal-sensors = <&meson_sensor 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpus 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpu_cluster0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpu 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       /* start AUDIO_RELATED */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks = <
+                       &clkc CLKID_MPLL3
+                       &clkc CLKID_AMCLK_COMP
+                       &clkc CLKID_AIU_GLUE
+                       &clkc CLKID_I2S_OUT
+                       &clkc CLKID_AMCLK_MEASURE
+                       &clkc CLKID_AIFIFO2
+                       &clkc CLKID_MIXER
+                       &clkc CLKID_MIXER_IFACE
+                       &clkc CLKID_ADC
+                       &clkc CLKID_AIU_TOP
+                       &clkc CLKID_AOCLK_GATE
+                       &clkc CLKID_I2S_SPDIF
+               >;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+       };
+
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks = <
+                       &clkc CLKID_MPLL1
+                       &clkc CLKID_IEC958_INT_COMP
+                       &clkc CLKID_AMCLK_COMP
+                       &clkc CLKID_IEC958_MUX
+                       &clkc CLKID_CLK81
+                       &clkc CLKID_IEC958
+                       &clkc CLKID_IEC958_GATE
+               >;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               /* disable pcm pin mux temporary, enable it if necessary */
+               /*pinctrl-0 = <&aml_audio_pcm>;*/
+               clocks = <
+                       &clkc CLKID_MPLL0
+                       &clkc CLKID_PCM_MCLK_COMP
+                       &clkc CLKID_PCM_SCLK_COMP
+                       >;
+               clock-names = "mpll0", "pcm_mclk", "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+
+       spdif_codec: spdif_codec {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               status = "okay";
+               pinctrl-names = "audio_spdif_out";
+               pinctrl-0 = <&audio_spdif_out_pins>;
+       };
+
+       pcm_codec: pcm_codec {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+               status = "okay";
+       };
+       /* endof AUDIO MESON8 DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disabled";
+       };
+
+       amlogic_codec:t9015S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015S";
+               status = "okay";
+               reg = <0xc8832000 0x14>;
+       };
+
+       aml_snd_tv {
+               compatible = "amlogic, txl-snd-tv";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-TVAUDIO";
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&aml_audio_i2s>;
+               /*avout mute gpio, if av_mute_inv = 1, invert gpio*/
+               mute_gpio-gpios = <&gpio GPIODV_11 GPIO_ACTIVE_LOW>;
+               av_mute_inv = <0>;
+               /*after sleep time, unmute avout*/
+               sleep_time = <0>;
+               /*analog amp mute pinmux*/
+               amp_mute_gpio-gpios = <&gpio GPIOZ_13 GPIO_ACTIVE_LOW>;
+               amp_mute_inv = <0>;
+               /* if 1, enable switch AV / HS Detect */
+               av_hs_switch = <1>;
+               hp_det-gpios = <&gpio GPIODV_10 GPIO_ACTIVE_HIGH>;
+               hp_det_inv = <0>;
+               /*audio soc*/
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+               Channel_Mask {
+                       /*i2s has 4 pins, 8channel, mux output*/
+                       DAC0_Channel_Mask = "i2s_2/3";
+               };
+       };
+
+       amaudio2 {
+               compatible = "amlogic, aml_amaudio2";
+               status = "okay";
+               interrupts = <0 48 1>;
+       };
+       /* end of AUDIO_RELATED */
+
+       wifi {
+               compatible = "amlogic, aml_wifi";
+               status = "okay";
+               power_on_pin = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+}; /* end of / */
+
+&pinctrl_periphs {
+       /* start AUDIO_RELATED */
+       /*i2s*/
+       aml_audio_i2s: aml_audio_i2s {
+               mux {
+                       groups = "i2s_amclk_z",
+                               "i2s_aoclk_out_z",
+                               "i2s_lrclk_out_z"
+                               /*,"i2s_out_ch01_z"*/
+                               ,"i2s_out_ch23"
+                               ;
+                       function = "i2s";
+               };
+       };
+
+       /*spdif*/
+       audio_spdif_out_pins: audio_spdif_out_pins {
+               mux {
+                       groups = "spdif_out";
+                       function = "spdif_out";
+               };
+       };
+
+       /*pcm*/
+       aml_audio_pcm: aml_audio_pcm {
+               mux {
+                       groups =
+                               "pcm_clk_a",
+                               "pcm_fs_a",
+                               "pcm_in_a",
+                               "pcm_out_a";
+                       function = "pcm_a";
+               };
+       };
+       /* end AUDIO_RELATED */
+
+       /*lcd_extern*/
+       lcd_extern_off_pins:lcd_extern_off_pin {
+               mux {
+                       pins = "GPIOH_2",
+                               "GPIOH_3";
+                       function = "gpio_periphs";
+                       /*output-high;*/
+                       output-low;
+                       /*input-enable;*/
+               };
+       };
+
+       /*backlight*/
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOZ_6";
+                       function = "gpio_periphs";
+                       output-low;
+               };
+       };
+       bl_pwm_combo_off_pins:bl_pwm_combo_off_pin {
+               mux {
+                       pins = "GPIOZ_6",
+                               "GPIOZ_7";
+                       function = "gpio_periphs";
+                       output-low;
+               };
+       };
+};
+
+&i2c1 {
+       status = "okay";
+       clock-frequency = <300000>;
+       pinctrl-names="default";
+       pinctrl-0=<&i2c1_dv_pins>;
+};
+
+&i2c2 {
+       status = "disabled";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c2_h_pins>;
+
+       lcd_extern_i2c0: lcd_extern_i2c@0 {
+               compatible = "lcd_ext, i2c";
+               dev_name = "i2c_T5800Q";
+               reg = <0x1c>;
+               status = "disabled";
+       };
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy {
+       status = "okay";
+};
+
+&usb3_phy {
+       status = "okay";
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <1>;
+};
+
+&audio_data{
+       status = "okay";
+};
+
+&pwm_ab {
+       status = "okay";
+};
+
+&pwm_cd {
+       status = "okay";
+};
+
+&ethmac {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/txl_t962_p320.dts b/arch/arm/boot/dts/amlogic/txl_t962_p320.dts
new file mode 100644 (file)
index 0000000..39a9c8d
--- /dev/null
@@ -0,0 +1,1143 @@
+/*
+ * arch/arm/boot/dts/amlogic/txl_t962_320.dts
+ *
+ * Copyright (C) 2018 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+
+#include "mesontxl.dtsi"
+#include "partition_mbox_normal.dtsi"
+#include "mesontxl_p321-panel.dtsi"
+
+/ {
+       model = "Amlogic TXL T962 P320 Development Board";
+       compatible = "amlogic, txl_t962_p320";
+       amlogic-dt-id = "txl_p320_v1";
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+               i2c0 = &i2c0;
+               i2c1 = &i2c1;
+               i2c2 = &i2c2;
+               i2c3 = &i2c3;
+               i2c4 = &i2c_AO;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               /* global autoconfigured region for contiguous allocations */
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               secos_reserved:linux,secos {
+                       compatible = "amlogic, aml_secos_memory";
+                       status = "disable";
+                       reg = <0x05300000 0x2000000>;
+                       no-map;
+               };
+
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x800000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3f800000 0x800000>;
+               };
+
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       // if no direct render, ion size = fb0_size x 3 + fb1_size + 4 M
+                       size = <0x2400000>;
+                       alignment = <0x400000>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0x13400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+
+               //di_reserved:linux,di {
+                       //compatible = "amlogic, di-mem";
+                       /* buffer_size = 3621952(yuv422 8bit) */
+                       /* 4179008(yuv422 10bit full pack mode) */
+                       /** 10x3621952=34.6M(0x23) support 8bit **/
+                       /** 10x4736064=45.2M(0x2e) support 12bit **/
+                       /** 10x4179008=40M(0x28) support 10bit **/
+                       //size = <0x2800000>;
+                       //no-map;
+               //};
+
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4179008(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4179008=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+
+               /* POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "amlogic, ppmgr_memory";
+                       size = <0x0>;
+               };
+
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+
+               demod_cma_reserved:linux,demod_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 5M */
+                       size = <0x0800000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 1920x1080x2x4  =16+4 M */
+                       size = <0x04000000>;
+                       alignment = <0x400000>;
+               };
+       }; /* end of reserved-memory */
+
+       secmon {
+               compatible = "amlogic, secmon";
+               memory-region = <&secmon_reserved>;
+               in_base_func = <0x82000020>;
+               out_base_func = <0x82000021>;
+               reserve_mem_size = <0x00300000>;
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "disabled";
+
+               sys_led {
+                       label = "sys_led";
+                       gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
+                       default-state = "on";
+               };
+       };
+
+       /*for external keypad*/
+       adc-keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "power","up", "down","enter","left","right";
+               key_num = <6>;
+               io-channels = <&saradc SARADC_CH2>,
+                               <&saradc SARADC_CH3>;
+               io-channel-names = "key-chan-2", "key-chan-3";
+               key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2
+                               SARADC_CH3 SARADC_CH3 SARADC_CH3>;
+               key_code = <116 103 108 28 105 106>;
+               key_val = <0 143 266 0 143 266>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40 40>;
+       };
+
+       avin_detect {
+               compatible = "amlogic, avin_detect";
+               status = "okay";
+               avin_device_num = <2>;
+               gpios = <&gpio  GPIODV_8   GPIO_ACTIVE_HIGH>,
+                       <&gpio  GPIODV_10  GPIO_ACTIVE_HIGH>;
+               detect_interval_length = <100>;
+               set_detect_times = <5>;
+               set_fault_tolerance = <1>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-txl";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               /* 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               scale_mode = <1>;
+               /* 1920*1080*4*3 = 0x17BB000 */
+               display_size_default = <1920 1080 1920 3240 32>;
+               pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+               logo_addr = "0x3f800000";
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               status = "okay";
+               memory-region = <&picdec_cma_reserved>;
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               status = "okay";
+               memory-region = <&ppmgr_reserved>;
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 6 1>;
+               interrupt-names = "de_irq";
+               clocks = <&clkc CLKID_VPU_MUX>,
+                       <&clkc CLKID_FCLK_DIV4>,
+                       <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_mux",
+                       "fclk_div4",
+                       "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <333 333>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4179008>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               nr10bit-support = <1>;
+       };
+
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       hdmirx {
+               compatible = "amlogic, hdmirx-txl";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               dev_name = "hdmirx";
+               pinctrl-names = "hdmirx_pins";
+               pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux
+                       &hdmirx_c_mux>;
+               repeat = <0>;
+               interrupts = <0 56 1>;
+               clocks = <&clkc CLKID_HDMIRX_MODET_COMP>,
+                       <&clkc CLKID_HDMIRX_CFG_COMP>,
+                       <&clkc CLKID_HDMIRX_ACR_COMP>,
+                       <&clkc CLKID_HDMIRX_AUDMEAS_COMP>,
+                       <&xtal>,
+                       <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_FCLK_DIV7>,
+                       <&clkc CLKID_HDCP22_SKP_COMP>,
+                       <&clkc CLKID_HDCP22_ESM_COMP>;
+                       //<&clkc CLK_AUD_PLL2FS>,
+                       //<&clkc CLK_AUD_PLL4FS>,
+                       //<&clkc CLK_AUD_OUT>;
+               clock-names = "hdmirx_modet_clk",
+                       "hdmirx_cfg_clk",
+                       "hdmirx_acr_ref_clk",
+                       "hdmirx_audmeas_clk",
+                       "xtal",
+                       "fclk_div5",
+                       "fclk_div7",
+                       "hdcp_rx22_skp",
+                       "hdcp_rx22_esm";
+                       //"hdmirx_aud_pll2fs",
+                       //"hdmirx_aud_pll4f",
+                       //"clk_aud_out";
+               hdmirx_id = <0>;
+               en_4k_2_2k = <0>;
+               hpd_low_cec_off = <1>;
+               /* bit4: enable feature, bit3~0: port number */
+               disable_port = <0x0>;
+               reg = <0xc0800000 0xa00000
+                       0xC883C000 0x2000
+                       0xd0076000 0x2000
+                       0xc883e000 0x2000
+                       0xda83e000 0x2000
+                       0xc8834000 0x2000
+                       0xda846000 0x2000>;
+       };
+
+       vdin@0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "okay";
+               reserve-iomap = "true";
+               /*bit0:(1:share with codec_mm;0:cma alone)*/
+               /*bit8:(1:alloc in discontinus way;0:alone in continuous way)*/
+               flag_cma = <0x101>;
+               /* MByte, if 10bit disable: 64M(YUV422),
+                * if 10bit enable: 64*1.5 = 96M(YUV422)
+                * if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                * if support 4K2K-YUV444-10bit-WR:3840*2160*4*6 ~= 190M
+                * if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                * if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                * if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <190>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               clocks = <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_VDIN_MEAS_COMP>;
+               clock-names = "fclk_div5", "cts_vdin_meas_clk";
+               vdin_id = <0>;
+               /* vdin write mem color depth support:
+                * bit0:support 8bit
+                * bit1:support 9bit
+                * bit2:support 10bit
+                * bit3:support 12bit
+                * bit4:support yuv422 10bit full pack mode (from txl new add)
+                * bit8:use 8bit  at 4k_50/60hz_10bit
+                * bit9:use 10bit at 4k_50/60hz_10bit
+                */
+               tv_bit_mode = <0x215>;
+       };
+
+       vdin@1 {
+               compatible = "amlogic, vdin";
+               status = "okay";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               clocks = <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_VDIN_MEAS_COMP>;
+               clock-names = "fclk_div5", "cts_vdin_meas_clk";
+               vdin_id = <1>;
+               /* vdin write mem color depth support:
+                * bit0:support 8bit
+                * bit1:support 9bit
+                * bit2:support 10bit
+                * bit3:support 12bit
+                */
+               tv_bit_mode = <21>;
+       };
+
+       tvafe:tvafe@c8842000 {
+               compatible = "amlogic, tvafe-txl";
+               status = "okay";
+               /*memory-region = <&tvafe_cma_reserved>;*/
+               dev_name = "tvafe";
+               flag_cma = <1>;/*1:share with codec_mm;0:cma alone*/
+               cma_size = <5>;/*MByte*/
+               reg = <0xc8842000 0x2000>;/*tvafe reg base*/
+               reserve-iomap = "true";
+               tvafe_id = <0>;
+               //pinctrl-names = "default";
+               /*!!particular sequence, no more and no less!!!*/
+               tvafe_pin_mux = <
+                               3 /* TVAFE_CVBS_IN2, CVBS_IN0 = 0 */
+                               1 /* TVAFE_CVBS_IN0, CVBS_IN1 */
+                               2 /* TVAFE_CVBS_IN1, CVBS_IN2 */
+                               4 /* TVAFE_CVBS_IN3, CVBS_IN3 */
+               >;
+               clocks = <&clkc CLKID_DAC_CLK>;
+               clock-names = "vdac_clk_gate";
+       };
+
+       vecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <1>;/*1:enabel ;0:disable*/
+               wb_en = <1>;/*1:enabel ;0:disable*/
+               cm_en = <1>;/*1:enabel ;0:disable*/
+               wb_sel = <1>;/*1:mtx ;0:gainoff*/
+               vlock_en = <1>;/*1:enable;0:disable*/
+               vlock_mode = <0x4>;
+               /* vlock work mode:
+                *bit0:auto ENC
+                *bit1:auto PLL
+                *bit2:manual PLL
+                *bit3:manual ENC
+                *bit4:manual soft ENC
+                *bit5:manual MIX PLL ENC
+                */
+                vlock_pll_m_limit = <1>;
+                vlock_line_limit = <3>;
+       };
+
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "si2151_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0x60>;
+               /* tuner_xtal = <0>; */ /* unuse for si2151 */
+               /* tuner_xtal_mode = <0>; */
+               /* tuner_xtal_cap = <0>; */
+       };
+
+       atv-demod {
+               compatible = "amlogic, atv-demod";
+               status = "okay";
+               tuner = <&tuner>;
+               btsc_sap_mode = <1>;
+               /* pinctrl-names = "atvdemod_agc_pins"; */
+               /* pinctrl-0 = <&atvdemod_agc_pins>; */
+               reg = <0xc8840000 0x2000 /* demod reg */
+                       0xc883c000 0x2000 /* hiu reg */
+                       0xc8834000 0x2000>; /* periphs reg */
+               reg_23cf = <0x88188832>;
+               /*default:0x88188832;r840 on haier:0x48188832*/
+       };
+
+       sd_emmc_c: emmc@d0074000 {
+               compatible = "amlogic, meson-mmc-txl";
+               status = "okay";
+               reg = <0xd0074000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200";
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       tx_phase = <3>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b:sd@d0072000 {
+               compatible = "amlogic, meson-mmc-txl";
+               status = "okay";
+               reg = <0xd0072000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>;
+               clock-names = "core", "clkin0", "clkin1";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <100000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio CARD_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio CARD_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 0:unknown,
+                        * 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD),
+                        * 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card,
+                        * 5:NON sdio device(means sd/mmc card),
+                        * other:reserved
+                        */
+               };
+       };
+
+       unifykey {
+               compatible = "amlogic, unifykey";
+               status = "okay";
+
+               unifykey-num = <19>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11 = <&keysn_11>;
+               unifykey-index-12 = <&keysn_12>;
+               unifykey-index-13 = <&keysn_13>;
+               unifykey-index-14 = <&keysn_14>;
+               unifykey-index-15 = <&keysn_15>;
+               unifykey-index-16 = <&keysn_16>;
+               unifykey-index-17 = <&keysn_17>;
+               unifykey-index-18 = <&keysn_18>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device  = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type  = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "hdcp22_rx_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "hdcp22_rx_fw";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "hdcp14_rx";
+                       key-device = "normal";
+                       key-type  = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_15:key_15{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_16:key_16{
+                       key-name = "lcd";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_17:key_17{
+                       key-name = "lcd_extern";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_18:key_18{
+                       key-name = "backlight";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+       }; /* End unifykey */
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       dvb {
+               compatible = "amlogic, dvb";
+               dev_name = "dvb";
+               status = "okay";
+               fe0_mode = "internal";
+               fe0_tuner = <&tuner>;
+
+               /*"parallel","serial","disable"*/
+               ts2 = "parallel";
+               ts2_control = <0>;
+               ts2_invert = <0>;
+               interrupts = <0 23 1
+                                               0 5 1
+                                               0 53 1
+                                               0 19 1
+                                               0 25 1
+                                               0 18 1
+                                               0 24 1>;
+               interrupt-names = "demux0_irq",
+                                                       "demux1_irq",
+                                                       "demux2_irq",
+                                                       "dvr0_irq",
+                                                       "dvr1_irq",
+                                                       "dvrfill0_fill",
+                                                       "dvrfill1_flush";
+               clocks = <&clkc CLKID_DEMUX
+                                               &clkc CLKID_ASYNC_FIFO
+                                               &clkc CLKID_AHB_ARB0
+                                               &clkc CLKID_DOS_PARSER>;
+               clock-names = "demux", "asyncfifo", "ahbarb0", "uparsertop";
+       };
+
+       meson_sensor: sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpus";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpu_core_cluster0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "mali";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "thermal_gpu_cores";
+                               device_type = "gpucore";
+                       };
+               };
+               cpu_cluster0:cpu_core_cluster0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore:thermal_gpu_cores {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+
+       dtv-demod {
+               compatible = "amlogic, ddemod-txl";
+               status = "okay";
+
+               pinctrl-names = "dtvdemod_agc_pins";
+               pinctrl-0 = <&dtvdemod_agc_pins>;
+
+               clocks = <&clkc CLKID_DAC_CLK>;
+               clock-names = "vdac_clk_gate";
+
+               reg = <0xc8844000 0x2000        /*dtv demod base*/
+                          0xc883c000 0x2000    /*hiu reg base*/
+                          0xc8100000 0x1000    /*io_aobus_base*/
+                          0xc1104400 0x1000    /*reset*/
+                          >;
+               /*move from dvbfe*/
+               dtv_demod0_mem = <0>;   // need move to aml_dtv_demod ?
+               spectrum = <1>;
+               cma_flag = <1>;
+               cma_mem_size = <8>;
+               memory-region = <&demod_cma_reserved>;//<&demod_reserved>;
+       };
+
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+                       thermal-sensors = <&meson_sensor 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpus 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpu_cluster0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpu 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+       /* start AUDIO_RELATED */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-i2s-dai";
+               clocks = <
+                       &clkc CLKID_MPLL3
+                       &clkc CLKID_AMCLK_COMP
+                       &clkc CLKID_AIU_GLUE
+                       &clkc CLKID_I2S_OUT
+                       &clkc CLKID_AMCLK_MEASURE
+                       &clkc CLKID_AIFIFO2
+                       &clkc CLKID_MIXER
+                       &clkc CLKID_MIXER_IFACE
+                       &clkc CLKID_ADC
+                       &clkc CLKID_AIU_TOP
+                       &clkc CLKID_AOCLK_GATE
+                       &clkc CLKID_I2S_SPDIF
+               >;
+               clock-names =
+                       "mpll",
+                       "mclk",
+                       "top_glue",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in";
+       };
+
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks = <
+                       &clkc CLKID_MPLL1
+                       &clkc CLKID_IEC958_INT_COMP
+                       &clkc CLKID_AMCLK_COMP
+                       &clkc CLKID_IEC958_MUX
+                       &clkc CLKID_CLK81
+                       &clkc CLKID_IEC958
+                       &clkc CLKID_IEC958_GATE
+               >;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               /* disable pcm pin mux temporary, enable it if necessary */
+               /*pinctrl-0 = <&aml_audio_pcm>;*/
+               clocks = <
+                       &clkc CLKID_MPLL0
+                       &clkc CLKID_PCM_MCLK_COMP
+                       &clkc CLKID_PCM_SCLK_COMP
+                       >;
+               clock-names = "mpll0", "pcm_mclk", "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+
+       spdif_codec: spdif_codec {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               status = "okay";
+               pinctrl-names = "audio_spdif_out";
+               pinctrl-0 = <&audio_spdif_out_pins>;
+       };
+
+       pcm_codec: pcm_codec {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+               status = "okay";
+       };
+       /* endof AUDIO MESON8 DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "disabled";
+       };
+
+       amlogic_codec:t9015S {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_codec_T9015S";
+               status = "okay";
+               reg = <0xc8832000 0x14>;
+       };
+
+       aml_snd_tv {
+               compatible = "amlogic, txl-snd-tv";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-TVAUDIO";
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&aml_audio_i2s>;
+               /*avout mute gpio*/
+               mute_gpio-gpios = <&gpio GPIODV_11 GPIO_ACTIVE_HIGH>;
+               sleep_time = <20>;
+               aux_dev = <&tas5707>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2>;
+               codec_list = <&codec0 &codec1 &codec2>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+               Channel_Mask {
+                       /*i2s has 4 pins, 8channel, mux output*/
+                       Speaker1_Channel_Mask = "i2s_2/3";
+                       DAC0_Channel_Mask = "i2s_0/1";
+               };
+       };
+
+       amaudio2 {
+               compatible = "amlogic, aml_amaudio2";
+               status = "okay";
+               interrupts = <0 48 1>;
+       };
+       /* end of AUDIO_RELATED */
+
+       wifi {
+               compatible = "amlogic, aml_wifi";
+               status = "okay";
+               power_on_pin = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+}; /* end of / */
+
+&pinctrl_periphs {
+       /* start AUDIO_RELATED */
+       /*i2s*/
+       aml_audio_i2s: aml_audio_i2s {
+               mux {
+                       groups = "i2s_amclk_z",
+                               "i2s_aoclk_out_z",
+                               "i2s_lrclk_out_z"
+                               /*,"i2s_out_ch01_z"*/
+                               ,"i2s_out_ch23"
+                               ;
+                       function = "i2s";
+               };
+       };
+
+       /*spdif*/
+       audio_spdif_out_pins: audio_spdif_out_pins {
+               mux {
+                       groups = "spdif_out";
+                       function = "spdif_out";
+               };
+       };
+
+       /*pcm*/
+       aml_audio_pcm: aml_audio_pcm {
+               mux {
+                       groups =
+                               "pcm_clk_a",
+                               "pcm_fs_a",
+                               "pcm_in_a",
+                               "pcm_out_a";
+                       function = "pcm_a";
+               };
+       };
+       /* end AUDIO_RELATED */
+
+       /*lcd_extern*/
+       lcd_extern_off_pins:lcd_extern_off_pin {
+               mux {
+                       pins = "GPIOH_2",
+                               "GPIOH_3";
+                       function = "gpio_periphs";
+                       /*output-high;*/
+                       output-low;
+                       /*input-enable;*/
+               };
+       };
+
+       /*backlight*/
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOZ_6";
+                       function = "gpio_periphs";
+                       output-low;
+               };
+       };
+       bl_pwm_combo_off_pins:bl_pwm_combo_off_pin {
+               mux {
+                       pins = "GPIOZ_6",
+                               "GPIOZ_7";
+                       function = "gpio_periphs";
+                       output-low;
+               };
+       };
+};
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&i2c0_z_pins>;
+
+       /* start AUDIO_RELATED */
+       tas5707: tas5707@36 {
+               #sound-dai-cells = <0>;
+               compatible = "ti,tas5707";
+               status = "okay";
+               codec_name = "tas5707";
+               reg = <0x1B>;
+               reset_pin = <&gpio GPIOZ_13 GPIO_ACTIVE_LOW>;
+               eq_enable = <0>;
+               drc_enable = <0>;
+       };
+       /* end AUDIO_RELATED */
+};
+
+
+&i2c1 {
+       status = "okay";
+       clock-frequency = <300000>;
+       pinctrl-names="default";
+       pinctrl-0=<&i2c1_dv_pins>;
+};
+
+&i2c2 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c2_h_pins>;
+
+       lcd_extern_i2c0: lcd_extern_i2c@0 {
+               compatible = "lcd_ext, i2c";
+               dev_name = "i2c_T5800Q";
+               reg = <0x1c>;
+               status = "okay";
+       };
+};
+
+&dwc3 {
+       status = "okay";
+};
+
+&usb2_phy {
+       status = "okay";
+};
+
+&usb3_phy {
+       status = "okay";
+};
+
+&dwc2_a {
+       status = "okay";
+       /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+       controller-type = <1>;
+};
+
+&audio_data{
+       status = "okay";
+};
+
+&pwm_ab {
+       status = "okay";
+};
+
+&pwm_cd {
+       status = "okay";
+};
+
+&ethmac {
+       status = "okay";
+};
+
diff --git a/arch/arm/boot/dts/amlogic/txlx_t962e_r321_buildroot.dts b/arch/arm/boot/dts/amlogic/txlx_t962e_r321_buildroot.dts
new file mode 100644 (file)
index 0000000..89eee0f
--- /dev/null
@@ -0,0 +1,1594 @@
+/*
+ * arch/arm/boot/dts/amlogic/txlx_t962e_r321.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/meson-txlx-gpio.h>
+#include <dt-bindings/gpio/gpio.h>
+
+#include "mesontxlx.dtsi"
+
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "txlx_t962e_r321";
+       compatible = "amlogic, txlx";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x7ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               //secos_reserved:linux,secos {
+               //      status = "disabled";
+               //      compatible = "amlogic, aml_secos_memory";
+               //      reg = <0x05300000 0x2000000>;
+               //      no-map;
+               //};
+
+
+
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x8000000>;
+                       alignment = <0x400000>;
+               };
+
+               //carveout_reserved:linux,carveout-reserve {
+               //      compatible = "amlogic, idev-mem";
+               //      size = <0x1000>;
+               //};
+
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4179008(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4179008=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+
+               /* POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "amlogic, ppmgr_memory";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x10400000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+
+               demod_cma_reserved:linux,demod_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 5M */
+                       size = <0x0800000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       linux,phandle = <5>;
+                       reusable;
+                       /* 1920x1080x2x4  =16+4 M */
+                       size = <0x01400000>;
+                       alignment = <0x400000>;
+               };
+
+               /*vbi reserved mem*/
+               vbi_reserved:linux,vbi {
+                       compatible = "amlogic, vbi-mem";
+                       size = <0x100000>;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+       };
+
+       /* for external keypad */
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "power","up","down","enter","left","right","home";
+               key_num = <7>;
+               io-channels = <&saradc SARADC_CH2>,
+                                       <&saradc SARADC_CH3>;
+               io-channel-names = "key-chan-2", "key-chan-3";
+               key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2 SARADC_CH2
+                                       SARADC_CH2 SARADC_CH3 SARADC_CH3>;
+               key_code = <116 103 108 28 105 106 102>;
+               key_val = <0 143 266 389 512 143 266>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40 40 40>;
+       };
+
+       pwmleds {
+               compatible = "pwm-leds";
+               status = "disabled";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwmleds_pins>;
+
+               sys {
+                       active-low;
+                       label = "sysled";
+                       max-brightness = <255>;
+                       pwms = <&pwm_AO_ab 0 50000 0>;
+               };
+       };
+
+       ethmac: ethernet@0xff3f0000 {
+               compatible = "amlogic, gxbb-eth-dwmac";
+               status = "okay";
+               reg = <0xff3f0000 0x10000
+                       0xff634540 0x8
+                       0xff634558 0xc
+                       0xffd01084 0x4>;
+               interrupts = <0 8 1
+                               0 9 1>;
+
+               phy-mode= "rmii";
+               mc_val_internal_phy = <0x1804>;
+               mc_val_external_phy = <0x1621>;
+               interrupt-names = "macirq",
+                               "phyirq";
+               clocks = <&clkc CLKID_ETH_CORE>;
+               clock-names = "ethclk81";
+               internal_phy = <1>;
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-txlx";
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00800000 0x01800000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x01851000*/
+               display_mode_default = "1080p60hz";
+               /* 0:VPU free scale 1:OSD free scale 2:OSD super scale */
+               scale_mode = <1>;
+               /* 1920*1080*4*3 = 0x17BB000 */
+               display_size_default = <1920 1080 1920 3240 32>;
+               pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+               mem_alloc = <1>;
+               logo_addr = "0x7dc00000";
+       };
+
+       ge2d {
+               compatible = "amlogic, ge2d-txlx";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+               reg = <0xff940000 0x10000>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xffd00000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xff620000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xff63c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xff800000 0x10000>;
+               };
+               io_vcbus_base{
+                       reg = <0xff900000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xff638000 0x2000>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_CLK81
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_81",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+
+
+       amvideocap {
+               compatible = "amlogic, amvideocap";
+               dev_name = "amvideocap.0";
+               status = "disabled";
+               max_size = <8>;//8M
+       };
+
+       partitions: partitions{
+               parts = <12>;
+               part-0 = <&logo>;
+               part-1 = <&recovery>;
+               part-2 = <&rsv>;
+               part-3 = <&tee>;
+               part-4 = <&crypt>;
+               part-5 = <&misc>;
+               part-6 = <&boot>;
+               part-7 = <&system>;
+               part-8 = <&cache>;
+               part-9 = <&vendor>;
+               part-10 = <&odm>;
+               part-11 = <&data>;
+
+               logo:logo{
+                       pname = "logo";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               recovery:recovery{
+                       pname = "recovery";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               rsv:rsv{
+                       pname = "rsv";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               tee:tee{
+                       pname = "tee";
+                       size = <0x0 0x800000>;
+                       mask = <1>;
+               };
+               crypt:crypt{
+                       pname = "crypt";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               misc:misc{
+                       pname = "misc";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               boot:boot
+               {
+                       pname = "boot";
+                       size = <0x0 0x2000000>;
+                       mask = <1>;
+               };
+               system:system
+               {
+                       pname = "system";
+                       size = <0x0 0x80000000>;
+                       mask = <1>;
+               };
+               vendor:vendor
+               {
+                       pname = "vendor";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               odm:odm
+               {
+                       pname = "odm";
+                       size = <0x0 0x10000000>;
+                       mask = <1>;
+               };
+               cache:cache
+               {
+                       pname = "cache";
+                       size = <0x0 0x20000000>;
+                       mask = <2>;
+               };
+               data:data
+               {
+                       pname = "data";
+                       size = <0xffffffff 0xffffffff>;
+                       mask = <4>;
+               };
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 6 1>;
+               interrupt-names = "de_irq";
+               clocks = <&clkc CLKID_VPU_MUX>,
+                       <&clkc CLKID_FCLK_DIV4>,
+                       <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_mux",
+                       "fclk_div4",
+                       "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <250 500>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4179008>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               nr10bit-support = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       hdmirx {
+               compatible = "amlogic, hdmirx_txlx";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               dev_name = "hdmirx";
+               status = "okay";
+               pinctrl-names = "hdmirx_pins";
+               pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux &hdmirx_d_mux>;
+               repeat = <0>;
+               interrupts = <0 56 1>;
+               clocks = <&clkc CLKID_HDMIRX_MODET_COMP>,
+                          <&clkc CLKID_HDMIRX_CFG_COMP>,
+                          <&clkc CLKID_HDMIRX_ACR_COMP>,
+                          <&clkc CLKID_HDMIRX_AUDMEAS_COMP>,
+                          <&xtal>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&clkc CLKID_FCLK_DIV7>,
+                          <&clkc CLKID_HDCP22_SKP_COMP>,
+                          <&clkc CLKID_HDCP22_ESM_COMP>;
+               //         <&clkc CLK_AUD_PLL2FS>,
+               //         <&clkc CLK_AUD_PLL4FS>,
+               //         <&clkc CLK_AUD_OUT>;
+               clock-names = "hdmirx_modet_clk",
+                       "hdmirx_cfg_clk",
+                               "hdmirx_acr_ref_clk",
+                               "hdmirx_audmeas_clk",
+                               "xtal",
+                               "fclk_div5",
+                               "fclk_div7",
+                               "hdcp_rx22_skp",
+                               "hdcp_rx22_esm";
+               //              "hdmirx_aud_pll2fs",
+               //              "hdmirx_aud_pll4f",
+               //              "clk_aud_out";
+               hdmirx_id = <0>;
+               en_4k_2_2k = <0>;
+               hpd_low_cec_off = <1>;
+               /* bit4: enable feature, bit3~0: port number */
+               disable_port = <0x0>;
+               reg = <0xffd26000 0xa00000
+                       0xff63C000 0x2000
+                       0xffe0d000 0x2000
+                       0xff63e000 0x2000
+                       0x0 0x0
+                       0xff634400 0x2000
+                       0xff646000 0x2000>;
+       };
+
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "okay";
+               reserve-iomap = "true";
+               /*bit0:(1:share with codec_mm;0:cma alone)*/
+               /*bit8:(1:alloc in discontinus way;0:alone in continuous way)*/
+               flag_cma = <0x101>;
+               /* MByte, if 10bit disable: 64M(YUV422),
+                * if 10bit enable: 64*1.5 = 96M(YUV422)
+                * if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                * if support 4K2K-YUV444-10bit-WR:3840*2160*4*6 ~= 190M
+                * if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                * if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                * if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <190>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               clocks = <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_VDIN_MEAS_COMP>;
+               clock-names = "fclk_div5", "cts_vdin_meas_clk";
+               vdin_id = <0>;
+               /* vdin write mem color depth support:
+                * bit0:support 8bit
+                * bit1:support 9bit
+                * bit2:support 10bit
+                * bit3:support 12bit
+                * bit4:support yuv422 10bit full pack mode (from txl new add)
+                */
+               tv_bit_mode = <21>;
+       };
+
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "okay";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               clocks = <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_VDIN_MEAS_COMP>;
+               clock-names = "fclk_div5", "cts_vdin_meas_clk";
+               vdin_id = <1>;
+               /* vdin write mem color depth support:
+                * bit0:support 8bit
+                * bit1:support 9bit
+                * bit2:support 10bit
+                * bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       tvafe {
+               compatible = "amlogic, tvafe-txlx";
+               /*memory-region = <&tvafe_cma_reserved>;*/
+               dev_name = "tvafe";
+               status = "okay";
+               flag_cma = <1>;/*1:share with codec_mm;0:cma alone*/
+               cma_size = <5>;/*MByte*/
+               reg = <0xff642000 0x2000>;/*tvafe reg base*/
+               reserve-iomap = "true";
+               tvafe_id = <0>;
+               //pinctrl-names = "default";
+               /*!!particular sequence, no more and no less!!!*/
+               tvafe_pin_mux = <
+                               3 /* TVAFE_CVBS_IN2, CVBS_IN0 = 0 */
+                               1 /* TVAFE_CVBS_IN0, CVBS_IN1 */
+                               2 /* TVAFE_CVBS_IN1, CVBS_IN2 */
+                               4 /* TVAFE_CVBS_IN3, CVBS_IN3 */
+               >;
+               clocks = <&clkc CLKID_DAC_CLK>;
+               clock-names = "vdac_clk_gate";
+       };
+
+       vbi {
+               compatible = "amlogic, vbi";
+               memory-region = <&vbi_reserved>;
+               dev_name = "vbi";
+               status = "okay";
+               interrupts = <0 83 1>;
+               reserve-iomap = "true";
+       };
+
+       tvafe_avin_detect {
+               compatible = "amlogic, tvafe_avin_detect";
+               dev_name = "tvafe_avin_detect";
+               status = "okay";
+               device_mask = <1>;/*bit0:ch1;bit1:ch2*/
+               interrupts = <0 12 1>,
+                               <0 13 1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <0>;/*1:enabel ;0:disable*/
+               wb_en = <0>;/*1:enabel ;0:disable*/
+               cm_en = <0>;/*1:enabel ;0:disable*/
+               wb_sel = <0>;/*1:mtx ;0:gainoff*/
+               /*0: 709/601  1: bt2020*/
+               tx_op_color_primary = <0>;
+               /*1:enabel osd lut 100 table;0:disable*/
+               cfg_en_osd_100 = <1>;
+
+               vlock_en = <0>;/*1:enable;0:disable*/
+               vlock_mode = <0x4>;
+               /* vlock work mode:
+                *bit0:auto ENC
+                *bit1:auto PLL
+                *bit2:manual PLL
+                *bit3:manual ENC
+                *bit4:manual soft ENC
+                *bit5:manual MIX PLL ENC
+                */
+               vlock_pll_m_limit = <1>;
+               vlock_line_limit = <3>;
+       };
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_txlx";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <0>;/*1:enabel ;0:disable*/
+       };
+       amvenc_avc {
+               compatible = "amlogic, amvenc_avc";
+               //memory-region = <&amvenc_avc_reserved>;
+               //memory-region = <&avc_cma_reserved>;
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "si2151_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0x60>;
+               /* tuner_xtal = <0>; */ /* unuse for si2151 */
+               /* tuner_xtal_mode = <0>; */
+               /* tuner_xtal_cap = <0>; */
+       };
+
+       atv-demod {
+               compatible = "amlogic, atv-demod";
+               status = "okay";
+               tuner = <&tuner>;
+               btsc_sap_mode = <1>;
+               /* pinctrl-names="atvdemod_agc_pins"; */
+               /* pinctrl-0=<&atvdemod_agc_pins>; */
+               reg = <0xff640000 0x2000 /* demod reg */
+                               0xff63c000 0x2000 /* hiu reg */
+                               0xff634000 0x2000 /* periphs reg */
+                               0xff648000 0x2000>; /* audio reg */
+               reg_23cf = <0x88188832>;
+               /*default:0x88188832;r840 on haier:0x48188832*/
+       };
+
+       bt-dev {
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               gpio_reset = <&gpio_ao GPIOAO_13 GPIO_ACTIVE_HIGH>;
+               //gpio_en = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       rtc {
+               compatible = "amlogic, aml_vrtc";
+               alarm_reg_addr = <0xff8000a8>;
+               timer_e_addr = <0xffd0f188>;
+               init_date = "2015/01/01";
+               status = "okay";
+       };
+
+       wifi {
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
+               interrupts = <0 68 4>;
+               irq_trigger_type = "GPIO_IRQ_HIGH";
+               dhd_static_buf;
+               power_on_pin = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf: wifi_pwm_conf {
+               pwm_channel1_conf {
+                       pwms = <&pwm_cd MESON_PWM_1 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_cd MESON_PWM_3 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@ffe07000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-txlx";
+               reg = <0xffe07000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       status = "disabled";
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b: sd@ffe05000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-txlx";
+               reg = <0xffe05000 0x2000>;
+               interrupts = <0 217 4>;
+               pinctrl-names = "sd_clk_cmd_pins", "sd_all_pins";
+               pinctrl-0 = <&sd_clk_cmd_pins>;
+               pinctrl-1 = <&sd_all_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               max-frequency = <100000000>;
+               non-removable;
+               disable-wp;
+               sd {
+                       status = "disabled";
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_UHS_SDR12",
+                                "MMC_CAP_UHS_SDR25",
+                                "MMC_CAP_UHS_SDR50",
+                                "MMC_CAP_UHS_SDR104",
+                                "MMC_PM_KEEP_POWER",
+                                "MMC_CAP_SDIO_IRQ";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       card_type = <3>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        * 5:NON sdio device(means sd/mmc card)
+                        */
+               };
+       };
+
+       unifykey {
+               compatible = "amlogic, unifykey";
+               status = "okay";
+
+               unifykey-num = <17>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11 = <&keysn_11>;
+               unifykey-index-12 = <&keysn_12>;
+               unifykey-index-13 = <&keysn_13>;
+               unifykey-index-14 = <&keysn_14>;
+               unifykey-index-15 = <&keysn_15>;
+               unifykey-index-16 = <&keysn_16>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device  = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type  = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "hdcp22_rx_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "hdcp22_rx_fw";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "hdcp14_rx";
+                       key-device = "normal";
+                       key-type  = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_15:key_15{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_16:key_16{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       }; /* End unifykey */
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-txlx";
+               dev_name = "cvbsout";
+               status = "disabled";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               performance = <0x1b56  0x343
+                       0x1b05  0xf4
+                       0x1c59  0xfc48
+                       0x1b12  0x8c00
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx {
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "okay";
+               pinctrl-names="default", "hdmitx_i2c";
+               pinctrl-0=<&hdmitx_hpd &hdmitx_ddc>;
+               pinctrl-1=<&hdmitx_hpd_gpio &i2c2_h_pins>;
+               clocks = <&clkc CLKID_HDCP22_SKP_COMP>,
+                            <&clkc CLKID_HDCP22_ESM_COMP>;
+               clock-names = "hdcp22_tx_skp",
+                                     "hdcp22_tx_esm";
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <6>;
+               //gpio_i2c_en = <0>;
+               //repeater_tx = <0x1>;
+               //#address-cells = <2>;
+               //#size-cells = <2>;
+               //ranges;
+       };
+
+       i2c_gpio: i2c_gpio {
+               compatible = "i2c-gpio";
+               dev_name = "i2c-gpio";
+               status = "disabled";
+               i2c-gpio,delay-us = <10>; /* 50 kHz */
+               gpios = <&gpio GPIOH_2 0
+                       &gpio GPIOH_3 0>;
+               #address-cells = <2>;
+               #size-cells = <2>;
+               i2c-gpio,timeout-ms = <10>;
+               i2c_gpio_edid: i2c_gpio_edid {
+                       compatible = "i2c-gpio";
+                       reg = <0x50 0x0 0x0 0x0>;
+               };
+       };
+
+       aocec: aocec {
+               compatible = "amlogic, aocec-txlx";
+               device_name = "aocec";
+               status = "okay";
+               vendor_name = "Amlogic"; /* Max Chars: 8     */
+               /* Refer to the following URL at:
+                * http://standards.ieee.org/develop/regauth/oui/oui.txt
+                */
+               vendor_id = <0x000000>;
+               product_desc = "TXLX"; /* Max Chars: 16    */
+               cec_osd_string = "AML_TV"; /* Max Chars: 14    */
+               port_num = <4>; /*all port number*/
+               /*ee_cec;*/
+               output = <1>;   /*output port number*/
+               /*arc support port:bit 0-3, according to portmap*/
+               arc_port_mask = <0x8>;
+               interrupts = <0 205 1
+                                       0 199 1>;
+               interrupt-names = "hdmi_aocecb","hdmi_aocec";
+               pinctrl-names = "default","hdmitx_aocecb","cec_pin_sleep";
+               pinctrl-0=<&hdmitx_aocec>;
+               pinctrl-1=<&hdmitx_aocecb>;
+               pinctrl-2=<&hdmitx_aocecb>;
+               reg = <0xFF80023c 0x4
+                      0xFF800000 0x400>;
+               reg-names = "ao_exit","ao";
+       };
+
+
+       canvas {
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "okay";
+               reg = <0xff638000 0x2000>;
+       };
+
+       rdma {
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "okay";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       dwc3: dwc3@ff500000 {
+               compatible = "synopsys, dwc3";
+               status = "okay";
+               reg = <0xff500000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@ffe09000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               status = "okay";
+               portnum = <4>;
+               reg = <0xffe09000 0x80
+                       0xffd01008 0x4>;
+       };
+
+       usb3_phy: usb3phy@ffe09080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               status = "okay";
+               portnum = <0>;
+               reg = <0xffe09080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xff400000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               /*0:default,1:single,2:incr,3:incr4,4:incr8,5:incr16,6:disable*/
+               port-dma = <0>;
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+               controller-type = <1>;
+               phy-reg = <0xffe09000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                                       &clkc CLKID_USB1_TO_DDR>;
+               clock-names = "usb_general",
+                                               "usb1";
+       };
+
+       /* Sound iomap */
+       aml_snd_iomap {
+               compatible = "amlogic, meson-snd-iomap";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_audin_base {
+                       reg = <0xffd03000 0x100000>;
+               };
+               io_aiu_base {
+                       reg = <0xFFCFFC00 0x100000>;
+               };
+               io_eqdrc_base {
+                       reg = <0xFFCFF000 0x100000>;
+               };
+               io_hiu_reset_base {
+                       reg = <0xFFCFCC00 0x100000>;
+               };
+               io_isa_base {
+                       reg = <0xFFD05800 0x100000>;
+               };
+       };
+
+       /* AUDIO DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               /* config mpll whether same with audin */
+               clocks = <&clkc CLKID_MPLL3>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK_MEASURE>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>,
+                       <&clkc CLKID_DAC_CLK>;
+               clock-names = "mpll",
+                       "mclk",
+                       "top_glue",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in",
+                       "vdac_clk";
+               compatible = "amlogic, aml-i2s-dai";
+       };
+
+       i2s2_dai: I2S2 {
+               #sound-dai-cells = <0>;
+               /* config mpll whether same with aiu */
+               clocks = <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AUDIN_MCLK_COMP>,
+                       <&clkc CLKID_AUDIN_SCLK_COMP>,
+                       <&clkc CLKID_AUDIN_LRCLK_COMP>;
+               clock-names = "audin_mpll",
+                       "audin_mclk",
+                       "audin_sclk",
+                       "audin_lrclk";
+               compatible = "amlogic, aml-i2s2-dai";
+       };
+
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks = <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_IEC958_INT_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_IEC958_MUX>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               /* disable pcm pin mux temporary, enable it if necessary */
+               /*pinctrl-0 = <&aml_audio_pcm>;*/
+               clocks = <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_COMP>;
+               clock-names = "mpll0", "pcm_mclk", "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif_out",
+                                               "audio_spdif_out_mute",
+                                               "audio_spdif_in",
+                                               "audio_spdif_in_mute";
+               pinctrl-0 = <&audio_spdif_out_pins>;
+               pinctrl-1 = <&audio_spdif_out_mute_pins>;
+               pinctrl-2 = <&audio_spdif_in_pins>;
+               pinctrl-3 = <&audio_spdif_in_mute_pins>;
+       };
+
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* end of AUDIO DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+
+       amlogic_codec:txlx_acodec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, txlx_acodec";
+               reg = <0xFF632000 0x1c>;
+               status = "okay";
+       };
+
+       aml_snd_tv {
+               compatible = "amlogic, txlx-snd-tv";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-TVAUDIO";
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&aml_audio_i2s>;
+               /*avout mute gpio*/
+               mute_gpio-gpios = <&gpio GPIOZ_7 GPIO_ACTIVE_HIGH>;
+               /*switch ARC_IN & SPDIF_IN*/
+               source_switch-gpios = <&gpio GPIOZ_4 GPIO_ACTIVE_HIGH>;
+               /*analog amp mute*/
+               /*amp_mute_gpio-gpios = <&gpio GPIOZ_18 GPIO_ACTIVE_LOW>;*/
+               aux_dev = <&tas5707>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2 &cpudai3>;
+               codec_list = <&codec0 &codec1 &codec2 &codec3>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat &i2s_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               cpudai3: cpudai3 {
+                       sound-dai = <&i2s2_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+               codec3: codec3 {
+                       sound-dai = <&dummy_codec>;
+               };
+               Channel_Mask {
+                       /*i2s has 4 pins, 8channel, mux output*/
+                       Speaker0_Channel_Mask = "i2s_2/3";
+                       DAC0_Channel_Mask = "i2s_2/3";
+                       DAC1_Channel_Mask = "i2s_2/3";
+                       EQ_DRC_Channel_Mask = "i2s_2/3";
+                       Spdif_samesource_Channel_Mask = "i2s_0/1";
+               };
+       };
+
+       amaudio2 {
+               compatible = "amlogic, aml_amaudio2";
+               status = "okay";
+               interrupts = <0 48 1>;
+       };
+       /* end of AUDIO board specific */
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               status = "disabled";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpus";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpu_core_cluster0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "mali";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "thermal_gpu_cores";
+                               device_type = "gpucore";
+                       };
+               };
+               cpu_cluster0:cpu_core_cluster0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore:thermal_gpu_cores {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+
+       dvb {
+               compatible = "amlogic, dvb";
+               dev_name = "dvb";
+               status = "okay";
+               fe0_mode = "internal";
+               fe0_tuner = <&tuner>;
+
+               /*"parallel","serial","disable"*/
+               ts2 = "parallel";
+               ts2_control = <0>;
+               ts2_invert = <0>;
+               interrupts = <0 23 1
+                                       0 5 1
+                                       0 53 1
+                                       0 19 1
+                                       0 25 1
+                                       0 18 1
+                                       0 24 1>;
+               interrupt-names = "demux0_irq",
+                                               "demux1_irq",
+                                               "demux2_irq",
+                                               "dvr0_irq",
+                                               "dvr1_irq",
+                                               "dvrfill0_fill",
+                                               "dvrfill1_flush";
+               clocks = <&clkc CLKID_DEMUX
+                       &clkc CLKID_ASYNC_FIFO
+                       &clkc CLKID_AHB_ARB0
+                       &clkc CLKID_DOS_PARSER>;
+               clock-names = "demux", "asyncfifo", "ahbarb0", "uparsertop";
+       };
+       aml_dtv_demod {
+               compatible = "amlogic, ddemod-txlx";
+               dev_name = "aml_dtv_demod";
+               status = "okay";
+
+               //pinctrl-names="dtvdemod_agc";
+               //pinctrl-0=<&dtvdemod_agc>;
+
+               clocks = <&clkc CLKID_DAC_CLK>;
+               clock-names = "vdac_clk_gate";
+
+               reg = <0xff644000 0x2000        /*dtv demod base*/
+                          0xff63c000 0x2000    /*hiu reg base*/
+                          0xff800000 0x1000    /*io_aobus_base*/
+                          0xffd01000 0x1000    /*reset*/
+                          >;
+               /*move from dvbfe*/
+               dtv_demod0_mem = <0>;   // need move to aml_dtv_demod ?
+               spectrum = <1>;
+               cma_flag = <1>;
+               cma_mem_size = <8>;
+               memory-region = <&demod_cma_reserved>;//<&demod_reserved>;
+       };
+       dvbfe {
+               compatible = "amlogic, dvbfe";
+               dev_name = "dvbfe";
+               status = "disabled";
+               dtv_demod0 = "AMLDEMOD";
+               fe0_dtv_demod = <0>;
+               fe0_ts = <2>;
+               fe0_dev = <0>;
+               dtv_demod0_mem = <0>;
+               dtv_demod0_spectrum = <1>;
+               dtv_demod0_cma_flag = <1>;
+               dtv_demod0_cma_mem_size = <8>;
+               memory-region = <&demod_cma_reserved>;//<&demod_reserved>;
+               tuner0 = "si2151_tuner";
+               tuner0_i2c_adap_id = <2>;
+               tuner0_i2c_addr = <0x60>;
+               //tuner0_reset_value = <0>;
+               //tuner0_reset_gpio =  "GPIOY_10" ;  /*GPIOX_8   76*/
+               fe0_tuner = <0>;
+               atv_demod0 = "aml_atv_demod";
+               fe0_atv_demod = <0>;
+       };
+
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpus 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpu_cluster0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       //cooling-device = <&gpu 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+}; /* end of / */
+
+&i2c0 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c0_z_pins>;
+
+       tas5707: tas5707@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               codec_name = "tas5707";
+               reg = <0x1B>;
+               reset_pin = <&gpio GPIOZ_13 GPIO_ACTIVE_LOW>;
+               eq_enable = <0>;
+               drc_enable = <0>;
+               status = "okay";
+       };
+};
+
+&i2c1 {
+       status = "okay";
+       clock-frequency = <300000>;
+       pinctrl-names="default";
+       pinctrl-0=<&i2c1_dv_pins>;
+};
+
+&pinctrl_periphs {
+       /*i2s*/
+       aml_audio_i2s: aml_audio_i2s {
+               mux {
+                       groups = "i2s_mclk_z",
+                               "i2s_sclk_z",
+                               "i2s_lrclk_z",
+                               "i2s_dout01_z"
+                               //, "i2s_dout23_z15"
+                               //, "i2s_dout45_z"
+                               //, "i2s_dout67_z19"
+                               //, "i2s_din01_h6"
+                               //, "i2s_din23_h5"
+                               //, "i2s_din23_h5"
+                               //, "i2s_din67_h0"
+                               ;
+                       function = "i2s";
+               };
+       };
+       /*spdif*/
+       audio_spdif_out_pins: audio_spdif_out_pins {
+               mux {
+                       groups = "spdif_out_z";
+                       function = "spdif_out";
+               };
+       };
+       audio_spdif_out_mute_pins: audio_spdif_out_mute_pins {
+               mux {
+                       groups = "GPIOZ_17";
+                       function = "gpio_periphs";
+               };
+       };
+       audio_spdif_in_pins: audio_spdif_in_pins {
+           mux {
+                       groups = "spdif_in_z18";
+                       function = "spdif_in";
+               };
+       };
+       audio_spdif_in_mute_pins: audio_spdif_in_mute_pins {
+           mux {
+                       groups = "GPIOZ_18";
+                       function = "gpio_periphs";
+               };
+       };
+       /*pcm*/
+       aml_audio_pcm: aml_audio_pcm {
+               mux {
+                       groups =
+                               "pcm_clk_a_dv",
+                               "pcm_fs_a_dv",
+                               "pcm_in_a_dv",
+                               "pcm_out_a_dv";
+                       function = "pcm_a";
+               };
+       };
+
+};
+
+&uart_A {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+
+&pwm_AO_ab {
+       status = "okay";
+};
+
+&pwm_cd {
+       status = "okay";
+};
+
+
+&spicc0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi_a_pins>;
+       cs-gpios = <&gpio GPIOZ_3 0>;
+};
diff --git a/arch/arm/boot/dts/amlogic/txlx_t962x_r311_720p.dts b/arch/arm/boot/dts/amlogic/txlx_t962x_r311_720p.dts
new file mode 100644 (file)
index 0000000..aa905d3
--- /dev/null
@@ -0,0 +1,1643 @@
+/*
+ * arch/arm/boot/dts/amlogic/txlx_t962x_r311_1g.dts
+ *
+ * Copyright (C) 2017 Amlogic, Inc. All rights reserved.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License for
+ * more details.
+ *
+ */
+
+/dts-v1/;
+#include <dt-bindings/gpio/meson-txlx-gpio.h>
+#include <dt-bindings/gpio/gpio.h>
+
+#include "mesontxlx.dtsi"
+#include "partition_mbox_normal.dtsi"
+#include "mesontxlx_r311-panel.dtsi"
+
+/ {
+       model = "Amlogic";
+       amlogic-dt-id = "txlx_t962x_r311-720p";
+       compatible = "amlogic, txlx";
+       interrupt-parent = <&gic>;
+       #address-cells = <1>;
+       #size-cells = <1>;
+
+       aliases {
+               serial0 = &uart_AO;
+               serial1 = &uart_A;
+               serial2 = &uart_B;
+               serial3 = &uart_C;
+               serial4 = &uart_AO_B;
+       };
+
+       ion_dev {
+               compatible = "amlogic, ion_dev";
+               memory-region = <&ion_reserved>;
+       };
+
+       memory@00000000 {
+               device_type = "memory";
+               linux,usable-memory = <0x100000 0x3ff00000>;
+       };
+
+       reserved-memory {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+               /* global autoconfigured region for contiguous allocations */
+               ramoops@0x07400000 {
+                       compatible = "ramoops";
+                       reg = <0x07400000 0x00100000>;
+                       record-size = <0x8000>;
+                       console-size = <0x8000>;
+                       ftrace-size = <0x0>;
+                       pmsg-size = <0x8000>;
+               };
+               secmon_reserved:linux,secmon {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x05000000 0x400000>;
+               };
+
+               //secos_reserved:linux,secos {
+               //      status = "disabled";
+               //      compatible = "amlogic, aml_secos_memory";
+               //      reg = <0x05300000 0x2000000>;
+               //      no-map;
+               //};
+
+
+
+               logo_reserved:linux,meson-fb {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x400000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x3fc00000 0x400000>;
+               };
+
+               //carveout_reserved:linux,carveout-reserve {
+               //      compatible = "amlogic, idev-mem";
+               //      size = <0x1000>;
+               //};
+
+               ion_reserved:linux,ion-dev {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x4C00000>;
+                       alignment = <0x400000>;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+
+               /*di CMA pool */
+               di_cma_reserved:linux,di_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* buffer_size = 3621952(yuv422 8bit)
+                        *  | 4736064(yuv422 10bit)
+                        *  | 4179008(yuv422 10bit full pack mode)
+                        * 10x3621952=34.6M(0x23) support 8bit
+                        * 10x4736064=45.2M(0x2e) support 12bit
+                        * 10x4179008=40M(0x28) support 10bit
+                        */
+                       size = <0x02800000>;
+                       alignment = <0x400000>;
+               };
+
+               /* POST PROCESS MANAGER */
+               ppmgr_reserved:linux,ppmgr {
+                       compatible = "amlogic, ppmgr_memory";
+                       size = <0x0>;
+               };
+
+               codec_mm_cma:linux,codec_mm_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* ion_codec_mm max can alloc size 80M*/
+                       size = <0xd000000>;
+                       alignment = <0x400000>;
+                       linux,contiguous-region;
+               };
+
+               picdec_cma_reserved:linux,picdec {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       size = <0x0>;
+                       alignment = <0x0>;
+                       linux,contiguous-region;
+               };
+
+               /* codec shared reserved */
+               codec_mm_reserved:linux,codec_mm_reserved {
+                       compatible = "amlogic, codec-mm-reserved";
+                       size = <0x0>;
+                       alignment = <0x100000>;
+                       //no-map;
+               };
+
+               demod_cma_reserved:linux,demod_cma {
+                       compatible = "shared-dma-pool";
+                       reusable;
+                       /* 5M */
+                       size = <0x0800000>;
+                       alignment = <0x400000>;
+               };
+
+               /*  vdin1 CMA pool */
+               vdin1_cma_reserved:linux,vdin1_cma {
+                       compatible = "shared-dma-pool";
+                       linux,phandle = <5>;
+                       reusable;
+                       /* 1920x1080x2x4  =16+4 M */
+                       size = <0x01400000>;
+                       alignment = <0x400000>;
+               };
+
+               /*vbi reserved mem*/
+               vbi_reserved:linux,vbi {
+                       compatible = "amlogic, vbi-mem";
+                       size = <0x100000>;
+                       alloc-ranges = <0x0 0x30000000>;
+               };
+       };
+
+       dummy-battery {
+               compatible = "amlogic, dummy-battery";
+               status = "okay";
+       };
+
+       dummy-charger {
+               compatible = "amlogic, dummy-charger";
+               status = "okay";
+       };
+
+       /* for external keypad */
+       adc_keypad {
+               compatible = "amlogic, adc_keypad";
+               status = "okay";
+               key_name = "power","up","down","enter","left","right","home";
+               key_num = <7>;
+               io-channels = <&saradc SARADC_CH2>,
+                                       <&saradc SARADC_CH3>;
+               io-channel-names = "key-chan-2", "key-chan-3";
+               key_chan = <SARADC_CH2 SARADC_CH2 SARADC_CH2 SARADC_CH2
+                                       SARADC_CH2 SARADC_CH3 SARADC_CH3>;
+               key_code = <116 103 108 28 105 106 102>;
+               key_val = <0 143 266 389 512 143 266>; //val=voltage/1800mV*1023
+               key_tolerance = <40 40 40 40 40 40 40>;
+       };
+
+       gpioleds {
+               compatible = "gpio-leds";
+               status = "okay";
+
+               sys {
+                       label = "sysled";
+                       gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
+                       default-state = "on"; /* keep/on/off */
+                       linux,default-trigger = "none";
+               };
+
+       };
+
+       pwmleds {
+               compatible = "pwm-leds";
+               status = "disabled";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pwmleds_pins>;
+
+               sys {
+                       active-low;
+                       label = "sysled";
+                       max-brightness = <255>;
+                       pwms = <&pwm_AO_ab 0 50000 0>;
+               };
+       };
+
+       ethmac: ethernet@0xff3f0000 {
+               compatible = "amlogic, gxbb-eth-dwmac";
+               status = "okay";
+               reg = <0xff3f0000 0x10000
+                       0xff634540 0x8
+                       0xff634558 0xc
+                       0xffd01084 0x4>;
+               interrupts = <0 8 1
+                               0 9 1>;
+
+               phy-mode= "rmii";
+               mc_val_internal_phy = <0x1804>;
+               mc_val_external_phy = <0x1621>;
+               interrupt-names = "macirq",
+                               "phyirq";
+               clocks = <&clkc CLKID_ETH_CORE>;
+               clock-names = "ethclk81";
+               internal_phy = <1>;
+       };
+
+       vout {
+               compatible = "amlogic, vout";
+               dev_name = "vout";
+               status = "okay";
+               fr_auto_policy = <0>;
+       };
+
+       meson-fb {
+               compatible = "amlogic, meson-txlx";
+               memory-region = <&logo_reserved>;
+               dev_name = "meson-fb";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 89 1>;
+               interrupt-names = "viu-vsync", "rdma";
+               mem_size = <0x00400000 0x00b00000 0x00100000>;
+               /* uboot logo,fb0/fb1 memory size,if afbcd fb0=0x0b51000*/
+               display_mode_default = "720p60hz";
+               scale_mode = <1>;
+               /*1280*720*4*3 = 0xA8C000*/
+               display_size_default = <1280 720 1280 2160 32>;
+               pxp_mode = <0>; /** 0:normal mode 1:pxp mode */
+               logo_addr = "0x3fc00000";
+       };
+
+       ge2d {
+               compatible = "amlogic, ge2d-txlx";
+               dev_name = "ge2d";
+               status = "okay";
+               interrupts = <0 150 1>;
+               interrupt-names = "ge2d";
+               clocks = <&clkc CLKID_VAPB_MUX>,
+                       <&clkc CLKID_G2D>,
+                       <&clkc CLKID_GE2D_GATE>;
+               clock-names = "clk_vapb_0",
+                       "clk_ge2d",
+                       "clk_ge2d_gate";
+               reg = <0xff940000 0x10000>;
+       };
+
+       codec_io {
+               compatible = "amlogic, codec_io";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_cbus_base{
+                       reg = <0xffd00000 0x100000>;
+               };
+               io_dos_base{
+                       reg = <0xff620000 0x10000>;
+               };
+               io_hiubus_base{
+                       reg = <0xff63c000 0x2000>;
+               };
+               io_aobus_base{
+                       reg = <0xff800000 0x10000>;
+               };
+               io_vcbus_base{
+                       reg = <0xff900000 0x40000>;
+               };
+               io_dmc_base{
+                       reg = <0xff638000 0x2000>;
+               };
+       };
+
+       codec_mm {
+               compatible = "amlogic, codec, mm";
+               memory-region = <&codec_mm_cma &codec_mm_reserved>;
+               dev_name = "codec_mm";
+               status = "okay";
+       };
+
+       mesonstream {
+               compatible = "amlogic, codec, streambuf";
+               dev_name = "mesonstream";
+               status = "okay";
+               clocks = <&clkc CLKID_DOS_PARSER
+                       &clkc CLKID_DEMUX
+                       &clkc CLKID_DOS
+                       &clkc CLKID_CLK81
+                       &clkc CLKID_VDEC_MUX
+                       &clkc CLKID_HCODEC_MUX
+                       &clkc CLKID_HEVC_MUX>;
+               clock-names = "parser_top",
+                       "demux",
+                       "vdec",
+                       "clk_81",
+                       "clk_vdec_mux",
+                       "clk_hcodec_mux",
+                       "clk_hevc_mux";
+       };
+
+       vdec {
+               compatible = "amlogic, vdec";
+               dev_name = "vdec.0";
+               status = "okay";
+               interrupts = <0 3 1
+                       0 23 1
+                       0 32 1
+                       0 43 1
+                       0 44 1
+                       0 45 1>;
+               interrupt-names = "vsync",
+                       "demux",
+                       "parser",
+                       "mailbox_0",
+                       "mailbox_1",
+                       "mailbox_2";
+       };
+
+       meson-amvideom {
+               compatible = "amlogic, amvideom";
+               dev_name = "amvideom";
+               status = "okay";
+               interrupts = <0 3 1>;
+               interrupt-names = "vsync";
+       };
+
+
+
+       amvideocap {
+               compatible = "amlogic, amvideocap";
+               dev_name = "amvideocap.0";
+               status = "disabled";
+               max_size = <8>;//8M
+       };
+
+       picdec {
+               compatible = "amlogic, picdec";
+               memory-region = <&picdec_cma_reserved>;
+               dev_name = "picdec";
+               status = "okay";
+       };
+
+       ppmgr {
+               compatible = "amlogic, ppmgr";
+               memory-region = <&ppmgr_reserved>;
+               dev_name = "ppmgr";
+               status = "okay";
+       };
+
+       deinterlace {
+               compatible = "amlogic, deinterlace";
+               status = "okay";
+               /* 0:use reserved; 1:use cma; 2:use cma as reserved */
+               flag_cma = <1>;
+               //memory-region = <&di_reserved>;
+               memory-region = <&di_cma_reserved>;
+               interrupts = <0 46 1
+                               0 6 1>;
+               interrupt-names = "de_irq";
+               clocks = <&clkc CLKID_VPU_MUX>,
+                       <&clkc CLKID_FCLK_DIV4>,
+                       <&clkc CLKID_VPU_CLKB_TMP_COMP>,
+                       <&clkc CLKID_VPU_CLKB_COMP>;
+               clock-names = "vpu_mux",
+                       "fclk_div4",
+                       "vpu_clkb_tmp_composite",
+                       "vpu_clkb_composite";
+               clock-range = <250 500>;
+               /* buffer-size = <3621952>;(yuv422 8bit) */
+               buffer-size = <4179008>;/*yuv422 fullpack*/
+               /* reserve-iomap = "true"; */
+               /* if enable nr10bit, set nr10bit-support to 1 */
+               nr10bit-support = <1>;
+       };
+       ionvideo {
+               compatible = "amlogic, ionvideo";
+               dev_name = "ionvideo";
+               status = "okay";
+       };
+
+       amlvideo {
+               compatible = "amlogic, amlvideo";
+               dev_name = "amlvideo";
+               status = "okay";
+       };
+
+       amlvideo2_0 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <0>;
+               cma_mode = <1>;
+       };
+
+       amlvideo2_1 {
+               compatible = "amlogic, amlvideo2";
+               dev_name = "amlvideo2";
+               status = "okay";
+               amlvideo2_id = <1>;
+               cma_mode = <1>;
+       };
+
+       hdmirx {
+               compatible = "amlogic, hdmirx_txlx";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               dev_name = "hdmirx";
+               status = "okay";
+               pinctrl-names = "hdmirx_pins";
+               pinctrl-0 = <&hdmirx_a_mux &hdmirx_b_mux
+                       &hdmirx_c_mux &hdmirx_d_mux>;
+               repeat = <0>;
+               interrupts = <0 56 1>;
+               clocks = <&clkc CLKID_HDMIRX_MODET_COMP>,
+                          <&clkc CLKID_HDMIRX_CFG_COMP>,
+                          <&clkc CLKID_HDMIRX_ACR_COMP>,
+                          <&clkc CLKID_HDMIRX_AUDMEAS_COMP>,
+                          <&xtal>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&clkc CLKID_FCLK_DIV7>,
+                          <&clkc CLKID_HDCP22_SKP_COMP>,
+                          <&clkc CLKID_HDCP22_ESM_COMP>;
+               //         <&clkc CLK_AUD_PLL2FS>,
+               //         <&clkc CLK_AUD_PLL4FS>,
+               //         <&clkc CLK_AUD_OUT>;
+               clock-names = "hdmirx_modet_clk",
+                       "hdmirx_cfg_clk",
+                               "hdmirx_acr_ref_clk",
+                               "hdmirx_audmeas_clk",
+                               "xtal",
+                               "fclk_div5",
+                               "fclk_div7",
+                               "hdcp_rx22_skp",
+                               "hdcp_rx22_esm";
+               //              "hdmirx_aud_pll2fs",
+               //              "hdmirx_aud_pll4f",
+               //              "clk_aud_out";
+               hdmirx_id = <0>;
+               en_4k_2_2k = <0>;
+               hpd_low_cec_off = <1>;
+               /* bit4: enable feature, bit3~0: port number */
+               disable_port = <0x0>;
+               reg = <0xffd26000 0xa00000
+                       0xff63C000 0x2000
+                       0xffe0d000 0x2000
+                       0xff63e000 0x2000
+                       0x0 0x0
+                       0xff634400 0x2000
+                       0xff646000 0x2000>;
+       };
+
+       vdin0 {
+               compatible = "amlogic, vdin";
+               /*memory-region = <&vdin0_cma_reserved>;*/
+               dev_name = "vdin0";
+               status = "okay";
+               reserve-iomap = "true";
+               /*bit0:(1:share with codec_mm;0:cma alone)*/
+               /*bit8:(1:alloc in discontinus way;0:alone in continuous way)*/
+               flag_cma = <0x101>;
+               /* MByte, if 10bit disable: 64M(YUV422),
+                * if 10bit enable: 64*1.5 = 96M(YUV422)
+                * if support 4K2K-YUV444-10bit-WR:3840*2160*4*4 ~= 128M
+                * if support 4K2K-YUV444-10bit-WR:3840*2160*4*6 ~= 190M
+                * if support 4K2K-YUV422-10bit-wr:3840*2160*3*4 ~= 96M
+                * if support 4K2K-YUV422-8BIT-WR:3840*2160*2*4 ~= 64M
+                * if support 1080p-YUV422-8BIT-WR:1920*1080*2*4 ~= 16M
+                */
+               cma_size = <190>;
+               interrupts = <0 83 1>;
+               rdma-irq = <2>;
+               clocks = <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_VDIN_MEAS_COMP>;
+               clock-names = "fclk_div5", "cts_vdin_meas_clk";
+               vdin_id = <0>;
+               /* vdin write mem color depth support:
+                * bit0:support 8bit
+                * bit1:support 9bit
+                * bit2:support 10bit
+                * bit3:support 12bit
+                * bit4:support yuv422 10bit full pack mode (from txl new add)
+                * bit8:use 8bit  at 4k_50/60hz_10bit
+                * bit9:use 10bit at 4k_50/60hz_10bit
+                */
+               tv_bit_mode = <0x215>;
+       };
+
+       vdin1 {
+               compatible = "amlogic, vdin";
+               memory-region = <&vdin1_cma_reserved>;
+               dev_name = "vdin1";
+               status = "okay";
+               reserve-iomap = "true";
+               flag_cma = <0>;/*1:share with codec_mm;0:cma alone*/
+               interrupts = <0 85 1>;
+               rdma-irq = <4>;
+               clocks = <&clkc CLKID_FCLK_DIV5>,
+                       <&clkc CLKID_VDIN_MEAS_COMP>;
+               clock-names = "fclk_div5", "cts_vdin_meas_clk";
+               vdin_id = <1>;
+               /* vdin write mem color depth support:
+                * bit0:support 8bit
+                * bit1:support 9bit
+                * bit2:support 10bit
+                * bit3:support 12bit
+                */
+               tv_bit_mode = <1>;
+       };
+
+       tvafe {
+               compatible = "amlogic, tvafe-txlx";
+               /*memory-region = <&tvafe_cma_reserved>;*/
+               dev_name = "tvafe";
+               status = "okay";
+               flag_cma = <1>;/*1:share with codec_mm;0:cma alone*/
+               cma_size = <5>;/*MByte*/
+               reg = <0xff642000 0x2000>;/*tvafe reg base*/
+               reserve-iomap = "true";
+               tvafe_id = <0>;
+               //pinctrl-names = "default";
+               /*!!particular sequence, no more and no less!!!*/
+               tvafe_pin_mux = <
+                               3 /* TVAFE_CVBS_IN2, CVBS_IN0 = 0 */
+                               1 /* TVAFE_CVBS_IN0, CVBS_IN1 */
+                               2 /* TVAFE_CVBS_IN1, CVBS_IN2 */
+                               4 /* TVAFE_CVBS_IN3, CVBS_IN3 */
+               >;
+               clocks = <&clkc CLKID_DAC_CLK>;
+               clock-names = "vdac_clk_gate";
+       };
+
+       vbi {
+               compatible = "amlogic, vbi";
+               memory-region = <&vbi_reserved>;
+               dev_name = "vbi";
+               status = "okay";
+               interrupts = <0 83 1>;
+               reserve-iomap = "true";
+       };
+
+       tvafe_avin_detect {
+               compatible = "amlogic, tvafe_avin_detect";
+               dev_name = "tvafe_avin_detect";
+               status = "okay";
+               device_mask = <1>;/*bit0:ch1;bit1:ch2*/
+               interrupts = <0 12 1>,
+                               <0 13 1>;
+       };
+
+       amlvecm {
+               compatible = "amlogic, vecm";
+               dev_name = "aml_vecm";
+               status = "okay";
+               gamma_en = <1>;/*1:enabel ;0:disable*/
+               wb_en = <1>;/*1:enabel ;0:disable*/
+               cm_en = <1>;/*1:enabel ;0:disable*/
+               wb_sel = <1>;/*1:mtx ;0:gainoff*/
+               vlock_en = <1>;/*1:enable;0:disable*/
+               vlock_mode = <0x4>;
+               /* vlock work mode:
+                *bit0:auto ENC
+                *bit1:auto PLL
+                *bit2:manual PLL
+                *bit3:manual ENC
+                *bit4:manual soft ENC
+                *bit5:manual MIX PLL ENC
+                */
+                vlock_pll_m_limit = <1>;
+                vlock_line_limit = <3>;
+       };
+       amdolby_vision {
+               compatible = "amlogic, dolby_vision_txlx";
+               dev_name = "aml_amdolby_vision_driver";
+               status = "okay";
+               tv_mode = <1>;/*1:enabel ;0:disable*/
+       };
+       amvenc_avc {
+               compatible = "amlogic, amvenc_avc";
+               //memory-region = <&amvenc_avc_reserved>;
+               //memory-region = <&avc_cma_reserved>;
+               dev_name = "amvenc_avc";
+               status = "okay";
+               interrupts = <0 45 1>;
+               interrupt-names = "mailbox_2";
+       };
+
+       tuner: tuner {
+               status = "okay";
+               tuner_name = "mxl661_tuner";
+               tuner_i2c_adap = <&i2c1>;
+               tuner_i2c_addr = <0x60>;
+               tuner_xtal = <0>; /* 0: 16MHz, 1: 24MHz */
+               tuner_xtal_mode = <0>;
+                                       /* NO_SHARE_XTAL(0)
+                                        * SLAVE_XTAL_SHARE(1)
+                                        */
+               tuner_xtal_cap = <30>; /* when tuner_xtal_mode = 1, set 25 */
+       };
+
+       atv-demod {
+               compatible = "amlogic, atv-demod";
+               status = "okay";
+               tuner = <&tuner>;
+               btsc_sap_mode = <1>;
+               /* pinctrl-names="atvdemod_agc_pins"; */
+               /* pinctrl-0=<&atvdemod_agc_pins>; */
+               reg = <0xff640000 0x2000 /* demod reg */
+                               0xff63c000 0x2000 /* hiu reg */
+                               0xff634000 0x2000 /* periphs reg */
+                               0xff648000 0x2000>; /* audio reg */
+               reg_23cf = <0x88188832>;
+               /*default:0x88188832;r840 on haier:0x48188832*/
+       };
+
+       bt-dev {
+               compatible = "amlogic, bt-dev";
+               dev_name = "bt-dev";
+               status = "okay";
+               power_down_disable = <1>;
+               gpio_reset = <&gpio_ao GPIOAO_8 GPIO_ACTIVE_HIGH>;
+               //gpio_en = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+       };
+
+       rtc {
+               compatible = "amlogic, aml_vrtc";
+               alarm_reg_addr = <0xff8000a8>;
+               timer_e_addr = <0xffd0f188>;
+               init_date = "2015/01/01";
+               status = "okay";
+       };
+
+       wifi {
+               compatible = "amlogic, aml_wifi";
+               dev_name = "aml_wifi";
+               status = "okay";
+               interrupt_pin = <&gpio_ao GPIOAO_4 GPIO_ACTIVE_HIGH>;
+               interrupts = <0 68 4>;
+               irq_trigger_type = "GPIO_IRQ_HIGH";
+               dhd_static_buf;
+               power_on_pin = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+               pinctrl-names = "default";
+               pinctrl-0 = <&wifi_32k_pins>;
+               pwm_config = <&wifi_pwm_conf>;
+       };
+
+       wifi_pwm_conf: wifi_pwm_conf {
+               pwm_channel1_conf {
+                       pwms = <&pwm_cd MESON_PWM_1 30040 0>;
+                       duty-cycle = <15020>;
+                       times = <10>;
+               };
+               pwm_channel2_conf {
+                       pwms = <&pwm_cd MESON_PWM_3 30030 0>;
+                       duty-cycle = <15015>;
+                       times = <12>;
+               };
+       };
+
+       sd_emmc_c: emmc@ffe07000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-txlx";
+               reg = <0xffe07000 0x2000>;
+               interrupts = <0 218 1>;
+               pinctrl-names = "emmc_clk_cmd_pins", "emmc_all_pins";
+               pinctrl-0 = <&emmc_clk_cmd_pins>;
+               pinctrl-1 = <&emmc_conf_pull_up &emmc_conf_pull_done>;
+               clocks = <&clkc CLKID_SD_EMMC_C>,
+                          <&clkc CLKID_SD_EMMC_C_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <8>;
+               cap-sd-highspeed;
+               cap-mmc-highspeed;
+               mmc-ddr-1_8v;
+               mmc-hs200-1_8v;
+
+               max-frequency = <200000000>;
+               non-removable;
+               disable-wp;
+               emmc {
+                       status = "disabled";
+                       pinname = "emmc";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_8_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED",
+                                "MMC_CAP_NONREMOVABLE",
+                                "MMC_CAP_1_8V_DDR",
+                                "MMC_CAP_HW_RESET",
+                                "MMC_CAP_ERASE",
+                                "MMC_CAP_CMD23";
+                       caps2 = "MMC_CAP2_HS200", "MMC_CAP2_HS400";
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio BOOT_3 GPIO_ACTIVE_HIGH>;
+                       hw_reset = <&gpio BOOT_9 GPIO_ACTIVE_HIGH>;
+                       card_type = <1>;
+                       /* 1:mmc card(include eMMC),
+                        * 2:sd card(include tSD)
+                        */
+               };
+       };
+
+       sd_emmc_b: sd@ffe05000 {
+               status = "okay";
+               compatible = "amlogic, meson-mmc-txlx";
+               reg = <0xffe05000 0x2000>;
+               interrupts = <0 217 1>;
+               pinctrl-names = "sd_all_pins",
+                       "sd_clk_cmd_pins",
+                       "sd_1bit_pins",
+                       "sd_clk_cmd_uart_pins",
+                       "sd_1bit_uart_pins",
+                       "sd_to_ao_uart_pins",
+                       "ao_to_sd_uart_pins",
+                       "ao_to_sd_jtag_pins",
+                       "sd_to_ao_jtag_pins";
+               pinctrl-0 = <&sd_all_pins>;
+               pinctrl-1 = <&sd_clk_cmd_pins>;
+               pinctrl-2 = <&sd_1bit_pins>;
+               pinctrl-3 = <&sd_to_ao_uart_clr_pins
+                       &sd_clk_cmd_pins &ao_to_sd_uart_pins>;
+               pinctrl-4 = <&sd_to_ao_uart_clr_pins
+                       &sd_1bit_pins &ao_to_sd_uart_pins>;
+               pinctrl-5 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               pinctrl-6 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-7 = <&sd_to_ao_uart_clr_pins &ao_to_sd_uart_pins>;
+               pinctrl-8 = <&sd_all_pins &sd_to_ao_uart_pins>;
+               clocks = <&clkc CLKID_SD_EMMC_B>,
+                          <&clkc CLKID_SD_EMMC_B_P0_COMP>,
+                          <&clkc CLKID_FCLK_DIV2>,
+                          <&clkc CLKID_FCLK_DIV5>,
+                          <&xtal>;
+               clock-names = "core", "clkin0", "clkin1", "clkin2", "xtal";
+
+               bus-width = <4>;
+               cap-sd-highspeed;
+               max-frequency = <100000000>;
+               disable-wp;
+               sd {
+                       status = "disabled";
+                       pinname = "sd";
+                       ocr_avail = <0x200080>; /**VDD voltage 3.3 ~ 3.4 */
+                       caps = "MMC_CAP_4_BIT_DATA",
+                                "MMC_CAP_MMC_HIGHSPEED",
+                                "MMC_CAP_SD_HIGHSPEED";
+                       /* "MMC_CAP_UHS_SDR12",
+                        * "MMC_CAP_UHS_SDR25",
+                        * "MMC_CAP_UHS_SDR50",
+                        * "MMC_CAP_UHS_SDR104";
+                        */
+                       f_min = <400000>;
+                       f_max = <200000000>;
+                       max_req_size = <0x20000>; /**128KB*/
+                       gpio_dat3 = <&gpio GPIOC_4 GPIO_ACTIVE_HIGH>;
+                       jtag_pin = <&gpio GPIOC_0 GPIO_ACTIVE_HIGH>;
+                       gpio_cd = <&gpio GPIOH_10 GPIO_ACTIVE_HIGH>;
+                       card_type = <5>;
+                       /* 3:sdio device(ie:sdio-wifi),
+                        * 4:SD combo (IO+mem) card
+                        * 5:NON sdio device(means sd/mmc card)
+                        */
+               };
+       };
+
+       unifykey {
+               compatible = "amlogic, unifykey";
+               status = "okay";
+
+               unifykey-num = <20>;
+               unifykey-index-0 = <&keysn_0>;
+               unifykey-index-1 = <&keysn_1>;
+               unifykey-index-2 = <&keysn_2>;
+               unifykey-index-3 = <&keysn_3>;
+               unifykey-index-4 = <&keysn_4>;
+               unifykey-index-5 = <&keysn_5>;
+               unifykey-index-6 = <&keysn_6>;
+               unifykey-index-7 = <&keysn_7>;
+               unifykey-index-8 = <&keysn_8>;
+               unifykey-index-9 = <&keysn_9>;
+               unifykey-index-10= <&keysn_10>;
+               unifykey-index-11 = <&keysn_11>;
+               unifykey-index-12 = <&keysn_12>;
+               unifykey-index-13 = <&keysn_13>;
+               unifykey-index-14 = <&keysn_14>;
+               unifykey-index-15 = <&keysn_15>;
+               unifykey-index-16 = <&keysn_16>;
+               unifykey-index-17 = <&keysn_17>;
+               unifykey-index-18 = <&keysn_18>;
+               unifykey-index-19 = <&keysn_19>;
+
+               keysn_0: key_0{
+                       key-name = "usid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_1:key_1{
+                       key-name = "mac";
+                       key-device  = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_2:key_2{
+                       key-name = "hdcp";
+                       key-device = "secure";
+                       key-type  = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_3:key_3{
+                       key-name = "secure_boot_set";
+                       key-device = "efuse";
+                       key-permit = "write";
+               };
+               keysn_4:key_4{
+                       key-name = "mac_bt";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_5:key_5{
+                       key-name = "mac_wifi";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+                       key-type  = "mac";
+               };
+               keysn_6:key_6{
+                       key-name = "hdcp2_tx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_7:key_7{
+                       key-name = "hdcp2_rx";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_8:key_8{
+                       key-name = "widevinekeybox";
+                       key-device = "secure";
+                       key-type = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_9:key_9{
+                       key-name = "deviceid";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_10:key_10{
+                       key-name = "hdcp22_fw_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_11:key_11{
+                       key-name = "hdcp22_rx_private";
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_12:key_12{
+                       key-name = "hdcp22_rx_fw";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_13:key_13{
+                       key-name = "hdcp14_rx";
+                       key-device = "normal";
+                       key-type  = "sha1";
+                       key-permit = "read","write","del";
+               };
+               keysn_14:key_14{
+                       key-name = "prpubkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_15:key_15{
+                       key-name = "prprivkeybox";// PlayReady
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+               keysn_16:key_16{
+                       key-name = "lcd";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_17:key_17{
+                       key-name = "lcd_extern";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_18:key_18{
+                       key-name = "backlight";
+                       key-device = "normal";
+                       key-permit = "read","write","del";
+               };
+               keysn_19:key_19{
+                       key-name = "attestationkeybox";// attestation key
+                       key-device = "secure";
+                       key-permit = "read","write","del";
+               };
+       }; /* End unifykey */
+
+       cvbsout {
+               compatible = "amlogic, cvbsout-txlx";
+               dev_name = "cvbsout";
+               status = "disabled";
+               clocks = <&clkc CLKID_VCLK2_ENCI
+                       &clkc CLKID_VCLK2_VENCI0
+                       &clkc CLKID_VCLK2_VENCI1
+                       &clkc CLKID_DAC_CLK>;
+               clock-names = "venci_top_gate",
+                       "venci_0_gate",
+                       "venci_1_gate",
+                       "vdac_clk_gate";
+
+               /* performance: reg_address, reg_value */
+               performance = <0x1b56  0x343
+                       0x1b05  0xf4
+                       0x1c59  0xfc48
+                       0x1b12  0x8c00
+                       0xffff  0x0>; /* ending flag */
+       };
+
+       amhdmitx: amhdmitx {
+               compatible = "amlogic, amhdmitx";
+               dev_name = "amhdmitx";
+               status = "disabled";
+               pinctrl-names="default", "hdmitx_i2c";
+               pinctrl-0=<&hdmitx_hpd &hdmitx_ddc>;
+               pinctrl-1=<&hdmitx_hpd_gpio &i2c2_h_pins>;
+               /* HPD, 57 + 32 = 89; CEC, 151 + 32 = 183*/
+               interrupts = <0 57 1>;
+               interrupt-names = "hdmitx_hpd";
+               /* 0:M8B 1:GXBB 2:GXTVBB 3:GXL 4:GXM
+                * 5:TXL 6:TXLX 7:AXG 8:GXLX 9:TXHD
+                */
+               ic_type = <6>;
+               //gpio_i2c_en = <0>;
+               //repeater_tx = <0x1>;
+               //#address-cells = <2>;
+               //#size-cells = <2>;
+               //ranges;
+       };
+
+       i2c_gpio: i2c_gpio {
+               compatible = "i2c-gpio";
+               dev_name = "i2c-gpio";
+               status = "disabled";
+               i2c-gpio,delay-us = <10>; /* 50 kHz */
+               gpios = <&gpio GPIOH_2 0
+                       &gpio GPIOH_3 0>;
+               #address-cells = <2>;
+               #size-cells = <2>;
+               i2c-gpio,timeout-ms = <10>;
+               i2c_gpio_edid: i2c_gpio_edid {
+                       compatible = "i2c-gpio";
+                       reg = <0x50 0x0 0x0 0x0>;
+               };
+       };
+
+       aocec: aocec {
+               compatible = "amlogic, aocec-txlx";
+               device_name = "aocec";
+               status = "okay";
+               vendor_name = "Amlogic"; /* Max Chars: 8     */
+               /* Refer to the following URL at:
+                * http://standards.ieee.org/develop/regauth/oui/oui.txt
+                */
+               vendor_id = <0x000000>;
+               product_desc = "TXLX"; /* Max Chars: 16    */
+               cec_osd_string = "AML_TV"; /* Max Chars: 14    */
+               port_num = <4>;
+               /*ee_cec;*/
+               arc_port_mask = <0x2>;
+               interrupts = <0 205 1
+                                       0 199 1>;
+               interrupt-names = "hdmi_aocecb","hdmi_aocec";
+               pinctrl-names = "default","hdmitx_aocecb","cec_pin_sleep";
+               pinctrl-0=<&hdmitx_aocec>;
+               pinctrl-1=<&hdmitx_aocecb>;
+               pinctrl-2=<&hdmitx_aocecb>;
+               reg = <0xFF80023c 0x4
+                      0xFF800000 0x400>;
+               reg-names = "ao_exit","ao";
+       };
+
+
+       canvas {
+               compatible = "amlogic, meson, canvas";
+               dev_name = "amlogic-canvas";
+               status = "okay";
+               reg = <0xff638000 0x2000>;
+       };
+
+       rdma {
+               compatible = "amlogic, meson, rdma";
+               dev_name = "amlogic-rdma";
+               status = "okay";
+               interrupts = <0 89 1>;
+               interrupt-names = "rdma";
+       };
+
+       dwc3: dwc3@ff500000 {
+               compatible = "synopsys, dwc3";
+               status = "okay";
+               reg = <0xff500000 0x100000>;
+               interrupts = <0 30 4>;
+               usb-phy = <&usb2_phy>, <&usb3_phy>;
+               cpu-type = "gxl";
+               clock-src = "usb3.0";
+       };
+
+       usb2_phy: usb2phy@ffe09000 {
+               compatible = "amlogic, amlogic-new-usb2";
+               status = "okay";
+               portnum = <4>;
+               reg = <0xffe09000 0x80
+                       0xffd01008 0x4>;
+       };
+
+       usb3_phy: usb3phy@ffe09080 {
+               compatible = "amlogic, amlogic-new-usb3";
+               status = "okay";
+               portnum = <0>;
+               reg = <0xffe09080 0x20>;
+       };
+
+       dwc2_a {
+               compatible = "amlogic, dwc2";
+               device_name = "dwc2_a";
+               reg = <0xff400000 0x40000>;
+               status = "okay";
+               interrupts = <0 31 4>;
+               pl-periph-id = <0>; /** lm name */
+               clock-src = "usb0"; /** clock src */
+               port-id = <0>;  /** ref to mach/usb.h */
+               port-type = <2>;        /** 0: otg, 1: host, 2: slave */
+               port-speed = <0>; /** 0: default, high, 1: full */
+               port-config = <0>; /** 0: default */
+               /*0:default,1:single,2:incr,3:incr4,4:incr8,5:incr16,6:disable*/
+               port-dma = <0>;
+               port-id-mode = <0>; /** 0: hardware, 1: sw_host, 2: sw_slave*/
+               usb-fifo = <728>;
+               cpu-type = "gxl";
+               /** 0: normal, 1: otg+dwc3 host only, 2: otg+dwc3 device only*/
+               controller-type = <1>;
+               phy-reg = <0xffe09000>;
+               phy-reg-size = <0xa0>;
+               clocks = <&clkc CLKID_USB_GENERAL
+                                       &clkc CLKID_USB1_TO_DDR>;
+               clock-names = "usb_general",
+                                               "usb1";
+       };
+
+       /* Sound iomap */
+       aml_snd_iomap {
+               compatible = "amlogic, meson-snd-iomap";
+               status = "okay";
+               #address-cells=<1>;
+               #size-cells=<1>;
+               ranges;
+               io_audin_base {
+                       reg = <0xffd03000 0x100000>;
+               };
+               io_aiu_base {
+                       reg = <0xFFCFFC00 0x100000>;
+               };
+               io_eqdrc_base {
+                       reg = <0xFFCFF000 0x100000>;
+               };
+               io_hiu_reset_base {
+                       reg = <0xFFCFCC00 0x100000>;
+               };
+               io_isa_base {
+                       reg = <0xFFD05800 0x100000>;
+               };
+       };
+
+       /* AUDIO DEVICES */
+       i2s_dai: I2S {
+               #sound-dai-cells = <0>;
+               /* config mpll whether same with audin */
+               clocks = <&clkc CLKID_MPLL3>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_AIU_GLUE>,
+                       <&clkc CLKID_I2S_OUT>,
+                       <&clkc CLKID_AMCLK_MEASURE>,
+                       <&clkc CLKID_AIFIFO2>,
+                       <&clkc CLKID_MIXER>,
+                       <&clkc CLKID_MIXER_IFACE>,
+                       <&clkc CLKID_ADC>,
+                       <&clkc CLKID_AIU_TOP>,
+                       <&clkc CLKID_AOCLK_GATE>,
+                       <&clkc CLKID_I2S_SPDIF>,
+                       <&clkc CLKID_DAC_CLK>;
+               clock-names = "mpll",
+                       "mclk",
+                       "top_glue",
+                       "i2s_out",
+                       "amclk_measure",
+                       "aififo2",
+                       "aud_mixer",
+                       "mixer_reg",
+                       "adc",
+                       "top_level",
+                       "aoclk",
+                       "aud_in",
+                       "vdac_clk";
+               compatible = "amlogic, aml-i2s-dai";
+       };
+
+       i2s2_dai: I2S2 {
+               #sound-dai-cells = <0>;
+               /* config mpll whether same with aiu */
+               clocks = <&clkc CLKID_MPLL2>,
+                       <&clkc CLKID_AUDIN_MCLK_COMP>,
+                       <&clkc CLKID_AUDIN_SCLK_COMP>,
+                       <&clkc CLKID_AUDIN_LRCLK_COMP>;
+               clock-names = "audin_mpll",
+                       "audin_mclk",
+                       "audin_sclk",
+                       "audin_lrclk";
+               compatible = "amlogic, aml-i2s2-dai";
+       };
+
+       spdif_dai: SPDIF {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-dai";
+               clocks = <&clkc CLKID_MPLL1>,
+                       <&clkc CLKID_IEC958_INT_COMP>,
+                       <&clkc CLKID_AMCLK_COMP>,
+                       <&clkc CLKID_IEC958_MUX>,
+                       <&clkc CLKID_CLK81>,
+                       <&clkc CLKID_IEC958>,
+                       <&clkc CLKID_IEC958_GATE>;
+               clock-names =
+                       "mpll1",
+                       "i958",
+                       "mclk",
+                       "spdif",
+                       "clk_81",
+                       "iec958",
+                       "iec958_amclk";
+       };
+
+       pcm_dai: PCM {
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-pcm-dai";
+               pinctrl-names = "audio_pcm";
+               /* disable pcm pin mux temporary, enable it if necessary */
+               /*pinctrl-0 = <&aml_audio_pcm>;*/
+               clocks = <&clkc CLKID_MPLL0>,
+                       <&clkc CLKID_PCM_MCLK_COMP>,
+                       <&clkc CLKID_PCM_SCLK_COMP>;
+               clock-names = "mpll0", "pcm_mclk", "pcm_sclk";
+               pcm_mode = <1>; /* 0=slave mode, 1=master mode */
+       };
+
+       i2s_plat: i2s_platform {
+               compatible = "amlogic, aml-i2s";
+               interrupts = <0 29 1>;
+       };
+
+       pcm_plat: pcm_platform {
+               compatible = "amlogic, aml-pcm";
+       };
+
+       spdif_codec: spdif_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml-spdif-codec";
+               pinctrl-names = "audio_spdif_out", "audio_spdif_out_mute";
+               pinctrl-0 = <&audio_spdif_out_pins>;
+               pinctrl-1 = <&audio_spdif_out_mute_pins>;
+       };
+
+       pcm_codec: pcm_codec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, pcm2BT-codec";
+       };
+       /* end of AUDIO DEVICES */
+
+       /* AUDIO board specific */
+       dummy_codec:dummy{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, aml_dummy_codec";
+               status = "okay";
+       };
+
+       amlogic_codec:txlx_acodec{
+               #sound-dai-cells = <0>;
+               compatible = "amlogic, txlx_acodec";
+               reg = <0xFF632000 0x1c>;
+               status = "okay";
+       };
+
+       aml_snd_tv {
+               compatible = "amlogic, txlx-snd-tv";
+               status = "okay";
+               aml-sound-card,format = "i2s";
+               aml_sound_card,name = "AML-TVAUDIO";
+               pinctrl-names = "audio_i2s";
+               pinctrl-0 = <&aml_audio_i2s>;
+               /*avout mute gpio*/
+               mute_gpio-gpios = <&gpio GPIODV_5 GPIO_ACTIVE_HIGH>;
+               /*analog amp mute*/
+               /*amp_mute_gpio-gpios = <&gpio GPIOZ_18 GPIO_ACTIVE_LOW>;*/
+               aux_dev = <&tas5707>;
+               cpu_list = <&cpudai0 &cpudai1 &cpudai2 &cpudai3>;
+               codec_list = <&codec0 &codec1 &codec2 &codec3>;
+               plat_list = <&i2s_plat &i2s_plat &pcm_plat &i2s_plat>;
+               cpudai0: cpudai0 {
+                       sound-dai = <&i2s_dai>;
+               };
+               cpudai1: cpudai1 {
+                       sound-dai = <&spdif_dai>;
+               };
+               cpudai2: cpudai2 {
+                       sound-dai = <&pcm_dai>;
+               };
+               cpudai3: cpudai3 {
+                       sound-dai = <&i2s2_dai>;
+               };
+               codec0: codec0 {
+                       sound-dai = <&amlogic_codec>;
+               };
+               codec1: codec1 {
+                       sound-dai = <&spdif_codec>;
+               };
+               codec2: codec2 {
+                       sound-dai = <&pcm_codec>;
+               };
+               codec3: codec3 {
+                       sound-dai = <&dummy_codec>;
+               };
+               Channel_Mask {
+                       /*i2s has 4 pins, 8channel, mux output*/
+                       Speaker0_Channel_Mask = "i2s_2/3";
+                       DAC0_Channel_Mask = "i2s_4/5";
+                       DAC1_Channel_Mask = "i2s_4/5";
+                       EQ_DRC_Channel_Mask = "i2s_2/3";
+                       Spdif_samesource_Channel_Mask = "i2s_0/1";
+               };
+       };
+
+       amaudio2 {
+               compatible = "amlogic, aml_amaudio2";
+               status = "okay";
+               interrupts = <0 48 1>;
+       };
+       /* end of AUDIO board specific */
+
+       aml_sensor0: aml-sensor@0 {
+               compatible = "amlogic, aml-thermal";
+               device_name = "thermal";
+               status = "okay";
+               #thermal-sensor-cells = <1>;
+               cooling_devices {
+                       cpufreq_cool_cluster0 {
+                               min_state = <1000000>;
+                               dyn_coeff = <140>;
+                               cluster_id = <0>;
+                               node_name = "cpus";
+                               device_type = "cpufreq";
+                       };
+                       cpucore_cool_cluster0 {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "cpu_core_cluster0";
+                               device_type = "cpucore";
+                       };
+                       gpufreq_cool {
+                               min_state = <400>;
+                               dyn_coeff = <437>;
+                               cluster_id = <0>;
+                               node_name = "mali";
+                               device_type = "gpufreq";
+                       };
+                       gpucore_cool {
+                               min_state = <1>;
+                               dyn_coeff = <0>;
+                               cluster_id = <0>;
+                               node_name = "thermal_gpu_cores";
+                               device_type = "gpucore";
+                       };
+               };
+               cpu_cluster0:cpu_core_cluster0 {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+               gpucore:thermal_gpu_cores {
+                       #cooling-cells = <2>; /* min followed by max */
+               };
+       };
+
+       dvb {
+               compatible = "amlogic, dvb";
+               dev_name = "dvb";
+               status = "okay";
+               fe0_mode = "internal";
+               fe0_tuner = <&tuner>;
+               /*"parallel","serial","disable"*/
+               ts2 = "parallel";
+               ts2_control = <0>;
+               ts2_invert = <0>;
+               interrupts = <0 23 1
+                                       0 5 1
+                                       0 53 1
+                                       0 19 1
+                                       0 25 1
+                                       0 18 1
+                                       0 24 1>;
+               interrupt-names = "demux0_irq",
+                                               "demux1_irq",
+                                               "demux2_irq",
+                                               "dvr0_irq",
+                                               "dvr1_irq",
+                                               "dvrfill0_fill",
+                                               "dvrfill1_flush";
+               clocks = <&clkc CLKID_DEMUX
+                       &clkc CLKID_ASYNC_FIFO
+                       &clkc CLKID_AHB_ARB0
+                       &clkc CLKID_DOS_PARSER>;
+               clock-names = "demux", "asyncfifo", "ahbarb0", "uparsertop";
+       };
+       aml_dtv_demod {
+               compatible = "amlogic, ddemod-txlx";
+               dev_name = "aml_dtv_demod";
+               status = "okay";
+
+               //pinctrl-names="dtvdemod_agc";
+               //pinctrl-0=<&dtvdemod_agc>;
+
+
+               clocks = <&clkc CLKID_DAC_CLK>;
+               clock-names = "vdac_clk_gate";
+
+
+               reg = <0xff644000 0x2000        /*dtv demod base*/
+                          0xff63c000 0x2000    /*hiu reg base*/
+                          0xff800000 0x1000    /*io_aobus_base*/
+                          0xffd01000 0x1000    /*reset*/
+                          >;
+               /*move from dvbfe*/
+               dtv_demod0_mem = <0>;   // need move to aml_dtv_demod ?
+               spectrum = <1>;
+               cma_flag = <1>;
+               cma_mem_size = <8>;
+               memory-region = <&demod_cma_reserved>;//<&demod_reserved>;
+       };
+       dvbfe {
+               compatible = "amlogic, dvbfe";
+               dev_name = "dvbfe";
+               status = "disabled";
+               dtv_demod0 = "AMLDEMOD";
+               fe0_dtv_demod = <0>;
+               fe0_ts = <2>;
+               fe0_dev = <0>;
+               dtv_demod0_mem = <0>;
+               dtv_demod0_spectrum = <1>;
+               dtv_demod0_cma_flag = <1>;
+               dtv_demod0_cma_mem_size = <8>;
+               memory-region = <&demod_cma_reserved>;//<&demod_reserved>;
+               tuner0 = "si2151_tuner";
+               tuner0_i2c_adap_id = <2>;
+               tuner0_i2c_addr = <0x60>;
+               //tuner0_reset_value = <0>;
+               //tuner0_reset_gpio =  "GPIOY_10" ;  /*GPIOX_8   76*/
+               fe0_tuner = <0>;
+               atv_demod0 = "aml_atv_demod";
+               fe0_atv_demod = <0>;
+       };
+
+       thermal-zones {
+               soc_thermal {
+                       polling-delay = <1000>;
+                       polling-delay-passive = <100>;
+                       sustainable-power = <2150>;
+
+                       thermal-sensors = <&aml_sensor0 3>;
+
+                       trips {
+                               switch_on: trip-point@0 {
+                                       temperature = <70000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               control: trip-point@1 {
+                                       temperature = <80000>;
+                                       hysteresis = <1000>;
+                                       type = "passive";
+                               };
+                               hot: trip-point@2 {
+                                       temperature = <85000>;
+                                       hysteresis = <5000>;
+                                       type = "hot";
+                               };
+                               critical: trip-point@3 {
+                                       temperature = <260000>;
+                                       hysteresis = <1000>;
+                                       type = "critical";
+                               };
+                       };
+
+                       cooling-maps {
+                               cpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpus 0 4>;
+                                       contribution = <1024>;
+                               };
+                               cpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&cpu_cluster0 0 3>;
+                                       contribution = <1024>;
+                               };
+                               gpufreq_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpu 0 4>;
+                                       contribution = <1024>;
+                               };
+                               gpucore_cooling_map {
+                                       trip = <&control>;
+                                       cooling-device = <&gpucore 0 2>;
+                                       contribution = <1024>;
+                               };
+                       };
+               };
+       };
+
+}; /* end of / */
+
+&i2c2 {
+       status = "okay";
+       pinctrl-names="default";
+       pinctrl-0=<&i2c2_h_pins>;
+
+       tas5707: tas5707@36 {
+               compatible = "ti,tas5707";
+               #sound-dai-cells = <0>;
+               codec_name = "tas5707";
+               reg = <0x1B>;
+               reset_pin = <&gpio GPIODV_4 GPIO_ACTIVE_LOW>;
+               eq_enable = <0>;
+               drc_enable = <0>;
+               status = "okay";
+       };
+
+       lcd_extern_i2c0: lcd_extern_i2c@0 {
+               compatible = "lcd_ext, i2c";
+               dev_name = "i2c_T5800Q";
+               reg = <0x1c>;
+               status = "okay";
+       };
+
+       lcd_extern_i2c1: lcd_extern_i2c@1 {
+               compatible = "lcd_ext, i2c";
+               dev_name = "i2c_ANX6862";
+               reg = <0x20>;
+               status = "okay";
+       };
+
+       lcd_extern_i2c2: lcd_extern_i2c@2 {
+               compatible = "lcd_ext, i2c";
+               dev_name = "i2c_ANX7911";
+               reg = <0x74>;
+               status = "okay";
+       };
+};
+
+&i2c1 {
+       status = "okay";
+       clock-frequency = <300000>;
+       pinctrl-names="default";
+       pinctrl-0=<&i2c1_dv_pins>;
+};
+
+&pinctrl_periphs {
+       /*i2s*/
+       aml_audio_i2s: aml_audio_i2s {
+               mux {
+                       groups = "i2s_mclk_h",
+                               "i2s_sclk_h",
+                               "i2s_lrclk_h",
+                               "i2s_dout01_h6";
+                       function = "i2s";
+               };
+       };
+       /*spdif*/
+       audio_spdif_out_pins: audio_spdif_out_pins {
+               mux {
+                       groups = "spdif_out_dv";
+                       function = "spdif_out";
+               };
+       };
+       audio_spdif_out_mute_pins: audio_spdif_out_mute_pins {
+               mux {
+                       groups = "GPIODV_6";
+                       function = "gpio_periphs";
+               };
+       };
+       /*pcm*/
+       aml_audio_pcm: aml_audio_pcm {
+               mux {
+                       groups =
+                               "pcm_clk_a_dv",
+                               "pcm_fs_a_dv",
+                               "pcm_in_a_dv",
+                               "pcm_out_a_dv";
+                       function = "pcm_a";
+               };
+       };
+
+       /*lcd_extern*/
+       lcd_extern_off_pins:lcd_extern_off_pin {
+               mux {
+                       pins = "GPIOH_2",
+                               "GPIOH_3";
+                       function = "gpio_periphs";
+                       /*output-high;*/
+                       output-low;
+                       /*input-enable;*/
+               };
+       };
+
+       /*backlight*/
+       bl_pwm_on_pins:bl_pwm_on_pin {
+               mux {
+                       pins = "pwm_b";
+                       function = "pwm_b";
+               };
+       };
+       bl_pwm_vs_on_pins:bl_pwm_vs_on_pin {
+               mux {
+                       pins = "pwm_vs_z6";
+                       function = "pwm_vs";
+               };
+       };
+       bl_pwm_off_pins:bl_pwm_off_pin {
+               mux {
+                       pins = "GPIOZ_6";
+                       function = "gpio_periphs";
+                       output-low;
+               };
+       };
+       bl_pwm_combo_0_on_pins:bl_pwm_combo_0_on_pin {
+               mux {
+                       pins = "pwm_b";
+                       function = "pwm_b";
+               };
+       };
+       bl_pwm_combo_1_on_pins:bl_pwm_combo_1_on_pin {
+               mux {
+                       pins = "pwm_c_z";
+                       function = "pwm_c";
+               };
+       };
+       bl_pwm_combo_0_vs_on_pins:bl_pwm_combo_0_vs_on_pin {
+               mux {
+                       pins = "pwm_vs_z6";
+                       function = "pwm_vs";
+               };
+       };
+       bl_pwm_combo_1_vs_on_pins:bl_pwm_combo_1_vs_on_pin {
+               mux {
+                       pins = "pwm_vs_z7";
+                       function = "pwm_vs";
+               };
+       };
+       bl_pwm_combo_off_pins:bl_pwm_combo_off_pin {
+               mux {
+                       pins = "GPIOZ_6",
+                               "GPIOZ_7";
+                       function = "gpio_periphs";
+                       output-low;
+               };
+       };
+};
+
+&uart_A {
+       status = "okay";
+};
+
+&audio_data{
+       status = "okay";
+};
+
+&pwm_AO_ab {
+       status = "okay";
+};
+
+&pwm_ab {
+       status = "okay";
+};
+
+&pwm_cd {
+       status = "okay";
+};
+
+&spicc0 {
+       status = "okay";
+       pinctrl-names = "default";
+       pinctrl-0 = <&spi_a_pins>;
+       cs-gpios = <&gpio GPIOZ_3 0>;
+};