]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
ARM: dts: sync amlogic G12A/SM1 DT from Linux 5.9-rc1
authorNeil Armstrong <narmstrong@baylibre.com>
Mon, 21 Sep 2020 07:34:12 +0000 (09:34 +0200)
committerNeil Armstrong <narmstrong@baylibre.com>
Mon, 5 Oct 2020 15:59:45 +0000 (17:59 +0200)
This imports the G12A & SM1 SoC and boards DT changes from the Linux
commit 9123e3a74ec7 ("Linux 5.9-rc1").

Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
Reviewed-by: Kevin Hilman <khilman@baylibre.com>
Tested-by: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Neil Armstrong <narmstrong@baylibre.com>
arch/arm/dts/meson-g12-common.dtsi
arch/arm/dts/meson-g12b-odroid-n2.dts
arch/arm/dts/meson-khadas-vim3.dtsi
arch/arm/dts/meson-sm1-khadas-vim3l.dts
arch/arm/dts/meson-sm1-odroid-c4.dts
include/dt-bindings/clock/g12a-clkc.h
include/dt-bindings/sound/meson-g12a-toacodec.h [new file with mode: 0644]

index 593a006f4b7b3944f1a1095c0ad801c7ad68130c..1e83ec5b8c91a13018b3fc7a1651eca7f75290f7 100644 (file)
                secure-monitor = <&sm>;
        };
 
+       gpu_opp_table: gpu-opp-table {
+               compatible = "operating-points-v2";
+
+               opp-124999998 {
+                       opp-hz = /bits/ 64 <124999998>;
+                       opp-microvolt = <800000>;
+               };
+               opp-249999996 {
+                       opp-hz = /bits/ 64 <249999996>;
+                       opp-microvolt = <800000>;
+               };
+               opp-285714281 {
+                       opp-hz = /bits/ 64 <285714281>;
+                       opp-microvolt = <800000>;
+               };
+               opp-399999994 {
+                       opp-hz = /bits/ 64 <399999994>;
+                       opp-microvolt = <800000>;
+               };
+               opp-499999992 {
+                       opp-hz = /bits/ 64 <499999992>;
+                       opp-microvolt = <800000>;
+               };
+               opp-666666656 {
+                       opp-hz = /bits/ 64 <666666656>;
+                       opp-microvolt = <800000>;
+               };
+               opp-799999987 {
+                       opp-hz = /bits/ 64 <799999987>;
+                       opp-microvolt = <800000>;
+               };
+       };
+
        psci {
                compatible = "arm,psci-1.0";
                method = "smc";
                        interrupt-names = "macirq";
                        clocks = <&clkc CLKID_ETH>,
                                 <&clkc CLKID_FCLK_DIV2>,
-                                <&clkc CLKID_MPLL2>;
-                       clock-names = "stmmaceth", "clkin0", "clkin1";
+                                <&clkc CLKID_MPLL2>,
+                                <&clkc CLKID_FCLK_DIV2>;
+                       clock-names = "stmmaceth", "clkin0", "clkin1",
+                                     "timing-adjustment";
                        rx-fifo-depth = <4096>;
                        tx-fifo-depth = <2048>;
                        status = "disabled";
                        interrupt-names = "job", "mmu", "gpu";
                        clocks = <&clkc CLKID_MALI>;
                        resets = <&reset RESET_DVALIN_CAPB3>, <&reset RESET_DVALIN>;
-
-                       /*
-                        * 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_DIV2P5>,
-                                                <0>, /* Do Nothing */
-                                                <&clkc CLKID_MALI_0>;
-                       assigned-clock-rates = <0>, /* Do Nothing */
-                                              <800000000>,
-                                              <0>; /* Do Nothing */
+                       operating-points-v2 = <&gpu_opp_table>;
                        #cooling-cells = <2>;
                };
        };
index 169ea283d4ee3d4483c56bd5002fa1e2e4982e17..34fffa6d859dbd11bb506a8109fe4d113cd1c5fa 100644 (file)
@@ -9,6 +9,7 @@
 #include "meson-g12b-s922x.dtsi"
 #include <dt-bindings/input/input.h>
 #include <dt-bindings/gpio/meson-g12a-gpio.h>
