linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Re: [PATCH 2/9] ASoC: sun8i-codec-analog: split out linein and mic2
       [not found] ` <20170225123029.55939-2-icenowy@aosc.xyz>
@ 2017-02-26  6:06   ` Chen-Yu Tsai
  0 siblings, 0 replies; 7+ messages in thread
From: Chen-Yu Tsai @ 2017-02-26  6:06 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Vinod Koul, Rob Herring, Maxime Ripard, Chen-Yu Tsai, Mark Brown,
	dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Linux-ALSA

On Sat, Feb 25, 2017 at 8:30 PM, Icenowy Zheng <icenowy@aosc.xyz> wrote:
> Allwinner V3s SoC features an analog codec without linein and mic2.
>
> Split out them, in order to prepare for the analog codec on V3s.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>

Acked-by: Chen-Yu Tsai <wens@csie.org>

Though it would be better if you did 1 split as 1 patch, with 2 patches
in total.

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

* Re: [PATCH 3/9] ASoC: sun8i-codec-analog: add support for V3s SoC
       [not found] ` <20170225123029.55939-3-icenowy@aosc.xyz>
@ 2017-02-26  6:16   ` Chen-Yu Tsai
  0 siblings, 0 replies; 7+ messages in thread
From: Chen-Yu Tsai @ 2017-02-26  6:16 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Vinod Koul, Rob Herring, Maxime Ripard, Chen-Yu Tsai, Mark Brown,
	dmaengine, devicetree, linux-arm-kernel, linux-kernel,
	Linux-ALSA

On Sat, Feb 25, 2017 at 8:30 PM, Icenowy Zheng <icenowy@aosc.xyz> wrote:
> The V3s SoC features an analog codec with headphone support but without
> mic2 and linein.

It doesn't have MBIAS either. Please split it out as well.

ChenYu

>
> Add support for it.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
> ---
>  Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt | 1 +
>  sound/soc/sunxi/sun8i-codec-analog.c                           | 9 +++++++++
>  2 files changed, 10 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt b/Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt
> index 779b735781ba..1b6e7c4e50ab 100644
> --- a/Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt
> +++ b/Documentation/devicetree/bindings/sound/sun8i-codec-analog.txt
> @@ -4,6 +4,7 @@ Required properties:
>  - compatible: must be one of the following compatibles:
>                 - "allwinner,sun8i-a23-codec-analog"
>                 - "allwinner,sun8i-h3-codec-analog"
> +               - "allwinner,sun8i-v3s-codec-analog"
>
>  Required properties if not a sub-node of the PRCM node:
>  - reg: must contain the registers location and length
> diff --git a/sound/soc/sunxi/sun8i-codec-analog.c b/sound/soc/sunxi/sun8i-codec-analog.c
> index 6c17c99c2c8d..6375932177a3 100644
> --- a/sound/soc/sunxi/sun8i-codec-analog.c
> +++ b/sound/soc/sunxi/sun8i-codec-analog.c
> @@ -695,6 +695,11 @@ static const struct sun8i_codec_analog_quirks sun8i_h3_quirks = {
>         .has_mic2       = true,
>  };
>
> +static const struct sun8i_codec_analog_quirks sun8i_v3s_quirks = {
> +       .has_headphone  = true,
> +       .has_hmic       = true,
> +};
> +
>  static int sun8i_codec_analog_cmpnt_probe(struct snd_soc_component *cmpnt)
>  {
>         struct device *dev = cmpnt->dev;
> @@ -762,6 +767,10 @@ static const struct of_device_id sun8i_codec_analog_of_match[] = {
>                 .compatible = "allwinner,sun8i-h3-codec-analog",
>                 .data = &sun8i_h3_quirks,
>         },
> +       {
> +               .compatible = "allwinner,sun8i-v3s-codec-analog",
> +               .data = &sun8i_v3s_quirks,
> +       },
>         {}
>  };
>  MODULE_DEVICE_TABLE(of, sun8i_codec_analog_of_match);
> --
> 2.11.1
>

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

