arm64: dts: meson: sync dt and bindings from v5.6-rc2
authorJerome Brunet <jbrunet@baylibre.com>
Thu, 5 Mar 2020 11:12:38 +0000 (12:12 +0100)
committerNeil Armstrong <narmstrong@baylibre.com>
Mon, 6 Apr 2020 07:56:35 +0000 (09:56 +0200)
Sync the device tree and dt-bindings from Linux v5.6-rc2
11a48a5a18c6 ("Linux 5.6-rc2")

The only exception to this is the mmc pinctrl pin bias of gxl SoC family.
This is a fix which found its way to u-boot but not Linux yet.

Acked-by: Neil Armstrong <narmstrong@baylibre.com>
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
36 files changed:
arch/arm/dts/meson-axg-s400.dts
arch/arm/dts/meson-axg.dtsi
arch/arm/dts/meson-g12-common.dtsi
arch/arm/dts/meson-g12.dtsi [new file with mode: 0644]
arch/arm/dts/meson-g12a-sei510.dts
arch/arm/dts/meson-g12a-u200.dts
arch/arm/dts/meson-g12a.dtsi
arch/arm/dts/meson-g12b-a311d-khadas-vim3.dts
arch/arm/dts/meson-g12b-odroid-n2.dts
arch/arm/dts/meson-g12b.dtsi
arch/arm/dts/meson-gx.dtsi
arch/arm/dts/meson-gxbb-nanopi-k2.dts
arch/arm/dts/meson-gxbb-odroidc2.dts
arch/arm/dts/meson-gxbb-p200.dts
arch/arm/dts/meson-gxbb-p201.dts
arch/arm/dts/meson-gxbb-p20x.dtsi
arch/arm/dts/meson-gxbb.dtsi
arch/arm/dts/meson-gxl-s805x-libretech-ac.dts
arch/arm/dts/meson-gxl-s905x-khadas-vim.dts
arch/arm/dts/meson-gxl-s905x-libretech-cc.dts
arch/arm/dts/meson-gxl-s905x-p212.dtsi
arch/arm/dts/meson-gxl.dtsi
arch/arm/dts/meson-gxm-khadas-vim2.dts
arch/arm/dts/meson-gxm.dtsi
arch/arm/dts/meson-khadas-vim3.dtsi
arch/arm/dts/meson-sm1-sei610.dts
arch/arm/dts/meson-sm1.dtsi
include/dt-bindings/clock/axg-audio-clkc.h
include/dt-bindings/clock/gxbb-aoclkc.h
include/dt-bindings/clock/gxbb-clkc.h
include/dt-bindings/gpio/meson-gxbb-gpio.h
include/dt-bindings/gpio/meson-gxl-gpio.h
include/dt-bindings/reset/amlogic,meson-axg-audio-arb.h
include/dt-bindings/reset/amlogic,meson-axg-reset.h
include/dt-bindings/reset/amlogic,meson-g12a-audio-reset.h
include/dt-bindings/reset/amlogic,meson-gxbb-reset.h

index 18778ada7bd32527f6060b51df09bbafd97b44ff..4cd2d595182282bffd73670110fa8e895a65fe41 100644 (file)
@@ -60,7 +60,7 @@
                serial1 = &uart_A;
        };
 
-       linein: audio-codec@0 {
+       linein: audio-codec-0 {
                #sound-dai-cells = <0>;
                compatible = "everest,es7241";
                VDDA-supply = <&vcc_3v3>;
@@ -70,7 +70,7 @@
                sound-name-prefix = "Linein";
        };
 
-       lineout: audio-codec@1 {
+       lineout: audio-codec-1 {
                #sound-dai-cells = <0>;
                compatible = "everest,es7154";
                VDD-supply = <&vcc_3v3>;
                sound-name-prefix = "Lineout";
        };
 
-       spdif_dit: audio-codec@2 {
+       spdif_dit: audio-codec-2 {
                #sound-dai-cells = <0>;
                compatible = "linux,spdif-dit";
                status = "okay";
                sound-name-prefix = "DIT";
        };
 
-       dmics: audio-codec@3 {
+       dmics: audio-codec-3 {
                #sound-dai-cells = <0>;
                compatible = "dmic-codec";
                num-channels = <7>;
                sound-name-prefix = "MIC";
        };
 
+       spdif_dir: audio-codec-4 {
+               #sound-dai-cells = <0>;
+               compatible = "linux,spdif-dir";
+               status = "okay";
+               sound-name-prefix = "DIR";
+       };
+
        emmc_pwrseq: emmc-pwrseq {
                compatible = "mmc-pwrseq-emmc";
                reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
                                "TODDR_A IN 2", "TDMIN_C OUT",
                                "TODDR_B IN 2", "TDMIN_C OUT",
                                "TODDR_C IN 2", "TDMIN_C OUT",
+                               "TODDR_A IN 3", "SPDIFIN Capture",
+                               "TODDR_B IN 3", "SPDIFIN Capture",
+                               "TODDR_C IN 3", "SPDIFIN Capture",
                                "TODDR_A IN 4", "PDM Capture",
                                "TODDR_B IN 4", "PDM Capture",
                                "TODDR_C IN 4", "PDM Capture",
                                       <393216000>;
                status = "okay";
 
-               dai-link@0 {
+               dai-link-0 {
                        sound-dai = <&frddr_a>;
                };
 
-               dai-link@1 {
+               dai-link-1 {
                        sound-dai = <&frddr_b>;
                };
 
-               dai-link@2 {
+               dai-link-2 {
                        sound-dai = <&frddr_c>;
                };
 
-               dai-link@3 {
+               dai-link-3 {
                        sound-dai = <&toddr_a>;
                };
 
-               dai-link@4 {
+               dai-link-4 {
                        sound-dai = <&toddr_b>;
                };
 
-               dai-link@5 {
+               dai-link-5 {
                        sound-dai = <&toddr_c>;
                };
 
-               dai-link@6 {
+               dai-link-6 {
                        sound-dai = <&tdmif_c>;
                        dai-format = "i2s";
                        dai-tdm-slot-tx-mask-2 = <1 1>;
 
                };
 
-               dai-link@7 {
+               dai-link-7 {
                        sound-dai = <&spdifout>;
 
                        codec {
                        };
                };
 
-               dai-link@8 {
+               dai-link-8 {
+                       sound-dai = <&spdifin>;
+
+                       codec {
+                               sound-dai = <&spdif_dir>;
+                       };
+               };
+
+               dai-link-9 {
                        sound-dai = <&pdm>;
 
                        codec {
                eth_phy0: ethernet-phy@0 {
                        /* Realtek RTL8211F (0x001cc916) */
                        reg = <0>;
+                       interrupt-parent = <&gpio_intc>;
+                       interrupts = <98 IRQ_TYPE_LEVEL_LOW>;
                        eee-broken-1000t;
                };
        };
 
        bus-width = <4>;
        cap-sd-highspeed;
-       max-frequency = <100000000>;
+       sd-uhs-sdr104;
+       max-frequency = <200000000>;
        non-removable;
        disable-wp;
 
 
 /* emmc storage */
 &sd_emmc_c {
-       status = "disabled";
-       pinctrl-0 = <&emmc_pins>;
+       status = "okay";
+       pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
        pinctrl-1 = <&emmc_clk_gate_pins>;
        pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        cap-mmc-highspeed;
-       max-frequency = <180000000>;
+       max-frequency = <200000000>;
        non-removable;
        disable-wp;
        mmc-ddr-1_8v;
        vqmmc-supply = <&vddio_boot>;
 };
 
+&spdifin {
+       pinctrl-0 = <&spdif_in_a19_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
 &spdifout {
        pinctrl-0 = <&spdif_out_a20_pins>;
        pinctrl-names = "default";
 
 &uart_A {
        status = "okay";
-       pinctrl-0 = <&uart_a_pins>;
+       pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
        pinctrl-names = "default";
+       uart-has-rtscts;
+
+       bluetooth {
+               compatible = "brcm,bcm43438-bt";
+               shutdown-gpios = <&gpio GPIOX_21 GPIO_ACTIVE_HIGH>;
+       };
 };
 
 &uart_AO {
index df017dbd2e572028f2c98b66b065d1d2b5325b3a..aace3d32a3df233277eda6bed15e96d56abc2cde 100644 (file)
@@ -20,7 +20,7 @@
        #address-cells = <2>;
        #size-cells = <2>;
 
-       tdmif_a: audio-controller@0 {
+       tdmif_a: audio-controller-0 {
                compatible = "amlogic,axg-tdm-iface";
                #sound-dai-cells = <0>;
                sound-name-prefix = "TDM_A";
@@ -31,7 +31,7 @@
                status = "disabled";
        };
 
-       tdmif_b: audio-controller@1 {
+       tdmif_b: audio-controller-1 {
                compatible = "amlogic,axg-tdm-iface";
                #sound-dai-cells = <0>;
                sound-name-prefix = "TDM_B";
@@ -42,7 +42,7 @@
                status = "disabled";
        };
 
-       tdmif_c: audio-controller@2 {
+       tdmif_c: audio-controller-2 {
                compatible = "amlogic,axg-tdm-iface";
                #sound-dai-cells = <0>;
                sound-name-prefix = "TDM_C";
                status = "disabled";
        };
 
-       ao_alt_xtal: ao_alt_xtal-clk {
-               compatible = "fixed-clock";
-               clock-frequency = <32000000>;
-               clock-output-names = "ao_alt_xtal";
-               #clock-cells = <0>;
-       };
-
        arm-pmu {
                compatible = "arm,cortex-a53-pmu";
                interrupts = <GIC_SPI 137 IRQ_TYPE_LEVEL_HIGH>,
 
                cpu0: cpu@0 {
                        device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
+                       compatible = "arm,cortex-a53";
                        reg = <0x0 0x0>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       clocks = <&scpi_dvfs 0>;
                };
 
                cpu1: cpu@1 {
                        device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
+                       compatible = "arm,cortex-a53";
                        reg = <0x0 0x1>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       clocks = <&scpi_dvfs 0>;
                };
 
                cpu2: cpu@2 {
                        device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
+                       compatible = "arm,cortex-a53";
                        reg = <0x0 0x2>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       clocks = <&scpi_dvfs 0>;
                };
 
                cpu3: cpu@3 {
                        device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
+                       compatible = "arm,cortex-a53";
                        reg = <0x0 0x3>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       clocks = <&scpi_dvfs 0>;
                };
 
                l2: l2-cache0 {
                };
        };
 
+       sm: secure-monitor {
+               compatible = "amlogic,meson-gxbb-sm";
+       };
+
+       efuse: efuse {
+               compatible = "amlogic,meson-gxbb-efuse";
+               clocks = <&clkc CLKID_EFUSE>;
+               #address-cells = <1>;
+               #size-cells = <1>;
+               read-only;
+               secure-monitor = <&sm>;
+       };
+
        psci {
                compatible = "arm,psci-1.0";
                method = "smc";
                };
        };
 
+       scpi {
+               compatible = "arm,scpi-pre-1.0";
+               mboxes = <&mailbox 1 &mailbox 2>;
+               shmem = <&cpu_scp_lpri &cpu_scp_hpri>;
+
+               scpi_clocks: clocks {
+                       compatible = "arm,scpi-clocks";
+
+                       scpi_dvfs: clock-controller {
+                               compatible = "arm,scpi-dvfs-clocks";
+                               #clock-cells = <1>;
+                               clock-indices = <0>;
+                               clock-output-names = "vcpu";
+                       };
+               };
+
+               scpi_sensors: sensors {
+                       compatible = "amlogic,meson-gxbb-scpi-sensors";
+                       #thermal-sensor-cells = <1>;
+               };
+       };
+
        soc {
                compatible = "simple-bus";
                #address-cells = <2>;
                ranges;
 
                ethmac: ethernet@ff3f0000 {
-                       compatible = "amlogic,meson-axg-dwmac", "snps,dwmac";
-                       reg = <0x0 0xff3f0000 0x0 0x10000
-                              0x0 0xff634540 0x0 0x8>;
-                       interrupts = <GIC_SPI 8 IRQ_TYPE_EDGE_RISING>;
+                       compatible = "amlogic,meson-axg-dwmac",
+                                    "snps,dwmac-3.70a",
+                                    "snps,dwmac";
+                       reg = <0x0 0xff3f0000 0x0 0x10000>,
+                             <0x0 0xff634540 0x0 0x8>;
+                       interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "macirq";
                        clocks = <&clkc CLKID_ETH>,
                                 <&clkc CLKID_FCLK_DIV2>,
                                 <&clkc CLKID_MPLL2>;
                        clock-names = "stmmaceth", "clkin0", "clkin1";
+                       rx-fifo-depth = <4096>;
+                       tx-fifo-depth = <2048>;
                        status = "disabled";
                };
 
                                                groups = "i2c0_sck",
                                                         "i2c0_sda";
                                                function = "i2c0";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "i2c1_sck_x",
                                                         "i2c1_sda_x";
                                                function = "i2c1";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "i2c1_sck_z",
                                                         "i2c1_sda_z";
                                                function = "i2c1";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "i2c2_sck_a",
                                                         "i2c2_sda_a";
                                                function = "i2c2";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "i2c2_sck_x",
                                                         "i2c2_sda_x";
                                                function = "i2c2";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "i2c3_sda_a6",
                                                         "i2c3_sck_a7";
                                                function = "i2c3";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "i2c3_sda_a12",
                                                         "i2c3_sck_a13";
                                                function = "i2c3";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "i2c3_sda_a19",
                                                         "i2c3_sck_a20";
                                                function = "i2c3";
+                                               bias-disable;
                                        };
                                };
 
                                emmc_pins: emmc {
-                                       mux {
+                                       mux-0 {
                                                groups = "emmc_nand_d0",
                                                         "emmc_nand_d1",
                                                         "emmc_nand_d2",
                                                         "emmc_nand_d5",
                                                         "emmc_nand_d6",
                                                         "emmc_nand_d7",
-                                                        "emmc_clk",
-                                                        "emmc_cmd",
-                                                        "emmc_ds";
+                                                        "emmc_cmd";
+                                               function = "emmc";
+                                               bias-pull-up;
+                                       };
+
+                                       mux-1 {
+                                               groups = "emmc_clk";
                                                function = "emmc";
+                                               bias-disable;
+                                       };
+                               };
+
+                               emmc_ds_pins: emmc_ds {
+                                       mux {
+                                               groups = "emmc_ds";
+                                               function = "emmc";
+                                               bias-pull-down;
                                        };
                                };
 
                                        mux {
                                                groups = "BOOT_8";
                                                function = "gpio_periphs";
-                                       };
-                                       cfg-pull-down {
-                                               pins = "BOOT_8";
                                                bias-pull-down;
                                        };
                                };
                                                         "eth_txd2_rgmii",
                                                         "eth_txd3_rgmii";
                                                function = "eth";
+                                               bias-disable;
                                        };
                                };
 
                                                         "eth_txd2_rgmii",
                                                         "eth_txd3_rgmii";
                                                function = "eth";
+                                               bias-disable;
                                        };
                                };
 
                                                         "eth_txd0_x",
                                                         "eth_txd1_x";
                                                function = "eth";
+                                               bias-disable;
                                        };
                                };
 
                                                         "eth_txd0_y",
                                                         "eth_txd1_y";
                                                function = "eth";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "mclk_b";
                                                function = "mclk_b";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "mclk_c";
                                                function = "mclk_c";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pdm_dclk_a14";
                                                function = "pdm";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pdm_dclk_a19";
                                                function = "pdm";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pdm_din0";
                                                function = "pdm";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pdm_din1";
                                                function = "pdm";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pdm_din2";
                                                function = "pdm";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pdm_din3";
                                                function = "pdm";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pwm_a_a";
                                                function = "pwm_a";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pwm_a_x18";
                                                function = "pwm_a";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pwm_a_x20";
                                                function = "pwm_a";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pwm_a_z";
                                                function = "pwm_a";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pwm_b_a";
                                                function = "pwm_b";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pwm_b_x";
                                                function = "pwm_b";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pwm_b_z";
                                                function = "pwm_b";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pwm_c_a";
                                                function = "pwm_c";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pwm_c_x10";
                                                function = "pwm_c";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pwm_c_x17";
                                                function = "pwm_c";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pwm_d_x11";
                                                function = "pwm_d";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "pwm_d_x16";
                                                function = "pwm_d";
+                                               bias-disable;
                                        };
                                };
 
                                sdio_pins: sdio {
-                                       mux {
+                                       mux-0 {
                                                groups = "sdio_d0",
                                                         "sdio_d1",
                                                         "sdio_d2",
                                                         "sdio_d3",
-                                                        "sdio_cmd",
-                                                        "sdio_clk";
+                                                        "sdio_cmd";
+                                               function = "sdio";
+                                               bias-pull-up;
+                                       };
+
+                                       mux-1 {
+                                               groups = "sdio_clk";
                                                function = "sdio";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "GPIOX_4";
                                                function = "gpio_periphs";
-                                       };
-                                       cfg-pull-down {
-                                               pins = "GPIOX_4";
                                                bias-pull-down;
                                        };
                                };
                                        mux {
                                                groups = "spdif_in_z";
                                                function = "spdif_in";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spdif_in_a1";
                                                function = "spdif_in";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spdif_in_a7";
                                                function = "spdif_in";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spdif_in_a19";
                                                function = "spdif_in";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spdif_in_a20";
                                                function = "spdif_in";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spdif_out_a1";
                                                function = "spdif_out";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spdif_out_a11";
                                                function = "spdif_out";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spdif_out_a19";
                                                function = "spdif_out";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spdif_out_a20";
                                                function = "spdif_out";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spdif_out_z";
                                                function = "spdif_out";
+                                               bias-disable;
                                        };
                                };
 
                                                         "spi0_mosi",
                                                         "spi0_clk";
                                                function = "spi0";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spi0_ss0";
                                                function = "spi0";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spi0_ss1";
                                                function = "spi0";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spi0_ss2";
                                                function = "spi0";
+                                               bias-disable;
                                        };
                                };
 
                                                         "spi1_mosi_a",
                                                         "spi1_clk_a";
                                                function = "spi1";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spi1_ss0_a";
                                                function = "spi1";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spi1_ss1";
                                                function = "spi1";
+                                               bias-disable;
                                        };
                                };
 
                                                         "spi1_mosi_x",
                                                         "spi1_clk_x";
                                                function = "spi1";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "spi1_ss0_x";
                                                function = "spi1";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdma_din0";
                                                function = "tdma";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdma_dout0_x14";
                                                function = "tdma";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdma_dout0_x15";
                                                function = "tdma";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdma_dout1";
                                                function = "tdma";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdma_din1";
                                                function = "tdma";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdma_fs";
                                                function = "tdma";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdma_fs_slv";
                                                function = "tdma";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdma_sclk";
                                                function = "tdma";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdma_sclk_slv";
                                                function = "tdma";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmb_din0";
                                                function = "tdmb";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmb_din1";
                                                function = "tdmb";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmb_din2";
                                                function = "tdmb";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmb_din3";
                                                function = "tdmb";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmb_dout0";
                                                function = "tdmb";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmb_dout1";
                                                function = "tdmb";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmb_dout2";
                                                function = "tdmb";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmb_dout3";
                                                function = "tdmb";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmb_fs";
                                                function = "tdmb";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmb_fs_slv";
                                                function = "tdmb";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmb_sclk";
                                                function = "tdmb";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmb_sclk_slv";
                                                function = "tdmb";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmc_fs";
                                                function = "tdmc";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmc_fs_slv";
                                                function = "tdmc";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmc_sclk";
                                                function = "tdmc";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmc_sclk_slv";
                                                function = "tdmc";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmc_din0";
                                                function = "tdmc";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmc_din1";
                                                function = "tdmc";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmc_din2";
                                                function = "tdmc";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmc_din3";
                                                function = "tdmc";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmc_dout0";
                                                function = "tdmc";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmc_dout1";
                                                function = "tdmc";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmc_dout2";
                                                function = "tdmc";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "tdmc_dout3";
                                                function = "tdmc";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "uart_tx_a",
                                                         "uart_rx_a";
                                                function = "uart_a";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "uart_cts_a",
                                                         "uart_rts_a";
                                                function = "uart_a";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "uart_tx_b_x",
                                                         "uart_rx_b_x";
                                                function = "uart_b";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "uart_cts_b_x",
                                                         "uart_rts_b_x";
                                                function = "uart_b";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "uart_tx_b_z",
                                                         "uart_rx_b_z";
                                                function = "uart_b";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "uart_cts_b_z",
                                                         "uart_rts_b_z";
                                                function = "uart_b";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "uart_ao_tx_b_z",
                                                         "uart_ao_rx_b_z";
                                                function = "uart_ao_b_z";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "uart_ao_cts_b_z",
                                                         "uart_ao_rts_b_z";
                                                function = "uart_ao_b_z";
+                                               bias-disable;
                                        };
                                };
                        };
                                clkc: clock-controller {
                                        compatible = "amlogic,axg-clkc";
                                        #clock-cells = <1>;
+                                       clocks = <&xtal>;
+                                       clock-names = "xtal";
                                };
                        };
                };
 
-               mailbox: mailbox@ff63dc00 {
-                       compatible = "amlogic,meson-gx-mhu", "amlogic,meson-gxbb-mhu";
-                       reg = <0 0xff63dc00 0 0x400>;
+               mailbox: mailbox@ff63c404 {
+                       compatible = "amlogic,meson-gxbb-mhu";
+                       reg = <0 0xff63c404 0 0x4c>;
                        interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>,
                                     <GIC_SPI 209 IRQ_TYPE_EDGE_RISING>,
                                     <GIC_SPI 210 IRQ_TYPE_EDGE_RISING>;
 
                        toddr_a: audio-controller@100 {
                                compatible = "amlogic,axg-toddr";
-                               reg = <0x0 0x100 0x0 0x1c>;
+                               reg = <0x0 0x100 0x0 0x2c>;
                                #sound-dai-cells = <0>;
                                sound-name-prefix = "TODDR_A";
                                interrupts = <GIC_SPI 84 IRQ_TYPE_EDGE_RISING>;
                                clocks = <&clkc_audio AUD_CLKID_TODDR_A>;
                                resets = <&arb AXG_ARB_TODDR_A>;
+                               amlogic,fifo-depth = <512>;
                                status = "disabled";
                        };
 
                        toddr_b: audio-controller@140 {
                                compatible = "amlogic,axg-toddr";
-                               reg = <0x0 0x140 0x0 0x1c>;
+                               reg = <0x0 0x140 0x0 0x2c>;
                                #sound-dai-cells = <0>;
                                sound-name-prefix = "TODDR_B";
                                interrupts = <GIC_SPI 85 IRQ_TYPE_EDGE_RISING>;
                                clocks = <&clkc_audio AUD_CLKID_TODDR_B>;
                                resets = <&arb AXG_ARB_TODDR_B>;
+                               amlogic,fifo-depth = <256>;
                                status = "disabled";
                        };
 
                        toddr_c: audio-controller@180 {
                                compatible = "amlogic,axg-toddr";
-                               reg = <0x0 0x180 0x0 0x1c>;
+                               reg = <0x0 0x180 0x0 0x2c>;
                                #sound-dai-cells = <0>;
                                sound-name-prefix = "TODDR_C";
                                interrupts = <GIC_SPI 86 IRQ_TYPE_EDGE_RISING>;
                                clocks = <&clkc_audio AUD_CLKID_TODDR_C>;
                                resets = <&arb AXG_ARB_TODDR_C>;
+                               amlogic,fifo-depth = <256>;
                                status = "disabled";
                        };
 
                        frddr_a: audio-controller@1c0 {
                                compatible = "amlogic,axg-frddr";
-                               reg = <0x0 0x1c0 0x0 0x1c>;
+                               reg = <0x0 0x1c0 0x0 0x2c>;
                                #sound-dai-cells = <0>;
                                sound-name-prefix = "FRDDR_A";
                                interrupts = <GIC_SPI 88 IRQ_TYPE_EDGE_RISING>;
                                clocks = <&clkc_audio AUD_CLKID_FRDDR_A>;
                                resets = <&arb AXG_ARB_FRDDR_A>;
+                               amlogic,fifo-depth = <512>;
                                status = "disabled";
                        };
 
                        frddr_b: audio-controller@200 {
                                compatible = "amlogic,axg-frddr";
-                               reg = <0x0 0x200 0x0 0x1c>;
+                               reg = <0x0 0x200 0x0 0x2c>;
                                #sound-dai-cells = <0>;
                                sound-name-prefix = "FRDDR_B";
                                interrupts = <GIC_SPI 89 IRQ_TYPE_EDGE_RISING>;
                                clocks = <&clkc_audio AUD_CLKID_FRDDR_B>;
                                resets = <&arb AXG_ARB_FRDDR_B>;
+                               amlogic,fifo-depth = <256>;
                                status = "disabled";
                        };
 
                        frddr_c: audio-controller@240 {
                                compatible = "amlogic,axg-frddr";
-                               reg = <0x0 0x240 0x0 0x1c>;
+                               reg = <0x0 0x240 0x0 0x2c>;
                                #sound-dai-cells = <0>;
                                sound-name-prefix = "FRDDR_C";
                                interrupts = <GIC_SPI 90 IRQ_TYPE_EDGE_RISING>;
                                clocks = <&clkc_audio AUD_CLKID_FRDDR_C>;
                                resets = <&arb AXG_ARB_FRDDR_C>;
+                               amlogic,fifo-depth = <256>;
                                status = "disabled";
                        };
 
                                status = "disabled";
                        };
 
+                       spdifin: audio-controller@400 {
+                               compatible = "amlogic,axg-spdifin";
+                               reg = <0x0 0x400 0x0 0x30>;
+                               #sound-dai-cells = <0>;
+                               sound-name-prefix = "SPDIFIN";
+                               interrupts = <GIC_SPI 87 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc_audio AUD_CLKID_SPDIFIN>,
+                                        <&clkc_audio AUD_CLKID_SPDIFIN_CLK>;
+                               clock-names = "pclk", "refclk";
+                               status = "disabled";
+                       };
+
                        spdifout: audio-controller@480 {
                                compatible = "amlogic,axg-spdifout";
                                reg = <0x0 0x480 0x0 0x50>;
                                        compatible = "amlogic,meson-axg-aoclkc";
                                        #clock-cells = <1>;
                                        #reset-cells = <1>;
+                                       clocks = <&xtal>, <&clkc CLKID_CLK81>;
+                                       clock-names = "xtal", "mpeg-clk";
                                };
                        };
 
                                        mux {
                                                groups = "i2c_ao_sck_4";
                                                function = "i2c_ao";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "i2c_ao_sck_8";
                                                function = "i2c_ao";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "i2c_ao_sck_10";
                                                function = "i2c_ao";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "i2c_ao_sda_5";
                                                function = "i2c_ao";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "i2c_ao_sda_9";
                                                function = "i2c_ao";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "i2c_ao_sda_11";
                                                function = "i2c_ao";
+                                               bias-disable;
                                        };
                                };
 
                                        mux {
                                                groups = "remote_input_ao";
                                                function = "remote_input_ao";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "uart_ao_tx_a",
                                                         "uart_ao_rx_a";
                                                function = "uart_ao_a";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "uart_ao_cts_a",
                                                         "uart_ao_rts_a";
                                                function = "uart_ao_a";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "uart_ao_tx_b",
                                                         "uart_ao_rx_b";
                                                function = "uart_ao_b";
+                                               bias-disable;
                                        };
                                };
 
                                                groups = "uart_ao_cts_b",
                                                         "uart_ao_rts_b";
                                                function = "uart_ao_b";
