2019-05-27 20:30:28

by Clément Péron

[permalink] [raw]
Subject: [PATCH v4 0/7] Allwinner H6 SPDIF support

*H6 DMA support IS REQUIRED*

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.

Also this series requires the DMA working on H6, a first version has been
submitted by Jernej Škrabec[1] but has not been accepted yet.

[1] https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=89011

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 (7):
dt-bindings: sound: sun4i-spdif: Add Allwinner H6 compatible
ASoC: sun4i-spdif: Move quirks to the top
ASoC: sun4i-spdif: Add TX fifo bit flush quirks
ASoC: sun4i-spdif: Add support for H6 SoC
arm64: dts: allwinner: Add SPDIF node for Allwinner H6
arm64: dts: allwinner: h6: Enable SPDIF for Beelink GS1
arm64: defconfig: Enable Sun4i SPDIF module

.../sound/allwinner,sun4i-a10-spdif.yaml | 1 +
.../dts/allwinner/sun50i-h6-beelink-gs1.dts | 4 ++
arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++
arch/arm64/configs/defconfig | 1 +
sound/soc/sunxi/sun4i-spdif.c | 49 ++++++++++++++++---
5 files changed, 87 insertions(+), 6 deletions(-)

--
2.20.1


2019-05-27 20:31:25

by Clément Péron

[permalink] [raw]
Subject: [PATCH v4 4/7] ASoC: sun4i-spdif: Add support for H6 SoC

Allwinner H6 has a different mapping for the fifo register controller.

Actually only the fifo TX bit is used in the drivers.

Use the freshly introduced quirks to make this drivers compatible with
the Allwinner H6.

Signed-off-by: Clément Péron <[email protected]>
---
sound/soc/sunxi/sun4i-spdif.c | 22 ++++++++++++++++++++++
1 file changed, 22 insertions(+)

diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c
index 045d0cc4b62a..54c09346d298 100644
--- a/sound/soc/sunxi/sun4i-spdif.c
+++ b/sound/soc/sunxi/sun4i-spdif.c
@@ -75,6 +75,18 @@
#define SUN4I_SPDIF_FCTL_RXOM(v) ((v) << 0)
#define SUN4I_SPDIF_FCTL_RXOM_MASK GENMASK(1, 0)

+#define SUN50I_H6_SPDIF_FCTL (0x14)
+ #define SUN50I_H6_SPDIF_FCTL_HUB_EN BIT(31)
+ #define SUN50I_H6_SPDIF_FCTL_FTX BIT(30)
+ #define SUN50I_H6_SPDIF_FCTL_FRX BIT(29)
+ #define SUN50I_H6_SPDIF_FCTL_TXTL(v) ((v) << 12)
+ #define SUN50I_H6_SPDIF_FCTL_TXTL_MASK GENMASK(19, 12)
+ #define SUN50I_H6_SPDIF_FCTL_RXTL(v) ((v) << 4)
+ #define SUN50I_H6_SPDIF_FCTL_RXTL_MASK GENMASK(10, 4)
+ #define SUN50I_H6_SPDIF_FCTL_TXIM BIT(2)
+ #define SUN50I_H6_SPDIF_FCTL_RXOM(v) ((v) << 0)
+ #define SUN50I_H6_SPDIF_FCTL_RXOM_MASK GENMASK(1, 0)
+
#define SUN4I_SPDIF_FSTA (0x18)
#define SUN4I_SPDIF_FSTA_TXE BIT(14)
#define SUN4I_SPDIF_FSTA_TXECNTSHT (8)
@@ -438,6 +450,12 @@ static const struct sun4i_spdif_quirks sun8i_h3_spdif_quirks = {
.has_reset = true,
};

+static const struct sun4i_spdif_quirks sun50i_h6_spdif_quirks = {
+ .reg_dac_txdata = SUN8I_SPDIF_TXFIFO,
+ .val_fctl_ftx = SUN50I_H6_SPDIF_FCTL_FTX,
+ .has_reset = true,
+};
+
static const struct of_device_id sun4i_spdif_of_match[] = {
{
.compatible = "allwinner,sun4i-a10-spdif",
@@ -451,6 +469,10 @@ static const struct of_device_id sun4i_spdif_of_match[] = {
.compatible = "allwinner,sun8i-h3-spdif",
.data = &sun8i_h3_spdif_quirks,
},
+ {
+ .compatible = "allwinner,sun50i-h6-spdif",
+ .data = &sun50i_h6_spdif_quirks,
+ },
{ /* sentinel */ }
};
MODULE_DEVICE_TABLE(of, sun4i_spdif_of_match);
--
2.20.1

2019-05-27 20:38:09

by Clément Péron

[permalink] [raw]
Subject: [PATCH v4 1/7] dt-bindings: sound: sun4i-spdif: Add Allwinner H6 compatible

Allwinner H6 has a SPDIF controller with an increase of the fifo
size and a sligher difference in memory mapping compare to H3/A64.

This make it not compatible with the previous generation.

Introduce a specific bindings for H6 SoC.

Signed-off-by: Clément Péron <[email protected]>
Reviewed-by: Rob Herring <[email protected]>
Acked-by: Maxime Ripard <[email protected]>
---
.../devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml
index a49ef2294a74..e0284d8c3b63 100644
--- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml
+++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml
@@ -21,6 +21,7 @@ properties:
- const: allwinner,sun4i-a10-spdif
- const: allwinner,sun6i-a31-spdif
- const: allwinner,sun8i-h3-spdif
+ - const: allwinner,sun50i-h6-spdif
- items:
- const: allwinner,sun8i-a83t-spdif
- const: allwinner,sun8i-h3-spdif
--
2.20.1

2019-05-28 09:16:24

by Maxime Ripard

[permalink] [raw]
Subject: Re: [PATCH v4 4/7] ASoC: sun4i-spdif: Add support for H6 SoC

On Mon, May 27, 2019 at 10:06:24PM +0200, Cl?ment P?ron wrote:
> Allwinner H6 has a different mapping for the fifo register controller.
>
> Actually only the fifo TX bit is used in the drivers.
>
> Use the freshly introduced quirks to make this drivers compatible with
> the Allwinner H6.
>
> Signed-off-by: Cl?ment P?ron <[email protected]>

Acked-by: Maxime Ripard <[email protected]>

Maxime

--
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


Attachments:
(No filename) (509.00 B)
signature.asc (235.00 B)
Download all attachments

2019-06-14 08:30:50

by Clément Péron

[permalink] [raw]
Subject: Re: [PATCH v4 0/7] Allwinner H6 SPDIF support

Hi,

On Mon, 27 May 2019 at 22:10, Clément Péron <[email protected]> wrote:
>
> *H6 DMA support IS REQUIRED*

DMA has been merged, so this series can be merge when ASoC maintainers
have reviewed it.

Regards,
Clément

>
> 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.
>
> Also this series requires the DMA working on H6, a first version has been
> submitted by Jernej Škrabec[1] but has not been accepted yet.
>
> [1] https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=89011
>
> 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 (7):
> dt-bindings: sound: sun4i-spdif: Add Allwinner H6 compatible
> ASoC: sun4i-spdif: Move quirks to the top
> ASoC: sun4i-spdif: Add TX fifo bit flush quirks
> ASoC: sun4i-spdif: Add support for H6 SoC
> arm64: dts: allwinner: Add SPDIF node for Allwinner H6
> arm64: dts: allwinner: h6: Enable SPDIF for Beelink GS1
> arm64: defconfig: Enable Sun4i SPDIF module
>
> .../sound/allwinner,sun4i-a10-spdif.yaml | 1 +
> .../dts/allwinner/sun50i-h6-beelink-gs1.dts | 4 ++
> arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++
> arch/arm64/configs/defconfig | 1 +
> sound/soc/sunxi/sun4i-spdif.c | 49 ++++++++++++++++---
> 5 files changed, 87 insertions(+), 6 deletions(-)
>
> --
> 2.20.1
>

2019-07-15 19:23:40

by Clément Péron

[permalink] [raw]
Subject: Re: [PATCH v4 0/7] Allwinner H6 SPDIF support

Hi,

I'm missing ACK from ASoC Maintainers patch 2-3-4.

It's really small paches, if you could have a look at it.
Many thanks,
Clément



On Fri, 14 Jun 2019 at 10:29, Clément Péron <[email protected]> wrote:
>
> Hi,
>
> On Mon, 27 May 2019 at 22:10, Clément Péron <[email protected]> wrote:
> >
> > *H6 DMA support IS REQUIRED*
>
> DMA has been merged, so this series can be merge when ASoC maintainers
> have reviewed it.
>
> Regards,
> Clément
>
> >
> > 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.
> >
> > Also this series requires the DMA working on H6, a first version has been
> > submitted by Jernej Škrabec[1] but has not been accepted yet.
> >
> > [1] https://patchwork.kernel.org/project/linux-arm-kernel/list/?series=89011
> >
> > 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 (7):
> > dt-bindings: sound: sun4i-spdif: Add Allwinner H6 compatible
> > ASoC: sun4i-spdif: Move quirks to the top
> > ASoC: sun4i-spdif: Add TX fifo bit flush quirks
> > ASoC: sun4i-spdif: Add support for H6 SoC
> > arm64: dts: allwinner: Add SPDIF node for Allwinner H6
> > arm64: dts: allwinner: h6: Enable SPDIF for Beelink GS1
> > arm64: defconfig: Enable Sun4i SPDIF module
> >
> > .../sound/allwinner,sun4i-a10-spdif.yaml | 1 +
> > .../dts/allwinner/sun50i-h6-beelink-gs1.dts | 4 ++
> > arch/arm64/boot/dts/allwinner/sun50i-h6.dtsi | 38 ++++++++++++++
> > arch/arm64/configs/defconfig | 1 +
> > sound/soc/sunxi/sun4i-spdif.c | 49 ++++++++++++++++---
> > 5 files changed, 87 insertions(+), 6 deletions(-)
> >
> > --
> > 2.20.1
> >

2019-07-15 19:40:50

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v4 0/7] Allwinner H6 SPDIF support