* Re: [PATCH 1/9] ARM: dts: sun8i: add device tree for Lichee Pi Zero with Dock
       [not found] <20170225123029.55939-1-icenowy@aosc.xyz>
       [not found] ` <20170225123029.55939-2-icenowy@aosc.xyz>
       [not found] ` <20170225123029.55939-3-icenowy@aosc.xyz>
@ 2017-02-27  7:49 ` Maxime Ripard
       [not found] ` <20170225123029.55939-5-icenowy@aosc.xyz>
  2017-02-28 23:02 ` [PATCH 1/9] ARM: dts: sun8i: add device tree for Lichee Pi Zero with Dock Rob Herring
  4 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2017-02-27  7:49 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Vinod Koul, Rob Herring, Chen-Yu Tsai, Mark Brown, dmaengine,
	devicetree, linux-arm-kernel, linux-kernel, alsa-devel

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

On Sat, Feb 25, 2017 at 08:30:21PM +0800, Icenowy Zheng wrote:
> Lichee Pi Zero features a dock, which adds some functions, and should be
> soldered with the core board of Lichee Pi Zero.
> 
> Add support for the dock as a new dts, as soldering is needed to make
> the dock usable and there's functions enabled on the dock that is
> unavailable at the 2.54mm pins of the core board.
> 
> Currently no new feature on core board is available in the mainline
> kernel, so the dock dt file only includes the core board device tree.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>

How does that relate to the rest of the serie, which seems to be about
the audio on V3s?

This should be clarified in a cover letter, but you know that already.

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] 7+ messages in thread

* Re: [PATCH 5/9] dmaengine: sun6i: support V3s SoC variant
       [not found] ` <20170225123029.55939-5-icenowy@aosc.xyz>
@ 2017-02-27  7:50   ` Maxime Ripard
       [not found]     ` <1426971488192481@web6g.yandex.ru>
  0 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2017-02-27  7:50 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Vinod Koul, Rob Herring, Chen-Yu Tsai, Mark Brown, dmaengine,
	devicetree, linux-arm-kernel, linux-kernel, alsa-devel

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

On Sat, Feb 25, 2017 at 08:30:25PM +0800, Icenowy Zheng wrote:
> Allwinner V3s has a DMA engine similar to the ones from A31, but with
> fewer channels and DRQs.
> 
> Add support for it.
> 
> As it also needs the special gate bit, make the gate bit generic.

That should be part of a separate patch.

