* [PATCH] arm64: dts: r8a7795: enable DMA for I2C
@ 2016-05-04 12:35 Niklas Söderlund
2016-05-16 8:19 ` Simon Horman
2016-05-17 8:52 ` Geert Uytterhoeven
0 siblings, 2 replies; 4+ messages in thread
From: Niklas Söderlund @ 2016-05-04 12:35 UTC (permalink / raw)
To: linux-renesas-soc, devicetree, horms, magnus.damm
Cc: geert+renesas, Niklas Söderlund
Add DMA properties to the I2C nodes.
Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
arch/arm64/boot/dts/renesas/r8a7795.dtsi | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index a7315eb..49896e4 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -693,6 +693,8 @@
interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 931>;
power-domains = <&cpg>;
+ dmas = <&dmac1 0x91>, <&dmac1 0x90>;
+ dma-names = "tx", "rx";
i2c-scl-internal-delay-ns = <110>;
status = "disabled";
};
@@ -705,6 +707,8 @@
interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 930>;
power-domains = <&cpg>;
+ dmas = <&dmac1 0x93>, <&dmac1 0x92>;
+ dma-names = "tx", "rx";
i2c-scl-internal-delay-ns = <6>;
status = "disabled";
};
@@ -717,6 +721,8 @@
interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 929>;
power-domains = <&cpg>;
+ dmas = <&dmac1 0x95>, <&dmac1 0x94>;
+ dma-names = "tx", "rx";
i2c-scl-internal-delay-ns = <6>;
status = "disabled";
};
@@ -729,6 +735,8 @@
interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 928>;
power-domains = <&cpg>;
+ dmas = <&dmac1 0x97>, <&dmac1 0x96>;
+ dma-names = "tx", "rx";
i2c-scl-internal-delay-ns = <110>;
status = "disabled";
};
@@ -741,6 +749,8 @@
interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 927>;
power-domains = <&cpg>;
+ dmas = <&dmac1 0x99>, <&dmac1 0x98>;
+ dma-names = "tx", "rx";
i2c-scl-internal-delay-ns = <110>;
status = "disabled";
};
@@ -753,6 +763,8 @@
interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 919>;
power-domains = <&cpg>;
+ dmas = <&dmac1 0x9b>, <&dmac1 0x9a>;
+ dma-names = "tx", "rx";
i2c-scl-internal-delay-ns = <110>;
status = "disabled";
};
@@ -765,6 +777,8 @@
interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&cpg CPG_MOD 918>;
power-domains = <&cpg>;
+ dmas = <&dmac1 0x9d>, <&dmac1 0x9c>;
+ dma-names = "tx", "rx";
i2c-scl-internal-delay-ns = <6>;
status = "disabled";
};
--
2.8.2
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: r8a7795: enable DMA for I2C
2016-05-04 12:35 [PATCH] arm64: dts: r8a7795: enable DMA for I2C Niklas Söderlund
@ 2016-05-16 8:19 ` Simon Horman
2016-05-17 8:52 ` Geert Uytterhoeven
1 sibling, 0 replies; 4+ messages in thread
From: Simon Horman @ 2016-05-16 8:19 UTC (permalink / raw)
To: Niklas Söderlund
Cc: linux-renesas-soc, devicetree, magnus.damm, geert+renesas
On Wed, May 04, 2016 at 02:35:03PM +0200, Niklas Söderlund wrote:
> Add DMA properties to the I2C nodes.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
Thanks, I have queued this up.
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: r8a7795: enable DMA for I2C
2016-05-04 12:35 [PATCH] arm64: dts: r8a7795: enable DMA for I2C Niklas Söderlund
2016-05-16 8:19 ` Simon Horman
@ 2016-05-17 8:52 ` Geert Uytterhoeven
2016-05-17 10:13 ` Niklas Söderlund
1 sibling, 1 reply; 4+ messages in thread
From: Geert Uytterhoeven @ 2016-05-17 8:52 UTC (permalink / raw)
To: Niklas Söderlund
Cc: linux-renesas-soc, devicetree@vger.kernel.org, Simon Horman,
Magnus Damm, Geert Uytterhoeven
On Wed, May 4, 2016 at 2:35 PM, Niklas Söderlund
<niklas.soderlund+renesas@ragnatech.se> wrote:
> Add DMA properties to the I2C nodes.
>
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> arch/arm64/boot/dts/renesas/r8a7795.dtsi | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> index a7315eb..49896e4 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> @@ -693,6 +693,8 @@
> interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&cpg CPG_MOD 931>;
> power-domains = <&cpg>;
> + dmas = <&dmac1 0x91>, <&dmac1 0x90>;
> + dma-names = "tx", "rx";
> i2c-scl-internal-delay-ns = <110>;
> status = "disabled";
> };
> @@ -705,6 +707,8 @@
> interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&cpg CPG_MOD 930>;
> power-domains = <&cpg>;
> + dmas = <&dmac1 0x93>, <&dmac1 0x92>;
> + dma-names = "tx", "rx";
> i2c-scl-internal-delay-ns = <6>;
> status = "disabled";
> };
> @@ -717,6 +721,8 @@
> interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&cpg CPG_MOD 929>;
> power-domains = <&cpg>;
> + dmas = <&dmac1 0x95>, <&dmac1 0x94>;
> + dma-names = "tx", "rx";
> i2c-scl-internal-delay-ns = <6>;
> status = "disabled";
> };
The three above can be used with SYS-DMAC1 (channels 16-31) or with SYS-DMAC2
(channels 32-47).
It should be tested with the latter before adding the corresponding dmas, as
we had issue with SYS-DMAC2 before (they may have been fixed in firmware in the
mean time).
> @@ -729,6 +735,8 @@
> interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&cpg CPG_MOD 928>;
> power-domains = <&cpg>;
> + dmas = <&dmac1 0x97>, <&dmac1 0x96>;
The two phandles above should reference "dmac0", as this i2c module can only be
used with SYS-DMAC0 (channels 0-15), according to the datasheet.
> + dma-names = "tx", "rx";
> i2c-scl-internal-delay-ns = <110>;
> status = "disabled";
> };
> @@ -741,6 +749,8 @@
> interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&cpg CPG_MOD 927>;
> power-domains = <&cpg>;
> + dmas = <&dmac1 0x99>, <&dmac1 0x98>;
dmac0
> + dma-names = "tx", "rx";
> i2c-scl-internal-delay-ns = <110>;
> status = "disabled";
> };
> @@ -753,6 +763,8 @@
> interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&cpg CPG_MOD 919>;
> power-domains = <&cpg>;
> + dmas = <&dmac1 0x9b>, <&dmac1 0x9a>;
dmac0
> + dma-names = "tx", "rx";
> i2c-scl-internal-delay-ns = <110>;
> status = "disabled";
> };
> @@ -765,6 +777,8 @@
> interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
> clocks = <&cpg CPG_MOD 918>;
> power-domains = <&cpg>;
> + dmas = <&dmac1 0x9d>, <&dmac1 0x9c>;
dmac0
> + dma-names = "tx", "rx";
> i2c-scl-internal-delay-ns = <6>;
> status = "disabled";
> };
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] 4+ messages in thread
* Re: [PATCH] arm64: dts: r8a7795: enable DMA for I2C
2016-05-17 8:52 ` Geert Uytterhoeven
@ 2016-05-17 10:13 ` Niklas Söderlund
0 siblings, 0 replies; 4+ messages in thread
From: Niklas Söderlund @ 2016-05-17 10:13 UTC (permalink / raw)
To: Geert Uytterhoeven
Cc: linux-renesas-soc, devicetree@vger.kernel.org, Simon Horman,
Magnus Damm, Geert Uytterhoeven
On 2016-05-17 10:52:08 +0200, Geert Uytterhoeven wrote:
> On Wed, May 4, 2016 at 2:35 PM, Niklas Söderlund
> <niklas.soderlund+renesas@ragnatech.se> wrote:
> > Add DMA properties to the I2C nodes.
> >
> > Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> > ---
> > arch/arm64/boot/dts/renesas/r8a7795.dtsi | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > index a7315eb..49896e4 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > @@ -693,6 +693,8 @@
> > interrupts = <GIC_SPI 287 IRQ_TYPE_LEVEL_HIGH>;
> > clocks = <&cpg CPG_MOD 931>;
> > power-domains = <&cpg>;
> > + dmas = <&dmac1 0x91>, <&dmac1 0x90>;
> > + dma-names = "tx", "rx";
> > i2c-scl-internal-delay-ns = <110>;
> > status = "disabled";
> > };
> > @@ -705,6 +707,8 @@
> > interrupts = <GIC_SPI 288 IRQ_TYPE_LEVEL_HIGH>;
> > clocks = <&cpg CPG_MOD 930>;
> > power-domains = <&cpg>;
> > + dmas = <&dmac1 0x93>, <&dmac1 0x92>;
> > + dma-names = "tx", "rx";
> > i2c-scl-internal-delay-ns = <6>;
> > status = "disabled";
> > };
> > @@ -717,6 +721,8 @@
> > interrupts = <GIC_SPI 286 IRQ_TYPE_LEVEL_HIGH>;
> > clocks = <&cpg CPG_MOD 929>;
> > power-domains = <&cpg>;
> > + dmas = <&dmac1 0x95>, <&dmac1 0x94>;
> > + dma-names = "tx", "rx";
> > i2c-scl-internal-delay-ns = <6>;
> > status = "disabled";
> > };
>
> The three above can be used with SYS-DMAC1 (channels 16-31) or with SYS-DMAC2
> (channels 32-47).
> It should be tested with the latter before adding the corresponding dmas, as
> we had issue with SYS-DMAC2 before (they may have been fixed in firmware in the
> mean time).
I tested with firmware v270-4core and you are correct, looks like dmac2
is not working for i2c.
>
> > @@ -729,6 +735,8 @@
> > interrupts = <GIC_SPI 290 IRQ_TYPE_LEVEL_HIGH>;
> > clocks = <&cpg CPG_MOD 928>;
> > power-domains = <&cpg>;
> > + dmas = <&dmac1 0x97>, <&dmac1 0x96>;
>
> The two phandles above should reference "dmac0", as this i2c module can only be
> used with SYS-DMAC0 (channels 0-15), according to the datasheet.
Thanks for pointing this out! I will fix it.
>
> > + dma-names = "tx", "rx";
> > i2c-scl-internal-delay-ns = <110>;
> > status = "disabled";
> > };
> > @@ -741,6 +749,8 @@
> > interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
> > clocks = <&cpg CPG_MOD 927>;
> > power-domains = <&cpg>;
> > + dmas = <&dmac1 0x99>, <&dmac1 0x98>;
>
> dmac0
>
> > + dma-names = "tx", "rx";
> > i2c-scl-internal-delay-ns = <110>;
> > status = "disabled";
> > };
> > @@ -753,6 +763,8 @@
> > interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
> > clocks = <&cpg CPG_MOD 919>;
> > power-domains = <&cpg>;
> > + dmas = <&dmac1 0x9b>, <&dmac1 0x9a>;
>
> dmac0
>
> > + dma-names = "tx", "rx";
> > i2c-scl-internal-delay-ns = <110>;
> > status = "disabled";
> > };
> > @@ -765,6 +777,8 @@
> > interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
> > clocks = <&cpg CPG_MOD 918>;
> > power-domains = <&cpg>;
> > + dmas = <&dmac1 0x9d>, <&dmac1 0x9c>;
>
> dmac0
>
> > + dma-names = "tx", "rx";
> > i2c-scl-internal-delay-ns = <6>;
> > status = "disabled";
> > };
>
> 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
--
Regards,
Niklas Söderlund
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-17 10:13 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-04 12:35 [PATCH] arm64: dts: r8a7795: enable DMA for I2C Niklas Söderlund
2016-05-16 8:19 ` Simon Horman
2016-05-17 8:52 ` Geert Uytterhoeven
2016-05-17 10:13 ` Niklas Söderlund
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).