+#include <dt-bindings/sound/meson-g12a-toacodec.h>
 #include <dt-bindings/sound/meson-g12a-tohdmitx.h>
 
 / {
                ethernet0 = &ethmac;
        };
 
+       dioo2133: audio-amplifier-0 {
+               compatible = "simple-audio-amplifier";
+               enable-gpios = <&gpio_ao GPIOAO_2 GPIO_ACTIVE_HIGH>;
+               VCC-supply = <&vcc_5v>;
+               sound-name-prefix = "U19";
+               status = "okay";
+       };
+
        chosen {
                stdout-path = "serial0:115200n8";
        };
        sound {
                compatible = "amlogic,axg-sound-card";
                model = "G12B-ODROID-N2";
-               audio-aux-devs = <&tdmout_b>;
+               audio-widgets = "Line", "Lineout";
+               audio-aux-devs = <&tdmout_b>, <&tdmout_c>, <&tdmin_a>,
+                                <&tdmin_b>, <&tdmin_c>, <&tdmin_lb>,
+                                <&dioo2133>;
                audio-routing = "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";
+                               "TDM_B Playback", "TDMOUT_B OUT",
+                               "TDMOUT_C IN 0", "FRDDR_A OUT 2",
+                               "TDMOUT_C IN 1", "FRDDR_B OUT 2",
+                               "TDMOUT_C IN 2", "FRDDR_C OUT 2",
+                               "TDM_C Playback", "TDMOUT_C OUT",
+                               "TDMIN_A IN 4", "TDM_B Loopback",
+                               "TDMIN_B IN 4", "TDM_B Loopback",
+                               "TDMIN_C IN 4", "TDM_B Loopback",
+                               "TDMIN_LB IN 1", "TDM_B Loopback",
+                               "TDMIN_A IN 5", "TDM_C Loopback",
+                               "TDMIN_B IN 5", "TDM_C Loopback",
+                               "TDMIN_C IN 5", "TDM_C Loopback",
+                               "TDMIN_LB IN 2", "TDM_C 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",
+                               "TODDR_A IN 2", "TDMIN_C OUT",
+                               "TODDR_B IN 2", "TDMIN_C OUT",
+                               "TODDR_C IN 2", "TDMIN_C OUT",
+                               "TODDR_A IN 6", "TDMIN_LB OUT",
+                               "TODDR_B IN 6", "TDMIN_LB OUT",
+                               "TODDR_C IN 6", "TDMIN_LB OUT",
+                               "U19 INL", "ACODEC LOLP",
+                               "U19 INR", "ACODEC LORP",
+                               "Lineout", "U19 OUTL",
+                               "Lineout", "U19 OUTR";
 
                assigned-clocks = <&clkc CLKID_MPLL2>,
                                  <&clkc CLKID_MPLL0>,
                        sound-dai = <&frddr_c>;
                };
 
-               /* 8ch hdmi interface */
                dai-link-3 {
+                       sound-dai = <&toddr_a>;
+               };
+
+               dai-link-4 {
+                       sound-dai = <&toddr_b>;
+               };
+
+               dai-link-5 {
+                       sound-dai = <&toddr_c>;
+               };
+
+               /* 8ch hdmi interface */
+               dai-link-6 {
                        sound-dai = <&tdmif_b>;
                        dai-format = "i2s";
                        dai-tdm-slot-tx-mask-0 = <1 1>;
                        dai-tdm-slot-tx-mask-3 = <1 1>;
                        mclk-fs = <256>;
 
-                       codec {
+                       codec-0 {
                                sound-dai = <&tohdmitx TOHDMITX_I2S_IN_B>;
                        };
+
+                       codec-1 {
+                               sound-dai = <&toacodec TOACODEC_IN_B>;
+                       };
+               };
+
+               /* i2s jack output interface */
+               dai-link-7 {
+                       sound-dai = <&tdmif_c>;
+                       dai-format = "i2s";
+                       dai-tdm-slot-tx-mask-0 = <1 1>;
+                       mclk-fs = <256>;
+
+                       codec-0 {
+                               sound-dai = <&tohdmitx TOHDMITX_I2S_IN_C>;
+                       };
+
+                       codec-1 {
+                               sound-dai = <&toacodec TOACODEC_IN_C>;
+                       };
                };
 
                /* hdmi glue */
-               dai-link-4 {
+               dai-link-8 {
                        sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
 
                        codec {
                                sound-dai = <&hdmi_tx>;
                        };
                };
+
+               /* acodec glue */
+               dai-link-9 {
+                       sound-dai = <&toacodec TOACODEC_OUT>;
+
+                       codec {
+                               sound-dai = <&acodec>;
+                       };
+               };
        };
 };
 