+                                               bias-disable;
                                        };
                                };
                        };
                        };
 
                        gpio_intc: interrupt-controller@f080 {
-                               compatible = "amlogic,meson-gpio-intc";
+                               compatible = "amlogic,meson-axg-gpio-intc",
+                                            "amlogic,meson-gpio-intc";
                                reg = <0x0 0xf080 0x0 0x10>;
                                interrupt-controller;
                                #interrupt-cells = <2>;
                                amlogic,channel-interrupts = <64 65 66 67 68 69 70 71>;
-                               status = "disabled";
+                       };
+
+                       watchdog@f0d0 {
+                               compatible = "amlogic,meson-gxbb-wdt";
+                               reg = <0x0 0xf0d0 0x0 0x10>;
+                               clocks = <&xtal>;
                        };
 
                        pwm_ab: pwm@1b000 {
                                status = "disabled";
                        };
 
+                       clk_msr: clock-measure@18000 {
+                               compatible = "amlogic,meson-axg-clk-measure";
+                               reg = <0x0 0x18000 0x0 0x10>;
+                       };
+
                        i2c3: i2c@1c000 {
                                compatible = "amlogic,meson-axg-i2c";
                                reg = <0x0 0x1c000 0x0 0x20>;
                        #size-cells = <1>;
                        ranges = <0 0x0 0xfffc0000 0x20000>;
 
-                       cpu_scp_lpri: scp-shmem@0 {
+                       cpu_scp_lpri: scp-shmem@13000 {
                                compatible = "amlogic,meson-axg-scp-shmem";
                                reg = <0x13000 0x400>;
                        };
 
-                       cpu_scp_hpri: scp-shmem@200 {
+                       cpu_scp_hpri: scp-shmem@13400 {
                                compatible = "amlogic,meson-axg-scp-shmem";
                                reg = <0x13400 0x400>;
                        };
index 3f39e020f74e62ede06732b5ac4046324f2adada..abe04f4ad7d873ba95f41e3b2e7b2b767f65aab9 100644 (file)
@@ -5,51 +5,42 @@
 
 #include <dt-bindings/phy/phy.h>
 #include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/clock/axg-audio-clkc.h>
 #include <dt-bindings/clock/g12a-clkc.h>
 #include <dt-bindings/clock/g12a-aoclkc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
-#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
-#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
 #include <dt-bindings/reset/amlogic,meson-g12a-reset.h>
+#include <dt-bindings/thermal/thermal.h>
 
 / {
        interrupt-parent = <&gic>;
        #address-cells = <2>;
        #size-cells = <2>;
 
-       tdmif_a: audio-controller-0 {
-               compatible = "amlogic,axg-tdm-iface";
-               #sound-dai-cells = <0>;
-               sound-name-prefix = "TDM_A";
-               clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>,
-                        <&clkc_audio AUD_CLKID_MST_A_SCLK>,
-                        <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
-               clock-names = "mclk", "sclk", "lrclk";
-               status = "disabled";
-       };
+       chosen {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
 
-       tdmif_b: audio-controller-1 {
-               compatible = "amlogic,axg-tdm-iface";
-               #sound-dai-cells = <0>;
-               sound-name-prefix = "TDM_B";
-               clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
-                        <&clkc_audio AUD_CLKID_MST_B_SCLK>,
-                        <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
-               clock-names = "mclk", "sclk", "lrclk";
-               status = "disabled";
-       };
+               simplefb_cvbs: framebuffer-cvbs {
+                       compatible = "amlogic,simple-framebuffer",
+                                    "simple-framebuffer";
+                       amlogic,pipeline = "vpu-cvbs";
+                       clocks = <&clkc CLKID_HDMI>,
+                                <&clkc CLKID_HTX_PCLK>,
+                                <&clkc CLKID_VPU_INTR>;
+                       status = "disabled";
+               };
 
-       tdmif_c: audio-controller-2 {
-               compatible = "amlogic,axg-tdm-iface";
-               #sound-dai-cells = <0>;
-               sound-name-prefix = "TDM_C";
-               clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>,
-                        <&clkc_audio AUD_CLKID_MST_C_SCLK>,
-                        <&clkc_audio AUD_CLKID_MST_C_LRCLK>;
-               clock-names = "mclk", "sclk", "lrclk";
-               status = "disabled";
+               simplefb_hdmi: framebuffer-hdmi {
+                       compatible = "amlogic,simple-framebuffer",
+                                   "simple-framebuffer";
+                       amlogic,pipeline = "vpu-hdmi";
+                       clocks = <&clkc CLKID_HDMI>,
+                                <&clkc CLKID_HTX_PCLK>,
+                                <&clkc CLKID_VPU_INTR>;
+                       status = "disabled";
+               };
        };
 
        efuse: efuse {
@@ -58,6 +49,7 @@
                #address-cells = <1>;
                #size-cells = <1>;
                read-only;
+               secure-monitor = <&sm>;
        };
 
        psci {
                #size-cells = <2>;
                ranges;
 
+               pcie: pcie@fc000000 {
+                       compatible = "amlogic,g12a-pcie", "snps,dw-pcie";
+                       reg = <0x0 0xfc000000 0x0 0x400000
+                              0x0 0xff648000 0x0 0x2000
+                              0x0 0xfc400000 0x0 0x200000>;
+                       reg-names = "elbi", "cfg", "config";
+                       interrupts = <GIC_SPI 221 IRQ_TYPE_LEVEL_HIGH>;
+                       #interrupt-cells = <1>;
+                       interrupt-map-mask = <0 0 0 0>;
+                       interrupt-map = <0 0 0 0 &gic GIC_SPI 223 IRQ_TYPE_LEVEL_HIGH>;
+                       bus-range = <0x0 0xff>;
+                       #address-cells = <3>;
+                       #size-cells = <2>;
+                       device_type = "pci";
+                       ranges = <0x81000000 0 0 0x0 0xfc600000 0 0x00100000
+                                 0x82000000 0 0xfc700000 0x0 0xfc700000 0 0x1900000>;
+
+                       clocks = <&clkc CLKID_PCIE_PHY
+                                 &clkc CLKID_PCIE_COMB
+                                 &clkc CLKID_PCIE_PLL>;
+                       clock-names = "general",
+                                     "pclk",
+                                     "port";
+                       resets = <&reset RESET_PCIE_CTRL_A>,
+                                <&reset RESET_PCIE_APB>;
+                       reset-names = "port",
+                                     "apb";
+                       num-lanes = <1>;
+                       phys = <&usb3_pcie_phy PHY_TYPE_PCIE>;
+                       phy-names = "pcie";
+                       status = "disabled";
+               };
+
+               thermal-zones {
+                       cpu_thermal: cpu-thermal {
+                               polling-delay = <1000>;
+                               polling-delay-passive = <100>;
+                               thermal-sensors = <&cpu_temp>;
+
+                               trips {
+                                       cpu_passive: cpu-passive {
+                                               temperature = <85000>; /* millicelsius */
+                                               hysteresis = <2000>; /* millicelsius */
+                                               type = "passive";
+                                       };
+
+                                       cpu_hot: cpu-hot {
+                                               temperature = <95000>; /* millicelsius */
+                                               hysteresis = <2000>; /* millicelsius */
+                                               type = "hot";
+                                       };
+
+                                       cpu_critical: cpu-critical {
+                                               temperature = <110000>; /* millicelsius */
+                                               hysteresis = <2000>; /* millicelsius */
+                                               type = "critical";
+                                       };
+                               };
+                       };
+
+                       ddr_thermal: ddr-thermal {
+                               polling-delay = <1000>;
+                               polling-delay-passive = <100>;
+                               thermal-sensors = <&ddr_temp>;
+
+                               trips {
+                                       ddr_passive: ddr-passive {
+                                               temperature = <85000>; /* millicelsius */
+                                               hysteresis = <2000>; /* millicelsius */
+                                               type = "passive";
+                                       };
+
+                                       ddr_critical: ddr-critical {
+                                               temperature = <110000>; /* millicelsius */
+                                               hysteresis = <2000>; /* millicelsius */
+                                               type = "critical";
+                                       };
+                               };
+
+                               cooling-maps {
+                                       map {
+                                               trip = <&ddr_passive>;
+                                               cooling-device = <&mali THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                                       };
+                               };
+                       };
+               };
+
                ethmac: ethernet@ff3f0000 {
                        compatible = "amlogic,meson-axg-dwmac",
                                     "snps,dwmac-3.70a",
                                };
                        };
 
+                       cpu_temp: temperature-sensor@34800 {
+                               compatible = "amlogic,g12a-cpu-thermal",
+                                            "amlogic,g12a-thermal";
+                               reg = <0x0 0x34800 0x0 0x50>;
+                               interrupts = <GIC_SPI 35 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc CLKID_TS>;
+                               #thermal-sensor-cells = <0>;
+                               amlogic,ao-secure = <&sec_AO>;
+                       };
+
+                       ddr_temp: temperature-sensor@34c00 {
+                               compatible = "amlogic,g12a-ddr-thermal",
+                                            "amlogic,g12a-thermal";
+                               reg = <0x0 0x34c00 0x0 0x50>;
+                               interrupts = <GIC_SPI 36 IRQ_TYPE_EDGE_RISING>;
+                               clocks = <&clkc CLKID_TS>;
+                               #thermal-sensor-cells = <0>;
+                               amlogic,ao-secure = <&sec_AO>;
+                       };
+
                        usb2_phy0: phy@36000 {
                                compatible = "amlogic,g12a-usb2-phy";
                                reg = <0x0 0x36000 0x0 0x2000>;
                                };
                        };
 
-                       pdm: audio-controller@40000 {
-                               compatible = "amlogic,g12a-pdm",
-                                            "amlogic,axg-pdm";
-                               reg = <0x0 0x40000 0x0 0x34>;
-                               #sound-dai-cells = <0>;
-                               sound-name-prefix = "PDM";
-                               clocks = <&clkc_audio AUD_CLKID_PDM>,
-                                        <&clkc_audio AUD_CLKID_PDM_DCLK>,
-                                        <&clkc_audio AUD_CLKID_PDM_SYSCLK>;
-                               clock-names = "pclk", "dclk", "sysclk";
-                               status = "disabled";
-                       };
-
-                       audio: bus@42000 {
-                               compatible = "simple-bus";
-                               reg = <0x0 0x42000 0x0 0x2000>;
-                               #address-cells = <2>;
-                               #size-cells = <2>;
-                               ranges = <0x0 0x0 0x0 0x42000 0x0 0x2000>;
-
-                               clkc_audio: clock-controller@0 {
-                                       status = "disabled";
-                                       compatible = "amlogic,g12a-audio-clkc";
-                                       reg = <0x0 0x0 0x0 0xb4>;
-                                       #clock-cells = <1>;
-                                       #reset-cells = <1>;
-
-                                       clocks = <&clkc CLKID_AUDIO>,
-                                                <&clkc CLKID_MPLL0>,
-                                                <&clkc CLKID_MPLL1>,
-                                                <&clkc CLKID_MPLL2>,
-                                                <&clkc CLKID_MPLL3>,
-                                                <&clkc CLKID_HIFI_PLL>,
-                                                <&clkc CLKID_FCLK_DIV3>,
-                                                <&clkc CLKID_FCLK_DIV4>,
-                                                <&clkc CLKID_GP0_PLL>;
-                                       clock-names = "pclk",
-                                                     "mst_in0",
-                                                     "mst_in1",
-                                                     "mst_in2",
-                                                     "mst_in3",
-                                                     "mst_in4",
-                                                     "mst_in5",
-                                                     "mst_in6",
-                                                     "mst_in7";
-
-                                       resets = <&reset RESET_AUDIO>;
-                               };
-
-                               toddr_a: audio-controller@100 {
-                                       compatible = "amlogic,g12a-toddr",
-                                                    "amlogic,axg-toddr";
-                                       reg = <0x0 0x100 0x0 0x1c>;
-                                       #sound-dai-cells = <0>;
-                                       sound-name-prefix = "TODDR_A";
-                                       interrupts = <GIC_SPI 148 IRQ_TYPE_EDGE_RISING>;
-                                       clocks = <&clkc_audio AUD_CLKID_TODDR_A>;
-                                       resets = <&arb AXG_ARB_TODDR_A>;
-                                       status = "disabled";
-                               };
-
-                               toddr_b: audio-controller@140 {
-                                       compatible = "amlogic,g12a-toddr",
-                                                    "amlogic,axg-toddr";
-                                       reg = <0x0 0x140 0x0 0x1c>;
-                                       #sound-dai-cells = <0>;
-                                       sound-name-prefix = "TODDR_B";
-                                       interrupts = <GIC_SPI 149 IRQ_TYPE_EDGE_RISING>;
-                                       clocks = <&clkc_audio AUD_CLKID_TODDR_B>;
-                                       resets = <&arb AXG_ARB_TODDR_B>;
-                                       status = "disabled";
-                               };
-
-                               toddr_c: audio-controller@180 {
-                                       compatible = "amlogic,g12a-toddr",
-                                                    "amlogic,axg-toddr";
-                                       reg = <0x0 0x180 0x0 0x1c>;
-                                       #sound-dai-cells = <0>;
-                                       sound-name-prefix = "TODDR_C";
-                                       interrupts = <GIC_SPI 150 IRQ_TYPE_EDGE_RISING>;
-                                       clocks = <&clkc_audio AUD_CLKID_TODDR_C>;
-                                       resets = <&arb AXG_ARB_TODDR_C>;
-                                       status = "disabled";
-                               };
-
-                               frddr_a: audio-controller@1c0 {
-                                       compatible = "amlogic,g12a-frddr",
-                                                    "amlogic,axg-frddr";
-                                       reg = <0x0 0x1c0 0x0 0x1c>;
-                                       #sound-dai-cells = <0>;
-                                       sound-name-prefix = "FRDDR_A";
-                                       interrupts = <GIC_SPI 152 IRQ_TYPE_EDGE_RISING>;
-                                       clocks = <&clkc_audio AUD_CLKID_FRDDR_A>;
-                                       resets = <&arb AXG_ARB_FRDDR_A>;
-                                       status = "disabled";
-                               };
-
-                               frddr_b: audio-controller@200 {
-                                       compatible = "amlogic,g12a-frddr",
-                                                    "amlogic,axg-frddr";
-                                       reg = <0x0 0x200 0x0 0x1c>;
-                                       #sound-dai-cells = <0>;
-                                       sound-name-prefix = "FRDDR_B";
-                                       interrupts = <GIC_SPI 153 IRQ_TYPE_EDGE_RISING>;
-                                       clocks = <&clkc_audio AUD_CLKID_FRDDR_B>;
-                                       resets = <&arb AXG_ARB_FRDDR_B>;
-                                       status = "disabled";
-                               };
-
-                               frddr_c: audio-controller@240 {
-                                       compatible = "amlogic,g12a-frddr",
-                                                    "amlogic,axg-frddr";
-                                       reg = <0x0 0x240 0x0 0x1c>;
-                                       #sound-dai-cells = <0>;
-                                       sound-name-prefix = "FRDDR_C";
-                                       interrupts = <GIC_SPI 154 IRQ_TYPE_EDGE_RISING>;
-                                       clocks = <&clkc_audio AUD_CLKID_FRDDR_C>;
-                                       resets = <&arb AXG_ARB_FRDDR_C>;
-                                       status = "disabled";
-                               };
-
-                               arb: reset-controller@280 {
-                                       status = "disabled";
-                                       compatible = "amlogic,meson-axg-audio-arb";
-                                       reg = <0x0 0x280 0x0 0x4>;
-                                       #reset-cells = <1>;
-                                       clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
-                               };
-
-                               tdmin_a: audio-controller@300 {
-                                       compatible = "amlogic,g12a-tdmin",
-                                                    "amlogic,axg-tdmin";
-                                       reg = <0x0 0x300 0x0 0x40>;
-                                       sound-name-prefix = "TDMIN_A";
-                                       resets = <&clkc_audio AUD_RESET_TDMIN_A>;
-                                       clocks = <&clkc_audio AUD_CLKID_TDMIN_A>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_A_SCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_A_SCLK_SEL>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>;
-                                       clock-names = "pclk", "sclk", "sclk_sel",
-                                                     "lrclk", "lrclk_sel";
-                                       status = "disabled";
-                               };
-
-                               tdmin_b: audio-controller@340 {
-                                       compatible = "amlogic,g12a-tdmin",
-                                                    "amlogic,axg-tdmin";
-                                       reg = <0x0 0x340 0x0 0x40>;
-                                       sound-name-prefix = "TDMIN_B";
-                                       resets = <&clkc_audio AUD_RESET_TDMIN_B>;
-                                       clocks = <&clkc_audio AUD_CLKID_TDMIN_B>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_B_SCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_B_SCLK_SEL>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>;
-                                       clock-names = "pclk", "sclk", "sclk_sel",
-                                                     "lrclk", "lrclk_sel";
-                                       status = "disabled";
-                               };
-
-                               tdmin_c: audio-controller@380 {
-                                       compatible = "amlogic,g12a-tdmin",
-                                                    "amlogic,axg-tdmin";
-                                       reg = <0x0 0x380 0x0 0x40>;
-                                       sound-name-prefix = "TDMIN_C";
-                                       resets = <&clkc_audio AUD_RESET_TDMIN_C>;
-                                       clocks = <&clkc_audio AUD_CLKID_TDMIN_C>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_C_SCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_C_SCLK_SEL>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>;
-                                       clock-names = "pclk", "sclk", "sclk_sel",
-                                                     "lrclk", "lrclk_sel";
-                                       status = "disabled";
-                               };
-
-                               tdmin_lb: audio-controller@3c0 {
-                                       compatible = "amlogic,g12a-tdmin",
-                                                    "amlogic,axg-tdmin";
-                                       reg = <0x0 0x3c0 0x0 0x40>;
-                                       sound-name-prefix = "TDMIN_LB";
-                                       resets = <&clkc_audio AUD_RESET_TDMIN_LB>;
-                                       clocks = <&clkc_audio AUD_CLKID_TDMIN_LB>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK_SEL>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>;
-                                       clock-names = "pclk", "sclk", "sclk_sel",
-                                                     "lrclk", "lrclk_sel";
-                                       status = "disabled";
-                               };
-
-                               spdifin: audio-controller@400 {
-                                       compatible = "amlogic,g12a-spdifin",
-                                                    "amlogic,axg-spdifin";
-                                       reg = <0x0 0x400 0x0 0x30>;
-                                       #sound-dai-cells = <0>;
-                                       sound-name-prefix = "SPDIFIN";
-                                       interrupts = <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
-                                       clocks = <&clkc_audio AUD_CLKID_SPDIFIN>,
-                                                <&clkc_audio AUD_CLKID_SPDIFIN_CLK>;
-                                       clock-names = "pclk", "refclk";
-                                       status = "disabled";
-                               };
-
-                               spdifout: audio-controller@480 {
-                                       compatible = "amlogic,g12a-spdifout",
-                                                    "amlogic,axg-spdifout";
-                                       reg = <0x0 0x480 0x0 0x50>;
-                                       #sound-dai-cells = <0>;
-                                       sound-name-prefix = "SPDIFOUT";
-                                       clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>,
-                                                <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>;
-                                       clock-names = "pclk", "mclk";
-                                       status = "disabled";
-                               };
-
-                               tdmout_a: audio-controller@500 {
-                                       compatible = "amlogic,g12a-tdmout";
-                                       reg = <0x0 0x500 0x0 0x40>;
-                                       sound-name-prefix = "TDMOUT_A";
-                                       resets = <&clkc_audio AUD_RESET_TDMOUT_A>;
-                                       clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>,
-                                                <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>,
-                                                <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>;
-                                       clock-names = "pclk", "sclk", "sclk_sel",
-                                                     "lrclk", "lrclk_sel";
-                                       status = "disabled";
-                               };
-
-                               tdmout_b: audio-controller@540 {
-                                       compatible = "amlogic,g12a-tdmout";
-                                       reg = <0x0 0x540 0x0 0x40>;
-                                       sound-name-prefix = "TDMOUT_B";
-                                       resets = <&clkc_audio AUD_RESET_TDMOUT_B>;
-                                       clocks = <&clkc_audio AUD_CLKID_TDMOUT_B>,
-                                                <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK_SEL>,
-                                                <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>;
-                                       clock-names = "pclk", "sclk", "sclk_sel",
-                                                     "lrclk", "lrclk_sel";
-                                       status = "disabled";
-                               };
-
-                               tdmout_c: audio-controller@580 {
-                                       compatible = "amlogic,g12a-tdmout";
-                                       reg = <0x0 0x580 0x0 0x40>;
-                                       sound-name-prefix = "TDMOUT_C";
-                                       resets = <&clkc_audio AUD_RESET_TDMOUT_C>;
-                                       clocks = <&clkc_audio AUD_CLKID_TDMOUT_C>,
-                                                <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK_SEL>,
-                                                <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>,
-                                                <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>;
-                                       clock-names = "pclk", "sclk", "sclk_sel",
-                                                     "lrclk", "lrclk_sel";
-                                       status = "disabled";
-                               };
-
-                               spdifout_b: audio-controller@680 {
-                                       compatible = "amlogic,g12a-spdifout",
-                                                    "amlogic,axg-spdifout";
-                                       reg = <0x0 0x680 0x0 0x50>;
-                                       #sound-dai-cells = <0>;
-                                       sound-name-prefix = "SPDIFOUT_B";
-                                       clocks = <&clkc_audio AUD_CLKID_SPDIFOUT_B>,
-                                                <&clkc_audio AUD_CLKID_SPDIFOUT_B_CLK>;
-                                       clock-names = "pclk", "mclk";
-                                       status = "disabled";
-                               };
-
-                               tohdmitx: audio-controller@744 {
-                                       compatible = "amlogic,g12a-tohdmitx";
-                                       reg = <0x0 0x744 0x0 0x4>;
-                                       #sound-dai-cells = <1>;
-                                       sound-name-prefix = "TOHDMITX";
-                                       status = "disabled";
-                               };
-                       };
-
                        usb3_pcie_phy: phy@46000 {
                                compatible = "amlogic,g12a-usb3-pcie-phy";
                                reg = <0x0 0x46000 0x0 0x2000>;
                        };
                };
 
+               vdec: video-decoder@ff620000 {
+                       compatible = "amlogic,g12a-vdec";
+                       reg = <0x0 0xff620000 0x0 0x10000>,
+                             <0x0 0xffd0e180 0x0 0xe4>;
+                       reg-names = "dos", "esparser";
+                       interrupts = <GIC_SPI 44 IRQ_TYPE_EDGE_RISING>,
+                                    <GIC_SPI 32 IRQ_TYPE_EDGE_RISING>;
+                       interrupt-names = "vdec", "esparser";
+
+                       amlogic,ao-sysctrl = <&rti>;
+                       amlogic,canvas = <&canvas>;
+
+                       clocks = <&clkc CLKID_PARSER>,
+                                <&clkc CLKID_DOS>,
+                                <&clkc CLKID_VDEC_1>,
+                                <&clkc CLKID_VDEC_HEVC>,
+                                <&clkc CLKID_VDEC_HEVCF>;
+                       clock-names = "dos_parser", "dos", "vdec_1",
+                                     "vdec_hevc", "vdec_hevcf";
+                       resets = <&reset RESET_PARSER>;
+                       reset-names = "esparser";
+               };
+
                vpu: vpu@ff900000 {
                        compatible = "amlogic,meson-g12a-vpu";
                        reg = <0x0 0xff900000 0x0 0x100000>,
                        compatible = "amlogic,meson-g12a-mali", "arm,mali-bifrost";
                        reg = <0x0 0xffe40000 0x0 0x40000>;
                        interrupt-parent = <&gic>;
-                       interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
+                       interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
                                     <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
-                                    <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>;
-                       interrupt-names = "gpu", "mmu", "job";
+                                    <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>;
+                       interrupt-names = "job", "mmu", "gpu";
                        clocks = <&clkc CLKID_MALI>;
                        resets = <&reset RESET_DVALIN_CAPB3>, <&reset RESET_DVALIN>;
 
                        assigned-clock-rates = <0>, /* Do Nothing */
                                               <800000000>,
                                               <0>; /* Do Nothing */
+                       #cooling-cells = <2>;
                };
        };
 
diff --git a/arch/arm/dts/meson-g12.dtsi b/arch/arm/dts/meson-g12.dtsi
new file mode 100644 (file)
index 0000000..03054c4
--- /dev/null
@@ -0,0 +1,398 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2019 BayLibre, SAS
+ * Author: Jerome Brunet <jbrunet@baylibre.com>
+ */
+
+#include "meson-g12-common.dtsi"
+#include <dt-bindings/clock/axg-audio-clkc.h>
+#include <dt-bindings/power/meson-g12a-power.h>
+#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
+#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
+
+/ {
+       tdmif_a: audio-controller-0 {
+               compatible = "amlogic,axg-tdm-iface";
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "TDM_A";
+               clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>,
+                        <&clkc_audio AUD_CLKID_MST_A_SCLK>,
+                        <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
+               clock-names = "mclk", "sclk", "lrclk";
+               status = "disabled";
+       };
+
+       tdmif_b: audio-controller-1 {
+               compatible = "amlogic,axg-tdm-iface";
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "TDM_B";
+               clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
+                        <&clkc_audio AUD_CLKID_MST_B_SCLK>,
+                        <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
+               clock-names = "mclk", "sclk", "lrclk";
+               status = "disabled";
+       };
+
+       tdmif_c: audio-controller-2 {
+               compatible = "amlogic,axg-tdm-iface";
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "TDM_C";
+               clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>,
+                        <&clkc_audio AUD_CLKID_MST_C_SCLK>,
+                        <&clkc_audio AUD_CLKID_MST_C_LRCLK>;
+               clock-names = "mclk", "sclk", "lrclk";
+               status = "disabled";
+       };
+};
+
+&apb {
+       pdm: audio-controller@40000 {
+               compatible = "amlogic,g12a-pdm",
+                            "amlogic,axg-pdm";
+               reg = <0x0 0x40000 0x0 0x34>;
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "PDM";
+               clocks = <&clkc_audio AUD_CLKID_PDM>,
+                        <&clkc_audio AUD_CLKID_PDM_DCLK>,
+                        <&clkc_audio AUD_CLKID_PDM_SYSCLK>;
+               clock-names = "pclk", "dclk", "sysclk";
+               status = "disabled";
+       };
+
+       audio: bus@42000 {
+               compatible = "simple-bus";
+               reg = <0x0 0x42000 0x0 0x2000>;
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges = <0x0 0x0 0x0 0x42000 0x0 0x2000>;
+
+               clkc_audio: clock-controller@0 {
+                       status = "disabled";
+                       compatible = "amlogic,g12a-audio-clkc";
+                       reg = <0x0 0x0 0x0 0xb4>;
+                       #clock-cells = <1>;
+                       #reset-cells = <1>;
+
+                       clocks = <&clkc CLKID_AUDIO>,
+                                <&clkc CLKID_MPLL0>,
+                                <&clkc CLKID_MPLL1>,
+                                <&clkc CLKID_MPLL2>,
+                                <&clkc CLKID_MPLL3>,
+                                <&clkc CLKID_HIFI_PLL>,
+                                <&clkc CLKID_FCLK_DIV3>,
+                                <&clkc CLKID_FCLK_DIV4>,
+                                <&clkc CLKID_GP0_PLL>;
+                       clock-names = "pclk",
+                                     "mst_in0",
+                                     "mst_in1",
+                                     "mst_in2",
+                                     "mst_in3",
+                                     "mst_in4",
+                                     "mst_in5",
+                                     "mst_in6",
+                                     "mst_in7";
+
+                       resets = <&reset RESET_AUDIO>;
+               };
+
+               toddr_a: audio-controller@100 {
+                       compatible = "amlogic,g12a-toddr",
+                                    "amlogic,axg-toddr";
+                       reg = <0x0 0x100 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "TODDR_A";
+                       interrupts = <GIC_SPI 148 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_TODDR_A>;
+                       resets = <&arb AXG_ARB_TODDR_A>,
+                                <&clkc_audio AUD_RESET_TODDR_A>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <512>;
+                       status = "disabled";
+               };
+
+               toddr_b: audio-controller@140 {
+                       compatible = "amlogic,g12a-toddr",
+                                    "amlogic,axg-toddr";
+                       reg = <0x0 0x140 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "TODDR_B";
+                       interrupts = <GIC_SPI 149 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_TODDR_B>;
+                       resets = <&arb AXG_ARB_TODDR_B>,
+                                <&clkc_audio AUD_RESET_TODDR_B>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <256>;
+                       status = "disabled";
+               };
+
+               toddr_c: audio-controller@180 {
+                       compatible = "amlogic,g12a-toddr",
+                                    "amlogic,axg-toddr";
+                       reg = <0x0 0x180 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "TODDR_C";
+                       interrupts = <GIC_SPI 150 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_TODDR_C>;
+                       resets = <&arb AXG_ARB_TODDR_C>,
+                                <&clkc_audio AUD_RESET_TODDR_C>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <256>;
+                       status = "disabled";
+               };
+
+               frddr_a: audio-controller@1c0 {
+                       compatible = "amlogic,g12a-frddr",
+                                    "amlogic,axg-frddr";
+                       reg = <0x0 0x1c0 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "FRDDR_A";
+                       interrupts = <GIC_SPI 152 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_FRDDR_A>;
+                       resets = <&arb AXG_ARB_FRDDR_A>,
+                                <&clkc_audio AUD_RESET_FRDDR_A>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <512>;
+                       status = "disabled";
+               };
+
+               frddr_b: audio-controller@200 {
+                       compatible = "amlogic,g12a-frddr",
+                                    "amlogic,axg-frddr";
+                       reg = <0x0 0x200 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "FRDDR_B";
+                       interrupts = <GIC_SPI 153 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_FRDDR_B>;
+                       resets = <&arb AXG_ARB_FRDDR_B>,
+                                <&clkc_audio AUD_RESET_FRDDR_B>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <256>;
+                       status = "disabled";
+               };
+
+               frddr_c: audio-controller@240 {
+                       compatible = "amlogic,g12a-frddr",
+                                    "amlogic,axg-frddr";
+                       reg = <0x0 0x240 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "FRDDR_C";
+                       interrupts = <GIC_SPI 154 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_FRDDR_C>;
+                       resets = <&arb AXG_ARB_FRDDR_C>,
+                                <&clkc_audio AUD_RESET_FRDDR_C>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <256>;
+                       status = "disabled";
+               };
+
+               arb: reset-controller@280 {
+                       status = "disabled";
+                       compatible = "amlogic,meson-axg-audio-arb";
+                       reg = <0x0 0x280 0x0 0x4>;
+                       #reset-cells = <1>;
+                       clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
+               };
+
+               tdmin_a: audio-controller@300 {
+                       compatible = "amlogic,g12a-tdmin",
+                                    "amlogic,axg-tdmin";
+                       reg = <0x0 0x300 0x0 0x40>;
+                       sound-name-prefix = "TDMIN_A";
+                       resets = <&clkc_audio AUD_RESET_TDMIN_A>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMIN_A>,
+                                <&clkc_audio AUD_CLKID_TDMIN_A_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_A_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               tdmin_b: audio-controller@340 {
+                       compatible = "amlogic,g12a-tdmin",
+                                    "amlogic,axg-tdmin";
+                       reg = <0x0 0x340 0x0 0x40>;
+                       sound-name-prefix = "TDMIN_B";
+                       resets = <&clkc_audio AUD_RESET_TDMIN_B>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMIN_B>,
+                                <&clkc_audio AUD_CLKID_TDMIN_B_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_B_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               tdmin_c: audio-controller@380 {
+                       compatible = "amlogic,g12a-tdmin",
+                                    "amlogic,axg-tdmin";
+                       reg = <0x0 0x380 0x0 0x40>;
+                       sound-name-prefix = "TDMIN_C";
+                       resets = <&clkc_audio AUD_RESET_TDMIN_C>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMIN_C>,
+                                <&clkc_audio AUD_CLKID_TDMIN_C_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_C_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               tdmin_lb: audio-controller@3c0 {
+                       compatible = "amlogic,g12a-tdmin",
+                                    "amlogic,axg-tdmin";
+                       reg = <0x0 0x3c0 0x0 0x40>;
+                       sound-name-prefix = "TDMIN_LB";
+                       resets = <&clkc_audio AUD_RESET_TDMIN_LB>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMIN_LB>,
+                                <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               spdifin: audio-controller@400 {
+                       compatible = "amlogic,g12a-spdifin",
+                                    "amlogic,axg-spdifin";
+                       reg = <0x0 0x400 0x0 0x30>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "SPDIFIN";
+                       interrupts = <GIC_SPI 151 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_SPDIFIN>,
+                                <&clkc_audio AUD_CLKID_SPDIFIN_CLK>;
+                       clock-names = "pclk", "refclk";
+                       resets = <&clkc_audio AUD_RESET_SPDIFIN>;
+                       status = "disabled";
+               };
+
+               spdifout: audio-controller@480 {
+                       compatible = "amlogic,g12a-spdifout",
+                                    "amlogic,axg-spdifout";
+                       reg = <0x0 0x480 0x0 0x50>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "SPDIFOUT";
+                       clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>,
+                                <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>;
+                       clock-names = "pclk", "mclk";
+                       resets = <&clkc_audio AUD_RESET_SPDIFOUT>;
+                       status = "disabled";
+               };
+
+               tdmout_a: audio-controller@500 {
+                       compatible = "amlogic,g12a-tdmout";
+                       reg = <0x0 0x500 0x0 0x40>;
+                       sound-name-prefix = "TDMOUT_A";
+                       resets = <&clkc_audio AUD_RESET_TDMOUT_A>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               tdmout_b: audio-controller@540 {
+                       compatible = "amlogic,g12a-tdmout";
+                       reg = <0x0 0x540 0x0 0x40>;
+                       sound-name-prefix = "TDMOUT_B";
+                       resets = <&clkc_audio AUD_RESET_TDMOUT_B>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMOUT_B>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               tdmout_c: audio-controller@580 {
+                       compatible = "amlogic,g12a-tdmout";
+                       reg = <0x0 0x580 0x0 0x40>;
+                       sound-name-prefix = "TDMOUT_C";
+                       resets = <&clkc_audio AUD_RESET_TDMOUT_C>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMOUT_C>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               spdifout_b: audio-controller@680 {
+                       compatible = "amlogic,g12a-spdifout",
+                                    "amlogic,axg-spdifout";
+                       reg = <0x0 0x680 0x0 0x50>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "SPDIFOUT_B";
+                       clocks = <&clkc_audio AUD_CLKID_SPDIFOUT_B>,
+                                <&clkc_audio AUD_CLKID_SPDIFOUT_B_CLK>;
+                       clock-names = "pclk", "mclk";
+                       resets = <&clkc_audio AUD_RESET_SPDIFOUT_B>;
+                       status = "disabled";
+               };
+
+               tohdmitx: audio-controller@744 {
+                       compatible = "amlogic,g12a-tohdmitx";
+                       reg = <0x0 0x744 0x0 0x4>;
+                       #sound-dai-cells = <1>;
+                       sound-name-prefix = "TOHDMITX";
+                       resets = <&clkc_audio AUD_RESET_TOHDMITX>;
+                       status = "disabled";
+               };
+       };
+};
+
+&cpu_thermal {
+       cooling-maps {
+               map0 {
+                       trip = <&cpu_passive>;
+                       cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                        <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                        <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                        <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                        <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                        <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+               };
+               map1 {
+                       trip = <&cpu_hot>;
+                       cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                        <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                        <&cpu100 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                        <&cpu101 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                        <&cpu102 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                        <&cpu103 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+               };
+       };
+};
+
+&ethmac {
+       power-domains = <&pwrc PWRC_G12A_ETH_ID>;
+};
+
+&vpu {
+       power-domains = <&pwrc PWRC_G12A_VPU_ID>;
+};
+
+&sd_emmc_a {
+       amlogic,dram-access-quirk;
+};
+
+&simplefb_cvbs {
+       power-domains = <&pwrc PWRC_G12A_VPU_ID>;
+};
+
+&simplefb_hdmi {
+       power-domains = <&pwrc PWRC_G12A_VPU_ID>;
+};
+
index c7a87368850b03ffbacb0a8f122fd4da6b800e20..2ac9e3a43b966a43e296b4504d2078f3807627ab 100644 (file)
                enable-active-high;
        };
 
+       vddcpu: regulator-vddcpu {
+               /*
+                * SY8120B1ABC DC/DC Regulator.
+                */
+               compatible = "pwm-regulator";
+
+               regulator-name = "VDDCPU";
+               regulator-min-microvolt = <721000>;
+               regulator-max-microvolt = <1022000>;
+
+               vin-supply = <&dc_in>;
+
+               pwms = <&pwm_AO_cd 1 1250 0>;
+               pwm-dutycycle-range = <100 0>;
+
+               regulator-boot-on;
+               regulator-always-on;
+       };
+
        vddio_ao1v8: regulator-vddio_ao1v8 {
                compatible = "regulator-fixed";
                regulator-name = "VDDIO_AO1V8";
        status = "okay";
 };
 
+&cpu0 {
+       cpu-supply = <&vddcpu>;
+       operating-points-v2 = <&cpu_opp_table>;
+       clocks = <&clkc CLKID_CPU_CLK>;
+       clock-latency = <50000>;
+};
+
+&cpu1 {
+       cpu-supply = <&vddcpu>;
+       operating-points-v2 = <&cpu_opp_table>;
+       clocks = <&clkc CLKID_CPU_CLK>;
+       clock-latency = <50000>;
+};
+
+&cpu2 {
+       cpu-supply = <&vddcpu>;
+       operating-points-v2 = <&cpu_opp_table>;
+       clocks = <&clkc CLKID_CPU_CLK>;
+       clock-latency = <50000>;
+};
+
+&cpu3 {
+       cpu-supply = <&vddcpu>;
+       operating-points-v2 = <&cpu_opp_table>;
+       clocks = <&clkc CLKID_CPU_CLK>;
+       clock-latency = <50000>;
+};
+
 &cvbs_vdac_port {
        cvbs_vdac_out: endpoint {
                remote-endpoint = <&cvbs_connector_in>;
        pinctrl-names = "default";
 };
 
+&ir {
+       status = "okay";
+       pinctrl-0 = <&remote_input_ao_pins>;
+       pinctrl-names = "default";
+};
+
+&pwm_AO_cd {
+       pinctrl-0 = <&pwm_ao_d_e_pins>;
+       pinctrl-names = "default";
+       clocks = <&xtal>;
+       clock-names = "clkin1";
+       status = "okay";
+};
+
 &pwm_ef {
        status = "okay";
        pinctrl-0 = <&pwm_e_pins>;
        non-removable;
        disable-wp;
 
+       /* WiFi firmware requires power to be kept while in suspend */
+       keep-power-in-suspend;
+
        mmc-pwrseq = <&sdio_pwrseq>;
 
        vmmc-supply = <&vddao_3v3>;
index 8551fbd4a488cfd358c160104177e3a9e613108d..2a324f0136e3fc404dc243d4985e889634b79352 100644 (file)
                regulator-always-on;
        };
 
+       vddcpu: regulator-vddcpu {
+               /*
+                * MP8756GD Regulator.
+                */
+               compatible = "pwm-regulator";
+
+               regulator-name = "VDDCPU";
+               regulator-min-microvolt = <721000>;
+               regulator-max-microvolt = <1022000>;
+
+               vin-supply = <&main_12v>;
+
+               pwms = <&pwm_AO_cd 1 1250 0>;
+               pwm-dutycycle-range = <100 0>;
+
+               regulator-boot-on;
+               regulator-always-on;
+       };
 };
 
 &cec_AO {
        hdmi-phandle = <&hdmi_tx>;
 };
 
+&cpu0 {
+       cpu-supply = <&vddcpu>;
+       operating-points-v2 = <&cpu_opp_table>;
+       clocks = <&clkc CLKID_CPU_CLK>;
+       clock-latency = <50000>;
+};
+
+&cpu1 {
+       cpu-supply = <&vddcpu>;
+       operating-points-v2 = <&cpu_opp_table>;
+       clocks = <&clkc CLKID_CPU_CLK>;
+       clock-latency = <50000>;
+};
+
+&cpu2 {
+       cpu-supply = <&vddcpu>;
+       operating-points-v2 = <&cpu_opp_table>;
+       clocks = <&clkc CLKID_CPU_CLK>;
+       clock-latency = <50000>;
+};
+
+&cpu3 {
+       cpu-supply = <&vddcpu>;
+       operating-points-v2 = <&cpu_opp_table>;
+       clocks = <&clkc CLKID_CPU_CLK>;
+       clock-latency = <50000>;
+};
+
 &cvbs_vdac_port {
        cvbs_vdac_out: endpoint {
                remote-endpoint = <&cvbs_connector_in>;
        pinctrl-names = "default";
 };
 
+&pwm_AO_cd {
+       pinctrl-0 = <&pwm_ao_d_e_pins>;
+       pinctrl-names = "default";
+       clocks = <&xtal>;
+       clock-names = "clkin1";
+       status = "okay";
+};
+
 /* SD card */
 &sd_emmc_b {
        status = "okay";
index eb5d177d7a999311e21ff1cc8ceb8350908c8611..fb0ab27d1f642dbe5e7100f737ea64b7a69d5eb1 100644 (file)
@@ -3,8 +3,7 @@
  * Copyright (c) 2018 Amlogic, Inc. All rights reserved.
  */
 
-#include "meson-g12-common.dtsi"
-#include <dt-bindings/power/meson-g12a-power.h>
+#include "meson-g12.dtsi"
 
 / {
        compatible = "amlogic,g12a";
@@ -19,6 +18,7 @@
                        reg = <0x0 0x0>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       #cooling-cells = <2>;
                };
 
                cpu1: cpu@1 {
@@ -27,6 +27,7 @@
                        reg = <0x0 0x1>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       #cooling-cells = <2>;
                };
 
                cpu2: cpu@2 {
@@ -35,6 +36,7 @@
                        reg = <0x0 0x2>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       #cooling-cells = <2>;
                };
 
                cpu3: cpu@3 {
@@ -43,6 +45,7 @@
                        reg = <0x0 0x3>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
+                       #cooling-cells = <2>;
                };
 
                l2: l2-cache0 {
        };
 };
 
-&ethmac {
-       power-domains = <&pwrc PWRC_G12A_ETH_ID>;
-};
-
-&vpu {
-       power-domains = <&pwrc PWRC_G12A_VPU_ID>;
-};
+&cpu_thermal {
+       cooling-maps {
+               map0 {
+                       trip = <&cpu_passive>;
+                       cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                       <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                       <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                       <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+               };
 
-&sd_emmc_a {
-       amlogic,dram-access-quirk;
+               map1 {
+                       trip = <&cpu_hot>;
+                       cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                       <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                       <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                       <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+               };
+       };
 };
index 3a6a1e0c1e32c5cd4101e25bc979ac6ff091cdbc..124a809010840f31ff5b72dd92d9ceb82a105610 100644 (file)
 / {
        compatible = "khadas,vim3", "amlogic,a311d", "amlogic,g12b";
 };
+
+/*
+ * The VIM3 on-board  MCU can mux the PCIe/USB3.0 shared differential
+ * lines using a FUSB340TMX USB 3.1 SuperSpeed Data Switch between
+ * an USB3.0 Type A connector and a M.2 Key M slot.
+ * The PHY driving these differential lines is shared between
+ * the USB3.0 controller and the PCIe Controller, thus only
+ * a single controller can use it.
+ * If the MCU is configured to mux the PCIe/USB3.0 differential lines
+ * to the M.2 Key M slot, uncomment the following block to disable
+ * USB3.0 from the USB Complex and enable the PCIe controller.
+ * The End User is not expected to uncomment the following except for
+ * testing purposes, but instead rely on the firmware/bootloader to
+ * update these nodes accordingly if PCIe mode is selected by the MCU.
+ */
+/*
+&pcie {
+       status = "okay";
+};
+
+&usb {
+       phys = <&usb2_phy0>, <&usb2_phy1>;
+       phy-names = "usb2-phy0", "usb2-phy1";
+};
+ */
index 42f15405750cd9f7ed1f01373580c86db0ee3b73..0e54c1dc2842b2a85486d348d5d84dc5948e1828 100644 (file)
@@ -12,7 +12,7 @@
 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
 
 / {
-       compatible = "hardkernel,odroid-n2", "amlogic,g12b";
+       compatible = "hardkernel,odroid-n2", "amlogic,s922x", "amlogic,g12b";
        model = "Hardkernel ODROID-N2";
 
        aliases {
index 5628ccd54531ac28e11d5eb3683344c6cef25991..6dbc3968045b812c1337d32ef8a4f8f554e4328e 100644 (file)
@@ -4,8 +4,7 @@
  * Author: Neil Armstrong <narmstrong@baylibre.com>
  */
 
-#include "meson-g12-common.dtsi"
-#include <dt-bindings/power/meson-g12a-power.h>
+#include "meson-g12.dtsi"
 
 / {
        compatible = "amlogic,g12b";
@@ -49,7 +48,9 @@
                        compatible = "arm,cortex-a53";
                        reg = <0x0 0x0>;
                        enable-method = "psci";
+                       capacity-dmips-mhz = <592>;
                        next-level-cache = <&l2>;
+                       #cooling-cells = <2>;
                };
 
                cpu1: cpu@1 {
@@ -57,7 +58,9 @@
                        compatible = "arm,cortex-a53";
                        reg = <0x0 0x1>;
                        enable-method = "psci";
+                       capacity-dmips-mhz = <592>;
                        next-level-cache = <&l2>;
+                       #cooling-cells = <2>;
                };
 
                cpu100: cpu@100 {
@@ -65,7 +68,9 @@
                        compatible = "arm,cortex-a73";
                        reg = <0x0 0x100>;
                        enable-method = "psci";
+                       capacity-dmips-mhz = <1024>;
                        next-level-cache = <&l2>;
+                       #cooling-cells = <2>;
                };
 
                cpu101: cpu@101 {
@@ -73,7 +78,9 @@
                        compatible = "arm,cortex-a73";
                        reg = <0x0 0x101>;
                        enable-method = "psci";
+                       capacity-dmips-mhz = <1024>;
                        next-level-cache = <&l2>;
+                       #cooling-cells = <2>;
                };
 
                cpu102: cpu@102 {
@@ -81,7 +88,9 @@
                        compatible = "arm,cortex-a73";
                        reg = <0x0 0x102>;
                        enable-method = "psci";
+                       capacity-dmips-mhz = <1024>;
                        next-level-cache = <&l2>;
+                       #cooling-cells = <2>;
                };
 
                cpu103: cpu@103 {
@@ -89,7 +98,9 @@
                        compatible = "arm,cortex-a73";
                        reg = <0x0 0x103>;
                        enable-method = "psci";
+                       capacity-dmips-mhz = <1024>;
                        next-level-cache = <&l2>;
+                       #cooling-cells = <2>;
                };
 
                l2: l2-cache0 {
        compatible = "amlogic,g12b-clkc";
 };
 
-&ethmac {
-       power-domains = <&pwrc PWRC_G12A_ETH_ID>;
-};
-
-&vpu {
-       power-domains = <&pwrc PWRC_G12A_VPU_ID>;
-};
-
-&sd_emmc_a {
-       amlogic,dram-access-quirk;
-};
index f1e5cdbade5edf281ecc9ea183c5e5b763c0f726..40db06e28b662f85e1d20c12fd1fe52f7ad85680 100644 (file)
                };
        };
 
+       chosen {
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges;
+
+               simplefb_cvbs: framebuffer-cvbs {
+                       compatible = "amlogic,simple-framebuffer",
+                                    "simple-framebuffer";
+                       amlogic,pipeline = "vpu-cvbs";
+                       power-domains = <&pwrc_vpu>;
+                       status = "disabled";
+               };
+
+               simplefb_hdmi: framebuffer-hdmi {
+                       compatible = "amlogic,simple-framebuffer",
+                                    "simple-framebuffer";
+                       amlogic,pipeline = "vpu-hdmi";
+                       power-domains = <&pwrc_vpu>;
+                       status = "disabled";
+               };
+       };
+
        cpus {
                #address-cells = <0x2>;
                #size-cells = <0x0>;
 
                cpu0: cpu@0 {
                        device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
+                       compatible = "arm,cortex-a53";
                        reg = <0x0 0x0>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
@@ -65,7 +87,7 @@
 
                cpu1: cpu@1 {
                        device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
+                       compatible = "arm,cortex-a53";
                        reg = <0x0 0x1>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
@@ -74,7 +96,7 @@
 
                cpu2: cpu@2 {
                        device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
+                       compatible = "arm,cortex-a53";
                        reg = <0x0 0x2>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
 
                cpu3: cpu@3 {
                        device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
+                       compatible = "arm,cortex-a53";
                        reg = <0x0 0x3>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
                #address-cells = <1>;
                #size-cells = <1>;
                read-only;
+               secure-monitor = <&sm>;
 
                sn: sn@14 {
                        reg = <0x14 0x10>;
                        };
 
                        reset: reset-controller@4404 {
-                               compatible = "amlogic,meson-gx-reset", "amlogic,meson-gxbb-reset";
+                               compatible = "amlogic,meson-gxbb-reset";
                                reg = <0x0 0x04404 0x0 0x9c>;
                                #reset-cells = <1>;
                        };
                        };
 
                        i2c_A: i2c@8500 {
-                               compatible = "amlogic,meson-gx-i2c", "amlogic,meson-gxbb-i2c";
+                               compatible = "amlogic,meson-gxbb-i2c";
                                reg = <0x0 0x08500 0x0 0x20>;
                                interrupts = <GIC_SPI 21 IRQ_TYPE_EDGE_RISING>;
                                #address-cells = <1>;
                                status = "disabled";
                        };
 
+                       clock-measure@8758 {
+                               compatible = "amlogic,meson-gx-clk-measure";
+                               reg = <0x0 0x8758 0x0 0x10>;
+                       };
+
                        i2c_B: i2c@87c0 {
-                               compatible = "amlogic,meson-gx-i2c", "amlogic,meson-gxbb-i2c";
+                               compatible = "amlogic,meson-gxbb-i2c";
                                reg = <0x0 0x087c0 0x0 0x20>;
                                interrupts = <GIC_SPI 214 IRQ_TYPE_EDGE_RISING>;
                                #address-cells = <1>;
                        };
 
                        i2c_C: i2c@87e0 {
-                               compatible = "amlogic,meson-gx-i2c", "amlogic,meson-gxbb-i2c";
+                               compatible = "amlogic,meson-gxbb-i2c";
                                reg = <0x0 0x087e0 0x0 0x20>;
                                interrupts = <GIC_SPI 215 IRQ_TYPE_EDGE_RISING>;
                                #address-cells = <1>;
                        };
 
                        spifc: spi@8c80 {
-                               compatible = "amlogic,meson-gx-spifc", "amlogic,meson-gxbb-spifc";
+                               compatible = "amlogic,meson-gxbb-spifc";
                                reg = <0x0 0x08c80 0x0 0x80>;
                                #address-cells = <1>;
                                #size-cells = <0>;
                        };
 
                        watchdog@98d0 {
-                               compatible = "amlogic,meson-gx-wdt", "amlogic,meson-gxbb-wdt";
+                               compatible = "amlogic,meson-gxbb-wdt";
                                reg = <0x0 0x098d0 0x0 0x10>;
                                clocks = <&xtal>;
                        };
                                compatible = "amlogic,meson-gx-ao-cec";
                                reg = <0x0 0x00100 0x0 0x14>;
                                interrupts = <GIC_SPI 199 IRQ_TYPE_EDGE_RISING>;
+                               status = "disabled";
                        };
 
                        sec_AO: ao-secure@140 {
                        };
 
                        i2c_AO: i2c@500 {
-                               compatible = "amlogic,meson-gx-i2c", "amlogic,meson-gxbb-i2c";
+                               compatible = "amlogic,meson-gxbb-i2c";
                                reg = <0x0 0x500 0x0 0x20>;
                                interrupts = <GIC_SPI 195 IRQ_TYPE_EDGE_RISING>;
                                #address-cells = <1>;
                        };
                };
 
-               periphs: periphs@c8834000 {
+               vdec: video-codec@c8820000 {
+                       compatible = "amlogic,gx-vdec";
+                       reg = <0x0 0xc8820000 0x0 0x10000>,
+                             <0x0 0xc110a580 0x0 0xe4>;
+                       reg-names = "dos", "esparser";
+
+                       interrupts = <GIC_SPI 44 IRQ_TYPE_EDGE_RISING>,
+                                    <GIC_SPI 32 IRQ_TYPE_EDGE_RISING>;
+                       interrupt-names = "vdec", "esparser";
+
+                       amlogic,ao-sysctrl = <&sysctrl_AO>;
+                       amlogic,canvas = <&canvas>;
+               };
+
+               periphs: bus@c8834000 {
                        compatible = "simple-bus";
                        reg = <0x0 0xc8834000 0x0 0x2000>;
                        #address-cells = <2>;
                        };
 
                        mailbox: mailbox@404 {
-                               compatible = "amlogic,meson-gx-mhu", "amlogic,meson-gxbb-mhu";
+                               compatible = "amlogic,meson-gxbb-mhu";
                                reg = <0 0x404 0 0x4c>;
                                interrupts = <GIC_SPI 208 IRQ_TYPE_EDGE_RISING>,
                                             <GIC_SPI 209 IRQ_TYPE_EDGE_RISING>,
                };
 
                ethmac: ethernet@c9410000 {
-                       compatible = "amlogic,meson-gx-dwmac", "amlogic,meson-gxbb-dwmac", "snps,dwmac";
-                       reg = <0x0 0xc9410000 0x0 0x10000
-                              0x0 0xc8834540 0x0 0x4>;
-                       interrupts = <GIC_SPI 8 IRQ_TYPE_EDGE_RISING>;
+                       compatible = "amlogic,meson-gxbb-dwmac",
+                                    "snps,dwmac-3.70a",
+                                    "snps,dwmac";
+                       reg = <0x0 0xc9410000 0x0 0x10000>,
+                             <0x0 0xc8834540 0x0 0x4>;
+                       interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
                        interrupt-names = "macirq";
+                       rx-fifo-depth = <4096>;
+                       tx-fifo-depth = <2048>;
                        status = "disabled";
                };
 
                vpu: vpu@d0100000 {
                        compatible = "amlogic,meson-gx-vpu";
                        reg = <0x0 0xd0100000 0x0 0x100000>,
-                             <0x0 0xc883c000 0x0 0x1000>,
-                             <0x0 0xc8838000 0x0 0x1000>;
-                       reg-names = "vpu", "hhi", "dmc";
+                             <0x0 0xc883c000 0x0 0x1000>;
+                       reg-names = "vpu", "hhi";
                        interrupts = <GIC_SPI 3 IRQ_TYPE_EDGE_RISING>;
                        #address-cells = <1>;
                        #size-cells = <0>;
+                       amlogic,canvas = <&canvas>;
 
                        /* CVBS VDAC output port */
                        cvbs_vdac_port: port@0 {
index cbe99bd4e06d2c43934a23848bbe788ee69e0390..d6ca684e0e616bc1d2a63df5fe5505f9fab46c2c 100644 (file)
@@ -10,6 +10,7 @@
 
 / {
        compatible = "friendlyarm,nanopi-k2", "amlogic,meson-gxbb";
+       model = "FriendlyARM NanoPi K2";
 
        aliases {
                serial0 = &uart_AO;
 
        amlogic,tx-delay-ns = <2>;
 
-       snps,reset-gpio = <&gpio GPIOZ_14 0>;
-       snps,reset-delays-us = <0 10000 1000000>;
-       snps,reset-active-low;
-
        mdio {
                compatible = "snps,dwmac-mdio";
                #address-cells = <1>;
                eth_phy0: ethernet-phy@0 {
                        /* Realtek RTL8211F (0x001cc916) */
                        reg = <0>;
+
+                       reset-assert-us = <10000>;
+                       reset-deassert-us = <30000>;
+                       reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
+
                        interrupt-parent = <&gpio_intc>;
                        /* MAC_INTR on GPIOZ_15 */
                        interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
        pinctrl-names = "default";
 };
 
-&pinctrl_aobus {
+&gpio_ao {
        gpio-line-names = "UART TX", "UART RX", "Power Control", "Power Key In",
                          "VCCK En", "CON1 Header Pin31",
                          "I2S Header Pin6", "IR In", "I2S Header Pin7",
                          "";
 };
 
-&pinctrl_periphs {
+&gpio {
        gpio-line-names = /* Bank GPIOZ */
                          "Eth MDIO", "Eth MDC", "Eth RGMII RX Clk",
                          "Eth RX DV", "Eth RX D0", "Eth RX D1", "Eth RX D2",
 
        bus-width = <4>;
        cap-sd-highspeed;
-       max-frequency = <200000000>;
+       max-frequency = <50000000>;
 
        non-removable;
        disable-wp;
 
+       /* WiFi firmware requires power to be kept while in suspend */
+       keep-power-in-suspend;
+
        mmc-pwrseq = <&sdio_pwrseq>;
 
        vmmc-supply = <&vddio_ao3v3>;
        sd-uhs-sdr12;
        sd-uhs-sdr25;
        sd-uhs-sdr50;
-       sd-uhs-sdr104;
-       max-frequency = <200000000>;
+       sd-uhs-ddr50;
+       max-frequency = <100000000>;
        disable-wp;
 
-       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
 
        vmmc-supply = <&vddio_ao3v3>;
        vqmmc-supply = <&vddio_tf>;
index 54954b314a452b7929aa0ce30a031927c2832b92..6ded279c40c86f42e5d42d26c536d424849ce1a3 100644 (file)
                regulator-min-microvolt = <5000000>;
                regulator-max-microvolt = <5000000>;
 
+               /*
+                * signal name from schematics: PWREN
+                */
                gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
                enable-active-high;
+               /*
+                * signal name from schematics: USB_POWER
+                */
+               vin-supply = <&p5v0>;
        };
 
        leds {
                };
        };
 
+       p5v0: regulator-p5v0 {
+               compatible = "regulator-fixed";
+
+               regulator-name = "P5V0";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               regulator-always-on;
+       };
+
+       hdmi_p5v0: regulator-hdmi_p5v0 {
+               compatible = "regulator-fixed";
+               regulator-name = "HDMI_P5V0";
+               regulator-min-microvolt = <5000000>;
+               regulator-max-microvolt = <5000000>;
+               /* AP2331SA-7 */
+               vin-supply = <&p5v0>;
+       };
+
        tflash_vdd: regulator-tflash_vdd {
-               /*
-                * signal name from schematics: TFLASH_VDD_EN
-                */
                compatible = "regulator-fixed";
 
                regulator-name = "TFLASH_VDD";
                regulator-min-microvolt = <3300000>;
                regulator-max-microvolt = <3300000>;
 
+               /*
+                * signal name from schematics: TFLASH_VDD_EN
+                */
                gpio = <&gpio GPIOY_12 GPIO_ACTIVE_HIGH>;
                enable-active-high;
+               /* U16 RT9179GB */
+               vin-supply = <&vddio_ao3v3>;
        };
 
        tf_io: gpio-regulator-tf_io {
                gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_HIGH>;
                gpios-states = <0>;
 
-               states = <3300000 0
-                         1800000 1>;
+               states = <3300000 0>,
+                        <1800000 1>;
+               /* U12/U13 RT9179GB */
+               vin-supply = <&vddio_ao3v3>;
        };
 
        vcc1v8: regulator-vcc1v8 {
                regulator-name = "VCC1V8";
                regulator-min-microvolt = <1800000>;
                regulator-max-microvolt = <1800000>;
+               regulator-always-on;
+               /* U18 RT9179GB */
+               vin-supply = <&vddio_ao3v3>;
        };
 
        vcc3v3: regulator-vcc3v3 {
                regulator-max-microvolt = <3300000>;
        };
 
+       vddio_ao1v8: regulator-vddio-ao1v8 {
+               compatible = "regulator-fixed";
+               regulator-name = "VDDIO_AO1V8";
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               regulator-always-on;
+               /* U17 RT9179GB */
+               vin-supply = <&p5v0>;
+       };
+
+       vddio_ao3v3: regulator-vddio-ao3v3 {
+               compatible = "regulator-fixed";
+               regulator-name = "VDDIO_AO3V3";
+               regulator-min-microvolt = <3300000>;
+               regulator-max-microvolt = <3300000>;
+               regulator-always-on;
+               /* U11 MP2161GJ-C499 */
+               vin-supply = <&p5v0>;
+       };
+
+       ddr3_1v5: regulator-ddr3_1v5 {
+               compatible = "regulator-fixed";
+               regulator-name = "DDR3_1V5";
+               regulator-min-microvolt = <1500000>;
+               regulator-max-microvolt = <1500000>;
+               regulator-always-on;
+               /* U15 MP2161GJ-C499 */
+               vin-supply = <&p5v0>;
+       };
+
        emmc_pwrseq: emmc-pwrseq {
                compatible = "mmc-pwrseq-emmc";
                reset-gpios = <&gpio BOOT_9 GPIO_ACTIVE_LOW>;
        phy-handle = <&eth_phy0>;
        phy-mode = "rgmii";
 
-       snps,reset-gpio = <&gpio GPIOZ_14 0>;
-       snps,reset-delays-us = <0 10000 1000000>;
-       snps,reset-active-low;
-
        amlogic,tx-delay-ns = <2>;
 
        mdio {
                eth_phy0: ethernet-phy@0 {
                        /* Realtek RTL8211F (0x001cc916) */
                        reg = <0>;
+
+                       reset-assert-us = <10000>;
+                       reset-deassert-us = <30000>;
+                       reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
+
                        interrupt-parent = <&gpio_intc>;
                        /* MAC_INTR on GPIOZ_15 */
                        interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
-                       eee-broken-1000t;
                };
        };
 };
        status = "okay";
        pinctrl-0 = <&hdmi_hpd_pins>, <&hdmi_i2c_pins>;
        pinctrl-names = "default";
+       hdmi-supply = <&hdmi_p5v0>;
 };
 
 &hdmi_tx_tmds_port {
        pinctrl-names = "default";
 };
 
-&pinctrl_aobus {
+&gpio_ao {
        gpio-line-names = "UART TX", "UART RX", "VCCK En", "TF 3V3/1V8 En",
                          "USB HUB nRESET", "USB OTG Power En",
                          "J7 Header Pin2", "IR In", "J7 Header Pin4",
                          "";
 };
 
-&pinctrl_periphs {
+&gpio {
        gpio-line-names = /* Bank GPIOZ */
                          "Eth MDIO", "Eth MDC", "Eth RGMII RX Clk",
                          "Eth RX DV", "Eth RX D0", "Eth RX D1", "Eth RX D2",
 
        bus-width = <4>;
        cap-sd-highspeed;
+       sd-uhs-sdr12;
+       sd-uhs-sdr25;
+       sd-uhs-sdr50;
+       sd-uhs-ddr50;
        max-frequency = <100000000>;
        disable-wp;
 
-       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
 
        vmmc-supply = <&tflash_vdd>;
        vqmmc-supply = <&tf_io>;
        pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       max-frequency = <100000000>;
+       max-frequency = <200000000>;
        non-removable;
        disable-wp;
        cap-mmc-highspeed;
 };
 
 &usb0_phy {
-       status = "okay";
+       status = "disabled";
        phy-supply = <&usb_otg_pwr>;
 };
 
 };
 
 &usb0 {
-       status = "okay";
+       status = "disabled";
 };
 
 &usb1 {
index 9d2406a7c4fadc21cd438cb75a5c3f30db224a8e..3c93d1898b4099bad289fa94bb8adb5284101e4a 100644 (file)
 
        amlogic,tx-delay-ns = <2>;
 
-       snps,reset-gpio = <&gpio GPIOZ_14 0>;
-       snps,reset-delays-us = <0 10000 1000000>;
-       snps,reset-active-low;
-
        mdio {
                compatible = "snps,dwmac-mdio";
                #address-cells = <1>;
                eth_phy0: ethernet-phy@3 {
                        /* Micrel KSZ9031 (0x00221620) */
                        reg = <3>;
+
+                       reset-assert-us = <10000>;
+                       reset-deassert-us = <30000>;
+                       reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
+
                        interrupt-parent = <&gpio_intc>;
                        /* MAC_INTR on GPIOZ_15 */
                        interrupts = <29 IRQ_TYPE_LEVEL_LOW>;
index 56e0dd1ff55c684f93937fec5a78cea46f98cc59..150a82f3b2d77cdab89f376e440e4470d80588a9 100644 (file)
@@ -21,6 +21,6 @@
        phy-mode = "rmii";
 
        snps,reset-gpio = <&gpio GPIOZ_14 0>;
-       snps,reset-delays-us = <0 10000 1000000>;
+       snps,reset-delays-us = <0>, <10000>, <1000000>;
        snps,reset-active-low;
 };
index 0be0f2a5d2fe918e2f1a43b798f2ee4899719bb9..e803a466fe4ebb15c160c480790749c46c419cbf 100644 (file)
@@ -46,8 +46,8 @@
                gpios-states = <1>;
 
                /* Based on P200 schematics, signal CARD_1.8V/3.3V_CTR */
-               states = <1800000 0
-                         3300000 1>;
+               states = <1800000 0>,
+                        <3300000 1>;
 
                regulator-settling-time-up-us = <10000>;
                regulator-settling-time-down-us = <150000>;
 
        bus-width = <4>;
        cap-sd-highspeed;
-       max-frequency = <100000000>;
+       max-frequency = <50000000>;
 
        non-removable;
        disable-wp;
 
+       /* WiFi firmware requires power to be kept while in suspend */
+       keep-power-in-suspend;
+
        mmc-pwrseq = <&sdio_pwrseq>;
 
        vmmc-supply = <&vddao_3v3>;
index 1ade7e486828c2db082a121e856456e5562d3445..0cb40326b0d3fc9251c5ba0c14914dacf277fbf5 100644 (file)
@@ -81,6 +81,7 @@
                        mux {
                                groups = "uart_tx_ao_a", "uart_rx_ao_a";
                                function = "uart_ao";
+                               bias-disable;
                        };
                };
 
@@ -89,6 +90,7 @@
                                groups = "uart_cts_ao_a",
                                       "uart_rts_ao_a";
                                function = "uart_ao";
+                               bias-disable;
                        };
                };
 
@@ -96,6 +98,7 @@
                        mux {
                                groups = "uart_tx_ao_b", "uart_rx_ao_b";
                                function = "uart_ao_b";
+                               bias-disable;
                        };
                };
 
                                groups = "uart_cts_ao_b",
                                       "uart_rts_ao_b";
                                function = "uart_ao_b";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "remote_input_ao";
                                function = "remote_input_ao";
+                               bias-disable;
                        };
                };
 
                                groups = "i2c_sck_ao",
                                       "i2c_sda_ao";
                                function = "i2c_ao";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "pwm_ao_a_3";
                                function = "pwm_ao_a_3";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "pwm_ao_a_6";
                                function = "pwm_ao_a_6";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "pwm_ao_a_12";
                                function = "pwm_ao_a_12";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "pwm_ao_b";
                                function = "pwm_ao_b";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "i2s_am_clk";
                                function = "i2s_out_ao";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "i2s_out_ao_clk";
                                function = "i2s_out_ao";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "i2s_out_lr_clk";
                                function = "i2s_out_ao";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "i2s_out_ch01_ao";
                                function = "i2s_out_ao";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "i2s_out_ch23_ao";
                                function = "i2s_out_ao";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "i2s_out_ch45_ao";
                                function = "i2s_out_ao";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "spdif_out_ao_13";
                                function = "spdif_out_ao";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "ao_cec";
                                function = "cec_ao";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "ee_cec";
                                function = "cec_ao";
+                               bias-disable;
                        };
                };
        };
 
 &clkc_AO {
        compatible = "amlogic,meson-gxbb-aoclkc", "amlogic,meson-gx-aoclkc";
+       clocks = <&xtal>, <&clkc CLKID_CLK81>;
+       clock-names = "xtal", "mpeg-clk";
+};
+
+&efuse {
+       clocks = <&clkc CLKID_EFUSE>;
 };
 
 &ethmac {
        clkc: clock-controller {
                compatible = "amlogic,gxbb-clkc";
                #clock-cells = <1>;
+               clocks = <&xtal>;
+               clock-names = "xtal";
        };
 };
 
                };
 
                emmc_pins: emmc {
-                       mux {
+                       mux-0 {
                                groups = "emmc_nand_d07",
-                                      "emmc_cmd",
-                                      "emmc_clk";
+                                      "emmc_cmd";
                                function = "emmc";
+                               bias-pull-up;
+                       };
+
+                       mux-1 {
+                               groups = "emmc_clk";
+                               function = "emmc";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "emmc_ds";
                                function = "emmc";
+                               bias-pull-down;
                        };
                };
 
                        mux {
                                groups = "BOOT_8";
                                function = "gpio_periphs";
-                       };
-                       cfg-pull-down {
-                               pins = "BOOT_8";
                                bias-pull-down;
                        };
                };
                                       "nor_c",
                                       "nor_cs";
                                function = "nor";
+                               bias-disable;
                        };
                };
 
                                        "spi_mosi",
                                        "spi_sclk";
                                function = "spi";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "spi_ss0";
                                function = "spi";
+                               bias-disable;
                        };
                };
 
                sdcard_pins: sdcard {
-                       mux {
+                       mux-0 {
                                groups = "sdcard_d0",
                                       "sdcard_d1",
                                       "sdcard_d2",
                                       "sdcard_d3",
-                                      "sdcard_cmd",
-                                      "sdcard_clk";
+                                      "sdcard_cmd";
+                               function = "sdcard";
+                               bias-pull-up;
+                       };
+
+                       mux-1 {
+                               groups = "sdcard_clk";
                                function = "sdcard";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "CARD_2";
                                function = "gpio_periphs";
-                       };
-                       cfg-pull-down {
-                               pins = "CARD_2";
                                bias-pull-down;
                        };
                };
 
                sdio_pins: sdio {
-                       mux {
+                       mux-0 {
                                groups = "sdio_d0",
                                       "sdio_d1",
                                       "sdio_d2",
                                       "sdio_d3",
-                                      "sdio_cmd",
-                                      "sdio_clk";
+                                      "sdio_cmd";
+                               function = "sdio";
+                               bias-pull-up;
+                       };
+
+                       mux-1 {
+                               groups = "sdio_clk";
                                function = "sdio";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "GPIOX_4";
                                function = "gpio_periphs";
-                       };
-                       cfg-pull-down {
-                               pins = "GPIOX_4";
                                bias-pull-down;
                        };
                };
                        mux {
                                groups = "sdio_irq";
                                function = "sdio";
+                               bias-disable;
                        };
                };
 
                                groups = "uart_tx_a",
                                       "uart_rx_a";
                                function = "uart_a";
+                               bias-disable;
                        };
                };
 
                                groups = "uart_cts_a",
                                       "uart_rts_a";
                                function = "uart_a";
+                               bias-disable;
                        };
                };
 
                                groups = "uart_tx_b",
                                       "uart_rx_b";
                                function = "uart_b";
+                               bias-disable;
                        };
                };
 
                                groups = "uart_cts_b",
                                       "uart_rts_b";
                                function = "uart_b";
+                               bias-disable;
                        };
                };
 
                                groups = "uart_tx_c",
                                       "uart_rx_c";
                                function = "uart_c";
