]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
arm64: dts: meson: add audio playback to wetek-play2
authorChristian Hewitt <christianshewitt@gmail.com>
Thu, 3 Dec 2020 06:00:23 +0000 (06:00 +0000)
committerKevin Hilman <khilman@baylibre.com>
Mon, 7 Dec 2020 19:05:56 +0000 (11:05 -0800)
Add initial support limited to HDMI i2s and SPDIF (LPCM).

Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
Acked-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Kevin Hilman <khilman@baylibre.com>
Link: https://lore.kernel.org/r/20201203060023.9454-8-christianshewitt@gmail.com
arch/arm64/boot/dts/amlogic/meson-gxbb-wetek-play2.dts

index 2ab8a3d10079188240a19934ca907a69765a8641..f2562c7de67ce747885cea9784125ab7d614c5d4 100644 (file)
@@ -8,11 +8,19 @@
 
 #include "meson-gxbb-wetek.dtsi"
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/sound/meson-aiu.h>
 
 / {
        compatible = "wetek,play2", "amlogic,meson-gxbb";
        model = "WeTek Play 2";
 
+       spdif_dit: audio-codec-0 {
+               #sound-dai-cells = <0>;
+               compatible = "linux,spdif-dit";
+               status = "okay";
+               sound-name-prefix = "DIT";
+       };
+
        leds {
                led-wifi {
                        label = "wetek-play:wifi-status";
                        gpios = <&gpio_ao GPIOAO_3 GPIO_ACTIVE_LOW>;
                };
        };
+
+       sound {
+               compatible = "amlogic,gx-sound-card";
+               model = "GXBB-WETEK-PLAY2";
+               assigned-clocks = <&clkc CLKID_MPLL0>,
+                                 <&clkc CLKID_MPLL1>,
+                                 <&clkc CLKID_MPLL2>;
+               assigned-clock-parents = <0>, <0>, <0>;
+               assigned-clock-rates = <294912000>,
+                                      <270950400>,
+                                      <393216000>;
+               status = "okay";
+
+               dai-link-0 {
+                       sound-dai = <&aiu AIU_CPU CPU_I2S_FIFO>;
+               };
+
+               dai-link-1 {
+                       sound-dai = <&aiu AIU_CPU CPU_SPDIF_FIFO>;
+               };
+
+               dai-link-2 {
+                       sound-dai = <&aiu AIU_CPU CPU_I2S_ENCODER>;
+                       dai-format = "i2s";
+                       mclk-fs = <256>;
+
+                       codec-0 {
+                               sound-dai = <&aiu AIU_HDMI CTRL_I2S>;
+                       };
+               };
+
+               dai-link-3 {
+                       sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
+
+                       codec-0 {
+                               sound-dai = <&spdif_dit>;
+                       };
+               };
+
+               dai-link-4 {
+                       sound-dai = <&aiu AIU_HDMI CTRL_OUT>;
+
+                       codec-0 {
+                               sound-dai = <&hdmi_tx>;
+                       };
+               };
+       };
+};
+
+&aiu {
+       status = "okay";
+       pinctrl-0 = <&spdif_out_y_pins>;
+       pinctrl-names = "default";
 };
 
 &i2c_A {