From: Code Kipper <codekipper@gmail.com> To: Vasily Khoruzhick <anarsoul@gmail.com> Cc: Linux-ALSA <alsa-devel@alsa-project.org>, "Liam Girdwood" <lgirdwood@gmail.com>, "Chen-Yu Tsai" <wens@csie.org>, "Mark Brown" <broonie@kernel.org>, "Maxime Ripard" <maxime.ripard@free-electrons.com>, "Mylène Josserand" <mylene.josserand@free-electrons.com>, linux-arm-kernel <linux-arm-kernel@lists.infradead.org> Subject: Re: [PATCH 2/9] ASoC: sun4i-i2s: Add compatibility with A64 codec I2S Date: Mon, 4 Dec 2017 07:42:12 +0100 [thread overview] Message-ID: <CAEKpxBmHhZ+2WNXJEPbQFS6KeKsqRrZeNodRnu1M5yLc15DerA@mail.gmail.com> (raw) In-Reply-To: <20171203204157.20829-3-anarsoul@gmail.com> On 3 December 2017 at 21:41, Vasily Khoruzhick <anarsoul@gmail.com> wrote: > From: Marcus Cooper <codekipper@gmail.com> > > The I2S block used for the audio codec in the A64 is very similar > to what is used by the A10(sun4i) devices. However, its TX FIFO is > located at a different address. > > [vasilykh: - added fixed_wss and wss_value to A64 quirks, > - changed compatible to 'allwinner,sun50i-a64-acodec-i2s, > since A64 has 3 more I2S blocks that are not compatible > with audio codec I2S] > > Signed-off-by: Marcus Cooper <codekipper@gmail.com> > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> > --- > .../devicetree/bindings/sound/sun4i-i2s.txt | 2 ++ > sound/soc/sunxi/sun4i-i2s.c | 23 ++++++++++++++++++++++ > 2 files changed, 25 insertions(+) > > diff --git a/Documentation/devicetree/bindings/sound/sun4i-i2s.txt b/Documentation/devicetree/bindings/sound/sun4i-i2s.txt > index 05d7135a8d2f..ab86f266962a 100644 > --- a/Documentation/devicetree/bindings/sound/sun4i-i2s.txt > +++ b/Documentation/devicetree/bindings/sound/sun4i-i2s.txt > @@ -9,6 +9,7 @@ Required properties: > - "allwinner,sun4i-a10-i2s" > - "allwinner,sun6i-a31-i2s" > - "allwinner,sun8i-h3-i2s" > + - "allwinner,sun50i-a64-acodec-i2s" > - reg: physical base address of the controller and length of memory mapped > region. > - interrupts: should contain the I2S interrupt. > @@ -24,6 +25,7 @@ Required properties: > Required properties for the following compatibles: > - "allwinner,sun6i-a31-i2s" > - "allwinner,sun8i-h3-i2s" > + - "allwinner,sun50i-a64-acodec-i2s" I would keep the compatible format the same. ie. allwinner,sun50i-a64-i2s. The A33 for example uses the sun6i-a31-i2s for it's dai. > - resets: phandle to the reset line for this codec > > Example: > diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c > index 54c16eb64713..2c060e015725 100644 > --- a/sound/soc/sunxi/sun4i-i2s.c > +++ b/sound/soc/sunxi/sun4i-i2s.c > @@ -942,6 +942,25 @@ static const struct sun4i_i2s_quirks sun8i_h3_i2s_quirks = { > .field_rxchansel = REG_FIELD(SUN8I_I2S_RX_CHAN_SEL_REG, 0, 2), > }; > > +static const struct sun4i_i2s_quirks sun50i_a64_acodec_i2s_quirks = { ditto > + .has_reset = true, > + .reg_offset_txdata = SUN8I_I2S_FIFO_TX_REG, > + .sun4i_i2s_regmap = &sun4i_i2s_regmap_config, > + .has_slave_select_bit = true, > + .fixed_wss = true, > + .wss_value = 3, > + .field_clkdiv_mclk_en = REG_FIELD(SUN4I_I2S_CLK_DIV_REG, 7, 7), > + .field_fmt_wss = REG_FIELD(SUN4I_I2S_FMT0_REG, 2, 3), > + .field_fmt_sr = REG_FIELD(SUN4I_I2S_FMT0_REG, 4, 5), > + .field_fmt_bclk = REG_FIELD(SUN4I_I2S_FMT0_REG, 6, 6), > + .field_fmt_lrclk = REG_FIELD(SUN4I_I2S_FMT0_REG, 7, 7), > + .field_fmt_mode = REG_FIELD(SUN4I_I2S_FMT0_REG, 0, 1), > + .field_txchanmap = REG_FIELD(SUN4I_I2S_TX_CHAN_MAP_REG, 0, 31), > + .field_rxchanmap = REG_FIELD(SUN4I_I2S_RX_CHAN_MAP_REG, 0, 31), > + .field_txchansel = REG_FIELD(SUN4I_I2S_TX_CHAN_SEL_REG, 0, 2), > + .field_rxchansel = REG_FIELD(SUN4I_I2S_RX_CHAN_SEL_REG, 0, 2), > +}; > + > static int sun4i_i2s_init_regmap_fields(struct device *dev, > struct sun4i_i2s *i2s) > { > @@ -1146,6 +1165,10 @@ static const struct of_device_id sun4i_i2s_match[] = { > .compatible = "allwinner,sun8i-h3-i2s", > .data = &sun8i_h3_i2s_quirks, > }, > + { > + .compatible = "allwinner,sun50i-a64-acodec-i2s", > + .data = &sun50i_a64_acodec_i2s_quirks, ditto BR, CK > + }, > {} > }; > MODULE_DEVICE_TABLE(of, sun4i_i2s_match); > -- > 2.15.0 >
WARNING: multiple messages have this Message-ID (diff)
From: codekipper@gmail.com (Code Kipper) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH 2/9] ASoC: sun4i-i2s: Add compatibility with A64 codec I2S Date: Mon, 4 Dec 2017 07:42:12 +0100 [thread overview] Message-ID: <CAEKpxBmHhZ+2WNXJEPbQFS6KeKsqRrZeNodRnu1M5yLc15DerA@mail.gmail.com> (raw) In-Reply-To: <20171203204157.20829-3-anarsoul@gmail.com> On 3 December 2017 at 21:41, Vasily Khoruzhick <anarsoul@gmail.com> wrote: > From: Marcus Cooper <codekipper@gmail.com> > > The I2S block used for the audio codec in the A64 is very similar > to what is used by the A10(sun4i) devices. However, its TX FIFO is > located at a different address. > > [vasilykh: - added fixed_wss and wss_value to A64 quirks, > - changed compatible to 'allwinner,sun50i-a64-acodec-i2s, > since A64 has 3 more I2S blocks that are not compatible > with audio codec I2S] > > Signed-off-by: Marcus Cooper <codekipper@gmail.com> > Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> > --- > .../devicetree/bindings/sound/sun4i-i2s.txt | 2 ++ > sound/soc/sunxi/sun4i-i2s.c | 23 ++++++++++++++++++++++ > 2 files changed, 25 insertions(+) > > diff --git a/Documentation/devicetree/bindings/sound/sun4i-i2s.txt b/Documentation/devicetree/bindings/sound/sun4i-i2s.txt > index 05d7135a8d2f..ab86f266962a 100644 > --- a/Documentation/devicetree/bindings/sound/sun4i-i2s.txt > +++ b/Documentation/devicetree/bindings/sound/sun4i-i2s.txt > @@ -9,6 +9,7 @@ Required properties: > - "allwinner,sun4i-a10-i2s" > - "allwinner,sun6i-a31-i2s" > - "allwinner,sun8i-h3-i2s" > + - "allwinner,sun50i-a64-acodec-i2s" > - reg: physical base address of the controller and length of memory mapped > region. > - interrupts: should contain the I2S interrupt. > @@ -24,6 +25,7 @@ Required properties: > Required properties for the following compatibles: > - "allwinner,sun6i-a31-i2s" > - "allwinner,sun8i-h3-i2s" > + - "allwinner,sun50i-a64-acodec-i2s" I would keep the compatible format the same. ie. allwinner,sun50i-a64-i2s. The A33 for example uses the sun6i-a31-i2s for it's dai. > - resets: phandle to the reset line for this codec > > Example: > diff --git a/sound/soc/sunxi/sun4i-i2s.c b/sound/soc/sunxi/sun4i-i2s.c > index 54c16eb64713..2c060e015725 100644 > --- a/sound/soc/sunxi/sun4i-i2s.c > +++ b/sound/soc/sunxi/sun4i-i2s.c > @@ -942,6 +942,25 @@ static const struct sun4i_i2s_quirks sun8i_h3_i2s_quirks = { > .field_rxchansel = REG_FIELD(SUN8I_I2S_RX_CHAN_SEL_REG, 0, 2), > }; > > +static const struct sun4i_i2s_quirks sun50i_a64_acodec_i2s_quirks = { ditto > + .has_reset = true, > + .reg_offset_txdata = SUN8I_I2S_FIFO_TX_REG, > + .sun4i_i2s_regmap = &sun4i_i2s_regmap_config, > + .has_slave_select_bit = true, > + .fixed_wss = true, > + .wss_value = 3, > + .field_clkdiv_mclk_en = REG_FIELD(SUN4I_I2S_CLK_DIV_REG, 7, 7), > + .field_fmt_wss = REG_FIELD(SUN4I_I2S_FMT0_REG, 2, 3), > + .field_fmt_sr = REG_FIELD(SUN4I_I2S_FMT0_REG, 4, 5), > + .field_fmt_bclk = REG_FIELD(SUN4I_I2S_FMT0_REG, 6, 6), > + .field_fmt_lrclk = REG_FIELD(SUN4I_I2S_FMT0_REG, 7, 7), > + .field_fmt_mode = REG_FIELD(SUN4I_I2S_FMT0_REG, 0, 1), > + .field_txchanmap = REG_FIELD(SUN4I_I2S_TX_CHAN_MAP_REG, 0, 31), > + .field_rxchanmap = REG_FIELD(SUN4I_I2S_RX_CHAN_MAP_REG, 0, 31), > + .field_txchansel = REG_FIELD(SUN4I_I2S_TX_CHAN_SEL_REG, 0, 2), > + .field_rxchansel = REG_FIELD(SUN4I_I2S_RX_CHAN_SEL_REG, 0, 2), > +}; > + > static int sun4i_i2s_init_regmap_fields(struct device *dev, > struct sun4i_i2s *i2s) > { > @@ -1146,6 +1165,10 @@ static const struct of_device_id sun4i_i2s_match[] = { > .compatible = "allwinner,sun8i-h3-i2s", > .data = &sun8i_h3_i2s_quirks, > }, > + { > + .compatible = "allwinner,sun50i-a64-acodec-i2s", > + .data = &sun50i_a64_acodec_i2s_quirks, ditto BR, CK > + }, > {} > }; > MODULE_DEVICE_TABLE(of, sun4i_i2s_match); > -- > 2.15.0 >
next prev parent reply other threads:[~2017-12-04 6:42 UTC|newest] Thread overview: 64+ 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 ` Vasily Khoruzhick 2017-12-03 20:41 ` [PATCH 1/9] ASoC: sun4i-i2s: Add quirk to handle fixed WSS Vasily Khoruzhick 2017-12-03 20:41 ` Vasily Khoruzhick 2017-12-04 0:43 ` Chen-Yu Tsai 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-03 20:41 ` Vasily Khoruzhick 2017-12-04 6:42 ` Code Kipper [this message] 2017-12-04 6:42 ` Code Kipper 2017-12-04 7:34 ` Vasily Khoruzhick 2017-12-04 7:34 ` Vasily Khoruzhick 2017-12-05 8:01 ` Maxime Ripard 2017-12-05 8:01 ` Maxime Ripard 2017-12-05 23:04 ` Vasily Khoruzhick 2017-12-05 23:04 ` Vasily Khoruzhick 2017-12-06 15:27 ` Maxime Ripard 2017-12-06 15:27 ` Maxime Ripard 2017-12-07 9:21 ` Code Kipper 2017-12-07 9:21 ` Code Kipper 2017-12-07 9:30 ` Chen-Yu Tsai 2017-12-07 9:30 ` Chen-Yu Tsai 2017-12-07 22:48 ` Vasily Khoruzhick 2017-12-07 22:48 ` Vasily Khoruzhick 2017-12-08 6:40 ` Code Kipper 2017-12-08 6:40 ` Code Kipper 2017-12-08 22:16 ` Vasily Khoruzhick 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-03 20:41 ` Vasily Khoruzhick 2017-12-04 7:23 ` Code Kipper 2017-12-04 7:23 ` Code Kipper 2017-12-04 7:38 ` Chen-Yu Tsai 2017-12-04 7:38 ` Chen-Yu Tsai 2017-12-04 8:26 ` Chen-Yu Tsai 2017-12-04 8:26 ` Chen-Yu Tsai 2017-12-03 20:41 ` [PATCH 4/9] ASoC: sun8i-codec: Add support for A64 SoC Vasily Khoruzhick 2017-12-03 20:41 ` Vasily Khoruzhick 2017-12-05 8:04 ` Maxime Ripard 2017-12-05 8:04 ` Maxime Ripard 2017-12-05 23:17 ` Vasily Khoruzhick 2017-12-05 23:17 ` Vasily Khoruzhick 2017-12-06 15:32 ` Maxime Ripard 2017-12-06 15:32 ` Maxime Ripard 2017-12-06 15:48 ` Mark Brown 2017-12-06 15:48 ` Mark Brown 2017-12-06 18:53 ` Maxime Ripard 2017-12-06 18:53 ` Maxime Ripard 2017-12-06 19:13 ` Mark Brown 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 ` 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 ` 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 ` 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 ` Vasily Khoruzhick 2017-12-03 20:41 ` [PATCH 9/9] arm64: dts: allwinner: a64: Enable sound on Pine64 and SoPine Vasily Khoruzhick 2017-12-03 20:41 ` Vasily Khoruzhick 2017-12-05 3:24 ` Chen-Yu Tsai 2017-12-05 3:24 ` Chen-Yu Tsai 2017-12-09 19:54 ` Vasily Khoruzhick 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=CAEKpxBmHhZ+2WNXJEPbQFS6KeKsqRrZeNodRnu1M5yLc15DerA@mail.gmail.com \ --to=codekipper@gmail.com \ --cc=alsa-devel@alsa-project.org \ --cc=anarsoul@gmail.com \ --cc=broonie@kernel.org \ --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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.