dmaengine.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [RESEND PATCH 00/19] Second step support for A100
@ 2020-11-10  6:20 Frank Lee
  2020-11-10  6:26 ` [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible Frank Lee
  2020-11-10  6:28 ` [RESEND PATCH 05/19] dmaengine: sun6i: Add support for A100 DMA Frank Lee
  0 siblings, 2 replies; 7+ messages in thread
From: Frank Lee @ 2020-11-10  6:20 UTC (permalink / raw)
  To: tiny.windzz, dmaengine, devicetree, linux-arm-kernel,
	linux-kernel, linux-mmc, linux-watchdog, linux-gpio
  Cc: Frank Lee, Vinod Koul, Rob Herring, Maxime Ripard, Chen-Yu Tsai,
	Ulf Hansson, Kishon Vijay Abraham I, Wim Van Sebroeck,
	Guenter Roeck, Dan Williams, Linus Walleij, Wolfram Sang,
	Marek Vasut, Douglas Anderson, Randy Dunlap, Krzysztof Kozlowski,
	Colin Ian King, Ondrej Jirman, Rikard Falkeborn,
	Greg Kroah-Hartman

Let's add watchdog, arm-pmu, dma, usb, mmc..... support for allwinner
a100 soc.

Yangtao Li (19):
  pinctrl: sunxi: fix irq bank map for the Allwinner A100 pin controller
  pinctrl: sunxi: Mark the irq bank not found in
    sunxi_pinctrl_irq_handler() with WARN_ON
  pinctrl: sunxi: Always call chained_irq_{enter, exit} in
    sunxi_pinctrl_irq_handler
  dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible
  dmaengine: sun6i: Add support for A100 DMA
  arm64: allwinner: a100: Add device node for DMA controller
  arm64: dts: allwinner: A100: Add PMU mode
  phy: sun4i-usb: remove enable_pmu_unk1 from sun50i_h6_cfg
  phy: allwinner: Convert to devm_platform_ioremap_* API
  dt-bindings: watchdog: sun4i: Add A100 compatible
  arm64: dts: allwinner: a100: add watchdog node
  dt-bindings: Add bindings for USB phy on Allwinner A100
  phy: sun4i-usb: add support for A100 USB PHY
  arm64: dts: allwinner: a100: add usb related nodes
  arm64: allwinner: A100: enable EHCI, OHCI and USB PHY nodes in Perf1
  dt-bindings: mmc: sunxi: Add A100 compatibles
  mmc: sunxi: add support for A100 mmc controller
  arm64: allwinner: a100: Add MMC related nodes
  arm64: dts: allwinner: a100: perf1: Add eMMC and MMC node

 .../dma/allwinner,sun50i-a64-dma.yaml         |   5 +-
 .../bindings/mmc/allwinner,sun4i-a10-mmc.yaml |   2 +
 .../phy/allwinner,sun50i-a100-usb-phy.yaml    | 105 ++++++++++
 .../watchdog/allwinner,sun4i-a10-wdt.yaml     |   3 +
 .../allwinner/sun50i-a100-allwinner-perf1.dts |  54 +++++
 .../arm64/boot/dts/allwinner/sun50i-a100.dtsi | 197 +++++++++++++++++-
 drivers/dma/sun6i-dma.c                       |  25 +++
 drivers/mmc/host/sunxi-mmc.c                  |  28 ++-
 drivers/phy/allwinner/phy-sun4i-usb.c         |  29 ++-
 drivers/phy/allwinner/phy-sun50i-usb3.c       |   4 +-
 drivers/phy/allwinner/phy-sun6i-mipi-dphy.c   |   4 +-
 drivers/phy/allwinner/phy-sun9i-usb.c         |   4 +-
 drivers/pinctrl/sunxi/pinctrl-sun50i-a100.c   |   2 +-
 drivers/pinctrl/sunxi/pinctrl-sunxi.c         |   9 +-
 14 files changed, 443 insertions(+), 28 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/phy/allwinner,sun50i-a100-usb-phy.yaml

-- 
2.28.0


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

