linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] ASoC: sun4i-spdif: Add support for the H3 SoC
@ 2017-01-19 19:52 codekipper
  2017-01-19 19:52 ` [PATCH v2 1/2] ASoC: sunxi: Add bindings for sun8i to SPDIF codekipper
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: codekipper @ 2017-01-19 19:52 UTC (permalink / raw)
  To: maxime.ripard
  Cc: linux-arm-kernel, linux-sunxi, lgirdwood, broonie, linux-kernel,
	alsa-devel, be17068, Marcus Cooper

From: Marcus Cooper <codekipper@gmail.com>

The H3 SoC uses the same SPDIF block as found in earlier SoCs, but the
transmit fifo is at a different address.

This has been tested on the Beelink X2.
BR,
CK
---
Changes since v1:
 - Now a patch set with bindings and driver changes.
---
Marcus Cooper (2):
  ASoC: sunxi: Add bindings for sun8i to SPDIF
  ASoC: sun4i-spdif: Add support for the H3 SoC

 Documentation/devicetree/bindings/sound/sunxi,sun4i-spdif.txt |  1 +
 sound/soc/sunxi/sun4i-spdif.c                                 | 11 +++++++++++
 2 files changed, 12 insertions(+)

-- 
2.11.0

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

* [PATCH v2 1/2] ASoC: sunxi: Add bindings for sun8i to SPDIF
  2017-01-19 19:52 [PATCH v2 0/2] ASoC: sun4i-spdif: Add support for the H3 SoC codekipper
@ 2017-01-19 19:52 ` codekipper
  2017-01-19 19:52 ` [PATCH v2 2/2] ASoC: sun4i-spdif: Add support for the H3 SoC codekipper
  2017-01-20  8:38 ` [PATCH v2 0/2] " Maxime Ripard
  2 siblings, 0 replies; 4+ messages in thread
From: codekipper @ 2017-01-19 19:52 UTC (permalink / raw)
  To: maxime.ripard
  Cc: linux-arm-kernel, linux-sunxi, lgirdwood, broonie, linux-kernel,
	alsa-devel, be17068, Marcus Cooper

From: Marcus Cooper <codekipper@gmail.com>

The H3 SoC uses the same SPDIF block as found in earlier SoCs, but the
transmit fifo is at a different address.

Signed-off-by: Marcus Cooper <codekipper@gmail.com>
---
 Documentation/devicetree/bindings/sound/sunxi,sun4i-spdif.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/sound/sunxi,sun4i-spdif.txt b/Documentation/devicetree/bindings/sound/sunxi,sun4i-spdif.txt
index 0230c4d20506..fe0a65e6d629 100644
--- a/Documentation/devicetree/bindings/sound/sunxi,sun4i-spdif.txt
+++ b/Documentation/devicetree/bindings/sound/sunxi,sun4i-spdif.txt
@@ -10,6 +10,7 @@ Required properties:
   - compatible		: should be one of the following:
     - "allwinner,sun4i-a10-spdif": for the Allwinner A10 SoC
     - "allwinner,sun6i-a31-spdif": for the Allwinner A31 SoC
+    - "allwinner,sun8i-h3-spdif": for the Allwinner H3 SoC
 
   - reg			: Offset and length of the register set for the device.
 
-- 
2.11.0

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

