DMA Engine development
 help / color / mirror / Atom feed
* [PATCH 0/4] dmaengine: sh: rcar-dmac: add R-Car Gen5 X5H support
@ 2026-08-25 14:15 Wolfram Sang
  2026-08-25 14:15 ` [PATCH 1/4] dmaengine: sh: rcar-dmac: fix style in struct initialization Wolfram Sang
                   ` (3 more replies)
  0 siblings, 4 replies; 14+ messages in thread
From: Wolfram Sang @ 2026-08-25 14:15 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Conor Dooley, devicetree, dmaengine, Frank Li,
	Geert Uytterhoeven, Krzysztof Kozlowski, Magnus Damm, Rob Herring,
	Vinod Koul, Yoshihiro Shimoda

Here is a small series with the needed driver updates to support R-Car
Gen5 and X5H for the SYSC-DMAC. Details are in the patch descriptions,
but it is all small stuff.

It has been tested on an Ironhide board (X5H) and a SparrowHawk (V4H)
for regression testing. The testing branch can be found here:

git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux.git renesas/x5h/i2c-experimental

The patches here are based on linux-next as of 20260825. DT checks have
also been passed.

Looking forward to comments or approval!


Wolfram Sang (4):
  dmaengine: sh: rcar-dmac: fix style in struct initialization
  dmaengine: sh: rcar-dmac: SMMU doesn't need IPMMU workaround
  dt-bindings: renesas,rcar-dmac: Add support for R-Car X5H SoC
  dmaengine: sh: rcar-dmac: Add support for R-Car Gen5 SoCs

 .../bindings/dma/renesas,rcar-dmac.yaml       |  6 +++++
 drivers/dma/sh/rcar-dmac.c                    | 25 ++++++++++++++-----
 2 files changed, 25 insertions(+), 6 deletions(-)

-- 
2.47.3


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

* [PATCH 1/4] dmaengine: sh: rcar-dmac: fix style in struct initialization
  2026-08-25 14:15 [PATCH 0/4] dmaengine: sh: rcar-dmac: add R-Car Gen5 X5H support Wolfram Sang
@ 2026-08-25 14:15 ` Wolfram Sang
  2026-08-25 15:35   ` Frank Li
  2026-09-04 12:29   ` Geert Uytterhoeven
  2026-08-25 14:15 ` [PATCH 2/4] dmaengine: sh: rcar-dmac: SMMU doesn't need IPMMU workaround Wolfram Sang
                   ` (2 subsequent siblings)
  3 siblings, 2 replies; 14+ messages in thread
From: Wolfram Sang @ 2026-08-25 14:15 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Vinod Koul, Frank Li, Geert Uytterhoeven,
	Magnus Damm, dmaengine

A new member will be added to the struct. Before that, adhere to coding
style by using a single space when assigning values.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/dma/sh/rcar-dmac.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
index 44eab2d21d54..cf07c17847d0 100644
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -1998,13 +1998,13 @@ static void rcar_dmac_shutdown(struct platform_device *pdev)
 }
 
 static const struct rcar_dmac_of_data rcar_dmac_data = {
-	.chan_offset_base	= 0x8000,
-	.chan_offset_stride	= 0x80,
+	.chan_offset_base = 0x8000,
+	.chan_offset_stride = 0x80,
 };
 
 static const struct rcar_dmac_of_data rcar_gen4_dmac_data = {
-	.chan_offset_base	= 0x0,
-	.chan_offset_stride	= 0x1000,
+	.chan_offset_base = 0x0,
+	.chan_offset_stride = 0x1000,
 };
 
 static const struct of_device_id rcar_dmac_of_ids[] = {
-- 
2.47.3


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

* [PATCH 2/4] dmaengine: sh: rcar-dmac: SMMU doesn't need IPMMU workaround
  2026-08-25 14:15 [PATCH 0/4] dmaengine: sh: rcar-dmac: add R-Car Gen5 X5H support Wolfram Sang
  2026-08-25 14:15 ` [PATCH 1/4] dmaengine: sh: rcar-dmac: fix style in struct initialization Wolfram Sang
@ 2026-08-25 14:15 ` Wolfram Sang
  2026-08-25 15:37   ` Frank Li
  2026-09-04 12:44   ` Geert Uytterhoeven
  2026-08-25 14:15 ` [PATCH 3/4] dt-bindings: renesas,rcar-dmac: Add support for R-Car X5H SoC Wolfram Sang
  2026-08-25 14:15 ` [PATCH 4/4] dmaengine: sh: rcar-dmac: Add support for R-Car Gen5 SoCs Wolfram Sang
  3 siblings, 2 replies; 14+ messages in thread
From: Wolfram Sang @ 2026-08-25 14:15 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Vinod Koul, Frank Li, Geert Uytterhoeven,
	Magnus Damm, dmaengine

R-Car Gen5 doesn't use an IPMMU anymore, but a SMMU. So, the workaround
for the IPMMU becomes optional. Add a flag to distinguish. No functional
change.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/dma/sh/rcar-dmac.c | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
index cf07c17847d0..9c5210257097 100644
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -219,10 +219,12 @@ struct rcar_dmac {
  * struct rcar_dmac_of_data - This driver's OF data
  * @chan_offset_base: DMAC channels base offset
  * @chan_offset_stride: DMAC channels offset stride
+ * @has_ipmmu: flag telling if DMAC is connected to an IPMMU
  */
 struct rcar_dmac_of_data {
 	u32 chan_offset_base;
 	u32 chan_offset_stride;
+	unsigned int has_ipmmu:1;
 };
 
 /* -----------------------------------------------------------------------------
@@ -1877,8 +1879,9 @@ static int rcar_dmac_probe(struct platform_device *pdev)
 	 * can't use it with the IPMMU. As the IOMMU API operates at the device
 	 * level we can't disable it selectively, so ignore channel 0 for now if
 	 * the device is part of an IOMMU group.
+	 * Not applicable if system uses something else than IPMMU like SMMU.
 	 */
-	if (device_iommu_mapped(&pdev->dev))
+	if (data->has_ipmmu && device_iommu_mapped(&pdev->dev))
 		dmac->channels_mask &= ~BIT(0);
 
 	dmac->channels = devm_kcalloc(&pdev->dev, dmac->n_channels,
@@ -2000,11 +2003,13 @@ static void rcar_dmac_shutdown(struct platform_device *pdev)
 static const struct rcar_dmac_of_data rcar_dmac_data = {
 	.chan_offset_base = 0x8000,
 	.chan_offset_stride = 0x80,
+	.has_ipmmu = 1,
 };
 
 static const struct rcar_dmac_of_data rcar_gen4_dmac_data = {
 	.chan_offset_base = 0x0,
 	.chan_offset_stride = 0x1000,
+	.has_ipmmu = 1,
 };
 
 static const struct of_device_id rcar_dmac_of_ids[] = {
-- 
2.47.3


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

* [PATCH 3/4] dt-bindings: renesas,rcar-dmac: Add support for R-Car X5H SoC
  2026-08-25 14:15 [PATCH 0/4] dmaengine: sh: rcar-dmac: add R-Car Gen5 X5H support Wolfram Sang
  2026-08-25 14:15 ` [PATCH 1/4] dmaengine: sh: rcar-dmac: fix style in struct initialization Wolfram Sang
  2026-08-25 14:15 ` [PATCH 2/4] dmaengine: sh: rcar-dmac: SMMU doesn't need IPMMU workaround Wolfram Sang
@ 2026-08-25 14:15 ` Wolfram Sang
  2026-08-28 10:12   ` Krzysztof Kozlowski
  2026-09-04 12:59   ` Geert Uytterhoeven
  2026-08-25 14:15 ` [PATCH 4/4] dmaengine: sh: rcar-dmac: Add support for R-Car Gen5 SoCs Wolfram Sang
  3 siblings, 2 replies; 14+ messages in thread
From: Wolfram Sang @ 2026-08-25 14:15 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Vinod Koul, Frank Li, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
	Magnus Damm, Yoshihiro Shimoda, dmaengine, devicetree

Also add the familiy compatible because X5H is the first R-Car Gen5 SoC.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 .../devicetree/bindings/dma/renesas,rcar-dmac.yaml          | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml b/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml
index 04fc4a99a7cb..d3d521c927e1 100644
--- a/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml
+++ b/Documentation/devicetree/bindings/dma/renesas,rcar-dmac.yaml
@@ -49,6 +49,11 @@ properties:
               - renesas,dmac-r8a779h0     # R-Car V4M
           - const: renesas,rcar-gen4-dmac # R-Car Gen4
 
+      - items:
+          - enum:
+              - renesas,dmac-r8a78000     # R-Car X5H
+          - const: renesas,rcar-gen5-dmac # R-Car Gen5
+
   reg: true
 
   interrupts:
@@ -123,6 +128,7 @@ if:
       contains:
         enum:
           - renesas,rcar-gen4-dmac
+          - renesas,rcar-gen5-dmac
 then:
   properties:
     reg:
-- 
2.47.3


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

* [PATCH 4/4] dmaengine: sh: rcar-dmac: Add support for R-Car Gen5 SoCs
  2026-08-25 14:15 [PATCH 0/4] dmaengine: sh: rcar-dmac: add R-Car Gen5 X5H support Wolfram Sang
                   ` (2 preceding siblings ...)
  2026-08-25 14:15 ` [PATCH 3/4] dt-bindings: renesas,rcar-dmac: Add support for R-Car X5H SoC Wolfram Sang
@ 2026-08-25 14:15 ` Wolfram Sang
  2026-08-25 15:40   ` Frank Li
  2026-09-04 13:01   ` Geert Uytterhoeven
  3 siblings, 2 replies; 14+ messages in thread
