devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v5 0/3] Allwinner H6 SPDIF support
@ 2019-08-11 20:31 Clément Péron
       [not found] ` <20190811203144.5999-1-peron.clem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  0 siblings, 1 reply; 8+ messages in thread
From: Clément Péron @ 2019-08-11 20:31 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Clément Péron

Allwinner H6 SoC has a SPDIF controller called One Wire Audio (OWA) which
is different from the previous H3 generation and not compatible.

Difference are an increase of fifo sizes, some memory mapping are different
and there is now the possibility to output the master clock on a pin.

Actually all these features are unused and only a bit for flushing the TX
fifo is required.

Changes since v4:
 - rename audio card name to sun50i-h6-spdif
 - drop patches already merged

Changes since v3:
 - rename reg_fctl_ftx to val_fctl_ftx
 - rebase this series on sound-next
 - fix dt-bindings due to change in sound-next
 - change node name sound_spdif to sound-spdif

Changes since v2:
 - Split quirks and H6 support patch
 - Add specific section for quirks comment

Changes since v1:
 - Remove H3 compatible
 - Add TX fifo bit flush quirks
 - Add H6 bindings in SPDIF driver


Clément Péron (3):
  arm64: dts: allwinner: Add SPDIF node for Allwinner H6
  arm64: dts: allwinner: h6: Enable SPDIF for Beelink GS1
  arm64: defconfig: Enable Sun4i SPDIF module

 .../dts/allwinner/sun50i-h6-beelink-gs1.dts   |  4 ++
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi  | 38 +++++++++++++++++++
 arch/arm64/configs/defconfig                  |  1 +
 3 files changed, 43 insertions(+)

-- 
2.20.1

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-1-peron.clem%40gmail.com.

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

* [PATCH v5 1/3] arm64: dts: allwinner: Add SPDIF node for Allwinner H6
       [not found] ` <20190811203144.5999-1-peron.clem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
@ 2019-08-11 20:31   ` Clément Péron
  2019-08-12  4:52     ` [linux-sunxi] " Chen-Yu Tsai
  2019-08-11 20:31   ` [PATCH v5 2/3] arm64: dts: allwinner: h6: Enable SPDIF for Beelink GS1 Clément Péron
  2019-08-11 20:31   ` [PATCH v5 3/3] arm64: defconfig: Enable Sun4i SPDIF module Clément Péron
  2 siblings, 1 reply; 8+ messages in thread
From: Clément Péron @ 2019-08-11 20:31 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Clément Péron

The Allwinner H6 has a SPDIF controller called OWA (One Wire Audio).

Only one pinmuxing is available so set it as default.

Signed-off-by: Clément Péron <peron.clem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
index 7628a7c83096..677eb374678d 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
@@ -83,6 +83,24 @@
 		method = "smc";
 	};
 
+	sound-spdif {
+		compatible = "simple-audio-card";
+		simple-audio-card,name = "sun50i-h6-spdif";
+
+		simple-audio-card,cpu {
+			sound-dai = <&spdif>;
+		};
+
+		simple-audio-card,codec {
+			sound-dai = <&spdif_out>;
+		};
+	};
+
+	spdif_out: spdif-out {
+		#sound-dai-cells = <0>;
+		compatible = "linux,spdif-dit";
+	};
+
 	timer {
 		compatible = "arm,armv8-timer";
 		interrupts = <GIC_PPI 13
@@ -282,6 +300,11 @@
 				bias-pull-up;
 			};
 
+			spdif_tx_pin: spdif-tx-pin {
+				pins = "PH7";
+				function = "spdif";
+			};
+
 			uart0_ph_pins: uart0-ph-pins {
 				pins = "PH0", "PH1";
 				function = "uart0";
@@ -411,6 +434,21 @@
 			};
 		};
 