* [PATCH v2 2/2] ASoC: sun4i-spdif: Add support for the H3 SoC
  2017-01-19 19:52 [PATCH v2 0/2] ASoC: sun4i-spdif: Add support for the H3 SoC codekipper
  2017-01-19 19:52 ` [PATCH v2 1/2] ASoC: sunxi: Add bindings for sun8i to SPDIF codekipper
@ 2017-01-19 19:52 ` codekipper
  2017-01-20  8:38 ` [PATCH v2 0/2] " Maxime Ripard
  2 siblings, 0 replies; 4+ messages in thread
From: codekipper @ 2017-01-19 19:52 UTC (permalink / raw)
  To: maxime.ripard
  Cc: linux-arm-kernel, linux-sunxi, lgirdwood, broonie, linux-kernel,
	alsa-devel, be17068, Marcus Cooper

From: Marcus Cooper <codekipper@gmail.com>

The H3 SoC uses the same SPDIF block as found in earlier SoCs, but its
TXFIFO is mapped to another address.

Signed-off-by: Marcus Cooper <codekipper@gmail.com>
---
 sound/soc/sunxi/sun4i-spdif.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c
index fec62ee1fc72..c03cd07a9b19 100644
--- a/sound/soc/sunxi/sun4i-spdif.c
+++ b/sound/soc/sunxi/sun4i-spdif.c
@@ -103,6 +103,8 @@
 	#define SUN4I_SPDIF_ISTA_RXOSTA			BIT(1)
 	#define SUN4I_SPDIF_ISTA_RXASTA			BIT(0)
 
+#define SUN8I_SPDIF_TXFIFO	(0x20)
+
 #define SUN4I_SPDIF_TXCNT	(0x24)
 
 #define SUN4I_SPDIF_RXCNT	(0x28)
@@ -417,6 +419,11 @@ static const struct sun4i_spdif_quirks sun6i_a31_spdif_quirks = {
 	.has_reset	= true,
 };
 
+static const struct sun4i_spdif_quirks sun8i_h3_spdif_quirks = {
+	.reg_dac_txdata	= SUN8I_SPDIF_TXFIFO,
+	.has_reset	= true,
+};
+
 static const struct of_device_id sun4i_spdif_of_match[] = {
 	{
 		.compatible = "allwinner,sun4i-a10-spdif",
@@ -426,6 +433,10 @@ static const struct of_device_id sun4i_spdif_of_match[] = {
 		.compatible = "allwinner,sun6i-a31-spdif",
 		.data = &sun6i_a31_spdif_quirks,
 	},
+	{
+		.compatible = "allwinner,sun8i-h3-spdif",
+		.data = &sun8i_h3_spdif_quirks,
+	},
 	{ /* sentinel */ }
 };
 MODULE_DEVICE_TABLE(of, sun4i_spdif_of_match);
-- 
2.11.0

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

* Re: [PATCH v2 0/2] ASoC: sun4i-spdif: Add support for the H3 SoC
  2017-01-19 19:52 [PATCH v2 0/2] ASoC: sun4i-spdif: Add support for the H3 SoC codekipper
  2017-01-19 19:52 ` [PATCH v2 1/2] ASoC: sunxi: Add bindings for sun8i to SPDIF codekipper
  2017-01-19 19:52 ` [PATCH v2 2/2] ASoC: sun4i-spdif: Add support for the H3 SoC codekipper
@ 2017-01-20  8:38 ` Maxime Ripard
  2 siblings, 0 replies; 4+ messages in thread
From: Maxime Ripard @ 2017-01-20  8:38 UTC (permalink / raw)
  To: codekipper
  Cc: linux-arm-kernel, linux-sunxi, lgirdwood, broonie, linux-kernel,
	alsa-devel, be17068

[-- Attachment #1: Type: text/plain, Size: 445 bytes --]

On Thu, Jan 19, 2017 at 08:52:56PM +0100, codekipper@gmail.com wrote:
> From: Marcus Cooper <codekipper@gmail.com>
> 
> The H3 SoC uses the same SPDIF block as found in earlier SoCs, but the
> transmit fifo is at a different address.

For both patches,

Acked-by: Maxime Ripard <maxime.ripard@free-electrons.com>

Thanks,
Maxime

-- 
Maxime Ripard, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 801 bytes --]

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

end of thread, other threads:[~2017-01-20  8:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-19 19:52 [PATCH v2 0/2] ASoC: sun4i-spdif: Add support for the H3 SoC codekipper
2017-01-19 19:52 ` [PATCH v2 1/2] ASoC: sunxi: Add bindings for sun8i to SPDIF codekipper
2017-01-19 19:52 ` [PATCH v2 2/2] ASoC: sun4i-spdif: Add support for the H3 SoC codekipper
2017-01-20  8:38 ` [PATCH v2 0/2] " Maxime Ripard

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