diff mbox series

arm64: dts: meson: add audio playback to vega-s95 dtsi

Message ID 20210804140258.4666-1-christianshewitt@gmail.com
State Accepted
Commit c6cf488e3bfdf92427686317d99e0342516753de
Headers show
Series arm64: dts: meson: add audio playback to vega-s95 dtsi | expand

Commit Message

Christian Hewitt Aug. 4, 2021, 2:02 p.m. UTC
Add initial support limited to HDMI i2s and SPDIF (LPCM).

Tested-by: Oleg Ivanov <150balbes@yandex.ru>
Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>
---
 .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 61 +++++++++++++++++++
 1 file changed, 61 insertions(+)

Comments

Neil Armstrong Aug. 10, 2021, 7:48 a.m. UTC | #1
On 04/08/2021 16:02, Christian Hewitt wrote:
> Add initial support limited to HDMI i2s and SPDIF (LPCM).

> 

> Tested-by: Oleg Ivanov <150balbes@yandex.ru>

> Signed-off-by: Christian Hewitt <christianshewitt@gmail.com>

> ---

>  .../boot/dts/amlogic/meson-gxbb-vega-s95.dtsi | 61 +++++++++++++++++++

>  1 file changed, 61 insertions(+)

> 

> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi

> index 9b0b81f191f1..66daf3af34c3 100644

> --- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi

> +++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi

> @@ -4,6 +4,7 @@

>   */

>  

>  #include "meson-gxbb.dtsi"

> +#include <dt-bindings/sound/meson-aiu.h>

>  

>  / {

>  	compatible = "tronsmart,vega-s95", "amlogic,meson-gxbb";

> @@ -17,6 +18,13 @@

>  		stdout-path = "serial0:115200n8";

>  	};

>  

> +	spdif_dit: audio-codec-0 {

> +		#sound-dai-cells = <0>;

> +		compatible = "linux,spdif-dit";

> +		status = "okay";

> +		sound-name-prefix = "DIT";

> +	};

> +

>  	leds {

>  		compatible = "gpio-leds";

>  

> @@ -97,6 +105,59 @@

>  		clocks = <&wifi32k>;

>  		clock-names = "ext_clock";

>  	};

> +

> +	sound {

> +		compatible = "amlogic,gx-sound-card";

> +		model = "VEGA-S95";

> +		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";

>  };

>  

>  &cec_AO {

> 


Reviewed-by: Neil Armstrong <narmstrong@baylibre.com>
Neil Armstrong Aug. 10, 2021, 7:58 a.m. UTC | #2
Hi,

On Wed, 4 Aug 2021 14:02:58 +0000, Christian Hewitt wrote:
> Add initial support limited to HDMI i2s and SPDIF (LPCM).


Thanks, Applied to https://git.kernel.org/pub/scm/linux/kernel/git/amlogic/linux.git (v5.15/dt64)

[1/1] arm64: dts: meson: add audio playback to vega-s95 dtsi
      https://git.kernel.org/amlogic/c/c6cf488e3bfdf92427686317d99e0342516753de

-- 
Neil
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 9b0b81f191f1..66daf3af34c3 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -4,6 +4,7 @@ 
  */
 
 #include "meson-gxbb.dtsi"
+#include <dt-bindings/sound/meson-aiu.h>
 
 / {
 	compatible = "tronsmart,vega-s95", "amlogic,meson-gxbb";
@@ -17,6 +18,13 @@ 
 		stdout-path = "serial0:115200n8";
 	};
 
+	spdif_dit: audio-codec-0 {
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dit";
+		status = "okay";
+		sound-name-prefix = "DIT";
+	};
+
 	leds {
 		compatible = "gpio-leds";
 
@@ -97,6 +105,59 @@ 
 		clocks = <&wifi32k>;
 		clock-names = "ext_clock";
 	};
+
+	sound {
+		compatible = "amlogic,gx-sound-card";
+		model = "VEGA-S95";
+		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";
 };
 
 &cec_AO {