From: Wolfram Sang @ 2026-08-25 14:15 UTC (permalink / raw)
  To: linux-renesas-soc
  Cc: Wolfram Sang, Vinod Koul, Frank Li, Geert Uytterhoeven,
	Magnus Damm, dmaengine

Gen5 is very similar to Gen4. Of interest here is that it has a SMMU
instead of an IPMMU, so we don't need to set the flag for a workaround.
Make the module description more generic while here.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
---
 drivers/dma/sh/rcar-dmac.c | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
index 9c5210257097..06f691f5f3fb 100644
--- a/drivers/dma/sh/rcar-dmac.c
+++ b/drivers/dma/sh/rcar-dmac.c
@@ -2012,6 +2012,11 @@ static const struct rcar_dmac_of_data rcar_gen4_dmac_data = {
 	.has_ipmmu = 1,
 };
 
+static const struct rcar_dmac_of_data rcar_gen5_dmac_data = {
+	.chan_offset_base = 0x0,
+	.chan_offset_stride = 0x1000,
+};
+
 static const struct of_device_id rcar_dmac_of_ids[] = {
 	{
 		.compatible = "renesas,rcar-dmac",
@@ -2019,6 +2024,9 @@ static const struct of_device_id rcar_dmac_of_ids[] = {
 	}, {
 		.compatible = "renesas,rcar-gen4-dmac",
 		.data = &rcar_gen4_dmac_data,
+	}, {
+		.compatible = "renesas,rcar-gen5-dmac",
+		.data = &rcar_gen5_dmac_data,
 	}, {
 		/*
 		 * Backward compatibility for between v5.12 - v5.19
@@ -2044,6 +2052,6 @@ static struct platform_driver rcar_dmac_driver = {
 
 module_platform_driver(rcar_dmac_driver);
 
-MODULE_DESCRIPTION("R-Car Gen2 DMA Controller Driver");
+MODULE_DESCRIPTION("R-Car DMA Controller Driver");
 MODULE_AUTHOR("Laurent Pinchart <laurent.pinchart@ideasonboard.com>");
 MODULE_LICENSE("GPL v2");
-- 
2.47.3


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

* Re: [PATCH 1/4] dmaengine: sh: rcar-dmac: fix style in struct initialization
  2026-08-25 14:15 ` [PATCH 1/4] dmaengine: sh: rcar-dmac: fix style in struct initialization Wolfram Sang
@ 2026-08-25 15:35   ` Frank Li
  2026-09-04 12:29   ` Geert Uytterhoeven
  1 sibling, 0 replies; 14+ messages in thread
From: Frank Li @ 2026-08-25 15:35 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Vinod Koul, Frank Li, Geert Uytterhoeven,
	Magnus Damm, dmaengine

On Tue, Aug 25, 2026 at 04:15:43PM +0200, Wolfram Sang wrote:
> A new member will be added to the struct. Before that, adhere to coding
> style by using a single space when assigning values.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  drivers/dma/sh/rcar-dmac.c | 8 ++++----
>  1 file changed, 4 insertions(+), 4 deletions(-)
>
> diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
> index 44eab2d21d54..cf07c17847d0 100644
> --- a/drivers/dma/sh/rcar-dmac.c
> +++ b/drivers/dma/sh/rcar-dmac.c
> @@ -1998,13 +1998,13 @@ static void rcar_dmac_shutdown(struct platform_device *pdev)
>  }
>
>  static const struct rcar_dmac_of_data rcar_dmac_data = {
> -	.chan_offset_base	= 0x8000,
> -	.chan_offset_stride	= 0x80,
> +	.chan_offset_base = 0x8000,
> +	.chan_offset_stride = 0x80,
>  };
>
>  static const struct rcar_dmac_of_data rcar_gen4_dmac_data = {
> -	.chan_offset_base	= 0x0,
> -	.chan_offset_stride	= 0x1000,
> +	.chan_offset_base = 0x0,
> +	.chan_offset_stride = 0x1000,
>  };
>
>  static const struct of_device_id rcar_dmac_of_ids[] = {
> --
> 2.47.3
>

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

* Re: [PATCH 2/4] dmaengine: sh: rcar-dmac: SMMU doesn't need IPMMU workaround
  2026-08-25 14:15 ` [PATCH 2/4] dmaengine: sh: rcar-dmac: SMMU doesn't need IPMMU workaround Wolfram Sang
@ 2026-08-25 15:37   ` Frank Li
  2026-09-04 12:44   ` Geert Uytterhoeven
  1 sibling, 0 replies; 14+ messages in thread
From: Frank Li @ 2026-08-25 15:37 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Vinod Koul, Frank Li, Geert Uytterhoeven,
	Magnus Damm, dmaengine

On Tue, Aug 25, 2026 at 04:15:44PM +0200, Wolfram Sang wrote:
> R-Car Gen5 doesn't use an IPMMU anymore, but a SMMU. So, the workaround
> for the IPMMU becomes optional. Add a flag to distinguish. No functional
> change.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  drivers/dma/sh/rcar-dmac.c | 7 ++++++-
>  1 file changed, 6 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
> index cf07c17847d0..9c5210257097 100644
> --- a/drivers/dma/sh/rcar-dmac.c
> +++ b/drivers/dma/sh/rcar-dmac.c
> @@ -219,10 +219,12 @@ struct rcar_dmac {
>   * struct rcar_dmac_of_data - This driver's OF data
>   * @chan_offset_base: DMAC channels base offset
>   * @chan_offset_stride: DMAC channels offset stride
> + * @has_ipmmu: flag telling if DMAC is connected to an IPMMU
>   */
>  struct rcar_dmac_of_data {
>  	u32 chan_offset_base;
>  	u32 chan_offset_stride;
> +	unsigned int has_ipmmu:1;

Nit: most similar case use bool

Reviewed-by: Frank Li <Frank.Li@nxp.com>

>  };
>
>  /* -----------------------------------------------------------------------------
> @@ -1877,8 +1879,9 @@ static int rcar_dmac_probe(struct platform_device *pdev)
>  	 * can't use it with the IPMMU. As the IOMMU API operates at the device
>  	 * level we can't disable it selectively, so ignore channel 0 for now if
>  	 * the device is part of an IOMMU group.
> +	 * Not applicable if system uses something else than IPMMU like SMMU.
>  	 */
> -	if (device_iommu_mapped(&pdev->dev))
> +	if (data->has_ipmmu && device_iommu_mapped(&pdev->dev))
>  		dmac->channels_mask &= ~BIT(0);
>
>  	dmac->channels = devm_kcalloc(&pdev->dev, dmac->n_channels,
> @@ -2000,11 +2003,13 @@ static void rcar_dmac_shutdown(struct platform_device *pdev)
>  static const struct rcar_dmac_of_data rcar_dmac_data = {
>  	.chan_offset_base = 0x8000,
>  	.chan_offset_stride = 0x80,
> +	.has_ipmmu = 1,
>  };
>
>  static const struct rcar_dmac_of_data rcar_gen4_dmac_data = {
>  	.chan_offset_base = 0x0,
>  	.chan_offset_stride = 0x1000,
> +	.has_ipmmu = 1,
>  };
>
>  static const struct of_device_id rcar_dmac_of_ids[] = {
> --
> 2.47.3
>

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

* Re: [PATCH 4/4] dmaengine: sh: rcar-dmac: Add support for R-Car Gen5 SoCs
  2026-08-25 14:15 ` [PATCH 4/4] dmaengine: sh: rcar-dmac: Add support for R-Car Gen5 SoCs Wolfram Sang
@ 2026-08-25 15:40   ` Frank Li
  2026-08-26  8:17     ` Wolfram Sang
  2026-09-04 13:01   ` Geert Uytterhoeven
  1 sibling, 1 reply; 14+ messages in thread
From: Frank Li @ 2026-08-25 15:40 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Vinod Koul, Frank Li, Geert Uytterhoeven,
	Magnus Damm, dmaengine

On Tue, Aug 25, 2026 at 04:15:46PM +0200, Wolfram Sang wrote:
> Gen5 is very similar to Gen4. Of interest here is that it has a SMMU
> instead of an IPMMU, so we don't need to set the flag for a workaround.

Generally, needn't "we",  simple said

needn't to set ...

Frank

> Make the module description more generic while here.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  drivers/dma/sh/rcar-dmac.c | 10 +++++++++-
>  1 file changed, 9 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/dma/sh/rcar-dmac.c b/drivers/dma/sh/rcar-dmac.c
> index 9c5210257097..06f691f5f3fb 100644
> --- a/drivers/dma/sh/rcar-dmac.c
> +++ b/drivers/dma/sh/rcar-dmac.c
> @@ -2012,6 +2012,11 @@ static const struct rcar_dmac_of_data rcar_gen4_dmac_data = {
>  	.has_ipmmu = 1,
>  };
>
> +static const struct rcar_dmac_of_data rcar_gen5_dmac_data = {
> +	.chan_offset_base = 0x0,
> +	.chan_offset_stride = 0x1000,
> +};
> +
>  static const struct of_device_id rcar_dmac_of_ids[] = {
>  	{
>  		.compatible = "renesas,rcar-dmac",
> @@ -2019,6 +2024,9 @@ static const struct of_device_id rcar_dmac_of_ids[] = {
>  	}, {
>  		.compatible = "renesas,rcar-gen4-dmac",
>  		.data = &rcar_gen4_dmac_data,
> +	}, {
> +		.compatible = "renesas,rcar-gen5-dmac",
> +		.data = &rcar_gen5_dmac_data,
>  	}, {
>  		/*
>  		 * Backward compatibility for between v5.12 - v5.19
> @@ -2044,6 +2052,6 @@ static struct platform_driver rcar_dmac_driver = {
>
>  module_platform_driver(rcar_dmac_driver);
>
> -MODULE_DESCRIPTION("R-Car Gen2 DMA Controller Driver");
> +MODULE_DESCRIPTION("R-Car DMA Controller Driver");
>  MODULE_AUTHOR("Laurent Pinchart <laurent.pinchart@ideasonboard.com>");
>  MODULE_LICENSE("GPL v2");
> --
> 2.47.3
>

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

* Re: [PATCH 4/4] dmaengine: sh: rcar-dmac: Add support for R-Car Gen5 SoCs
  2026-08-25 15:40   ` Frank Li
@ 2026-08-26  8:17     ` Wolfram Sang
  0 siblings, 0 replies; 14+ messages in thread
From: Wolfram Sang @ 2026-08-26  8:17 UTC (permalink / raw)
  To: Frank Li
  Cc: linux-renesas-soc, Vinod Koul, Frank Li, Geert Uytterhoeven,
	Magnus Damm, dmaengine

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

On Tue, Aug 25, 2026 at 10:40:31AM -0500, Frank Li wrote:
> On Tue, Aug 25, 2026 at 04:15:46PM +0200, Wolfram Sang wrote:
> > Gen5 is very similar to Gen4. Of interest here is that it has a SMMU
> > instead of an IPMMU, so we don't need to set the flag for a workaround.
> 
> Generally, needn't "we",  simple said
> 
> needn't to set ...

Can do, will wait a bit more for more comments before resending.


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

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

* Re: [PATCH 3/4] dt-bindings: renesas,rcar-dmac: Add support for R-Car X5H SoC
  2026-08-25 14:15 ` [PATCH 3/4] dt-bindings: renesas,rcar-dmac: Add support for R-Car X5H SoC Wolfram Sang
@ 2026-08-28 10:12   ` Krzysztof Kozlowski
  2026-09-04 12:59   ` Geert Uytterhoeven
  1 sibling, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2026-08-28 10:12 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Vinod Koul, Frank Li, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Geert Uytterhoeven,
	Magnus Damm, Yoshihiro Shimoda, dmaengine, devicetree

On Tue, Aug 25, 2026 at 04:15:45PM +0200, Wolfram Sang wrote:
> Also add the familiy compatible because X5H is the first R-Car Gen5 SoC.
> 
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
> ---
>  .../devicetree/bindings/dma/renesas,rcar-dmac.yaml          | 6 ++++++
>  1 file changed, 6 insertions(+)

Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com>

Best regards,
Krzysztof


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

* Re: [PATCH 1/4] dmaengine: sh: rcar-dmac: fix style in struct initialization
  2026-08-25 14:15 ` [PATCH 1/4] dmaengine: sh: rcar-dmac: fix style in struct initialization Wolfram Sang
  2026-08-25 15:35   ` Frank Li
@ 2026-09-04 12:29   ` Geert Uytterhoeven
  1 sibling, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2026-09-04 12:29 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Vinod Koul, Frank Li, Magnus Damm, dmaengine

Hi Wolfram,

On Tue, 25 Aug 2026 at 16:16, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> A new member will be added to the struct. Before that, adhere to coding
> style by using a single space when assigning values.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks for your patch!

> --- a/drivers/dma/sh/rcar-dmac.c
> +++ b/drivers/dma/sh/rcar-dmac.c
> @@ -1998,13 +1998,13 @@ static void rcar_dmac_shutdown(struct platform_device *pdev)
>  }
>
>  static const struct rcar_dmac_of_data rcar_dmac_data = {
> -       .chan_offset_base       = 0x8000,
> -       .chan_offset_stride     = 0x80,
> +       .chan_offset_base = 0x8000,
> +       .chan_offset_stride = 0x80,
>  };
>
>  static const struct rcar_dmac_of_data rcar_gen4_dmac_data = {
> -       .chan_offset_base       = 0x0,
> -       .chan_offset_stride     = 0x1000,
> +       .chan_offset_base = 0x0,
> +       .chan_offset_stride = 0x1000,
>  };
>
>  static const struct of_device_id rcar_dmac_of_ids[] = {

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Note that rcar_dmac_driver below has a few more violations,
which you are indeed not modifying in this series ;-)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 2/4] dmaengine: sh: rcar-dmac: SMMU doesn't need IPMMU workaround
  2026-08-25 14:15 ` [PATCH 2/4] dmaengine: sh: rcar-dmac: SMMU doesn't need IPMMU workaround Wolfram Sang
  2026-08-25 15:37   ` Frank Li
@ 2026-09-04 12:44   ` Geert Uytterhoeven
  1 sibling, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2026-09-04 12:44 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Vinod Koul, Frank Li, Geert Uytterhoeven,
	Magnus Damm, dmaengine

Hi Wolfram,

On Tue, 25 Aug 2026 at 16:16, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> R-Car Gen5 doesn't use an IPMMU anymore, but a SMMU. So, the workaround
> for the IPMMU becomes optional. Add a flag to distinguish. No functional
> change.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Thanks for your patch!

> --- a/drivers/dma/sh/rcar-dmac.c
> +++ b/drivers/dma/sh/rcar-dmac.c
> @@ -219,10 +219,12 @@ struct rcar_dmac {
>   * struct rcar_dmac_of_data - This driver's OF data
>   * @chan_offset_base: DMAC channels base offset
>   * @chan_offset_stride: DMAC channels offset stride
> + * @has_ipmmu: flag telling if DMAC is connected to an IPMMU
>   */
>  struct rcar_dmac_of_data {
>         u32 chan_offset_base;
>         u32 chan_offset_stride;
> +       unsigned int has_ipmmu:1;

broken_ipmmu_microTLB_0?

>  };
>
>  /* -----------------------------------------------------------------------------
> @@ -1877,8 +1879,9 @@ static int rcar_dmac_probe(struct platform_device *pdev)
>          * can't use it with the IPMMU. As the IOMMU API operates at the device
>          * level we can't disable it selectively, so ignore channel 0 for now if
>          * the device is part of an IOMMU group.
> +        * Not applicable if system uses something else than IPMMU like SMMU.
>          */
> -       if (device_iommu_mapped(&pdev->dev))
> +       if (data->has_ipmmu && device_iommu_mapped(&pdev->dev))
>                 dmac->channels_mask &= ~BIT(0);
>
>         dmac->channels = devm_kcalloc(&pdev->dev, dmac->n_channels,
> @@ -2000,11 +2003,13 @@ static void rcar_dmac_shutdown(struct platform_device *pdev)
>  static const struct rcar_dmac_of_data rcar_dmac_data = {
>         .chan_offset_base = 0x8000,
>         .chan_offset_stride = 0x80,
> +       .has_ipmmu = 1,

The issue this fixes was seen on R-Car H2 and M2-W.
R-Car H3 ES1.0 already existed at that time, so R-Car Gen3 might be
affected or not.

>  };
>
>  static const struct rcar_dmac_of_data rcar_gen4_dmac_data = {
>         .chan_offset_base = 0x0,
>         .chan_offset_stride = 0x1000,
> +       .has_ipmmu = 1,

Let's hope this issue was fixed in R-Car Gen4.  Perhaps someone can
verify this using the test Laurent shared[1] a long time ago?

>  };
>
>  static const struct of_device_id rcar_dmac_of_ids[] = {

[1] https://lore.kernel.org/1422137953-30156-1-git-send-email-laurent.pinchart+renesas@ideasonboard.com

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 3/4] dt-bindings: renesas,rcar-dmac: Add support for R-Car X5H SoC
  2026-08-25 14:15 ` [PATCH 3/4] dt-bindings: renesas,rcar-dmac: Add support for R-Car X5H SoC Wolfram Sang
  2026-08-28 10:12   ` Krzysztof Kozlowski
@ 2026-09-04 12:59   ` Geert Uytterhoeven
  1 sibling, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2026-09-04 12:59 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Vinod Koul, Frank Li, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Magnus Damm, Yoshihiro Shimoda,
	dmaengine, devicetree

On Tue, 25 Aug 2026 at 16:16, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Also add the familiy compatible because X5H is the first R-Car Gen5 SoC.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH 4/4] dmaengine: sh: rcar-dmac: Add support for R-Car Gen5 SoCs
  2026-08-25 14:15 ` [PATCH 4/4] dmaengine: sh: rcar-dmac: Add support for R-Car Gen5 SoCs Wolfram Sang
  2026-08-25 15:40   ` Frank Li
@ 2026-09-04 13:01   ` Geert Uytterhoeven
  1 sibling, 0 replies; 14+ messages in thread
From: Geert Uytterhoeven @ 2026-09-04 13:01 UTC (permalink / raw)
  To: Wolfram Sang
  Cc: linux-renesas-soc, Vinod Koul, Frank Li, Magnus Damm, dmaengine

Hi Wolfram,

On Tue, 25 Aug 2026 at 16:16, Wolfram Sang
<wsa+renesas@sang-engineering.com> wrote:
> Gen5 is very similar to Gen4. Of interest here is that it has a SMMU
> instead of an IPMMU, so we don't need to set the flag for a workaround.
> Make the module description more generic while here.
>
> Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>

> --- a/drivers/dma/sh/rcar-dmac.c
> +++ b/drivers/dma/sh/rcar-dmac.c
> @@ -2012,6 +2012,11 @@ static const struct rcar_dmac_of_data rcar_gen4_dmac_data = {
>         .has_ipmmu = 1,
>  };
>
> +static const struct rcar_dmac_of_data rcar_gen5_dmac_data = {
> +       .chan_offset_base = 0x0,
> +       .chan_offset_stride = 0x1000,
> +};
> +
>  static const struct of_device_id rcar_dmac_of_ids[] = {
>         {
>                 .compatible = "renesas,rcar-dmac",
> @@ -2019,6 +2024,9 @@ static const struct of_device_id rcar_dmac_of_ids[] = {
>         }, {
>                 .compatible = "renesas,rcar-gen4-dmac",
>                 .data = &rcar_gen4_dmac_data,
> +       }, {
> +               .compatible = "renesas,rcar-gen5-dmac",
> +               .data = &rcar_gen5_dmac_data,

I expect this can just point to rcar_gen4_dmac_data, once we have
confirmed the IPMMU issue does not impact R-Car Gen4.

>         }, {
>                 /*
>                  * Backward compatibility for between v5.12 - v5.19

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

end of thread, other threads:[~2026-09-04 13:01 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25 14:15 [PATCH 0/4] dmaengine: sh: rcar-dmac: add R-Car Gen5 X5H support Wolfram Sang
2026-08-25 14:15 ` [PATCH 1/4] dmaengine: sh: rcar-dmac: fix style in struct initialization Wolfram Sang
2026-08-25 15:35   ` Frank Li
2026-09-04 12:29   ` Geert Uytterhoeven
2026-08-25 14:15 ` [PATCH 2/4] dmaengine: sh: rcar-dmac: SMMU doesn't need IPMMU workaround Wolfram Sang
2026-08-25 15:37   ` Frank Li
2026-09-04 12:44   ` Geert Uytterhoeven
2026-08-25 14:15 ` [PATCH 3/4] dt-bindings: renesas,rcar-dmac: Add support for R-Car X5H SoC Wolfram Sang
2026-08-28 10:12   ` Krzysztof Kozlowski
2026-09-04 12:59   ` Geert Uytterhoeven
2026-08-25 14:15 ` [PATCH 4/4] dmaengine: sh: rcar-dmac: Add support for R-Car Gen5 SoCs Wolfram Sang
2026-08-25 15:40   ` Frank Li
2026-08-26  8:17     ` Wolfram Sang
2026-09-04 13:01   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox