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 <[email protected]>
---
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
Hi,
On Mon, Aug 12, 2019 at 4:31 AM Clément Péron <[email protected]> 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 <[email protected]>
> ---
> 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 [email protected].
> To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-2-peron.clem%40gmail.com.
On Mon, Aug 12, 2019 at 12:52 PM Chen-Yu Tsai <[email protected]> wrote:
>
> Hi,
>
> On Mon, Aug 12, 2019 at 4:31 AM Clément Péron <[email protected]> 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 <[email protected]>
> > ---
> > 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 [email protected].
> > To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-2-peron.clem%40gmail.com.
Hi Chen-Yu,
On Mon, 12 Aug 2019 at 08:35, Chen-Yu Tsai <[email protected]> wrote:
>
> On Mon, Aug 12, 2019 at 12:52 PM Chen-Yu Tsai <[email protected]> wrote:
> >
> > Hi,
> >
> > On Mon, Aug 12, 2019 at 4:31 AM Clément Péron <[email protected]> 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 <[email protected]>
> > > ---
> > > 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 [email protected].
> > > To view this discussion on the web, visit https://groups.google.com/d/msgid/linux-sunxi/20190811203144.5999-2-peron.clem%40gmail.com.