+&acodec {
+       AVDD-supply = <&vddao_1v8>;
+       status = "okay";
+};
+
 &arb {
        status = "okay";
 };
        status = "okay";
 };
 
+&tdmif_c {
+       status = "okay";
+};
+
+&tdmin_a {
+       status = "okay";
+};
+
+&tdmin_b {
+       status = "okay";
+};
+
+&tdmin_c {
+       status = "okay";
+};
+
+&tdmin_lb {
+       status = "okay";
+};
+
 &tdmout_b {
        status = "okay";
 };
 
+&tdmout_c {
+       status = "okay";
+};
+
+&toacodec {
+       status = "okay";
+};
+
 &tohdmitx {
        status = "okay";
 };
 
+&toddr_a {
+       status = "okay";
+};
+
+&toddr_b {
+       status = "okay";
+};
+
+&toddr_c {
+       status = "okay";
+};
+
 &uart_AO {
        status = "okay";
        pinctrl-0 = <&uart_ao_a_pins>;
index 1ef1e3672b9670aa2a93bebbcf1c15347d4e3325..94f75b4465044dabd5acc8bf330244a3fc0a1d19 100644 (file)
        hdmi-phandle = <&hdmi_tx>;
 };
 
+&cpu_thermal {
+       trips {
+               cpu_active: cpu-active {
+                       temperature = <80000>; /* millicelsius */
+                       hysteresis = <2000>; /* millicelsius */
+                       type = "active";
+               };
+       };
+
+       cooling-maps {
+               map {
+                       trip = <&cpu_active>;
+                       cooling-device = <&khadas_mcu THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
+               };
+       };
+};
+
 &ext_mdio {
        external_phy: ethernet-phy@0 {
                /* Realtek RTL8211F (0x001cc916) */
        pinctrl-0 = <&i2c_ao_sck_pins>, <&i2c_ao_sda_pins>;
        pinctrl-names = "default";
 
+       khadas_mcu: system-controller@18 {
+               compatible = "khadas,mcu";
+               reg = <0x18>;
+               #cooling-cells = <2>;
+       };
+
        gpio_expander: gpio-controller@20 {
                compatible = "ti,tca6408";
                reg = <0x20>;
 
        bus-width = <4>;
        cap-sd-highspeed;
-       sd-uhs-sdr50;
        max-frequency = <100000000>;
 
        non-removable;
        pinctrl-0 = <&nor_pins>;
        pinctrl-names = "default";
 
-       w25q32: spi-flash@0 {
+       w25q128: spi-flash@0 {
                #address-cells = <1>;
                #size-cells = <1>;
                compatible = "winbond,w25q128fw", "jedec,spi-nor";
index dbbf29a0dbf6d99c008b8f4851e4b27af4b7f513..0da56c051a0ef97da077025f217e2580afc82b7e 100644 (file)
@@ -8,6 +8,7 @@
 
 #include "meson-sm1.dtsi"
 #include "meson-khadas-vim3.dtsi"
+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
 
 / {
        compatible = "khadas,vim3l", "amlogic,sm1";
                regulator-boot-on;
                regulator-always-on;
        };
+
+       sound {
+               compatible = "amlogic,axg-sound-card";
+               model = "SM1-KHADAS-VIM3L";
+               audio-aux-devs = <&tdmout_a>;
+               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";
+
+               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>;
+               };
+
+               /* 8ch hdmi interface */
+               dai-link-3 {
+                       sound-dai = <&tdmif_a>;
+                       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_A>;
+                       };
+               };
+
+               /* hdmi glue */
+               dai-link-4 {
+                       sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
+
+                       codec {
+                               sound-dai = <&hdmi_tx>;
+                       };
+               };
+       };
+};
+
+&arb {
+       status = "okay";
+};
+
+&clkc_audio {
+       status = "okay";
 };
 
 &cpu0 {
        clock-latency = <50000>;
 };
 
+&frddr_a {
+       status = "okay";
+};
+
+&frddr_b {
+       status = "okay";
+};
+
+&frddr_c {
+       status = "okay";
+};
+
 &pwm_AO_cd {
        pinctrl-0 = <&pwm_ao_d_e_pins>;
        pinctrl-names = "default";
        status = "okay";
 };
 
+&sd_emmc_a {
+       sd-uhs-sdr50;
+};
+
 &usb {
        phys = <&usb2_phy0>, <&usb2_phy1>;
        phy-names = "usb2-phy0", "usb2-phy1";
 };
  */
+
+&tdmif_a {
+       status = "okay";
+};
+
+&tdmout_a {
+       status = "okay";
+};
+
+&tohdmitx {
+       status = "okay";
+};
index 00d90b30f8b49f71b4828246f63d307aeac8d883..cf5a98f0e47c8e4bb1a12ce142a76cf0d889fe79 100644 (file)
@@ -8,6 +8,7 @@
 #include "meson-sm1.dtsi"
 #include <dt-bindings/gpio/meson-g12a-gpio.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/sound/meson-g12a-tohdmitx.h>
 
 / {
        compatible = "hardkernel,odroid-c4", "amlogic,sm1";
                        };
                };
        };