> 
> According to BSP source code, SUN8IW6 (A83T) also needs the bit, so it
> have also been specified gate_needed property.
> 
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
> ---
>  Documentation/devicetree/bindings/dma/sun6i-dma.txt |  1 +
>  drivers/dma/sun6i-dma.c                             | 17 ++++++++++++++---
>  2 files changed, 15 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/dma/sun6i-dma.txt b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
> index 6b267045f522..98fbe1a5c6dd 100644
> --- a/Documentation/devicetree/bindings/dma/sun6i-dma.txt
> +++ b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
> @@ -9,6 +9,7 @@ Required properties:
>  		  "allwinner,sun8i-a23-dma"
>  		  "allwinner,sun8i-a83t-dma"
>  		  "allwinner,sun8i-h3-dma"
> +		  "allwinner,sun8i-v3s-dma"
>  - reg:		Should contain the registers base address and length
>  - interrupts:	Should contain a reference to the interrupt used by this device
>  - clocks:	Should contain a reference to the parent AHB clock
> diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
> index a2358780ab2c..1f38424c1b14 100644
> --- a/drivers/dma/sun6i-dma.c
> +++ b/drivers/dma/sun6i-dma.c
> @@ -101,6 +101,7 @@ struct sun6i_dma_config {
>  	u32 nr_max_channels;
>  	u32 nr_max_requests;
>  	u32 nr_max_vchans;
> +	bool gate_needed;
>  };
>  
>  /*
> @@ -1009,12 +1010,14 @@ static struct sun6i_dma_config sun8i_a23_dma_cfg = {
>  	.nr_max_channels = 8,
>  	.nr_max_requests = 24,
>  	.nr_max_vchans   = 37,
> +	.gate_needed	 = true,
>  };
>  
>  static struct sun6i_dma_config sun8i_a83t_dma_cfg = {
>  	.nr_max_channels = 8,
>  	.nr_max_requests = 28,
>  	.nr_max_vchans   = 39,
> +	.gate_needed	 = true,
>  };
>  
>  /*
> @@ -1028,11 +1031,19 @@ static struct sun6i_dma_config sun8i_h3_dma_cfg = {
>  	.nr_max_vchans   = 34,
>  };
>  
> +static struct sun6i_dma_config sun8i_v3s_dma_cfg = {
> +	.nr_max_channels = 8,
> +	.nr_max_requests = 23,
> +	.nr_max_vchans   = 24,

This one is suspicious. There's just a single endpoint that can be
used in both directions?

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] 7+ messages in thread

* Re: [PATCH 5/9] dmaengine: sun6i: support V3s SoC variant
       [not found]     ` <1426971488192481@web6g.yandex.ru>
@ 2017-02-28 17:56       ` Maxime Ripard
       [not found]         ` <535111488304713@web26h.yandex.ru>
  0 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2017-02-28 17:56 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Vinod Koul, Rob Herring, Chen-Yu Tsai, Mark Brown, dmaengine,
	devicetree, linux-arm-kernel, linux-kernel, alsa-devel

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

On Mon, Feb 27, 2017 at 06:48:01PM +0800, Icenowy Zheng wrote:
> 
> 
> 27.02.2017, 15:50, "Maxime Ripard" <maxime.ripard@free-electrons.com>:
> > On Sat, Feb 25, 2017 at 08:30:25PM +0800, Icenowy Zheng wrote:
> >>  Allwinner V3s has a DMA engine similar to the ones from A31, but with
> >>  fewer channels and DRQs.
> >>
> >>  Add support for it.
> >>
> >>  As it also needs the special gate bit, make the gate bit generic.
> >
> > That should be part of a separate patch.
> 
> OK.
> 
> >
> >>  According to BSP source code, SUN8IW6 (A83T) also needs the bit, so it
> >>  have also been specified gate_needed property.
> >>
> >>  Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
> >>  ---
> >>   Documentation/devicetree/bindings/dma/sun6i-dma.txt | 1 +
> >>   drivers/dma/sun6i-dma.c | 17 ++++++++++++++---
> >>   2 files changed, 15 insertions(+), 3 deletions(-)
> >>
> >>  diff --git a/Documentation/devicetree/bindings/dma/sun6i-dma.txt b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
> >>  index 6b267045f522..98fbe1a5c6dd 100644
> >>  --- a/Documentation/devicetree/bindings/dma/sun6i-dma.txt
> >>  +++ b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
> >>  @@ -9,6 +9,7 @@ Required properties:
> >>                     "allwinner,sun8i-a23-dma"
> >>                     "allwinner,sun8i-a83t-dma"
> >>                     "allwinner,sun8i-h3-dma"
> >>  + "allwinner,sun8i-v3s-dma"
> >>   - reg: Should contain the registers base address and length
> >>   - interrupts: Should contain a reference to the interrupt used by this device
> >>   - clocks: Should contain a reference to the parent AHB clock
> >>  diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
> >>  index a2358780ab2c..1f38424c1b14 100644
> >>  --- a/drivers/dma/sun6i-dma.c
> >>  +++ b/drivers/dma/sun6i-dma.c
> >>  @@ -101,6 +101,7 @@ struct sun6i_dma_config {
> >>           u32 nr_max_channels;
> >>           u32 nr_max_requests;
> >>           u32 nr_max_vchans;
> >>  + bool gate_needed;
> >>   };
> >>
> >>   /*
> >>  @@ -1009,12 +1010,14 @@ static struct sun6i_dma_config sun8i_a23_dma_cfg = {
> >>           .nr_max_channels = 8,
> >>           .nr_max_requests = 24,
> >>           .nr_max_vchans = 37,
> >>  + .gate_needed = true,
> >>   };
> >>
> >>   static struct sun6i_dma_config sun8i_a83t_dma_cfg = {
> >>           .nr_max_channels = 8,
> >>           .nr_max_requests = 28,
> >>           .nr_max_vchans = 39,
> >>  + .gate_needed = true,
> >>   };
> >>
> >>   /*
> >>  @@ -1028,11 +1031,19 @@ static struct sun6i_dma_config sun8i_h3_dma_cfg = {
> >>           .nr_max_vchans = 34,
> >>   };
> >>
> >>  +static struct sun6i_dma_config sun8i_v3s_dma_cfg = {
> >>  + .nr_max_channels = 8,
> >>  + .nr_max_requests = 23,
> >>  + .nr_max_vchans = 24,
> >
> > This one is suspicious. There's just a single endpoint that can be
> > used in both directions?
> 
> nr_max_vchans is the endpoint number. nr_max_requests is the
> maximum DRQ number, for V3s, according to the datasheet, it's
> 23: SPI0_{R,T}X.

There's not a lot of endpoints indeed, but you need 28 vchans (2 *
14).

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] 7+ messages in thread

* Re: [PATCH 1/9] ARM: dts: sun8i: add device tree for Lichee Pi Zero with Dock
       [not found] <20170225123029.55939-1-icenowy@aosc.xyz>
                   ` (3 preceding siblings ...)
       [not found] ` <20170225123029.55939-5-icenowy@aosc.xyz>
@ 2017-02-28 23:02 ` Rob Herring
  4 siblings, 0 replies; 7+ messages in thread
From: Rob Herring @ 2017-02-28 23:02 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Vinod Koul, Maxime Ripard, Chen-Yu Tsai, Mark Brown, dmaengine,
	devicetree, linux-arm-kernel, linux-kernel, Linux-ALSA

On Sat, Feb 25, 2017 at 6:30 AM, Icenowy Zheng <icenowy@aosc.xyz> wrote:
> Lichee Pi Zero features a dock, which adds some functions, and should be
> soldered with the core board of Lichee Pi Zero.
>
> Add support for the dock as a new dts, as soldering is needed to make
> the dock usable and there's functions enabled on the dock that is
> unavailable at the 2.54mm pins of the core board.
>
> Currently no new feature on core board is available in the mainline
> kernel, so the dock dt file only includes the core board device tree.
>
> Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
> ---
>  arch/arm/boot/dts/Makefile                         |  3 +-
>  arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts | 49 ++++++++++++++++++++++
>  2 files changed, 51 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts
>
> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
> index 011808490fed..1aa365306479 100644
> --- a/arch/arm/boot/dts/Makefile
> +++ b/arch/arm/boot/dts/Makefile
> @@ -876,7 +876,8 @@ dtb-$(CONFIG_MACH_SUN8I) += \
>         sun8i-h3-orangepi-plus.dtb \
>         sun8i-h3-orangepi-plus2e.dtb \
>         sun8i-r16-parrot.dtb \
> -       sun8i-v3s-licheepi-zero.dtb
> +       sun8i-v3s-licheepi-zero.dtb \
> +       sun8i-v3s-licheepi-zero-dock.dtb
>  dtb-$(CONFIG_MACH_SUN9I) += \
>         sun9i-a80-optimus.dtb \
>         sun9i-a80-cubieboard4.dtb
> diff --git a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts
> new file mode 100644
> index 000000000000..68c114d6b939
> --- /dev/null
> +++ b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero-dock.dts
> @@ -0,0 +1,49 @@
> +/*
> + * Copyright (C) 2016 Icenowy Zheng <icenowy@aosc.xyz>
> + *
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
> + *
> + *  a) This file is free software; you can redistribute it and/or
> + *     modify it under the terms of the GNU General Public License as
> + *     published by the Free Software Foundation; either version 2 of the
> + *     License, or (at your option) any later version.
> + *
> + *     This file is distributed in the hope that it will be useful,
> + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *     GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + *     obtaining a copy of this software and associated documentation
> + *     files (the "Software"), to deal in the Software without
> + *     restriction, including without limitation the rights to use,
> + *     copy, modify, merge, publish, distribute, sublicense, and/or
> + *     sell copies of the Software, and to permit persons to whom the
> + *     Software is furnished to do so, subject to the following
> + *     conditions:
> + *
> + *     The above copyright notice and this permission notice shall be
> + *     included in all copies or substantial portions of the Software.
> + *
> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + *     OTHER DEALINGS IN THE SOFTWARE.

Use SPDX tags here:

SPDX-License-Identifier: (GPL-2.0+ OR MIT)

While it says X11, this is really MIT license text.

> + */
> +
> +#include "sun8i-v3s-licheepi-zero.dts"
> +
> +/ {
> +       model = "Lichee Pi Zero with Dock";
> +       compatible = "licheepi,licheepi-zero-dock", "licheepi,licheepi-zero",
> +                    "allwinner,sun8i-v3s";
> +};
> --
> 2.11.1
>

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