+		spdif: spdif@5093000 {
+			#sound-dai-cells = <0>;
+			compatible = "allwinner,sun50i-h6-spdif";
+			reg = <0x05093000 0x400>;
+			interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
+			clock-names = "apb", "spdif";
+			resets = <&ccu RST_BUS_SPDIF>;
+			dmas = <&dma 2>;
+			dma-names = "tx";
+			pinctrl-names = "default";
+			pinctrl-0 = <&spdif_tx_pin>;
+			status = "disabled";
+		};
+
 		usb2otg: usb@5100000 {
 			compatible = "allwinner,sun50i-h6-musb",
 				     "allwinner,sun8i-a33-musb";
-- 
2.20.1

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-2-peron.clem%40gmail.com.

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

* [PATCH v5 2/3] arm64: dts: allwinner: h6: Enable SPDIF for Beelink GS1
       [not found] ` <20190811203144.5999-1-peron.clem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2019-08-11 20:31   ` [PATCH v5 1/3] arm64: dts: allwinner: Add SPDIF node for Allwinner H6 Clément Péron
@ 2019-08-11 20:31   ` Clément Péron
  2019-08-11 20:31   ` [PATCH v5 3/3] arm64: defconfig: Enable Sun4i SPDIF module Clément Péron
  2 siblings, 0 replies; 8+ messages in thread
From: Clément Péron @ 2019-08-11 20:31 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Clément Péron

Beelink GS1 board has a SPDIF out connector, so enable it in
the device-tree.

Signed-off-by: Clément Péron <peron.clem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
index 0dc33c90dd60..76a95ad33dc5 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-beelink-gs1.dts
@@ -243,6 +243,10 @@
 	vcc-pm-supply = <&reg_aldo1>;
 };
 
+&spdif {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_ph_pins>;
-- 
2.20.1

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-3-peron.clem%40gmail.com.

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

* [PATCH v5 3/3] arm64: defconfig: Enable Sun4i SPDIF module
       [not found] ` <20190811203144.5999-1-peron.clem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
  2019-08-11 20:31   ` [PATCH v5 1/3] arm64: dts: allwinner: Add SPDIF node for Allwinner H6 Clément Péron
  2019-08-11 20:31   ` [PATCH v5 2/3] arm64: dts: allwinner: h6: Enable SPDIF for Beelink GS1 Clément Péron
@ 2019-08-11 20:31   ` Clément Péron
  2019-08-12  6:37     ` [linux-sunxi] " Chen-Yu Tsai
  2 siblings, 1 reply; 8+ messages in thread
From: Clément Péron @ 2019-08-11 20:31 UTC (permalink / raw)
  To: Maxime Ripard, Rob Herring
  Cc: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	devicetree-u79uwXL29TY76Z2rM5mHXA,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-sunxi-/JYPxA39Uh5TLH3MbocFFw, Clément Péron

Allwinner A64 and H6 use the Sun4i SPDIF driver.

Enable this to allow a proper support.

Signed-off-by: Clément Péron <peron.clem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/configs/defconfig b/arch/arm64/configs/defconfig
index 0e58ef02880c..b0638849c14c 100644
--- a/arch/arm64/configs/defconfig
+++ b/arch/arm64/configs/defconfig
@@ -558,6 +558,7 @@ CONFIG_SND_SOC_ROCKCHIP_RT5645=m
 CONFIG_SND_SOC_RK3399_GRU_SOUND=m
 CONFIG_SND_SOC_SAMSUNG=y
 CONFIG_SND_SOC_RCAR=m
+CONFIG_SND_SUN4I_SPDIF=m
 CONFIG_SND_SOC_AK4613=m
 CONFIG_SND_SOC_ES7134=m
 CONFIG_SND_SOC_ES7241=m
-- 
2.20.1

-- 
You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-4-peron.clem%40gmail.com.

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

* Re: [linux-sunxi] [PATCH v5 1/3] arm64: dts: allwinner: Add SPDIF node for Allwinner H6
  2019-08-11 20:31   ` [PATCH v5 1/3] arm64: dts: allwinner: Add SPDIF node for Allwinner H6 Clément Péron
@ 2019-08-12  4:52     ` Chen-Yu Tsai
  2019-08-12  6:34       ` Chen-Yu Tsai
  0 siblings, 1 reply; 8+ messages in thread
From: Chen-Yu Tsai @ 2019-08-12  4:52 UTC (permalink / raw)
  To: Clément Péron
  Cc: Maxime Ripard, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel, linux-sunxi

Hi,

On Mon, Aug 12, 2019 at 4:31 AM Clément Péron <peron.clem@gmail.com> wrote:
>
> The Allwinner H6 has a SPDIF controller called OWA (One Wire Audio).
>
> Only one pinmuxing is available so set it as default.
>
> Signed-off-by: Clément Péron <peron.clem@gmail.com>
> ---
>  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++++++++
>  1 file changed, 38 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> index 7628a7c83096..677eb374678d 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> @@ -83,6 +83,24 @@
>                 method = "smc";
>         };
>
> +       sound-spdif {
> +               compatible = "simple-audio-card";
> +               simple-audio-card,name = "sun50i-h6-spdif";
> +
> +               simple-audio-card,cpu {
> +                       sound-dai = <&spdif>;
> +               };
> +
> +               simple-audio-card,codec {
> +                       sound-dai = <&spdif_out>;
> +               };
> +       };
> +
> +       spdif_out: spdif-out {
> +               #sound-dai-cells = <0>;
> +               compatible = "linux,spdif-dit";
> +       };
> +

We've always had this part in the board dts. It isn't relevant to boards
that don't have SPDIF output.

Also, not so relevant here, but there are different simple sound card
constructs. Some support multiple audio streams with dynamic PCM routing.
How these are configured really depends on what interfaces are usable.

So keeping this at the board level is IMO a better choice.

ChenYu


>         timer {
>                 compatible = "arm,armv8-timer";
>                 interrupts = <GIC_PPI 13
> @@ -282,6 +300,11 @@
>                                 bias-pull-up;
>                         };
>
> +                       spdif_tx_pin: spdif-tx-pin {
> +                               pins = "PH7";
> +                               function = "spdif";
> +                       };
> +
>                         uart0_ph_pins: uart0-ph-pins {
>                                 pins = "PH0", "PH1";
>                                 function = "uart0";
> @@ -411,6 +434,21 @@
>                         };
>                 };
>
> +               spdif: spdif@5093000 {
> +                       #sound-dai-cells = <0>;
> +                       compatible = "allwinner,sun50i-h6-spdif";
> +                       reg = <0x05093000 0x400>;
> +                       interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
> +                       clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
> +                       clock-names = "apb", "spdif";
> +                       resets = <&ccu RST_BUS_SPDIF>;
> +                       dmas = <&dma 2>;
> +                       dma-names = "tx";
> +                       pinctrl-names = "default";
> +                       pinctrl-0 = <&spdif_tx_pin>;
> +                       status = "disabled";
> +               };
> +
>                 usb2otg: usb@5100000 {
>                         compatible = "allwinner,sun50i-h6-musb",
>                                      "allwinner,sun8i-a33-musb";
> --
> 2.20.1
>
> --
> You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-2-peron.clem%40gmail.com.

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

* Re: [linux-sunxi] [PATCH v5 1/3] arm64: dts: allwinner: Add SPDIF node for Allwinner H6
  2019-08-12  4:52     ` [linux-sunxi] " Chen-Yu Tsai
@ 2019-08-12  6:34       ` Chen-Yu Tsai
  2019-08-12  7:11         ` Clément Péron
  0 siblings, 1 reply; 8+ messages in thread
From: Chen-Yu Tsai @ 2019-08-12  6:34 UTC (permalink / raw)
  To: Clément Péron
  Cc: Chen-Yu Tsai, Maxime Ripard, Rob Herring, linux-arm-kernel,
	devicetree, linux-kernel, linux-sunxi

On Mon, Aug 12, 2019 at 12:52 PM Chen-Yu Tsai <wens@kernel.org> wrote:
>
> Hi,
>
> On Mon, Aug 12, 2019 at 4:31 AM Clément Péron <peron.clem@gmail.com> wrote:
> >
> > The Allwinner H6 has a SPDIF controller called OWA (One Wire Audio).
> >
> > Only one pinmuxing is available so set it as default.
> >
> > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > ---
> >  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++++++++
> >  1 file changed, 38 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > index 7628a7c83096..677eb374678d 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > @@ -83,6 +83,24 @@
> >                 method = "smc";
> >         };
> >
> > +       sound-spdif {
> > +               compatible = "simple-audio-card";
> > +               simple-audio-card,name = "sun50i-h6-spdif";
> > +
> > +               simple-audio-card,cpu {
> > +                       sound-dai = <&spdif>;
> > +               };
> > +
> > +               simple-audio-card,codec {
> > +                       sound-dai = <&spdif_out>;
> > +               };
> > +       };
> > +
> > +       spdif_out: spdif-out {
> > +               #sound-dai-cells = <0>;
> > +               compatible = "linux,spdif-dit";
> > +       };
> > +
>
> We've always had this part in the board dts. It isn't relevant to boards
> that don't have SPDIF output.
>
> Also, not so relevant here, but there are different simple sound card
> constructs. Some support multiple audio streams with dynamic PCM routing.
> How these are configured really depends on what interfaces are usable.
>
> So keeping this at the board level is IMO a better choice.

Forgot to mention. Both patches and all parts in this patch are OK. It's
just the parts the need to be moved.


> ChenYu
>
>
> >         timer {
> >                 compatible = "arm,armv8-timer";
> >                 interrupts = <GIC_PPI 13
> > @@ -282,6 +300,11 @@
> >                                 bias-pull-up;
> >                         };
> >
> > +                       spdif_tx_pin: spdif-tx-pin {
> > +                               pins = "PH7";
> > +                               function = "spdif";
> > +                       };
> > +
> >                         uart0_ph_pins: uart0-ph-pins {
> >                                 pins = "PH0", "PH1";
> >                                 function = "uart0";
> > @@ -411,6 +434,21 @@
> >                         };
> >                 };
> >
> > +               spdif: spdif@5093000 {
> > +                       #sound-dai-cells = <0>;
> > +                       compatible = "allwinner,sun50i-h6-spdif";
> > +                       reg = <0x05093000 0x400>;
> > +                       interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
> > +                       clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
> > +                       clock-names = "apb", "spdif";
> > +                       resets = <&ccu RST_BUS_SPDIF>;
> > +                       dmas = <&dma 2>;
> > +                       dma-names = "tx";
> > +                       pinctrl-names = "default";
> > +                       pinctrl-0 = <&spdif_tx_pin>;
> > +                       status = "disabled";
> > +               };
> > +
> >                 usb2otg: usb@5100000 {
> >                         compatible = "allwinner,sun50i-h6-musb",
> >                                      "allwinner,sun8i-a33-musb";
> > --
> > 2.20.1
> >
> > --
> > You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> > To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-2-peron.clem%40gmail.com.

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

* Re: [linux-sunxi] [PATCH v5 3/3] arm64: defconfig: Enable Sun4i SPDIF module
  2019-08-11 20:31   ` [PATCH v5 3/3] arm64: defconfig: Enable Sun4i SPDIF module Clément Péron
@ 2019-08-12  6:37     ` Chen-Yu Tsai
  0 siblings, 0 replies; 8+ messages in thread
From: Chen-Yu Tsai @ 2019-08-12  6:37 UTC (permalink / raw)
  To: Clément Péron
  Cc: devicetree, Maxime Ripard, linux-kernel, linux-sunxi,
	Rob Herring, linux-arm-kernel

On Mon, Aug 12, 2019 at 4:32 AM Clément Péron <peron.clem@gmail.com> wrote:
>
> Allwinner A64 and H6 use the Sun4i SPDIF driver.
>
> Enable this to allow a proper support.
>
> Signed-off-by: Clément Péron <peron.clem@gmail.com>

Applied. Thanks.

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [linux-sunxi] [PATCH v5 1/3] arm64: dts: allwinner: Add SPDIF node for Allwinner H6
  2019-08-12  6:34       ` Chen-Yu Tsai
@ 2019-08-12  7:11         ` Clément Péron
  0 siblings, 0 replies; 8+ messages in thread
From: Clément Péron @ 2019-08-12  7:11 UTC (permalink / raw)
  To: Chen-Yu Tsai
  Cc: Maxime Ripard, Rob Herring, linux-arm-kernel, devicetree,
	linux-kernel, linux-sunxi

Hi Chen-Yu,

On Mon, 12 Aug 2019 at 08:35, Chen-Yu Tsai <wens@kernel.org> wrote:
>
> On Mon, Aug 12, 2019 at 12:52 PM Chen-Yu Tsai <wens@kernel.org> wrote:
> >
> > Hi,
> >
> > On Mon, Aug 12, 2019 at 4:31 AM Clément Péron <peron.clem@gmail.com> wrote:
> > >
> > > The Allwinner H6 has a SPDIF controller called OWA (One Wire Audio).
> > >
> > > Only one pinmuxing is available so set it as default.
> > >
> > > Signed-off-by: Clément Péron <peron.clem@gmail.com>
> > > ---
> > >  arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++++++++
> > >  1 file changed, 38 insertions(+)
> > >
> > > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > index 7628a7c83096..677eb374678d 100644
> > > --- a/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > +++ b/arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi
> > > @@ -83,6 +83,24 @@
> > >                 method = "smc";
> > >         };
> > >
> > > +       sound-spdif {
> > > +               compatible = "simple-audio-card";
> > > +               simple-audio-card,name = "sun50i-h6-spdif";
> > > +
> > > +               simple-audio-card,cpu {
> > > +                       sound-dai = <&spdif>;
> > > +               };
> > > +
> > > +               simple-audio-card,codec {
> > > +                       sound-dai = <&spdif_out>;
> > > +               };
> > > +       };
> > > +
> > > +       spdif_out: spdif-out {
> > > +               #sound-dai-cells = <0>;
> > > +               compatible = "linux,spdif-dit";
> > > +       };
> > > +
> >
> > We've always had this part in the board dts. It isn't relevant to boards
> > that don't have SPDIF output.
> >
> > Also, not so relevant here, but there are different simple sound card
> > constructs. Some support multiple audio streams with dynamic PCM routing.
> > How these are configured really depends on what interfaces are usable.
> >
> > So keeping this at the board level is IMO a better choice.

I Agree, I try to keep coherency with sun50i-a64.dtsi.
But sound routing is really at board level not SoC one.

Regards,
Clément

>
> Forgot to mention. Both patches and all parts in this patch are OK. It's
> just the parts the need to be moved.
>
>
> > ChenYu
> >
> >
> > >         timer {
> > >                 compatible = "arm,armv8-timer";
> > >                 interrupts = <GIC_PPI 13
> > > @@ -282,6 +300,11 @@
> > >                                 bias-pull-up;
> > >                         };
> > >
> > > +                       spdif_tx_pin: spdif-tx-pin {
> > > +                               pins = "PH7";
> > > +                               function = "spdif";
> > > +                       };
> > > +
> > >                         uart0_ph_pins: uart0-ph-pins {
> > >                                 pins = "PH0", "PH1";
> > >                                 function = "uart0";
> > > @@ -411,6 +434,21 @@
> > >                         };
> > >                 };
> > >
> > > +               spdif: spdif@5093000 {
> > > +                       #sound-dai-cells = <0>;
> > > +                       compatible = "allwinner,sun50i-h6-spdif";
> > > +                       reg = <0x05093000 0x400>;
> > > +                       interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
> > > +                       clocks = <&ccu CLK_BUS_SPDIF>, <&ccu CLK_SPDIF>;
> > > +                       clock-names = "apb", "spdif";
> > > +                       resets = <&ccu RST_BUS_SPDIF>;
> > > +                       dmas = <&dma 2>;
> > > +                       dma-names = "tx";
> > > +                       pinctrl-names = "default";
> > > +                       pinctrl-0 = <&spdif_tx_pin>;
> > > +                       status = "disabled";
> > > +               };
> > > +
> > >                 usb2otg: usb@5100000 {
> > >                         compatible = "allwinner,sun50i-h6-musb",
> > >                                      "allwinner,sun8i-a33-musb";
> > > --
> > > 2.20.1
> > >
> > > --
> > > You received this message because you are subscribed to the Google Groups "linux-sunxi" group.
> > > To unsubscribe from this group and stop receiving emails from it, send an email to linux-sunxi+unsubscribe@googlegroups.com.
> > > To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-2-peron.clem%40gmail.com.

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

end of thread, other threads:[~2019-08-12  7:11 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-08-11 20:31 [PATCH v5 0/3] Allwinner H6 SPDIF support Clément Péron
     [not found] ` <20190811203144.5999-1-peron.clem-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2019-08-11 20:31   ` [PATCH v5 1/3] arm64: dts: allwinner: Add SPDIF node for Allwinner H6 Clément Péron
2019-08-12  4:52     ` [linux-sunxi] " Chen-Yu Tsai
2019-08-12  6:34       ` Chen-Yu Tsai
2019-08-12  7:11         ` Clément Péron
2019-08-11 20:31   ` [PATCH v5 2/3] arm64: dts: allwinner: h6: Enable SPDIF for Beelink GS1 Clément Péron
2019-08-11 20:31   ` [PATCH v5 3/3] arm64: defconfig: Enable Sun4i SPDIF module Clément Péron
2019-08-12  6:37     ` [linux-sunxi] " Chen-Yu Tsai

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).