On Mon, Jul 15, 2019 at 09:21:01PM +0200, Cl?ment P?ron wrote:
> Hi,
>
> I'm missing ACK from ASoC Maintainers patch 2-3-4.
>
> It's really small paches, if you could have a look at it.

Please don't send content free pings and please allow a reasonable time
for review. People get busy, go on holiday, attend conferences and so
on so unless there is some reason for urgency (like critical bug fixes)
please allow at least a couple of weeks for review. If there have been
review comments then people may be waiting for those to be addressed.

Sending content free pings adds to the mail volume (if they are seen at
all) which is often the problem and since they can't be reviewed
directly if something has gone wrong you'll have to resend the patches
anyway, so sending again is generally a better approach though there are
some other maintainers who like them - if in doubt look at how patches
for the subsystem are normally handled.


Attachments:
(No filename) (959.00 B)
signature.asc (499.00 B)
Download all attachments

2019-08-10 08:47:40

by Clément Péron

[permalink] [raw]
Subject: Re: [PATCH v4 0/7] Allwinner H6 SPDIF support

Hi,

Sorry, I just discovered that the ASoC patches have been merged into
the broonie and linus tree in 5.3.

I'm still quite new in the sending of patches to the Kernel but
souldn't be a ack or a mail sent to warn the sender when the series
are accepted?

Should 5/6/7 patches be picked by Sunxi maintainer?

Thanks,
Clément





On Mon, 15 Jul 2019 at 21:38, Mark Brown <[email protected]> wrote:
>
> On Mon, Jul 15, 2019 at 09:21:01PM +0200, Clément Péron wrote:
> > Hi,
> >
> > I'm missing ACK from ASoC Maintainers patch 2-3-4.
> >
> > It's really small paches, if you could have a look at it.
>
> Please don't send content free pings and please allow a reasonable time
> for review. People get busy, go on holiday, attend conferences and so
> on so unless there is some reason for urgency (like critical bug fixes)
> please allow at least a couple of weeks for review. If there have been
> review comments then people may be waiting for those to be addressed.
>
> Sending content free pings adds to the mail volume (if they are seen at
> all) which is often the problem and since they can't be reviewed
> directly if something has gone wrong you'll have to resend the patches
> anyway, so sending again is generally a better approach though there are
> some other maintainers who like them - if in doubt look at how patches
> for the subsystem are normally handled.

2019-08-12 11:02:16

by Mark Brown

[permalink] [raw]
Subject: Re: [PATCH v4 0/7] Allwinner H6 SPDIF support

On Sat, Aug 10, 2019 at 10:45:23AM +0200, Cl?ment P?ron wrote:

> Hi,

Please don't top post, reply in line with needed context. This allows
readers to readily follow the flow of conversation and understand what
you are talking about and also helps ensure that everything in the
discussion is being addressed.

> Sorry, I just discovered that the ASoC patches have been merged into
> the broonie and linus tree in 5.3.

> I'm still quite new in the sending of patches to the Kernel but
> souldn't be a ack or a mail sent to warn the sender when the series
> are accepted?

Not every maintainer will send those, I do but you might find they've
gone into your spam folder if you're using gmail.


Attachments:
(No filename) (712.00 B)
signature.asc (499.00 B)
Download all attachments

2019-08-12 12:11:45

by Clément Péron

[permalink] [raw]
Subject: Re: [PATCH v4 0/7] Allwinner H6 SPDIF support

Hi Mark,

On Mon, 12 Aug 2019 at 13:01, Mark Brown <[email protected]> wrote:
>
> On Sat, Aug 10, 2019 at 10:45:23AM +0200, Clément Péron wrote:
>
> > Hi,
>
> Please don't top post, reply in line with needed context. This allows
> readers to readily follow the flow of conversation and understand what
> you are talking about and also helps ensure that everything in the
> discussion is being addressed.
>
> > Sorry, I just discovered that the ASoC patches have been merged into
> > the broonie and linus tree in 5.3.
>
> > I'm still quite new in the sending of patches to the Kernel but
> > souldn't be a ack or a mail sent to warn the sender when the series
> > are accepted?
>
> Not every maintainer will send those, I do but you might find they've
> gone into your spam folder if you're using gmail.

Thank you very much for the answer,
Regards,
Clément