diff mbox

[06/14,RFC] arm64: renesas: r8a7795: add SSI DMA support

Message ID 87io7in3xo.wl%kuninori.morimoto.gx@renesas.com (mailing list archive)
State RFC
Delegated to: Simon Horman
Headers show

Commit Message

Kuninori Morimoto Sept. 10, 2015, 7:16 a.m. UTC
From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>

Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a7795.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

Comments

Geert Uytterhoeven Sept. 10, 2015, 9:25 a.m. UTC | #1
Hi Morimoto-san,

On Thu, Sep 10, 2015 at 9:16 AM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
> From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>
> Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> ---
>  arch/arm64/boot/dts/renesas/r8a7795.dtsi | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> index 4586690..aaafd3a 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> @@ -761,33 +761,53 @@
>                         rcar_sound,ssi {
>                                 ssi0: ssi@0 {
>                                         interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
> +                                       dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
> +                                       dma-names = "rx", "tx", "rxu", "txu";
>                                 };

According to the R-Car Gen3 datasheet, you exchanged the RX and TX MID/RIDs\
for all channels?

Interestingly, the values seem to be the same in the R-Car Gen2 datasheet,
and thus they are also wrong in e.g. r8a7791.dtsi?

(for SYS-DMAC, MIDs/RIDs differ between Gen2 and Gen3, and RX = TX +1 on Gen2,
but TX = RX + 1 on Gen3).

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
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Sept. 10, 2015, 9:37 a.m. UTC | #2
Hi Geert

> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> >
> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
> > ---
> >  arch/arm64/boot/dts/renesas/r8a7795.dtsi | 20 ++++++++++++++++++++
> >  1 file changed, 20 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > index 4586690..aaafd3a 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> > @@ -761,33 +761,53 @@
> >                         rcar_sound,ssi {
> >                                 ssi0: ssi@0 {
> >                                         interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
> > +                                       dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
> > +                                       dma-names = "rx", "tx", "rxu", "txu";
> >                                 };
> 
> According to the R-Car Gen3 datasheet, you exchanged the RX and TX MID/RIDs\
> for all channels?
> 
> Interestingly, the values seem to be the same in the R-Car Gen2 datasheet,
> and thus they are also wrong in e.g. r8a7791.dtsi?
> 
> (for SYS-DMAC, MIDs/RIDs differ between Gen2 and Gen3, and RX = TX +1 on Gen2,
> but TX = RX + 1 on Gen3).

It is Audio-DMAC, not SYS-DMAC,
and above MID+RID are same as Gen3 datasheet I guess ?

Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Sept. 10, 2015, 9:44 a.m. UTC | #3
Hi Morimoto-san,

On Thu, Sep 10, 2015 at 11:37 AM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
>> > From: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>> >
>> > Signed-off-by: Kuninori Morimoto <kuninori.morimoto.gx@renesas.com>
>> > ---
>> >  arch/arm64/boot/dts/renesas/r8a7795.dtsi | 20 ++++++++++++++++++++
>> >  1 file changed, 20 insertions(+)
>> >
>> > diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
>> > index 4586690..aaafd3a 100644
>> > --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
>> > +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
>> > @@ -761,33 +761,53 @@
>> >                         rcar_sound,ssi {
>> >                                 ssi0: ssi@0 {
>> >                                         interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
>> > +                                       dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
>> > +                                       dma-names = "rx", "tx", "rxu", "txu";
>> >                                 };
>>
>> According to the R-Car Gen3 datasheet, you exchanged the RX and TX MID/RIDs\
>> for all channels?
>>
>> Interestingly, the values seem to be the same in the R-Car Gen2 datasheet,
>> and thus they are also wrong in e.g. r8a7791.dtsi?
>>
>> (for SYS-DMAC, MIDs/RIDs differ between Gen2 and Gen3, and RX = TX +1 on Gen2,
>> but TX = RX + 1 on Gen3).
>
> It is Audio-DMAC, not SYS-DMAC,
> and above MID+RID are same as Gen3 datasheet I guess ?

Only my comment between parenthesis was about SYS-DMAC, all other
comments were about AUDIO-DMAC.
Sorry for confusing you.

E.g. the Gen2/Gen3 datasheets says SSI0_0 TX MID/RID is 0x15, not 0x16,
so the r8a7791 and r8a7795 dtsis are both wrong?

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
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Sept. 11, 2015, 12:25 a.m. UTC | #4
Hi Geert

> >> >                                 ssi0: ssi@0 {
> >> >                                         interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
> >> > +                                       dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
> >> > +                                       dma-names = "rx", "tx", "rxu", "txu";
> >> >                                 };
(snip)
> E.g. the Gen2/Gen3 datasheets says SSI0_0 TX MID/RID is 0x15, not 0x16,
> so the r8a7791 and r8a7795 dtsis are both wrong?

Sorry, it is very confusable.
Sound driver is assuming rx, tx for SSI point.

     tx    rx
[DMA]------->[SSI]
     <------
     rx    tx


Best regards
---
Kuninori Morimoto
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Sept. 11, 2015, 6:55 a.m. UTC | #5
Hi Morimoto-san,

On Fri, Sep 11, 2015 at 2:25 AM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
>> >> >                                 ssi0: ssi@0 {
>> >> >                                         interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
>> >> > +                                       dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
>> >> > +                                       dma-names = "rx", "tx", "rxu", "txu";
>> >> >                                 };
> (snip)
>> E.g. the Gen2/Gen3 datasheets says SSI0_0 TX MID/RID is 0x15, not 0x16,
>> so the r8a7791 and r8a7795 dtsis are both wrong?
>
> Sorry, it is very confusable.
> Sound driver is assuming rx, tx for SSI point.
>
>      tx    rx
> [DMA]------->[SSI]
>      <------
>      rx    tx

Documentation/devicetree/bindings/sound/renesas,rsnd.txt says:

    - dma                           : Should contain Audio DMAC entry
    - dma-names                     : SSI  case "rx"  (=playback),
"tx"  (=capture)
                                      SSIU case "rxu" (=playback),
"txu" (=capture)

E.g. for "rx" = "playback", the SSI receives data from the DMA engine,
and sends it over the I2S link?

So the documentation uses the viewpoint of the DMA engine?

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
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Kuninori Morimoto Sept. 11, 2015, 8:03 a.m. UTC | #6
Hi Geert

> Documentation/devicetree/bindings/sound/renesas,rsnd.txt says:
> 
>     - dma                           : Should contain Audio DMAC entry
>     - dma-names                     : SSI  case "rx"  (=playback),
> "tx"  (=capture)
>                                       SSIU case "rxu" (=playback),
> "txu" (=capture)
> 
> E.g. for "rx" = "playback", the SSI receives data from the DMA engine,
> and sends it over the I2S link?
> 
> So the documentation uses the viewpoint of the DMA engine?

Does it mean "SSI point of view" ?
Then, YES

--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Sept. 11, 2015, 8:08 a.m. UTC | #7
Hi Morimoto-san,

On Fri, Sep 11, 2015 at 10:03 AM, Kuninori Morimoto
<kuninori.morimoto.gx@renesas.com> wrote:
>> Documentation/devicetree/bindings/sound/renesas,rsnd.txt says:
>>
>>     - dma                           : Should contain Audio DMAC entry
>>     - dma-names                     : SSI  case "rx"  (=playback),
>> "tx"  (=capture)
>>                                       SSIU case "rxu" (=playback),
>> "txu" (=capture)
>>
>> E.g. for "rx" = "playback", the SSI receives data from the DMA engine,
>> and sends it over the I2S link?
>>
>> So the documentation uses the viewpoint of the DMA engine?
>
> Does it mean "SSI point of view" ?

I don't know.

> Then, YES

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
--
To unsubscribe from this list: send the line "unsubscribe linux-sh" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index 4586690..aaafd3a 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -761,33 +761,53 @@ 
 			rcar_sound,ssi {
 				ssi0: ssi@0 {
 					interrupts = <0 370 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x01>, <&audma1 0x02>, <&audma0 0x15>, <&audma1 0x16>;
+					dma-names = "rx", "tx", "rxu", "txu";
 				};
 				ssi1: ssi@1 {
 					 interrupts = <0 371 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x03>, <&audma1 0x04>, <&audma0 0x49>, <&audma1 0x4a>;
+					dma-names = "rx", "tx", "rxu", "txu";
 				};
 				ssi2: ssi@2 {
 					interrupts = <0 372 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x05>, <&audma1 0x06>, <&audma0 0x63>, <&audma1 0x64>;
+					dma-names = "rx", "tx", "rxu", "txu";
 				};
 				ssi3: ssi@3 {
 					interrupts = <0 373 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x07>, <&audma1 0x08>, <&audma0 0x6f>, <&audma1 0x70>;
+					dma-names = "rx", "tx", "rxu", "txu";
 				};
 				ssi4: ssi@4 {
 					interrupts = <0 374 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x09>, <&audma1 0x0a>, <&audma0 0x71>, <&audma1 0x72>;
+					dma-names = "rx", "tx", "rxu", "txu";
 				};
 				ssi5: ssi@5 {
 					interrupts = <0 375 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x0b>, <&audma1 0x0c>, <&audma0 0x73>, <&audma1 0x74>;
+					dma-names = "rx", "tx", "rxu", "txu";
 				};
 				ssi6: ssi@6 {
 					interrupts = <0 376 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x0d>, <&audma1 0x0e>, <&audma0 0x75>, <&audma1 0x76>;
+					dma-names = "rx", "tx", "rxu", "txu";
 				};
 				ssi7: ssi@7 {
 					interrupts = <0 377 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x0f>, <&audma1 0x10>, <&audma0 0x79>, <&audma1 0x7a>;
+					dma-names = "rx", "tx", "rxu", "txu";
 				};
 				ssi8: ssi@8 {
 					interrupts = <0 378 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x11>, <&audma1 0x12>, <&audma0 0x7b>, <&audma1 0x7c>;
+					dma-names = "rx", "tx", "rxu", "txu";
 				};
 				ssi9: ssi@9 {
 					interrupts = <0 379 IRQ_TYPE_LEVEL_HIGH>;
+					dmas = <&audma0 0x13>, <&audma1 0x14>, <&audma0 0x7d>, <&audma1 0x7e>;
+					dma-names = "rx", "tx", "rxu", "txu";
 				};
 			};
 		};