+
+       sound {
+               compatible = "amlogic,axg-sound-card";
+               model = "SM1-ODROID-C4";
+               audio-aux-devs = <&tdmout_b>;
+               audio-routing = "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";
+
+               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>;
+               };
+
+               /* 8ch hdmi interface */
+               dai-link-3 {
+                       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>;
+                       };
+               };
+
+               /* hdmi glue */
+               dai-link-4 {
+                       sound-dai = <&tohdmitx TOHDMITX_I2S_OUT>;
+
+                       codec {
+                               sound-dai = <&hdmi_tx>;
+                       };
+               };
+       };
+};
+
+&arb {
+       status = "okay";
+};
+
+&clkc_audio {
+       status = "okay";
 };
 
 &cpu0 {
        amlogic,tx-delay-ns = <2>;
 };
 
+&frddr_a {
+       status = "okay";
+};
+
+&frddr_b {
+       status = "okay";
+};
+
+&frddr_c {
+       status = "okay";
+};
+
 &gpio {
        gpio-line-names =
                /* GPIOZ */
        vqmmc-supply = <&flash_1v8>;
 };
 
+&tdmif_b {
+       status = "okay";
+};
+
+&tdmout_b {
+       status = "okay";
+};
+
+&tohdmitx {
+       status = "okay";
+};
+
 &uart_AO {
        status = "okay";
        pinctrl-0 = <&uart_ao_a_pins>;
index b0d65d73db960472b5c2d05a231bd1c519126621..40d49940d8a8dfb1b55aa9a56b8d674ac16d1a30 100644 (file)
 #define CLKID_CPU3_CLK                         255
 #define CLKID_SPICC0_SCLK                      258
 #define CLKID_SPICC1_SCLK                      261
+#define CLKID_NNA_AXI_CLK                      264
+#define CLKID_NNA_CORE_CLK                     267
 
 #endif /* __G12A_CLKC_H */
diff --git a/include/dt-bindings/sound/meson-g12a-toacodec.h b/include/dt-bindings/sound/meson-g12a-toacodec.h
new file mode 100644 (file)
index 0000000..69d7a75
--- /dev/null
@@ -0,0 +1,10 @@
+/* SPDX-License-Identifier: GPL-2.0 */
+#ifndef __DT_MESON_G12A_TOACODEC_H
+#define __DT_MESON_G12A_TOACODEC_H
+
+#define TOACODEC_IN_A  0
+#define TOACODEC_IN_B  1
+#define TOACODEC_IN_C  2
+#define TOACODEC_OUT   3
+
+#endif /* __DT_MESON_G12A_TOACODEC_H */