* [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible
  2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
@ 2020-11-10  6:26 ` Frank Lee
  2020-11-11 22:46   ` Rob Herring
  2020-11-18 11:01   ` Vinod Koul
  2020-11-10  6:28 ` [RESEND PATCH 05/19] dmaengine: sun6i: Add support for A100 DMA Frank Lee
  1 sibling, 2 replies; 7+ messages in thread
From: Frank Lee @ 2020-11-10  6:26 UTC (permalink / raw)
  To: tiny.windzz
  Cc: devicetree, dmaengine, linux-arm-kernel, linux-kernel,
	Yangtao Li, Vinod Koul, Rob Herring, Maxime Ripard, Chen-Yu Tsai

From: Yangtao Li <frank@allwinnertech.com>

Add a binding for A100's dma controller.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
---
 .../devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml    | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml
index 372679dbd216..b6e1ebfaf366 100644
--- a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml
+++ b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml
@@ -21,6 +21,7 @@ properties:
   compatible:
     oneOf:
       - const: allwinner,sun50i-a64-dma
+      - const: allwinner,sun50i-a100-dma
       - const: allwinner,sun50i-h6-dma
       - items:
           - const: allwinner,sun8i-r40-dma
@@ -56,7 +57,9 @@ required:
 if:
   properties:
     compatible:
-      const: allwinner,sun50i-h6-dma
+      enum:
+        - allwinner,sun50i-a100-dma
+        - allwinner,sun50i-h6-dma
 
 then:
   properties:
-- 
2.28.0


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

* [RESEND PATCH 05/19] dmaengine: sun6i: Add support for A100 DMA
  2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
  2020-11-10  6:26 ` [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible Frank Lee
@ 2020-11-10  6:28 ` Frank Lee
  2020-11-18 10:59   ` Vinod Koul
  2020-11-28 20:31   ` André Przywara
  1 sibling, 2 replies; 7+ messages in thread
From: Frank Lee @ 2020-11-10  6:28 UTC (permalink / raw)
  To: tiny.windzz
  Cc: dmaengine, linux-arm-kernel, linux-kernel, Yangtao Li,
	Dan Williams, Vinod Koul, Maxime Ripard, Chen-Yu Tsai

From: Yangtao Li <frank@allwinnertech.com>

The dma of a100 is similar to h6, with some minor changes to
support greater addressing capabilities.

Add support for it.

Signed-off-by: Yangtao Li <frank@allwinnertech.com>
---
 drivers/dma/sun6i-dma.c | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
index f5f9c86c50bc..5cadd4d2b824 100644
--- a/drivers/dma/sun6i-dma.c
+++ b/drivers/dma/sun6i-dma.c
@@ -1173,6 +1173,30 @@ static struct sun6i_dma_config sun50i_a64_dma_cfg = {
 			     BIT(DMA_SLAVE_BUSWIDTH_8_BYTES),
 };
 
+/*
+ * TODO: Add support for more than 4g physical addressing.
+ *
+ * The A100 binding uses the number of dma channels from the
+ * device tree node.
+ */
+static struct sun6i_dma_config sun50i_a100_dma_cfg = {
+	.clock_autogate_enable = sun6i_enable_clock_autogate_h3,
+	.set_burst_length = sun6i_set_burst_length_h3,
+	.set_drq          = sun6i_set_drq_h6,
+	.set_mode         = sun6i_set_mode_h6,
+	.src_burst_lengths = BIT(1) | BIT(4) | BIT(8) | BIT(16),
+	.dst_burst_lengths = BIT(1) | BIT(4) | BIT(8) | BIT(16),
+	.src_addr_widths   = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) |
+			     BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) |
+			     BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) |
+			     BIT(DMA_SLAVE_BUSWIDTH_8_BYTES),
+	.dst_addr_widths   = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) |
+			     BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) |
+			     BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) |
+			     BIT(DMA_SLAVE_BUSWIDTH_8_BYTES),
+	.has_mbus_clk = true,
+};
+
 /*
  * The H6 binding uses the number of dma channels from the
  * device tree node.
@@ -1225,6 +1249,7 @@ static const struct of_device_id sun6i_dma_match[] = {
 	{ .compatible = "allwinner,sun8i-h3-dma", .data = &sun8i_h3_dma_cfg },
 	{ .compatible = "allwinner,sun8i-v3s-dma", .data = &sun8i_v3s_dma_cfg },
 	{ .compatible = "allwinner,sun50i-a64-dma", .data = &sun50i_a64_dma_cfg },
+	{ .compatible = "allwinner,sun50i-a100-dma", .data = &sun50i_a100_dma_cfg },
 	{ .compatible = "allwinner,sun50i-h6-dma", .data = &sun50i_h6_dma_cfg },
 	{ /* sentinel */ }
 };