+                               bias-disable;
                        };
                };
 
                                groups = "uart_cts_c",
                                       "uart_rts_c";
                                function = "uart_c";
+                               bias-disable;
                        };
                };
 
                                groups = "i2c_sck_a",
                                       "i2c_sda_a";
                                function = "i2c_a";
+                               bias-disable;
                        };
                };
 
                                groups = "i2c_sck_b",
                                       "i2c_sda_b";
                                function = "i2c_b";
+                               bias-disable;
                        };
                };
 
                                groups = "i2c_sck_c",
                                       "i2c_sda_c";
                                function = "i2c_c";
+                               bias-disable;
                        };
                };
 
                                       "eth_txd2",
                                       "eth_txd3";
                                function = "eth";
+                               bias-disable;
                        };
                };
 
                                       "eth_txd0",
                                       "eth_txd1";
                                function = "eth";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "pwm_a_x";
                                function = "pwm_a_x";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "pwm_a_y";
                                function = "pwm_a_y";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "pwm_b";
                                function = "pwm_b";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "pwm_d";
                                function = "pwm_d";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "pwm_e";
                                function = "pwm_e";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "pwm_f_x";
                                function = "pwm_f_x";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "pwm_f_y";
                                function = "pwm_f_y";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "hdmi_hpd";
                                function = "hdmi_hpd";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "hdmi_sda", "hdmi_scl";
                                function = "hdmi_i2c";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "i2sout_ch23_y";
                                function = "i2s_out";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "i2sout_ch45_y";
                                function = "i2s_out";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "i2sout_ch67_y";
                                function = "i2s_out";
