2023-10-03 12:12:28

by Jerome Brunet

[permalink] [raw]
Subject: [PATCH] arm64: dts: amlogic: add spdifout on libretech potatoes

SPDIF output is available libretech's Potato v1 and v2, on a dedicated
header. Add the codec, pinmux and dai link to enable it on the sound card.

Signed-off-by: Jerome Brunet <[email protected]>
---
.../amlogic/meson-gxl-s905x-libretech-cc-v2.dts | 17 +++++++++++++++++
.../amlogic/meson-gxl-s905x-libretech-cc.dts | 17 +++++++++++++++++
2 files changed, 34 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts
index 2825db91e462..ca6f922d162d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts
@@ -23,6 +23,13 @@ aliases {
spi0 = &spifc;
};

+ spdif_dit: audio-codec {
+ #sound-dai-cells = <0>;
+ compatible = "linux,spdif-dit";
+ status = "okay";
+ sound-name-prefix = "9J2";
+ };
+
chosen {
stdout-path = "serial0:115200n8";
};
@@ -189,11 +196,21 @@ codec-0 {
sound-dai = <&hdmi_tx>;
};
};
+
+ dai-link-3 {
+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
+
+ codec-0 {
+ sound-dai = <&spdif_dit>;
+ };
+ };
};
};

&aiu {
status = "okay";
+ pinctrl-0 = <&spdif_out_h_pins>;
+ pinctrl-names = "default";
};

&cec_AO {
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
index 27093e6ac9e2..8b3234a9cb45 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
@@ -29,6 +29,13 @@ dio2133: analog-amplifier {
enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
};

+ spdif_dit: audio-codec {
+ #sound-dai-cells = <0>;
+ compatible = "linux,spdif-dit";
+ status = "okay";
+ sound-name-prefix = "9J1";
+ };
+
chosen {
stdout-path = "serial0:115200n8";
};
@@ -183,6 +190,14 @@ codec-0 {
sound-dai = <&acodec>;
};
};
+
+ dai-link-4 {
+ sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
+
+ codec-0 {
+ sound-dai = <&spdif_dit>;
+ };
+ };
};
};

@@ -193,6 +208,8 @@ &acodec {

&aiu {
status = "okay";
+ pinctrl-0 = <&spdif_out_h_pins>;
+ pinctrl-names = "default";
};

&cec_AO {
--
2.40.1


2023-10-03 14:24:42

by Jerome Brunet

[permalink] [raw]
Subject: Re: [PATCH] arm64: dts: amlogic: add spdifout on libretech potatoes


On Tue 03 Oct 2023 at 14:12, Jerome Brunet <[email protected]> wrote:

> SPDIF output is available libretech's Potato v1 and v2, on a dedicated
> header. Add the codec, pinmux and dai link to enable it on the sound card.

After discussing further within Da,
while the the schematics says SPDIF_OUT this is actually not the only
use of the header. This mis-understanding is on me.

Please do not merge this change.

At least the information is out there.

>
> Signed-off-by: Jerome Brunet <[email protected]>
> ---
> .../amlogic/meson-gxl-s905x-libretech-cc-v2.dts | 17 +++++++++++++++++
> .../amlogic/meson-gxl-s905x-libretech-cc.dts | 17 +++++++++++++++++
> 2 files changed, 34 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts
> index 2825db91e462..ca6f922d162d 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc-v2.dts
> @@ -23,6 +23,13 @@ aliases {
> spi0 = &spifc;
> };
>
> + spdif_dit: audio-codec {
> + #sound-dai-cells = <0>;
> + compatible = "linux,spdif-dit";
> + status = "okay";
> + sound-name-prefix = "9J2";
> + };
> +
> chosen {
> stdout-path = "serial0:115200n8";
> };
> @@ -189,11 +196,21 @@ codec-0 {
> sound-dai = <&hdmi_tx>;
> };
> };
> +
> + dai-link-3 {
> + sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
> +
> + codec-0 {
> + sound-dai = <&spdif_dit>;
> + };
> + };
> };
> };
>
> &aiu {
> status = "okay";
> + pinctrl-0 = <&spdif_out_h_pins>;
> + pinctrl-names = "default";
> };
>
> &cec_AO {
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
> index 27093e6ac9e2..8b3234a9cb45 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-libretech-cc.dts
> @@ -29,6 +29,13 @@ dio2133: analog-amplifier {
> enable-gpios = <&gpio GPIOH_5 GPIO_ACTIVE_HIGH>;
> };
>
> + spdif_dit: audio-codec {
> + #sound-dai-cells = <0>;
> + compatible = "linux,spdif-dit";
> + status = "okay";
> + sound-name-prefix = "9J1";
> + };
> +
> chosen {
> stdout-path = "serial0:115200n8";
> };
> @@ -183,6 +190,14 @@ codec-0 {
> sound-dai = <&acodec>;
> };
> };
> +
> + dai-link-4 {
> + sound-dai = <&aiu AIU_CPU CPU_SPDIF_ENCODER>;
> +
> + codec-0 {
> + sound-dai = <&spdif_dit>;
> + };
> + };
> };
> };
>
> @@ -193,6 +208,8 @@ &acodec {
>
> &aiu {
> status = "okay";
> + pinctrl-0 = <&spdif_out_h_pins>;
> + pinctrl-names = "default";
> };
>
> &cec_AO {