-- 
2.28.0


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

* Re: [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible
  2020-11-10  6:26 ` [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible Frank Lee
@ 2020-11-11 22:46   ` Rob Herring
  2020-11-18 11:01   ` Vinod Koul
  1 sibling, 0 replies; 7+ messages in thread
From: Rob Herring @ 2020-11-11 22:46 UTC (permalink / raw)
  To: Frank Lee
  Cc: tiny.windzz, dmaengine, Rob Herring, Vinod Koul, Chen-Yu Tsai,
	Maxime Ripard, devicetree, linux-arm-kernel, linux-kernel

On Tue, 10 Nov 2020 14:26:38 +0800, Frank Lee wrote:
> From: Yangtao Li <frank@allwinnertech.com>
> 
> Add a binding for A100's dma controller.
> 
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> ---
>  .../devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml    | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 

Acked-by: Rob Herring <robh@kernel.org>

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

* Re: [RESEND PATCH 05/19] dmaengine: sun6i: Add support for A100 DMA
  2020-11-10  6:28 ` [RESEND PATCH 05/19] dmaengine: sun6i: Add support for A100 DMA Frank Lee
@ 2020-11-18 10:59   ` Vinod Koul
  2020-11-28 20:31   ` André Przywara
  1 sibling, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2020-11-18 10:59 UTC (permalink / raw)
  To: Frank Lee
  Cc: tiny.windzz, dmaengine, linux-arm-kernel, linux-kernel,
	Dan Williams, Maxime Ripard, Chen-Yu Tsai

On 10-11-20, 14:28, Frank Lee wrote:
> From: Yangtao Li <frank@allwinnertech.com>
> 
> The dma of a100 is similar to h6, with some minor changes to
> support greater addressing capabilities.
> 
> Add support for it.

Applied, thanks

-- 
~Vinod

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

* Re: [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible
  2020-11-10  6:26 ` [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible Frank Lee
  2020-11-11 22:46   ` Rob Herring
@ 2020-11-18 11:01   ` Vinod Koul
  1 sibling, 0 replies; 7+ messages in thread
From: Vinod Koul @ 2020-11-18 11:01 UTC (permalink / raw)
  To: Frank Lee
  Cc: tiny.windzz, devicetree, dmaengine, linux-arm-kernel,
	linux-kernel, Rob Herring, Maxime Ripard, Chen-Yu Tsai

On 10-11-20, 14:26, Frank Lee wrote:
> From: Yangtao Li <frank@allwinnertech.com>
> 
> Add a binding for A100's dma controller.

Applied, thanks

-- 
~Vinod

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

* Re: [RESEND PATCH 05/19] dmaengine: sun6i: Add support for A100 DMA
  2020-11-10  6:28 ` [RESEND PATCH 05/19] dmaengine: sun6i: Add support for A100 DMA Frank Lee
  2020-11-18 10:59   ` Vinod Koul
@ 2020-11-28 20:31   ` André Przywara
  1 sibling, 0 replies; 7+ messages in thread
From: André Przywara @ 2020-11-28 20:31 UTC (permalink / raw)
  To: Frank Lee, tiny.windzz
  Cc: linux-kernel, Maxime Ripard, Vinod Koul, dmaengine, Dan Williams,
	Chen-Yu Tsai, linux-arm-kernel, Jernej Skrabec

On 10/11/2020 06:28, Frank Lee wrote:

Hi,

> From: Yangtao Li <frank@allwinnertech.com>
> 
> The dma of a100 is similar to h6, with some minor changes to
> support greater addressing capabilities.

So apparently those changes are backwards compatible, right?
Why do we need then a new struct now, when this is actually identical to
the existing H6 one?

So as this seems to work with the same settings as the H6, I think we
don't need any change in the driver at the moment, just using the H6
compatible as a fallback in the .dtsi.

Cheers,
Andre

P.S. I understand that Vinod already applied it, and it doesn't hurt to
have that in at the moment, if we fix the compatible usage.

> 
> Add support for it.>
> Signed-off-by: Yangtao Li <frank@allwinnertech.com>
> ---
>  drivers/dma/sun6i-dma.c | 25 +++++++++++++++++++++++++
>  1 file changed, 25 insertions(+)
> 
> diff --git a/drivers/dma/sun6i-dma.c b/drivers/dma/sun6i-dma.c
> index f5f9c86c50bc..5cadd4d2b824 100644
> --- a/drivers/dma/sun6i-dma.c
> +++ b/drivers/dma/sun6i-dma.c
> @@ -1173,6 +1173,30 @@ static struct sun6i_dma_config sun50i_a64_dma_cfg = {
>  			     BIT(DMA_SLAVE_BUSWIDTH_8_BYTES),
>  };
>  
> +/*
> + * TODO: Add support for more than 4g physical addressing.
> + *
> + * The A100 binding uses the number of dma channels from the
> + * device tree node.
> + */
> +static struct sun6i_dma_config sun50i_a100_dma_cfg = {
> +	.clock_autogate_enable = sun6i_enable_clock_autogate_h3,
> +	.set_burst_length = sun6i_set_burst_length_h3,
> +	.set_drq          = sun6i_set_drq_h6,
> +	.set_mode         = sun6i_set_mode_h6,
> +	.src_burst_lengths = BIT(1) | BIT(4) | BIT(8) | BIT(16),
> +	.dst_burst_lengths = BIT(1) | BIT(4) | BIT(8) | BIT(16),
> +	.src_addr_widths   = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) |
> +			     BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) |
> +			     BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) |
> +			     BIT(DMA_SLAVE_BUSWIDTH_8_BYTES),
> +	.dst_addr_widths   = BIT(DMA_SLAVE_BUSWIDTH_1_BYTE) |
> +			     BIT(DMA_SLAVE_BUSWIDTH_2_BYTES) |
> +			     BIT(DMA_SLAVE_BUSWIDTH_4_BYTES) |
> +			     BIT(DMA_SLAVE_BUSWIDTH_8_BYTES),
> +	.has_mbus_clk = true,
> +};
> +
>  /*
>   * The H6 binding uses the number of dma channels from the
>   * device tree node.
> @@ -1225,6 +1249,7 @@ static const struct of_device_id sun6i_dma_match[] = {
>  	{ .compatible = "allwinner,sun8i-h3-dma", .data = &sun8i_h3_dma_cfg },
>  	{ .compatible = "allwinner,sun8i-v3s-dma", .data = &sun8i_v3s_dma_cfg },
>  	{ .compatible = "allwinner,sun50i-a64-dma", .data = &sun50i_a64_dma_cfg },
> +	{ .compatible = "allwinner,sun50i-a100-dma", .data = &sun50i_a100_dma_cfg },
>  	{ .compatible = "allwinner,sun50i-h6-dma", .data = &sun50i_h6_dma_cfg },
>  	{ /* sentinel */ }
>  };
> 


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

end of thread, other threads:[~2020-11-28 22:04 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-10  6:20 [RESEND PATCH 00/19] Second step support for A100 Frank Lee
2020-11-10  6:26 ` [RESEND PATCH 04/19] dt-bindings: dma: allwinner,sun50i-a64-dma: Add A100 compatible Frank Lee
2020-11-11 22:46   ` Rob Herring
2020-11-18 11:01   ` Vinod Koul
2020-11-10  6:28 ` [RESEND PATCH 05/19] dmaengine: sun6i: Add support for A100 DMA Frank Lee
2020-11-18 10:59   ` Vinod Koul
2020-11-28 20:31   ` André Przywara

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