* Re: [PATCH 5/9] dmaengine: sun6i: support V3s SoC variant
       [not found]         ` <535111488304713@web26h.yandex.ru>
@ 2017-03-01  9:32           ` Maxime Ripard
  0 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2017-03-01  9:32 UTC (permalink / raw)
  To: Icenowy Zheng
  Cc: Vinod Koul, Rob Herring, Chen-Yu Tsai, Mark Brown, dmaengine,
	devicetree, linux-arm-kernel, linux-kernel, alsa-devel

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

On Wed, Mar 01, 2017 at 01:58:33AM +0800, Icenowy Zheng wrote:
> 
> 
> 01.03.2017, 01:56, "Maxime Ripard" <maxime.ripard@free-electrons.com>:
> > On Mon, Feb 27, 2017 at 06:48:01PM +0800, Icenowy Zheng wrote:
> >>  27.02.2017, 15:50, "Maxime Ripard" <maxime.ripard@free-electrons.com>:
> >>  > On Sat, Feb 25, 2017 at 08:30:25PM +0800, Icenowy Zheng wrote:
> >>  >>  Allwinner V3s has a DMA engine similar to the ones from A31, but with
> >>  >>  fewer channels and DRQs.
> >>  >>
> >>  >>  Add support for it.
> >>  >>
> >>  >>  As it also needs the special gate bit, make the gate bit generic.
> >>  >
> >>  > That should be part of a separate patch.
> >>
> >>  OK.
> >>
> >>  >
> >>  >>  According to BSP source code, SUN8IW6 (A83T) also needs the bit, so it
> >>  >>  have also been specified gate_needed property.
> >>  >>
> >>  >>  Signed-off-by: Icenowy Zheng <icenowy@aosc.xyz>
> >>  >>  ---
> >>  >>   Documentation/devicetree/bindings/dma/sun6i-dma.txt | 1 +
> >>  >>   drivers/dma/sun6i-dma.c | 17 ++++++++++++++---
> >>  >>   2 files changed, 15 insertions(+), 3 deletions(-)
> >>  >>
> >>  >>  diff --git a/Documentation/devicetree/bindings/dma/sun6i-dma.txt b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
> >>  >>  index 6b267045f522..98fbe1a5c6dd 100644
> >>  >>  --- a/Documentation/devicetree/bindings/dma/sun6i-dma.txt
> >>  >>  +++ b/Documentation/devicetree/bindings/dma/sun6i-dma.txt
> >>  >>  @@ -9,6 +9,7 @@ Required properties:
> >>  >>                     "allwinner,sun8i-a23-dma"
> >>  >>                     "allwinner,sun8i-a83t-dma"
> >>  >>                     "allwinner,sun8i-h3-dma"
> >>  >>  + "allwinner,sun8i-v3s-dma"
> >>  >>   - reg: Should contain the registers base address and length
> >>  >>   - interrupts: Should contain a reference to the interrupt used by this device
> >>  >>   - clocks: Should contain a reference to the parent AHB clock
> >>  >>  diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
> >>  >>  index a2358780ab2c..1f38424c1b14 100644
> >>  >>  --- a/drivers/dma/sun6i-dma.c
> >>  >>  +++ b/drivers/dma/sun6i-dma.c
> >>  >>  @@ -101,6 +101,7 @@ struct sun6i_dma_config {
> >>  >>           u32 nr_max_channels;
> >>  >>           u32 nr_max_requests;
> >>  >>           u32 nr_max_vchans;
> >>  >>  + bool gate_needed;
> >>  >>   };
> >>  >>
> >>  >>   /*
> >>  >>  @@ -1009,12 +1010,14 @@ static struct sun6i_dma_config sun8i_a23_dma_cfg = {
> >>  >>           .nr_max_channels = 8,
> >>  >>           .nr_max_requests = 24,
> >>  >>           .nr_max_vchans = 37,
> >>  >>  + .gate_needed = true,
> >>  >>   };
> >>  >>
> >>  >>   static struct sun6i_dma_config sun8i_a83t_dma_cfg = {
> >>  >>           .nr_max_channels = 8,
> >>  >>           .nr_max_requests = 28,
> >>  >>           .nr_max_vchans = 39,
> >>  >>  + .gate_needed = true,
> >>  >>   };
> >>  >>
> >>  >>   /*
> >>  >>  @@ -1028,11 +1031,19 @@ static struct sun6i_dma_config sun8i_h3_dma_cfg = {
> >>  >>           .nr_max_vchans = 34,
> >>  >>   };
> >>  >>
> >>  >>  +static struct sun6i_dma_config sun8i_v3s_dma_cfg = {
> >>  >>  + .nr_max_channels = 8,
> >>  >>  + .nr_max_requests = 23,
> >>  >>  + .nr_max_vchans = 24,
> >>  >
> >>  > This one is suspicious. There's just a single endpoint that can be
> >>  > used in both directions?
> >>
> >>  nr_max_vchans is the endpoint number. nr_max_requests is the
> >>  maximum DRQ number, for V3s, according to the datasheet, it's
> >>  23: SPI0_{R,T}X.
> >
> > There's not a lot of endpoints indeed, but you need 28 vchans (2 *
> > 14).
> 
> Sorry but I counted only 12 pairs of vchans:
> Port 0. SRAM
> Port 1. SDRAM
> Port 6. UART0
> Port 7. UART1
> Port 8. UART2
> Port 15. Audio Codec
> Port 16. CE
> Port 17. OTG EP1
> Port 18. OTG EP2
> Port 19. OTG EP3
> Port 20. OTG EP4
> Port 23. SPI0

It seems like I can't count anymore... Yes, you're right, sorry.

Having a comment on top of the structure, just like all the other SoCs
would be nice though.

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] 7+ messages in thread

end of thread, other threads:[~2017-03-01  9:35 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20170225123029.55939-1-icenowy@aosc.xyz>
     [not found] ` <20170225123029.55939-2-icenowy@aosc.xyz>
2017-02-26  6:06   ` [PATCH 2/9] ASoC: sun8i-codec-analog: split out linein and mic2 Chen-Yu Tsai
     [not found] ` <20170225123029.55939-3-icenowy@aosc.xyz>
2017-02-26  6:16   ` [PATCH 3/9] ASoC: sun8i-codec-analog: add support for V3s SoC Chen-Yu Tsai
2017-02-27  7:49 ` [PATCH 1/9] ARM: dts: sun8i: add device tree for Lichee Pi Zero with Dock Maxime Ripard
     [not found] ` <20170225123029.55939-5-icenowy@aosc.xyz>
2017-02-27  7:50   ` [PATCH 5/9] dmaengine: sun6i: support V3s SoC variant Maxime Ripard
     [not found]     ` <1426971488192481@web6g.yandex.ru>
2017-02-28 17:56       ` Maxime Ripard
     [not found]         ` <535111488304713@web26h.yandex.ru>
2017-03-01  9:32           ` Maxime Ripard
2017-02-28 23:02 ` [PATCH 1/9] ARM: dts: sun8i: add device tree for Lichee Pi Zero with Dock Rob Herring

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