LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH 1/2] arm64: dts: meson: add spdif out to khadas-vim
@ 2021-08-10  4:16 Artem Lapkin
  2021-08-10  4:16 ` [PATCH 2/2] arm64: dts: meson: add spdif out to khadas-vim2 Artem Lapkin
  2021-08-10  7:55 ` [PATCH 1/2] arm64: dts: meson: add spdif out to khadas-vim Neil Armstrong
  0 siblings, 2 replies; 4+ messages in thread
From: Artem Lapkin @ 2021-08-10  4:16 UTC (permalink / raw)
  To: narmstrong
  Cc: jbrunet, linux-arm-kernel, linux-amlogic, linux-kernel,
	christianshewitt, art, nick, gouwa

Add spdif output audio support to khadas-vim

Signed-off-by: Artem Lapkin <art@khadas.com>
---
 .../dts/amlogic/meson-gxl-s905x-khadas-vim.dts  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
index 60feac0179c0..01f13822a616 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
@@ -64,6 +64,13 @@ hdmi_connector_in: endpoint {
 		};
 	};
 
+	spdif_dit: audio-codec-0 {
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dit";
+		status = "okay";
+		sound-name-prefix = "DIT";
+	};
+
 	sound {
 		compatible = "amlogic,gx-sound-card";
 		model = "KHADAS-VIM";
@@ -97,11 +104,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 {
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH 2/2] arm64: dts: meson: add spdif out to khadas-vim2
  2021-08-10  4:16 [PATCH 1/2] arm64: dts: meson: add spdif out to khadas-vim Artem Lapkin
@ 2021-08-10  4:16 ` Artem Lapkin
  2021-08-10  7:55 ` [PATCH 1/2] arm64: dts: meson: add spdif out to khadas-vim Neil Armstrong
  1 sibling, 0 replies; 4+ messages in thread
From: Artem Lapkin @ 2021-08-10  4:16 UTC (permalink / raw)
  To: narmstrong
  Cc: jbrunet, linux-arm-kernel, linux-amlogic, linux-kernel,
	christianshewitt, art, nick, gouwa

Add spdif output audio support to khadas-vim2

Signed-off-by: Artem Lapkin <art@khadas.com>
---
 .../boot/dts/amlogic/meson-gxm-khadas-vim2.dts  | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index 18a4b7a6c5df..a129a827f6ee 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -146,6 +146,13 @@ wifi32k: wifi32k {
 		pwms = <&pwm_ef 0 30518 0>; /* PWM_E at 32.768KHz */
 	};
 
+	spdif_dit: audio-codec-0 {
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dit";
+		status = "okay";
+		sound-name-prefix = "DIT";
+	};
+
 	sound {
 		compatible = "amlogic,gx-sound-card";
 		model = "KHADAS-VIM2";
@@ -179,11 +186,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 {
-- 
2.25.1


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] arm64: dts: meson: add spdif out to khadas-vim
  2021-08-10  4:16 [PATCH 1/2] arm64: dts: meson: add spdif out to khadas-vim Artem Lapkin
  2021-08-10  4:16 ` [PATCH 2/2] arm64: dts: meson: add spdif out to khadas-vim2 Artem Lapkin
@ 2021-08-10  7:55 ` Neil Armstrong
  2021-08-10 23:21   ` Art Nikpal
  1 sibling, 1 reply; 4+ messages in thread
From: Neil Armstrong @ 2021-08-10  7:55 UTC (permalink / raw)
  To: Artem Lapkin
  Cc: jbrunet, linux-arm-kernel, linux-amlogic, linux-kernel,
	christianshewitt, art, nick, gouwa

Hi,

On 10/08/2021 06:16, Artem Lapkin wrote:
> Add spdif output audio support to khadas-vim
> 
> Signed-off-by: Artem Lapkin <art@khadas.com>
> ---
>  .../dts/amlogic/meson-gxl-s905x-khadas-vim.dts  | 17 +++++++++++++++++
>  1 file changed, 17 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> index 60feac0179c0..01f13822a616 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> @@ -64,6 +64,13 @@ hdmi_connector_in: endpoint {
>  		};
>  	};
>  
> +	spdif_dit: audio-codec-0 {
> +		#sound-dai-cells = <0>;
> +		compatible = "linux,spdif-dit";
> +		status = "okay";
> +		sound-name-prefix = "DIT";
> +	};
> +
>  	sound {
>  		compatible = "amlogic,gx-sound-card";
>  		model = "KHADAS-VIM";
> @@ -97,11 +104,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 {
> 

AFAIK the board doesn't have a physical SPDIF output, but one of the 40pin header can output SPDIF, right ?

In this case, following the other boards mainline definitions, we do not enable any function by default
for pins on the 40pin (or other programmable) headers.

There is still ongoing discussions on how to handle that on a more generic level, but you should write a bunch
of DT overlays for the VIM boards to enable optional functions like SPDIF and store then in a public git
tree for everybody to use (like armbian or LibreELEC for example) from the U-Boot stage.

Neil

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH 1/2] arm64: dts: meson: add spdif out to khadas-vim
  2021-08-10  7:55 ` [PATCH 1/2] arm64: dts: meson: add spdif out to khadas-vim Neil Armstrong
@ 2021-08-10 23:21   ` Art Nikpal
  0 siblings, 0 replies; 4+ messages in thread
From: Art Nikpal @ 2021-08-10 23:21 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Jerome Brunet, linux-arm-kernel, open list:ARM/Amlogic Meson...,
	LKML, Christian Hewitt, Artem Lapkin, Nick Xie, Gouwa Wang

> AFAIK the board doesn't have a physical SPDIF output, but one of the 40pin header can output SPDIF, right ?
Yes it's right

>In this case, following the other boards mainline definitions, we do not enable any function by default
For pins on the 40pin (or other programmable) headers.

ok ! now  i'm understand reason

But maybe it is possible to add this area as commented /* */
and users will have possibilities to uncomment  it.

> DT overlays
Yes but I still don't understand how-to apply dt overlays for EFI+grub
may be somebody can clarify this problem?

On Tue, Aug 10, 2021 at 3:55 PM Neil Armstrong <narmstrong@baylibre.com> wrote:
>
> Hi,
>
> On 10/08/2021 06:16, Artem Lapkin wrote:
> > Add spdif output audio support to khadas-vim
> >
> > Signed-off-by: Artem Lapkin <art@khadas.com>
> > ---
> >  .../dts/amlogic/meson-gxl-s905x-khadas-vim.dts  | 17 +++++++++++++++++
> >  1 file changed, 17 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> > index 60feac0179c0..01f13822a616 100644
> > --- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> > +++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905x-khadas-vim.dts
> > @@ -64,6 +64,13 @@ hdmi_connector_in: endpoint {
> >               };
> >       };
> >
> > +     spdif_dit: audio-codec-0 {
> > +             #sound-dai-cells = <0>;
> > +             compatible = "linux,spdif-dit";
> > +             status = "okay";
> > +             sound-name-prefix = "DIT";
> > +     };
> > +
> >       sound {
> >               compatible = "amlogic,gx-sound-card";
> >               model = "KHADAS-VIM";
> > @@ -97,11 +104,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 {
> >
>
> AFAIK the board doesn't have a physical SPDIF output, but one of the 40pin header can output SPDIF, right ?
>
> In this case, following the other boards mainline definitions, we do not enable any function by default
> for pins on the 40pin (or other programmable) headers.
>
> There is still ongoing discussions on how to handle that on a more generic level, but you should write a bunch
> of DT overlays for the VIM boards to enable optional functions like SPDIF and store then in a public git
> tree for everybody to use (like armbian or LibreELEC for example) from the U-Boot stage.
>
> Neil

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-08-10 23:21 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-08-10  4:16 [PATCH 1/2] arm64: dts: meson: add spdif out to khadas-vim Artem Lapkin
2021-08-10  4:16 ` [PATCH 2/2] arm64: dts: meson: add spdif out to khadas-vim2 Artem Lapkin
2021-08-10  7:55 ` [PATCH 1/2] arm64: dts: meson: add spdif out to khadas-vim Neil Armstrong
2021-08-10 23:21   ` Art Nikpal

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).