+                               bias-disable;
                        };
                };
 
                        mux {
                                groups = "spdif_out_y";
                                function = "spdif_out";
+                               bias-disable;
                        };
                };
        };
        resets = <&reset RESET_SD_EMMC_C>;
 };
 
+&simplefb_hdmi {
+       clocks = <&clkc CLKID_HDMI_PCLK>,
+                <&clkc CLKID_CLK81>,
+                <&clkc CLKID_GCLK_VENCI_INT0>;
+};
+
 &spicc {
        clocks = <&clkc CLKID_SPICC>;
        clock-names = "core";
        compatible = "amlogic,meson-gxbb-vpu", "amlogic,meson-gx-vpu";
        power-domains = <&pwrc_vpu>;
 };
+
+&vdec {
+       compatible = "amlogic,gxbb-vdec", "amlogic,gx-vdec";
+       clocks = <&clkc CLKID_DOS_PARSER>,
+                <&clkc CLKID_DOS>,
+                <&clkc CLKID_VDEC_1>,
+                <&clkc CLKID_VDEC_HEVC>;
+       clock-names = "dos_parser", "dos", "vdec_1", "vdec_hevc";
+       resets = <&reset RESET_PARSER>;
+       reset-names = "esparser";
+};
index 82b1c485114780c53c20c9587259cd90d53ba1b9..4d5949496596697a5d2aa1d21b8aa4106d866b88 100644 (file)
@@ -14,7 +14,7 @@
 / {
        compatible = "libretech,aml-s805x-ac", "amlogic,s805x",
                     "amlogic,meson-gxl";
-       model = "Libre Computer Board AML-S805X-AC";
+       model = "Libre Computer AML-S805X-AC";
 
        aliases {
                serial0 = &uart_AO;
index ceb34afe421d5634f1c1970050c845fbaf350a7b..440bc23c734268cd4638fb33ee063c748f51c487 100644 (file)
 
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
-               #address-cells = <1>;
-               #size-cells = <0>;
                poll-interval = <100>;
 
-               button@0 {
+               power-button {
                        label = "power";
                        linux,code = <KEY_POWER>;
                        gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
 };
 
 &ir {
-       linux,rc-map-name = "rc-geekbox";
+       linux,rc-map-name = "rc-khadas";
 };
 
-&pinctrl_aobus {
+&gpio_ao {
        gpio-line-names = "UART TX",
                          "UART RX",
                          "Power Key In",
                          "";
 };
 
-&pinctrl_periphs {
+&gpio {
        gpio-line-names = /* Bank GPIOZ */
                          "", "", "", "", "", "", "",
                          "", "", "", "", "", "", "",
        };
 };
 
+&uart_A {
+       bluetooth {
+               compatible = "brcm,bcm43438-bt";
+               shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
+               max-speed = <2000000>;
+               clocks = <&wifi32k>;
+               clock-names = "lpo";
+       };
+};
+
 /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */
 &uart_AO {
        status = "okay";
index a23252efc685205432e78ff1087e9771e40ef750..e8348b2728db576cf8260b9fcc1c171d6f48f409 100644 (file)
@@ -12,8 +12,9 @@
 #include "meson-gxl-s905x.dtsi"
 
 / {
-       compatible = "libretech,cc", "amlogic,s905x", "amlogic,meson-gxl";
-       model = "Libre Computer Board AML-S905X-CC";
+       compatible = "libretech,aml-s905x-cc", "amlogic,s905x",
+                    "amlogic,meson-gxl";
+       model = "Libre Computer AML-S905X-CC";
 
        aliases {
                serial0 = &uart_AO;
                regulator-max-microvolt = <1800000>;
        };
 
+       /* This is provided by LDOs on the eMMC daugther card */
        vddio_boot: regulator-vddio_boot {
                compatible = "regulator-fixed";
                regulator-name = "VDDIO_BOOT";
-               regulator-min-microvolt = <3300000>;
-               regulator-max-microvolt = <3300000>;
+               regulator-min-microvolt = <1800000>;
+               regulator-max-microvolt = <1800000>;
+               vin-supply = <&vcc_3v3>;
        };
 };
 
        };
 };
 
-&pinctrl_aobus {
+&gpio_ao {
        gpio-line-names = "UART TX",
                          "UART RX",
                          "Blue LED",
                          "7J1 Header Pin15";
 };
 
-&pinctrl_periphs {
+&gpio {
        gpio-line-names = /* Bank GPIOZ */
                          "", "", "", "", "", "", "",
                          "", "", "", "", "", "", "",
 
        bus-width = <4>;
        cap-sd-highspeed;
-       max-frequency = <100000000>;
+       max-frequency = <50000000>;
        disable-wp;
 
-       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
 
        vmmc-supply = <&vcc_3v3>;
        vqmmc-supply = <&vcc_card>;
 
        bus-width = <8>;
        cap-mmc-highspeed;
-       mmc-ddr-3_3v;
-       max-frequency = <50000000>;
-       non-removable;
+       mmc-ddr-1_8v;
+       mmc-hs200-1_8v;
+       max-frequency = <200000000>;
        disable-wp;
 
        mmc-pwrseq = <&emmc_pwrseq>;
index a1b31013ab6e3494d810619fadf81752a67b94f4..43eb7d149e3647b1590f5c11f29676813591bbd8 100644 (file)
 
        bus-width = <4>;
        cap-sd-highspeed;
-       max-frequency = <100000000>;
+       max-frequency = <50000000>;
 
        non-removable;
        disable-wp;
 
+       /* WiFi firmware requires power to be kept while in suspend */
+       keep-power-in-suspend;
+
        mmc-pwrseq = <&sdio_pwrseq>;
 
        vmmc-supply = <&vddao_3v3>;
 
        bus-width = <4>;
        cap-sd-highspeed;
-       max-frequency = <100000000>;
+       max-frequency = <50000000>;
        disable-wp;
 
-       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
 
        vmmc-supply = <&vddao_3v3>;
        vqmmc-supply = <&vddio_boot>;
index d5c3d78aafeb5d97d69eb5cd788f1957a8c2538b..259d8639939059fd1e6bd3ca1e7563caec4c0c21 100644 (file)
                                phys = <&usb3_phy>, <&usb2_phy0>, <&usb2_phy1>;
                        };
                };
+
+               crypto: crypto@c883e000 {
+                       compatible = "amlogic,gxl-crypto";
+                       reg = <0x0 0xc883e000 0x0 0x36>;
+                       interrupts = <GIC_SPI 188 IRQ_TYPE_EDGE_RISING>,
+                                    <GIC_SPI 189 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc CLKID_BLKMV>;
+                       clock-names = "blkmv";
+                       status = "okay";
+               };
        };
 };
 
@@ -80,9 +90,6 @@
 };
 
 &ethmac {
-       reg = <0x0 0xc9410000 0x0 0x10000
-              0x0 0xc8834540 0x0 0x4>;
-
        clocks = <&clkc CLKID_ETH>,
                 <&clkc CLKID_FCLK_DIV2>,
                 <&clkc CLKID_MPLL2>;
                };
 
                emmc_pins: emmc {
-                       mux {
+                       mux-0 {
                                groups = "emmc_nand_d07",
-                                      "emmc_cmd",
-                                      "emmc_clk";
+                                      "emmc_cmd";
+                               function = "emmc";
+                               bias-pull-up;
+                       };
+
+                       mux-1 {
+                               groups = "emmc_clk";
                                function = "emmc";
                                bias-disable;
                        };
                        mux {
                                groups = "emmc_ds";
                                function = "emmc";
-                               bias-disable;
+                               bias-pull-down;
                        };
                };
 
                };
 
                sdcard_pins: sdcard {
-                       mux {
+                       mux-0 {
                                groups = "sdcard_d0",
                                       "sdcard_d1",
                                       "sdcard_d2",
                                       "sdcard_d3",
-                                      "sdcard_cmd",
-                                      "sdcard_clk";
+                                      "sdcard_cmd";
+                               function = "sdcard";
+                               bias-pull-up;
+                       };
+
+                       mux-1 {
+                               groups = "sdcard_clk";
                                function = "sdcard";
                                bias-disable;
                        };
                };
 
                sdio_pins: sdio {
-                       mux {
+                       mux-0 {
                                groups = "sdio_d0",
                                       "sdio_d1",
                                       "sdio_d2",
                                       "sdio_d3",
-                                      "sdio_cmd",
-                                      "sdio_clk";
+                                      "sdio_cmd";
+                               function = "sdio";
+                               bias-pull-up;
+                       };
+
+                       mux-1 {
+                               groups = "sdio_clk";
                                function = "sdio";
                                bias-disable;
                        };
                        };
                };
 
+               i2c_c_dv18_pins: i2c_c_dv18 {
+                       mux {
+                               groups = "i2c_sck_c_dv19",
+                                     "i2c_sda_c_dv18";
+                               function = "i2c_c";
+                               bias-disable;
+                       };
+               };
+
                eth_pins: eth_c {
                        mux {
                                groups = "eth_mdio",
                        #size-cells = <0>;
 
                        internal_phy: ethernet-phy@8 {
-                               compatible = "ethernet-phy-id0181.4400", "ethernet-phy-ieee802.3-c22";
+                               compatible = "ethernet-phy-id0181.4400";
                                interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
                                reg = <8>;
                                max-speed = <100>;
        resets = <&reset RESET_SD_EMMC_C>;
 };
 
+&simplefb_hdmi {
+       clocks = <&clkc CLKID_HDMI_PCLK>,
+                <&clkc CLKID_CLK81>,
+                <&clkc CLKID_GCLK_VENCI_INT0>;
+};
+
 &spicc {
        clocks = <&clkc CLKID_SPICC>;
        clock-names = "core";
        compatible = "amlogic,meson-gxl-vpu", "amlogic,meson-gx-vpu";
        power-domains = <&pwrc_vpu>;
 };
+
+&vdec {
+       compatible = "amlogic,gxl-vdec", "amlogic,gx-vdec";
+       clocks = <&clkc CLKID_DOS_PARSER>,
+                <&clkc CLKID_DOS>,
+                <&clkc CLKID_VDEC_1>,
+                <&clkc CLKID_VDEC_HEVC>;
+       clock-names = "dos_parser", "dos", "vdec_1", "vdec_hevc";
+       resets = <&reset RESET_PARSER>;
+       reset-names = "esparser";
+};
index 782e9edac80518a5d88efbded2963cda7c5ee300..f82f25c1a5f97be47d4593be9850ac0c5c7f0f32 100644 (file)
@@ -18,7 +18,6 @@
 
        aliases {
                serial0 = &uart_AO;
-               serial1 = &uart_A;
                serial2 = &uart_AO_B;
        };
 
 
        gpio-keys-polled {
                compatible = "gpio-keys-polled";
-               #address-cells = <1>;
-               #size-cells = <0>;
                poll-interval = <100>;
 
-               button@0 {
+               power-button {
                        label = "power";
                        linux,code = <KEY_POWER>;
                        gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
 
                                map1 {
                                        trip = <&cpu_alert1>;
-                                       cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>;
-                               };
-
-                               map2 {
-                                       trip = <&cpu_alert1>;
-                                       cooling-device =
-                                               <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
-                               };
-
-                               map3 {
-                                       trip = <&cpu_alert1>;
-                                       cooling-device =
-                                               <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+                                       cooling-device = <&gpio_fan 2 THERMAL_NO_LIMIT>,
+                                                        <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu4 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu5 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu6 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
+                                                        <&cpu7 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
                                };
                        };
                };
 
        amlogic,tx-delay-ns = <2>;
 
-       /* External PHY reset is shared with internal PHY Led signals */
-       snps,reset-gpio = <&gpio GPIOZ_14 0>;
-       snps,reset-delays-us = <0 10000 1000000>;
-       snps,reset-active-low;
-
        /* External PHY is in RGMII */
        phy-mode = "rgmii";
 
        external_phy: ethernet-phy@0 {
                /* Realtek RTL8211F (0x001cc916) */
                reg = <0>;
+
+               reset-assert-us = <10000>;
+               reset-deassert-us = <30000>;
+               reset-gpios = <&gpio GPIOZ_14 GPIO_ACTIVE_LOW>;
+
                interrupt-parent = <&gpio_intc>;
                /* MAC_INTR on GPIOZ_15 */
                interrupts = <25 IRQ_TYPE_LEVEL_LOW>;
        status = "okay";
        pinctrl-0 = <&remote_input_ao_pins>;
        pinctrl-names = "default";
-       linux,rc-map-name = "rc-geekbox";
+       linux,rc-map-name = "rc-khadas";
 };
 
 &pwm_AO_ab {
 &sd_emmc_a {
        status = "okay";
        pinctrl-0 = <&sdio_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdio_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
        #address-cells = <1>;
        #size-cells = <0>;
 
        bus-width = <4>;
-       max-frequency = <100000000>;
+       max-frequency = <50000000>;
 
        non-removable;
        disable-wp;
 
+       /* WiFi firmware requires power to be kept while in suspend */
+       keep-power-in-suspend;
+
        mmc-pwrseq = <&sdio_pwrseq>;
 
        vmmc-supply = <&vddao_3v3>;
 &sd_emmc_b {
        status = "okay";
        pinctrl-0 = <&sdcard_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&sdcard_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <4>;
        cap-sd-highspeed;
-       max-frequency = <100000000>;
+       max-frequency = <50000000>;
        disable-wp;
 
-       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_HIGH>;
-       cd-inverted;
+       cd-gpios = <&gpio CARD_6 GPIO_ACTIVE_LOW>;
 
        vmmc-supply = <&vddao_3v3>;
        vqmmc-supply = <&vddio_boot>;
 &sd_emmc_c {
        status = "okay";
        pinctrl-0 = <&emmc_pins>, <&emmc_ds_pins>;
-       pinctrl-names = "default";
+       pinctrl-1 = <&emmc_clk_gate_pins>;
+       pinctrl-names = "default", "clk-gate";
 
        bus-width = <8>;
-       cap-sd-highspeed;
        cap-mmc-highspeed;
        max-frequency = <200000000>;
        non-removable;
        disable-wp;
        mmc-ddr-1_8v;
        mmc-hs200-1_8v;
-       mmc-hs400-1_8v;
 
        mmc-pwrseq = <&emmc_pwrseq>;
        vmmc-supply = <&vcc_3v3>;
 /* This one is connected to the Bluetooth module */
 &uart_A {
        status = "okay";
-       pinctrl-0 = <&uart_a_pins>;
+       pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
        pinctrl-names = "default";
+       uart-has-rtscts;
+
+       bluetooth {
+               compatible = "brcm,bcm43438-bt";
+               shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
+               max-speed = <2000000>;
+               clocks = <&wifi32k>;
+               clock-names = "lpo";
+       };
 };
 
 /* This is brought out on the Linux_RX (18) and Linux_TX (19) pins: */
index 247888d68a3aabe06e8841a8d93cbfe8afe12960..5ff64a0d2dcf8aeecd677b8215738184e5fe2348 100644 (file)
@@ -44,7 +44,7 @@
 
                cpu4: cpu@100 {
                        device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
+                       compatible = "arm,cortex-a53";
                        reg = <0x0 0x100>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
@@ -53,7 +53,7 @@
 
                cpu5: cpu@101 {
                        device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
+                       compatible = "arm,cortex-a53";
                        reg = <0x0 0x101>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
@@ -62,7 +62,7 @@
 
                cpu6: cpu@102 {
                        device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
+                       compatible = "arm,cortex-a53";
                        reg = <0x0 0x102>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
@@ -71,7 +71,7 @@
 
                cpu7: cpu@103 {
                        device_type = "cpu";
-                       compatible = "arm,cortex-a53", "arm,armv8";
+                       compatible = "arm,cortex-a53";
                        reg = <0x0 0x103>;
                        enable-method = "psci";
                        next-level-cache = <&l2>;
                reset-names = "phy";
                status = "okay";
        };
+
+       mali: gpu@c0000 {
+               compatible = "amlogic,meson-gxm-mali", "arm,mali-t820";
+               reg = <0x0 0xc0000 0x0 0x40000>;
+               interrupt-parent = <&gic>;
+               interrupts = <GIC_SPI 162 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 161 IRQ_TYPE_LEVEL_HIGH>,
+                            <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>;
+               interrupt-names = "job", "mmu", "gpu";
+               clocks = <&clkc CLKID_MALI>;
+               resets = <&reset RESET_MALI_CAPB3>, <&reset RESET_MALI>;
+
+               /*
+                * Mali clocking is provided by two identical clock paths
+                * MALI_0 and MALI_1 muxed to a single clock by a glitch
+                * free mux to safely change frequency while running.
+                */
+               assigned-clocks = <&clkc CLKID_MALI_0_SEL>,
+                                 <&clkc CLKID_MALI_0>,
+                                 <&clkc CLKID_MALI>; /* Glitch free mux */
+               assigned-clock-parents = <&clkc CLKID_FCLK_DIV3>,
+                                        <0>, /* Do Nothing */
+                                        <&clkc CLKID_MALI_0>;
+               assigned-clock-rates = <0>, /* Do Nothing */
+                                      <666666666>,
+                                      <0>; /* Do Nothing */
+       };
 };
 
 &clkc_AO {
 &dwc3 {
        phys = <&usb3_phy>, <&usb2_phy0>, <&usb2_phy1>, <&usb2_phy2>;
 };
+
+&vdec {
+       compatible = "amlogic,gxm-vdec", "amlogic,gx-vdec";
+};
index 8647da7d6609b05089bcced0dd21d9a19b3a41d2..90815fa25ec645486e2f05654e00ffa5595c9f74 100644 (file)
        linux,rc-map-name = "rc-khadas";
 };
 
+&pcie {
+       reset-gpios = <&gpio GPIOA_8 GPIO_ACTIVE_LOW>;
+};
+
 &pwm_ef {
         status = "okay";
         pinctrl-0 = <&pwm_e_pins>;
        non-removable;
        disable-wp;
 
+       /* WiFi firmware requires power to be kept while in suspend */
+       keep-power-in-suspend;
+
        mmc-pwrseq = <&sdio_pwrseq>;
 
        vmmc-supply = <&vsys_3v3>;
index 3435aaa4e8db50c7f28c0b08f2b802faf8e6f20f..a8bb3fa9fec98e994ce2876b95e81e86b8369c02 100644 (file)
@@ -9,6 +9,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
 
 / {
        compatible = "seirobotics,sei610", "amlogic,sm1";
                ethernet0 = &ethmac;
        };
 
+       mono_dac: audio-codec-0 {
+               compatible = "maxim,max98357a";
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "U16";
+               sdmode-gpios = <&gpio GPIOX_8 GPIO_ACTIVE_HIGH>;
+       };
+
+       dmics: audio-codec-1 {
+               #sound-dai-cells = <0>;
+               compatible = "dmic-codec";
+               num-channels = <2>;
+               wakeup-delay-ms = <50>;
+               status = "okay";
+               sound-name-prefix = "MIC";
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
        };
 
        gpio-keys {
-               compatible = "gpio-keys-polled";
-               poll-interval = <100>;
+               compatible = "gpio-keys";
 
                key1 {
                        label = "A";
                        linux,code = <BTN_0>;
                        gpios = <&gpio GPIOH_6 GPIO_ACTIVE_LOW>;
+                       interrupt-parent = <&gpio_intc>;
+                       interrupts = <34 IRQ_TYPE_EDGE_BOTH>;
                };
 
                key2 {
                        label = "B";
                        linux,code = <BTN_1>;
                        gpios = <&gpio GPIOH_7 GPIO_ACTIVE_LOW>;
+                       interrupt-parent = <&gpio_intc>;
+                       interrupts = <35 IRQ_TYPE_EDGE_BOTH>;
                };
 
                key3 {
                        label = "C";
                        linux,code = <BTN_2>;
                        gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_LOW>;
+                       interrupt-parent = <&gpio_intc>;
+                       interrupts = <2 IRQ_TYPE_EDGE_BOTH>;
+               };
+
+               mic_mute {
+                       label = "MicMute";
+                       linux,code = <SW_MUTE_DEVICE>;
+                       linux,input-type = <EV_SW>;
+                       gpios = <&gpio_ao GPIOE_2 GPIO_ACTIVE_LOW>;
+                       interrupt-parent = <&gpio_intc>;
+                       interrupts = <99 IRQ_TYPE_EDGE_BOTH>;
+               };
+
+               power_key {
+                       label = "PowerKey";
+                       linux,code = <KEY_POWER>;
+                       gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
+                       interrupt-parent = <&gpio_intc>;
+                       interrupts = <3 IRQ_TYPE_EDGE_BOTH>;
                };
        };
 
                clock-names = "ext_clock";
        };
 
+       sound {
+               compatible = "amlogic,axg-sound-card";
+               model = "SM1-SEI610";
+               audio-aux-devs = <&tdmout_a>, <&tdmout_b>,
+                                <&tdmin_a>, <&tdmin_b>;
+               audio-routing = "TDMOUT_A IN 0", "FRDDR_A OUT 0",
+                               "TDMOUT_A IN 1", "FRDDR_B OUT 0",
+                               "TDMOUT_A IN 2", "FRDDR_C OUT 0",
+                               "TDM_A Playback", "TDMOUT_A OUT",
+                               "TDMOUT_B IN 0", "FRDDR_A OUT 1",
+                               "TDMOUT_B IN 1", "FRDDR_B OUT 1",
+                               "TDMOUT_B IN 2", "FRDDR_C OUT 1",
+                               "TDM_B Playback", "TDMOUT_B OUT",
+                               "TODDR_A IN 4", "PDM Capture",
+                               "TODDR_B IN 4", "PDM Capture",
+                               "TODDR_C IN 4", "PDM Capture",
+                               "TDMIN_A IN 0", "TDM_A Capture",
+                               "TDMIN_A IN 3", "TDM_A Loopback",
+                               "TDMIN_B IN 0", "TDM_A Capture",
+                               "TDMIN_B IN 3", "TDM_A Loopback",
+                               "TDMIN_A IN 1", "TDM_B Capture",
+                               "TDMIN_A IN 4", "TDM_B Loopback",
+                               "TDMIN_B IN 1", "TDM_B Capture",
+                               "TDMIN_B IN 4", "TDM_B Loopback",
+                               "TODDR_A IN 0", "TDMIN_A OUT",
+                               "TODDR_B IN 0", "TDMIN_A OUT",
+                               "TODDR_C IN 0", "TDMIN_A OUT",
+                               "TODDR_A IN 1", "TDMIN_B OUT",
+                               "TODDR_B IN 1", "TDMIN_B OUT",
+                               "TODDR_C IN 1", "TDMIN_B OUT";
+
+               assigned-clocks = <&clkc CLKID_MPLL2>,
+                                 <&clkc CLKID_MPLL0>,
+                                 <&clkc CLKID_MPLL1>;
+               assigned-clock-parents = <0>, <0>, <0>;
+               assigned-clock-rates = <294912000>,
+                                      <270950400>,
+                                      <393216000>;
+               status = "okay";
+
+               dai-link-0 {
+                       sound-dai = <&frddr_a>;
+               };
+
+               dai-link-1 {
+                       sound-dai = <&frddr_b>;
+               };
+
+               dai-link-2 {
+                       sound-dai = <&frddr_c>;
+               };
+
+               dai-link-3 {
+                       sound-dai = <&toddr_a>;
+               };
+
+               dai-link-4 {
+                       sound-dai = <&toddr_b>;
+               };
+
+               dai-link-5 {
+                       sound-dai = <&toddr_c>;
+               };
+
+               /* internal speaker interface */
+               dai-link-6 {
+                       sound-dai = <&tdmif_a>;
+                       dai-format = "i2s";
+                       dai-tdm-slot-tx-mask-0 = <1 1>;
+                       mclk-fs = <256>;
+
+                       codec-0 {
+                               sound-dai = <&mono_dac>;
+                       };
+
+                       codec-1 {
+                               sound-dai = <&tohdmitx TOHDMITX_I2S_IN_A>;
+                       };
+               };
+
+               /* 8ch hdmi interface */
+               dai-link-7 {
+                       sound-dai = <&tdmif_b>;
+                       dai-format = "i2s";
+                       dai-tdm-slot-tx-mask-0 = <1 1>;
+                       dai-tdm-slot-tx-mask-1 = <1 1>;
+                       dai-tdm-slot-tx-mask-2 = <1 1>;
+                       dai-tdm-slot-tx-mask-3 = <1 1>;
+                       mclk-fs = <256>;
+
+                       codec {
+                               sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
+                       };
+               };
+
+               /* internal digital mics */
+               dai-link-8 {
+                       sound-dai = <&pdm>;
+
+                       codec {
+                               sound-dai = <&dmics>;
+                       };
+               };
+
+               /* hdmi glue */
+               dai-link-9 {
+                       sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
+
+                       codec {
+                               sound-dai = <&hdmi_tx>;
+                       };
+               };
+       };
+
        wifi32k: wifi32k {
                compatible = "pwm-clock";
                #clock-cells = <0>;
        };
 };
 
+&arb {
+       status = "okay";
+};
+
 &cec_AO {
        pinctrl-0 = <&cec_ao_a_h_pins>;
        pinctrl-names = "default";
        hdmi-phandle = <&hdmi_tx>;
 };
 
+&clkc_audio {
+       status = "okay";
+};
+
 &cpu0 {
        cpu-supply = <&vddcpu>;
        operating-points-v2 = <&cpu_opp_table>;
        phy-mode = "rmii";
 };
 
+&frddr_a {
+       status = "okay";
+};
+
+&frddr_b {
+       status = "okay";
+};
+
+&frddr_c {
+       status = "okay";
+};
+
 &hdmi_tx {
        status = "okay";
        pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
        pinctrl-names = "default";
 };
 
+&pdm {
+       pinctrl-0 = <&pdm_din0_z_pins>, <&pdm_dclk_z_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+};
+
 &pwm_AO_ab {
        status = "okay";
        pinctrl-0 = <&pwm_ao_a_pins>;
        non-removable;
        disable-wp;
 
+       /* WiFi firmware requires power to be kept while in suspend */
+       keep-power-in-suspend;
+
        mmc-pwrseq = <&sdio_pwrseq>;
 
        vmmc-supply = <&vddao_3v3>;
        vqmmc-supply = <&emmc_1v8>;
 };
 
+&tdmif_a {
+       pinctrl-0 = <&tdm_a_dout0_pins>, <&tdm_a_fs_pins>, <&tdm_a_sclk_pins>;
+       pinctrl-names = "default";
+       status = "okay";
+
+       assigned-clocks = <&clkc_audio AUD_CLKID_TDM_SCLK_PAD0>,
+                         <&clkc_audio AUD_CLKID_TDM_LRCLK_PAD0>;
+       assigned-clock-parents = <&clkc_audio AUD_CLKID_MST_A_SCLK>,
+                                <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
+       assigned-clock-rates = <0>, <0>;
+};
+
+&tdmif_b {
+       status = "okay";
+};
+
+&tdmin_a {
+       status = "okay";
+};
+
+&tdmin_b {
+       status = "okay";
+};
+
+&tdmout_a {
+       status = "okay";
+};
+
+&tdmout_b {
+       status = "okay";
+};
+
+&toddr_a {
+       status = "okay";
+};
+
+&toddr_b {
+       status = "okay";
+};
+
+&toddr_c {
+       status = "okay";
+};
+
+&tohdmitx {
+       status = "okay";
+};
+
 &uart_A {
        status = "okay";
        pinctrl-0 = <&uart_a_pins>, <&uart_a_cts_rts_pins>;
 
        bluetooth {
                compatible = "brcm,bcm43438-bt";
+               interrupt-parent = <&gpio_intc>;
+               interrupts = <95 IRQ_TYPE_LEVEL_HIGH>;
                shutdown-gpios = <&gpio GPIOX_17 GPIO_ACTIVE_HIGH>;
                max-speed = <2000000>;
                clocks = <&wifi32k>;
index 521573f3a5babef270b05b6080c846ef1def4431..d847a3fcbc85764222915bac1cbc9372e03f1539 100644 (file)
@@ -5,11 +5,47 @@
  */
 
 #include "meson-g12-common.dtsi"
+#include <dt-bindings/clock/axg-audio-clkc.h>
 #include <dt-bindings/power/meson-sm1-power.h>
+#include <dt-bindings/reset/amlogic,meson-axg-audio-arb.h>
+#include <dt-bindings/reset/amlogic,meson-g12a-audio-reset.h>
 
 / {
        compatible = "amlogic,sm1";
 
+       tdmif_a: audio-controller-0 {
+               compatible = "amlogic,axg-tdm-iface";
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "TDM_A";
+               clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>,
+                        <&clkc_audio AUD_CLKID_MST_A_SCLK>,
+                        <&clkc_audio AUD_CLKID_MST_A_LRCLK>;
+               clock-names = "mclk", "sclk", "lrclk";
+               status = "disabled";
+       };
+
+       tdmif_b: audio-controller-1 {
+               compatible = "amlogic,axg-tdm-iface";
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "TDM_B";
+               clocks = <&clkc_audio AUD_CLKID_MST_B_MCLK>,
+                        <&clkc_audio AUD_CLKID_MST_B_SCLK>,
+                        <&clkc_audio AUD_CLKID_MST_B_LRCLK>;
+               clock-names = "mclk", "sclk", "lrclk";
+               status = "disabled";
+       };
+
+       tdmif_c: audio-controller-2 {
+               compatible = "amlogic,axg-tdm-iface";
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "TDM_C";
+               clocks = <&clkc_audio AUD_CLKID_MST_C_MCLK>,
+                        <&clkc_audio AUD_CLKID_MST_C_SCLK>,
+                        <&clkc_audio AUD_CLKID_MST_C_LRCLK>;
+               clock-names = "mclk", "sclk", "lrclk";
+               status = "disabled";
+       };
+
        cpus {
                #address-cells = <0x2>;
                #size-cells = <0x0>;
        };
 };
 
+&apb {
+       audio: bus@60000 {
+               compatible = "simple-bus";
+               reg = <0x0 0x60000 0x0 0x1000>;
+               #address-cells = <2>;
+               #size-cells = <2>;
+               ranges = <0x0 0x0 0x0 0x60000 0x0 0x1000>;
+
+               clkc_audio: clock-controller@0 {
+                       status = "disabled";
+                       compatible = "amlogic,sm1-audio-clkc";
+                       reg = <0x0 0x0 0x0 0xb4>;
+                       #clock-cells = <1>;
+                       #reset-cells = <1>;
+
+                       clocks = <&clkc CLKID_AUDIO>,
+                                <&clkc CLKID_MPLL0>,
+                                <&clkc CLKID_MPLL1>,
+                                <&clkc CLKID_MPLL2>,
+                                <&clkc CLKID_MPLL3>,
+                                <&clkc CLKID_HIFI_PLL>,
+                                <&clkc CLKID_FCLK_DIV3>,
+                                <&clkc CLKID_FCLK_DIV4>,
+                                <&clkc CLKID_FCLK_DIV5>;
+                       clock-names = "pclk",
+                                     "mst_in0",
+                                     "mst_in1",
+                                     "mst_in2",
+                                     "mst_in3",
+                                     "mst_in4",
+                                     "mst_in5",
+                                     "mst_in6",
+                                     "mst_in7";
+
+                       resets = <&reset RESET_AUDIO>;
+               };
+
+               toddr_a: audio-controller@100 {
+                       compatible = "amlogic,sm1-toddr",
+                                    "amlogic,axg-toddr";
+                       reg = <0x0 0x100 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "TODDR_A";
+                       interrupts = <GIC_SPI 148 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_TODDR_A>;
+                       resets = <&arb AXG_ARB_TODDR_A>,
+                                <&clkc_audio AUD_RESET_TODDR_A>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <8192>;
+                       status = "disabled";
+               };
+
+               toddr_b: audio-controller@140 {
+                       compatible = "amlogic,sm1-toddr",
+                                    "amlogic,axg-toddr";
+                       reg = <0x0 0x140 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "TODDR_B";
+                       interrupts = <GIC_SPI 149 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_TODDR_B>;
+                       resets = <&arb AXG_ARB_TODDR_B>,
+                                <&clkc_audio AUD_RESET_TODDR_B>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <256>;
+                       status = "disabled";
+               };
+
+               toddr_c: audio-controller@180 {
+                       compatible = "amlogic,sm1-toddr",
+                                    "amlogic,axg-toddr";
+                       reg = <0x0 0x180 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "TODDR_C";
+                       interrupts = <GIC_SPI 150 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_TODDR_C>;
+                       resets = <&arb AXG_ARB_TODDR_C>,
+                                <&clkc_audio AUD_RESET_TODDR_C>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <256>;
+                       status = "disabled";
+               };
+
+               frddr_a: audio-controller@1c0 {
+                       compatible = "amlogic,sm1-frddr",
+                                    "amlogic,axg-frddr";
+                       reg = <0x0 0x1c0 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "FRDDR_A";
+                       interrupts = <GIC_SPI 152 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_FRDDR_A>;
+                       resets = <&arb AXG_ARB_FRDDR_A>,
+                                <&clkc_audio AUD_RESET_FRDDR_A>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <512>;
+                       status = "disabled";
+               };
+
+               frddr_b: audio-controller@200 {
+                       compatible = "amlogic,sm1-frddr",
+                                    "amlogic,axg-frddr";
+                       reg = <0x0 0x200 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "FRDDR_B";
+                       interrupts = <GIC_SPI 153 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_FRDDR_B>;
+                       resets = <&arb AXG_ARB_FRDDR_B>,
+                                <&clkc_audio AUD_RESET_FRDDR_B>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <256>;
+                       status = "disabled";
+               };
+
+               frddr_c: audio-controller@240 {
+                       compatible = "amlogic,sm1-frddr",
+                                    "amlogic,axg-frddr";
+                       reg = <0x0 0x240 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "FRDDR_C";
+                       interrupts = <GIC_SPI 154 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_FRDDR_C>;
+                       resets = <&arb AXG_ARB_FRDDR_C>,
+                                <&clkc_audio AUD_RESET_FRDDR_C>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <256>;
+                       status = "disabled";
+               };
+
+               arb: reset-controller@280 {
+                       status = "disabled";
+                       compatible = "amlogic,meson-sm1-audio-arb";
+                       reg = <0x0 0x280 0x0 0x4>;
+                       #reset-cells = <1>;
+                       clocks = <&clkc_audio AUD_CLKID_DDR_ARB>;
+               };
+
+               tdmin_a: audio-controller@300 {
+                       compatible = "amlogic,sm1-tdmin",
+                                    "amlogic,axg-tdmin";
+                       reg = <0x0 0x300 0x0 0x40>;
+                       sound-name-prefix = "TDMIN_A";
+                       resets = <&clkc_audio AUD_RESET_TDMIN_A>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMIN_A>,
+                                <&clkc_audio AUD_CLKID_TDMIN_A_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_A_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_A_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               tdmin_b: audio-controller@340 {
+                       compatible = "amlogic,sm1-tdmin",
+                                    "amlogic,axg-tdmin";
+                       reg = <0x0 0x340 0x0 0x40>;
+                       sound-name-prefix = "TDMIN_B";
+                       resets = <&clkc_audio AUD_RESET_TDMIN_B>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMIN_B>,
+                                <&clkc_audio AUD_CLKID_TDMIN_B_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_B_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_B_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               tdmin_c: audio-controller@380 {
+                       compatible = "amlogic,sm1-tdmin",
+                                    "amlogic,axg-tdmin";
+                       reg = <0x0 0x380 0x0 0x40>;
+                       sound-name-prefix = "TDMIN_C";
+                       resets = <&clkc_audio AUD_RESET_TDMIN_C>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMIN_C>,
+                                <&clkc_audio AUD_CLKID_TDMIN_C_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_C_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_C_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               tdmin_lb: audio-controller@3c0 {
+                       compatible = "amlogic,sm1-tdmin",
+                                    "amlogic,axg-tdmin";
+                       reg = <0x0 0x3c0 0x0 0x40>;
+                       sound-name-prefix = "TDMIN_LB";
+                       resets = <&clkc_audio AUD_RESET_TDMIN_LB>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMIN_LB>,
+                                <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_LB_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMIN_LB_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               tdmout_a: audio-controller@500 {
+                       compatible = "amlogic,sm1-tdmout";
+                       reg = <0x0 0x500 0x0 0x40>;
+                       sound-name-prefix = "TDMOUT_A";
+                       resets = <&clkc_audio AUD_RESET_TDMOUT_A>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               tdmout_b: audio-controller@540 {
+                       compatible = "amlogic,sm1-tdmout";
+                       reg = <0x0 0x540 0x0 0x40>;
+                       sound-name-prefix = "TDMOUT_B";
+                       resets = <&clkc_audio AUD_RESET_TDMOUT_B>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMOUT_B>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_B_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_B_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               tdmout_c: audio-controller@580 {
+                       compatible = "amlogic,sm1-tdmout";
+                       reg = <0x0 0x580 0x0 0x40>;
+                       sound-name-prefix = "TDMOUT_C";
+                       resets = <&clkc_audio AUD_RESET_TDMOUT_C>;
+                       clocks = <&clkc_audio AUD_CLKID_TDMOUT_C>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_C_SCLK_SEL>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>,
+                                <&clkc_audio AUD_CLKID_TDMOUT_C_LRCLK>;
+                       clock-names = "pclk", "sclk", "sclk_sel",
+                                     "lrclk", "lrclk_sel";
+                       status = "disabled";
+               };
+
+               tohdmitx: audio-controller@744 {
+                       compatible = "amlogic,sm1-tohdmitx",
+                                    "amlogic,g12a-tohdmitx";
+                       reg = <0x0 0x744 0x0 0x4>;
+                       #sound-dai-cells = <1>;
+                       sound-name-prefix = "TOHDMITX";
+                       resets = <&clkc_audio AUD_RESET_TOHDMITX>;
+                       status = "disabled";
+               };
+
+               toddr_d: audio-controller@840 {
+                       compatible = "amlogic,sm1-toddr",
+                                    "amlogic,axg-toddr";
+                       reg = <0x0 0x840 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "TODDR_D";
+                       interrupts = <GIC_SPI 49 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_TODDR_D>;
+                       resets = <&arb AXG_ARB_TODDR_D>,
+                                <&clkc_audio AUD_RESET_TODDR_D>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <256>;
+                       status = "disabled";
+               };
+
+               frddr_d: audio-controller@880 {
+                        compatible = "amlogic,sm1-frddr",
+                                     "amlogic,axg-frddr";
+                       reg = <0x0 0x880 0x0 0x2c>;
+                       #sound-dai-cells = <0>;
+                       sound-name-prefix = "FRDDR_D";
+                       interrupts = <GIC_SPI 50 IRQ_TYPE_EDGE_RISING>;
+                       clocks = <&clkc_audio AUD_CLKID_FRDDR_D>;
+                       resets = <&arb AXG_ARB_FRDDR_D>,
+                                <&clkc_audio AUD_RESET_FRDDR_D>;
+                       reset-names = "arb", "rst";
+                       amlogic,fifo-depth = <256>;
+                       status = "disabled";
+               };
+       };
+
+       pdm: audio-controller@61000 {
+               compatible = "amlogic,sm1-pdm",
+                            "amlogic,axg-pdm";
+               reg = <0x0 0x61000 0x0 0x34>;
+               #sound-dai-cells = <0>;
+               sound-name-prefix = "PDM";
+               clocks = <&clkc_audio AUD_CLKID_PDM>,
+                        <&clkc_audio AUD_CLKID_PDM_DCLK>,
+                        <&clkc_audio AUD_CLKID_PDM_SYSCLK>;
+               clock-names = "pclk", "dclk", "sysclk";
+               status = "disabled";
+       };
+};
+
 &cecb_AO {
        compatible = "amlogic,meson-sm1-ao-cec";
 };
        power-domains = <&pwrc PWRC_SM1_ETH_ID>;
 };
 
+&gpio_intc {
+       compatible = "amlogic,meson-sm1-gpio-intc",
+                    "amlogic,meson-gpio-intc";
+};
+
+&pcie {
+       power-domains = <&pwrc PWRC_SM1_PCIE_ID>;
+};
+
 &pwrc {
        compatible = "amlogic,meson-sm1-pwrc";
 };
 
+&simplefb_cvbs {
+       power-domains = <&pwrc PWRC_SM1_VPU_ID>;
+};
+
+&simplefb_hdmi {
+       power-domains = <&pwrc PWRC_SM1_VPU_ID>;
+};
+
+&vdec {
+       compatible = "amlogic,sm1-vdec";
+};
+
 &vpu {
        power-domains = <&pwrc PWRC_SM1_VPU_ID>;
 };
index 75901c636893c7ddb67c3777be1f97f0b042ebd0..f561f5c5ef8f281a23bced0b79ca4a026cbf8eed 100644 (file)
 #define AUD_CLKID_TDM_SCLK_PAD0                160
 #define AUD_CLKID_TDM_SCLK_PAD1                161
 #define AUD_CLKID_TDM_SCLK_PAD2                162
+#define AUD_CLKID_TOP                  163
+#define AUD_CLKID_TORAM                        164
+#define AUD_CLKID_EQDRC                        165
+#define AUD_CLKID_RESAMPLE_B           166
+#define AUD_CLKID_TOVAD                        167
+#define AUD_CLKID_LOCKER               168
+#define AUD_CLKID_SPDIFIN_LB           169
+#define AUD_CLKID_FRDDR_D              170
+#define AUD_CLKID_TODDR_D              171
+#define AUD_CLKID_LOOPBACK_B           172
 
 #endif /* __AXG_AUDIO_CLKC_BINDINGS_H */
index 9d15e2221fdb7fd5f732eaa5a800f7b66112f8a5..ec3b26319fc494e812e3e3d02e659245c6a00d78 100644 (file)
 #define CLKID_AO_UART2         4
 #define CLKID_AO_IR_BLASTER    5
 #define CLKID_AO_CEC_32K       6
+#define CLKID_AO_CTS_OSCIN     7
+#define CLKID_AO_32K_PRE       8
+#define CLKID_AO_32K_DIV       9
+#define CLKID_AO_32K_SEL       10
+#define CLKID_AO_32K           11
+#define CLKID_AO_CTS_RTC_OSCIN 12
+#define CLKID_AO_CLK81         13
 
 #endif
index 8ba99a5e3fd34a64f8581ca51cedd47f11e803c5..db0763e96173ad8afde275856e060bf7b89c12c2 100644 (file)
 #define CLKID_VAPB_1           138
 #define CLKID_VAPB_SEL         139
 #define CLKID_VAPB             140
+#define CLKID_VDEC_1           153
+#define CLKID_VDEC_HEVC                156
+#define CLKID_GEN_CLK          159
+#define CLKID_VID_PLL          166
+#define CLKID_VCLK             175
+#define CLKID_VCLK2            176
+#define CLKID_VCLK_DIV1                185
+#define CLKID_VCLK_DIV2                186
+#define CLKID_VCLK_DIV4                187
+#define CLKID_VCLK_DIV6                188
+#define CLKID_VCLK_DIV12       189
+#define CLKID_VCLK2_DIV1       190
+#define CLKID_VCLK2_DIV2       191
+#define CLKID_VCLK2_DIV4       192
+#define CLKID_VCLK2_DIV6       193
+#define CLKID_VCLK2_DIV12      194
+#define CLKID_CTS_ENCI         199
+#define CLKID_CTS_ENCP         200
+#define CLKID_CTS_VDAC         201
+#define CLKID_HDMI_TX          202
+#define CLKID_HDMI             205
 
 #endif /* __GXBB_CLKC_H */
index 43a68a1110f043f3eaab908c554d20f30a9aeb33..489c75b27645d34fc6e82ad6ef7f8388accbb734 100644 (file)
@@ -1,15 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
 /*
  * GPIO definitions for Amlogic Meson GXBB SoCs
  *
  * Copyright (C) 2016 Endless Mobile, Inc.
  * Author: Carlo Caione <carlo@endlessm.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifndef _DT_BINDINGS_MESON_GXBB_GPIO_H
index 01f2a2abd35eea91bad49c60c478a47d461502eb..0a001ae48272e547f463ca0bf90536f754d43cad 100644 (file)
@@ -1,15 +1,9 @@
+/* SPDX-License-Identifier: GPL-2.0-only */
 /*
  * GPIO definitions for Amlogic Meson GXL SoCs
  *
  * Copyright (C) 2016 Endless Mobile, Inc.
  * Author: Carlo Caione <carlo@endlessm.com>
- *
- * This program is free software; you can redistribute it and/or
- * modify it under the terms of the GNU General Public License
- * version 2 as published by the Free Software Foundation.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program. If not, see <http://www.gnu.org/licenses/>.
  */
 
 #ifndef _DT_BINDINGS_MESON_GXL_GPIO_H
index 05c36367875c8bdaeec3b13b63b6e2fc852de9d3..1ef807856cb8989152e72323a3d6ee895cac0d53 100644 (file)
@@ -13,5 +13,7 @@
 #define AXG_ARB_FRDDR_A        3
 #define AXG_ARB_FRDDR_B        4
 #define AXG_ARB_FRDDR_C        5
+#define AXG_ARB_TODDR_D        6
+#define AXG_ARB_FRDDR_D        7
 
 #endif /* _DT_BINDINGS_AMLOGIC_MESON_AXG_AUDIO_ARB_H */
index ad6f55dabd6d72483fa00911a0c6864906188fda..0f2e0fe45ca4bbbd901dc45831c4a73b81658316 100644 (file)
@@ -1,12 +1,11 @@
+/* SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause */
 /*
- *
  * Copyright (c) 2016 BayLibre, SAS.
  * Author: Neil Armstrong <narmstrong@baylibre.com>
  *
  * Copyright (c) 2017 Amlogic, inc.
  * Author: Yixun Lan <yixun.lan@amlogic.com>
  *
- * SPDX-License-Identifier: (GPL-2.0+ OR BSD)
  */
 
 #ifndef _DT_BINDINGS_AMLOGIC_MESON_AXG_RESET_H
index 14b78dabed0e16c852b7c9d42989b8f64ee9934b..f805129ca7af7eb744ac044489b428191c4ba552 100644 (file)
 #define AUD_RESET_TOHDMITX     24
 #define AUD_RESET_CLKTREE      25
 
+/* SM1 added resets */
+#define AUD_RESET_RESAMPLE_B   26
+#define AUD_RESET_TOVAD                27
+#define AUD_RESET_LOCKER       28
+#define AUD_RESET_SPDIFIN_LB   29
+#define AUD_RESET_FRATV                30
+#define AUD_RESET_FRHDMIRX     31
+#define AUD_RESET_FRDDR_D      32
+#define AUD_RESET_TODDR_D      33
+#define AUD_RESET_LOOPBACK_B   34
+#define AUD_RESET_EARCTX       35
+#define AUD_RESET_EARCRX       36
+#define AUD_RESET_FRDDR_E      37
+#define AUD_RESET_TODDR_E      38
+
 #endif
index 524d6077ac1bb6853ef4c4a39f30581b096f07ea..ea5058618863f23f120a849c1bb333040e48acd4 100644 (file)
@@ -1,56 +1,7 @@
+/* SPDX-License-Identifier: GPL-2.0 OR BSD-3-Clause */
 /*
- * This file is provided under a dual BSD/GPLv2 license.  When using or
- * redistributing this file, you may do so under either license.
- *
- * GPL LICENSE SUMMARY
- *
  * Copyright (c) 2016 BayLibre, SAS.
  * Author: Neil Armstrong <narmstrong@baylibre.com>
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of version 2 of the GNU General Public License as
- * published by the Free Software Foundation.
- *
- * 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.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program; if not, see <http://www.gnu.org/licenses/>.
- * The full GNU General Public License is included in this distribution
- * in the file called COPYING.
- *
- * BSD LICENSE
- *
- * Copyright (c) 2016 BayLibre, SAS.
- * Author: Neil Armstrong <narmstrong@baylibre.com>
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- *
- *   * Redistributions of source code must retain the above copyright
- *     notice, this list of conditions and the following disclaimer.
- *   * Redistributions in binary form must reproduce the above copyright
- *     notice, this list of conditions and the following disclaimer in
- *     the documentation and/or other materials provided with the
- *     distribution.
- *   * Neither the name of Intel Corporation nor the names of its
- *     contributors may be used to endorse or promote products derived
- *     from this software without specific prior written permission.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
- * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
- * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
- * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
- * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
- * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
- * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 #ifndef _DT_BINDINGS_AMLOGIC_MESON_GXBB_RESET_H
 #define _DT_BINDINGS_AMLOGIC_MESON_GXBB_RESET_H