From: Vasily Khoruzhick <anarsoul@gmail.com>
To: "Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
"Maxime Ripard" <maxime.ripard@free-electrons.com>,
"Chen-Yu Tsai" <wens@csie.org>,
"Marcus Cooper" <codekipper@gmail.com>,
"Mylène Josserand" <mylene.josserand@free-electrons.com>,
alsa-devel@alsa-project.org,
linux-arm-kernel@lists.infradead.org
Cc: Vasily Khoruzhick <anarsoul@gmail.com>
Subject: [PATCH 4/9] ASoC: sun8i-codec: Add support for A64 SoC
Date: Sun, 3 Dec 2017 12:41:52 -0800 [thread overview]
Message-ID: <20171203204157.20829-5-anarsoul@gmail.com> (raw)
In-Reply-To: <20171203204157.20829-1-anarsoul@gmail.com>
Digital part of audio codec block in the A64 is very similar to what
is used by the A33(sun8i) devices. However, it uses different LRCK
divider.
Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com>
---
.../bindings/sound/{sun8i-a33-codec.txt => sun8i-codec.txt} | 6 ++++--
sound/soc/sunxi/sun8i-codec.c | 9 +++++++++
2 files changed, 13 insertions(+), 2 deletions(-)
rename Documentation/devicetree/bindings/sound/{sun8i-a33-codec.txt => sun8i-codec.txt} (91%)
diff --git a/Documentation/devicetree/bindings/sound/sun8i-a33-codec.txt b/Documentation/devicetree/bindings/sound/sun8i-codec.txt
similarity index 91%
rename from Documentation/devicetree/bindings/sound/sun8i-a33-codec.txt
rename to Documentation/devicetree/bindings/sound/sun8i-codec.txt
index 2ca3d138528e..ffcf9079a67c 100644
--- a/Documentation/devicetree/bindings/sound/sun8i-a33-codec.txt
+++ b/Documentation/devicetree/bindings/sound/sun8i-codec.txt
@@ -1,7 +1,7 @@
Allwinner SUN8I audio codec
------------------------------------
-On Sun8i-A33 SoCs, the audio is separated in different parts:
+On Sun8i-A33 and Sun50i-A64 SoCs, the audio is separated in different parts:
- A DAI driver. It uses the "sun4i-i2s" driver which is
documented here:
Documentation/devicetree/bindings/sound/sun4i-i2s.txt
@@ -16,7 +16,9 @@ On Sun8i-A33 SoCs, the audio is separated in different parts:
This bindings documentation exposes Sun8i codec (digital part).
Required properties:
-- compatible: must be "allwinner,sun8i-a33-codec"
+- compatible: should be one of the following:
+ - "allwinner,sun8i-a33-codec"
+ - "allwinner,sun50i-a64-codec"
- reg: must contain the registers location and length
- interrupts: must contain the codec interrupt
- clocks: a list of phandle + clock-specifer pairs, one for each entry
diff --git a/sound/soc/sunxi/sun8i-codec.c b/sound/soc/sunxi/sun8i-codec.c
index 054201d1de03..0e2a5adcfb96 100644
--- a/sound/soc/sunxi/sun8i-codec.c
+++ b/sound/soc/sunxi/sun8i-codec.c
@@ -52,6 +52,7 @@
#define SUN8I_AIF1CLK_CTRL_AIF1_BCLK_DIV 9
#define SUN8I_AIF1CLK_CTRL_AIF1_LRCK_DIV 6
#define SUN8I_AIF1CLK_CTRL_AIF1_LRCK_DIV_16 (1 << 6)
+#define SUN8I_AIF1CLK_CTRL_AIF1_LRCK_DIV_64 (2 << 6)
#define SUN8I_AIF1CLK_CTRL_AIF1_WORD_SIZ 4
#define SUN8I_AIF1CLK_CTRL_AIF1_WORD_SIZ_16 (1 << 4)
#define SUN8I_AIF1CLK_CTRL_AIF1_DATA_FMT 2
@@ -456,6 +457,10 @@ static const struct sun8i_codec_quirks sun8i_a33_codec_quirks = {
.aif1_lrck_div = SUN8I_AIF1CLK_CTRL_AIF1_LRCK_DIV_16,
};
+static const struct sun8i_codec_quirks sun50i_a64_codec_quirks = {
+ .aif1_lrck_div = SUN8I_AIF1CLK_CTRL_AIF1_LRCK_DIV_64,
+};
+
static int sun8i_codec_probe(struct platform_device *pdev)
{
struct resource *res_base;
@@ -551,6 +556,10 @@ static const struct of_device_id sun8i_codec_of_match[] = {
.compatible = "allwinner,sun8i-a33-codec",
.data = &sun8i_a33_codec_quirks,
},
+ {
+ .compatible = "allwinner,sun50i-a64-codec",
+ .data = &sun50i_a64_codec_quirks,
+ },
{}
};
MODULE_DEVICE_TABLE(of, sun8i_codec_of_match);
--
2.15.0
next prev parent reply other threads:[~2017-12-03 20:42 UTC|newest]
Thread overview: 32+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-03 20:41 [PATCH 0/9] Add audiocodec support for A64 SoC Vasily Khoruzhick
2017-12-03 20:41 ` [PATCH 1/9] ASoC: sun4i-i2s: Add quirk to handle fixed WSS Vasily Khoruzhick
2017-12-04 0:43 ` Chen-Yu Tsai
2017-12-03 20:41 ` [PATCH 2/9] ASoC: sun4i-i2s: Add compatibility with A64 codec I2S Vasily Khoruzhick
2017-12-04 6:42 ` Code Kipper
2017-12-04 7:34 ` Vasily Khoruzhick
2017-12-05 8:01 ` Maxime Ripard
2017-12-05 23:04 ` Vasily Khoruzhick
2017-12-06 15:27 ` Maxime Ripard
2017-12-07 9:21 ` Code Kipper
2017-12-07 9:30 ` Chen-Yu Tsai
2017-12-07 22:48 ` Vasily Khoruzhick
2017-12-08 6:40 ` Code Kipper
2017-12-08 22:16 ` Vasily Khoruzhick
2017-12-03 20:41 ` [PATCH 3/9] ASoC: sun8i-codec: Add quirk to specify aif1_lrck_div value Vasily Khoruzhick
2017-12-04 7:23 ` Code Kipper
2017-12-04 7:38 ` Chen-Yu Tsai
2017-12-04 8:26 ` Chen-Yu Tsai
2017-12-03 20:41 ` Vasily Khoruzhick [this message]
2017-12-05 8:04 ` [PATCH 4/9] ASoC: sun8i-codec: Add support for A64 SoC Maxime Ripard
2017-12-05 23:17 ` Vasily Khoruzhick
2017-12-06 15:32 ` Maxime Ripard
2017-12-06 15:48 ` Mark Brown
2017-12-06 18:53 ` Maxime Ripard
2017-12-06 19:13 ` Mark Brown
2017-12-03 20:41 ` [PATCH 5/9] ASoC: sun8i-codec-analog: Use callbacks to add headphones and lineout outputs Vasily Khoruzhick
2017-12-03 20:41 ` [PATCH 6/9] ASoC: sun8i-codec-analog: Add component driver field to quirks structure Vasily Khoruzhick
2017-12-03 20:41 ` [PATCH 7/9] ASoC: sun8i-codec-analog: Add support for A64 SoC Vasily Khoruzhick
2017-12-03 20:41 ` [PATCH 8/9] arm64: dts: allwinner: a64: Add nodes necessary for analog sound support Vasily Khoruzhick
2017-12-03 20:41 ` [PATCH 9/9] arm64: dts: allwinner: a64: Enable sound on Pine64 and SoPine Vasily Khoruzhick
2017-12-05 3:24 ` Chen-Yu Tsai
2017-12-09 19:54 ` Vasily Khoruzhick
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171203204157.20829-5-anarsoul@gmail.com \
--to=anarsoul@gmail.com \
--cc=alsa-devel@alsa-project.org \
--cc=broonie@kernel.org \
--cc=codekipper@gmail.com \
--cc=lgirdwood@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=maxime.ripard@free-electrons.com \
--cc=mylene.josserand@free-electrons.com \
--cc=wens@csie.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox