[v2,6/6] devicetree: bindings: Document Renesas JPEG Processing Unit.

Message ID 1408970132-6690-1-git-send-email-mikhail.ulyanov@cogentembedded.com (mailing list archive)
State Superseded, archived
Delegated to: Laurent Pinchart
Headers

Commit Message

Mikhail Ulyanov Aug. 25, 2014, 12:35 p.m. UTC
  Documentation for Renesas JPU devicetree node.

Changes since v1:
        - First line typo fixed
        - "renesas,jpu-gen2" compatability option added

Signed-off-by: Mikhail Ulyanov <mikhail.ulyanov@cogentembedded.com>
---
 .../devicetree/bindings/media/renesas,jpu.txt      | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/media/renesas,jpu.txt
  

Comments

Geert Uytterhoeven Aug. 25, 2014, 12:59 p.m. UTC | #1
Hi Mikhail,

On Mon, Aug 25, 2014 at 2:35 PM, Mikhail Ulyanov
<mikhail.ulyanov@cogentembedded.com> wrote:
> +  - compatible: should containg one of the following:
> +                       - "renesas,jpu-r8a7790" for R-Car H2
> +                       - "renesas,jpu-r8a7791" for R-Car M2
> +                       - "renesas,jpu-gen2" for R-Car second generation

Isn't "renesas,jpu-gen2" meant as a fallback?

I.e. the DTS should have one of '7790 and '7791, AND the gen2 fallback,
so we can make the driver match against '7790 and '7791 is we find
out about an incompatibility.

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-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Simon Horman Aug. 25, 2014, 11:57 p.m. UTC | #2
On Mon, Aug 25, 2014 at 02:59:46PM +0200, Geert Uytterhoeven wrote:
> Hi Mikhail,
> 
> On Mon, Aug 25, 2014 at 2:35 PM, Mikhail Ulyanov
> <mikhail.ulyanov@cogentembedded.com> wrote:
> > +  - compatible: should containg one of the following:
> > +                       - "renesas,jpu-r8a7790" for R-Car H2
> > +                       - "renesas,jpu-r8a7791" for R-Car M2
> > +                       - "renesas,jpu-gen2" for R-Car second generation
> 
> Isn't "renesas,jpu-gen2" meant as a fallback?
> 
> I.e. the DTS should have one of '7790 and '7791, AND the gen2 fallback,
> so we can make the driver match against '7790 and '7791 is we find
> out about an incompatibility.

Is there a document that clearly states that there is such a thing
as jpu-gen2 in hardware? If not I would prefer not to add a binding for it.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Laurent Pinchart Aug. 26, 2014, 12:02 a.m. UTC | #3
Hi Simon,

On Tuesday 26 August 2014 08:57:20 Simon Horman wrote:
> On Mon, Aug 25, 2014 at 02:59:46PM +0200, Geert Uytterhoeven wrote:
> > On Mon, Aug 25, 2014 at 2:35 PM, Mikhail Ulyanov wrote:
> > >
> > > +  - compatible: should containg one of the following:
> > > +                       - "renesas,jpu-r8a7790" for R-Car H2
> > > +                       - "renesas,jpu-r8a7791" for R-Car M2
> > > +                       - "renesas,jpu-gen2" for R-Car second generation
> > 
> > Isn't "renesas,jpu-gen2" meant as a fallback?
> > 
> > I.e. the DTS should have one of '7790 and '7791, AND the gen2 fallback,
> > so we can make the driver match against '7790 and '7791 is we find
> > out about an incompatibility.
> 
> Is there a document that clearly states that there is such a thing
> as jpu-gen2 in hardware? If not I would prefer not to add a binding for it.

How about going the other way around and requesting that document ?
  
Simon Horman Aug. 26, 2014, 2:42 a.m. UTC | #4
On Tue, Aug 26, 2014 at 02:02:00AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Tuesday 26 August 2014 08:57:20 Simon Horman wrote:
> > On Mon, Aug 25, 2014 at 02:59:46PM +0200, Geert Uytterhoeven wrote:
> > > On Mon, Aug 25, 2014 at 2:35 PM, Mikhail Ulyanov wrote:
> > > >
> > > > +  - compatible: should containg one of the following:
> > > > +                       - "renesas,jpu-r8a7790" for R-Car H2
> > > > +                       - "renesas,jpu-r8a7791" for R-Car M2
> > > > +                       - "renesas,jpu-gen2" for R-Car second generation
> > > 
> > > Isn't "renesas,jpu-gen2" meant as a fallback?
> > > 
> > > I.e. the DTS should have one of '7790 and '7791, AND the gen2 fallback,
> > > so we can make the driver match against '7790 and '7791 is we find
> > > out about an incompatibility.
> > 
> > Is there a document that clearly states that there is such a thing
> > as jpu-gen2 in hardware? If not I would prefer not to add a binding for it.
> 
> How about going the other way around and requesting that document ?

Good idea, I will make a request.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Geert Uytterhoeven Aug. 26, 2014, 8:03 a.m. UTC | #5
On Tue, Aug 26, 2014 at 1:57 AM, Simon Horman <horms@verge.net.au> wrote:
> On Mon, Aug 25, 2014 at 02:59:46PM +0200, Geert Uytterhoeven wrote:
>> Hi Mikhail,
>>
>> On Mon, Aug 25, 2014 at 2:35 PM, Mikhail Ulyanov
>> <mikhail.ulyanov@cogentembedded.com> wrote:
>> > +  - compatible: should containg one of the following:
>> > +                       - "renesas,jpu-r8a7790" for R-Car H2
>> > +                       - "renesas,jpu-r8a7791" for R-Car M2
>> > +                       - "renesas,jpu-gen2" for R-Car second generation
>>
>> Isn't "renesas,jpu-gen2" meant as a fallback?
>>
>> I.e. the DTS should have one of '7790 and '7791, AND the gen2 fallback,
>> so we can make the driver match against '7790 and '7791 is we find
>> out about an incompatibility.
>
> Is there a document that clearly states that there is such a thing
> as jpu-gen2 in hardware? If not I would prefer not to add a binding for it.

We do have a document that describes the "JPEG Processing Unit (JPU)",
as found in the following members of the "Second Generation R-Car Series
Products": "R-Car H2", "R-Car M2-W", "R-Car M2-N", and "R-Car V2H".

As for other SoCs, M1, H1, and A1 also seem to contain a JPU, but just
like Mikhail, I don't have enough information to say anything about those.

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-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Simon Horman Aug. 26, 2014, 9:01 a.m. UTC | #6
On Tue, Aug 26, 2014 at 10:03:34AM +0200, Geert Uytterhoeven wrote:
> On Tue, Aug 26, 2014 at 1:57 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Mon, Aug 25, 2014 at 02:59:46PM +0200, Geert Uytterhoeven wrote:
> >> Hi Mikhail,
> >>
> >> On Mon, Aug 25, 2014 at 2:35 PM, Mikhail Ulyanov
> >> <mikhail.ulyanov@cogentembedded.com> wrote:
> >> > +  - compatible: should containg one of the following:
> >> > +                       - "renesas,jpu-r8a7790" for R-Car H2
> >> > +                       - "renesas,jpu-r8a7791" for R-Car M2
> >> > +                       - "renesas,jpu-gen2" for R-Car second generation
> >>
> >> Isn't "renesas,jpu-gen2" meant as a fallback?
> >>
> >> I.e. the DTS should have one of '7790 and '7791, AND the gen2 fallback,
> >> so we can make the driver match against '7790 and '7791 is we find
> >> out about an incompatibility.
> >
> > Is there a document that clearly states that there is such a thing
> > as jpu-gen2 in hardware? If not I would prefer not to add a binding for it.
> 
> We do have a document that describes the "JPEG Processing Unit (JPU)",
> as found in the following members of the "Second Generation R-Car Series
> Products": "R-Car H2", "R-Car M2-W", "R-Car M2-N", and "R-Car V2H".

Oh, that is nice :)

From my point of view that ticks a lot of boxes.
But I wonder if we can come up with a better name than jpu,-gen2.

> As for other SoCs, M1, H1, and A1 also seem to contain a JPU, but just
> like Mikhail, I don't have enough information to say anything about those.
> 
> 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-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Geert Uytterhoeven Aug. 26, 2014, 9:27 a.m. UTC | #7
On Tue, Aug 26, 2014 at 11:01 AM, Simon Horman <horms@verge.net.au> wrote:
> On Tue, Aug 26, 2014 at 10:03:34AM +0200, Geert Uytterhoeven wrote:
>> On Tue, Aug 26, 2014 at 1:57 AM, Simon Horman <horms@verge.net.au> wrote:
>> > On Mon, Aug 25, 2014 at 02:59:46PM +0200, Geert Uytterhoeven wrote:
>> >> On Mon, Aug 25, 2014 at 2:35 PM, Mikhail Ulyanov
>> >> <mikhail.ulyanov@cogentembedded.com> wrote:
>> >> > +  - compatible: should containg one of the following:
>> >> > +                       - "renesas,jpu-r8a7790" for R-Car H2
>> >> > +                       - "renesas,jpu-r8a7791" for R-Car M2
>> >> > +                       - "renesas,jpu-gen2" for R-Car second generation
>> >>
>> >> Isn't "renesas,jpu-gen2" meant as a fallback?
>> >>
>> >> I.e. the DTS should have one of '7790 and '7791, AND the gen2 fallback,
>> >> so we can make the driver match against '7790 and '7791 is we find
>> >> out about an incompatibility.
>> >
>> > Is there a document that clearly states that there is such a thing
>> > as jpu-gen2 in hardware? If not I would prefer not to add a binding for it.
>>
>> We do have a document that describes the "JPEG Processing Unit (JPU)",
>> as found in the following members of the "Second Generation R-Car Series
>> Products": "R-Car H2", "R-Car M2-W", "R-Car M2-N", and "R-Car V2H".
>
> Oh, that is nice :)
>
> From my point of view that ticks a lot of boxes.
> But I wonder if we can come up with a better name than jpu,-gen2.

"jpu-rcar-gen2"?

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-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Simon Horman Aug. 27, 2014, 5:15 a.m. UTC | #8
On Tue, Aug 26, 2014 at 11:27:43AM +0200, Geert Uytterhoeven wrote:
> On Tue, Aug 26, 2014 at 11:01 AM, Simon Horman <horms@verge.net.au> wrote:
> > On Tue, Aug 26, 2014 at 10:03:34AM +0200, Geert Uytterhoeven wrote:
> >> On Tue, Aug 26, 2014 at 1:57 AM, Simon Horman <horms@verge.net.au> wrote:
> >> > On Mon, Aug 25, 2014 at 02:59:46PM +0200, Geert Uytterhoeven wrote:
> >> >> On Mon, Aug 25, 2014 at 2:35 PM, Mikhail Ulyanov
> >> >> <mikhail.ulyanov@cogentembedded.com> wrote:
> >> >> > +  - compatible: should containg one of the following:
> >> >> > +                       - "renesas,jpu-r8a7790" for R-Car H2
> >> >> > +                       - "renesas,jpu-r8a7791" for R-Car M2
> >> >> > +                       - "renesas,jpu-gen2" for R-Car second generation
> >> >>
> >> >> Isn't "renesas,jpu-gen2" meant as a fallback?
> >> >>
> >> >> I.e. the DTS should have one of '7790 and '7791, AND the gen2 fallback,
> >> >> so we can make the driver match against '7790 and '7791 is we find
> >> >> out about an incompatibility.
> >> >
> >> > Is there a document that clearly states that there is such a thing
> >> > as jpu-gen2 in hardware? If not I would prefer not to add a binding for it.
> >>
> >> We do have a document that describes the "JPEG Processing Unit (JPU)",
> >> as found in the following members of the "Second Generation R-Car Series
> >> Products": "R-Car H2", "R-Car M2-W", "R-Car M2-N", and "R-Car V2H".
> >
> > Oh, that is nice :)
> >
> > From my point of view that ticks a lot of boxes.
> > But I wonder if we can come up with a better name than jpu,-gen2.
> 
> "jpu-rcar-gen2"?

I guess that is a slight improvement.

But suppose some gen2 SoC exists or comes to exists that
has different IP. Suppose there is more than one that same
the same IP that is different to the SoCs covered by the
existing compat string?
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Laurent Pinchart Aug. 27, 2014, 6:06 a.m. UTC | #9
On Wednesday 27 August 2014 14:15:01 Simon Horman wrote:
> On Tue, Aug 26, 2014 at 11:27:43AM +0200, Geert Uytterhoeven wrote:
> > On Tue, Aug 26, 2014 at 11:01 AM, Simon Horman <horms@verge.net.au> wrote:
> >> On Tue, Aug 26, 2014 at 10:03:34AM +0200, Geert Uytterhoeven wrote:
> >>> On Tue, Aug 26, 2014 at 1:57 AM, Simon Horman wrote:
> >>>> On Mon, Aug 25, 2014 at 02:59:46PM +0200, Geert Uytterhoeven wrote:
> >>>>> On Mon, Aug 25, 2014 at 2:35 PM, Mikhail Ulyanov wrote:
> >>>>>> +  - compatible: should containg one of the following:
> >>>>>> +                       - "renesas,jpu-r8a7790" for R-Car H2
> >>>>>> +                       - "renesas,jpu-r8a7791" for R-Car M2
> >>>>>> +                       - "renesas,jpu-gen2" for R-Car second
> >>>>>> generation
> >>>>> 
> >>>>> Isn't "renesas,jpu-gen2" meant as a fallback?
> >>>>> 
> >>>>> I.e. the DTS should have one of '7790 and '7791, AND the gen2
> >>>>> fallback, so we can make the driver match against '7790 and '7791 is
> >>>>> we find out about an incompatibility.
> >>>> 
> >>>> Is there a document that clearly states that there is such a thing
> >>>> as jpu-gen2 in hardware? If not I would prefer not to add a binding
> >>>> for it.
> >>> 
> >>> We do have a document that describes the "JPEG Processing Unit (JPU)",
> >>> as found in the following members of the "Second Generation R-Car
> >>> Series Products": "R-Car H2", "R-Car M2-W", "R-Car M2-N", and "R-Car
> >>> V2H".
> >> 
> >> Oh, that is nice :)
> >> 
> >> From my point of view that ticks a lot of boxes.
> >> But I wonder if we can come up with a better name than jpu,-gen2.
> > 
> > "jpu-rcar-gen2"?
> 
> I guess that is a slight improvement.
> 
> But suppose some gen2 SoC exists or comes to exists that
> has different IP. Suppose there is more than one that same
> the same IP that is different to the SoCs covered by the
> existing compat string?

That's exactly the information we need to request from the hardware team :-)
  
Simon Horman Aug. 27, 2014, 6:16 a.m. UTC | #10
On Wed, Aug 27, 2014 at 08:06:10AM +0200, Laurent Pinchart wrote:
> On Wednesday 27 August 2014 14:15:01 Simon Horman wrote:
> > On Tue, Aug 26, 2014 at 11:27:43AM +0200, Geert Uytterhoeven wrote:
> > > On Tue, Aug 26, 2014 at 11:01 AM, Simon Horman <horms@verge.net.au> wrote:
> > >> On Tue, Aug 26, 2014 at 10:03:34AM +0200, Geert Uytterhoeven wrote:
> > >>> On Tue, Aug 26, 2014 at 1:57 AM, Simon Horman wrote:
> > >>>> On Mon, Aug 25, 2014 at 02:59:46PM +0200, Geert Uytterhoeven wrote:
> > >>>>> On Mon, Aug 25, 2014 at 2:35 PM, Mikhail Ulyanov wrote:
> > >>>>>> +  - compatible: should containg one of the following:
> > >>>>>> +                       - "renesas,jpu-r8a7790" for R-Car H2
> > >>>>>> +                       - "renesas,jpu-r8a7791" for R-Car M2
> > >>>>>> +                       - "renesas,jpu-gen2" for R-Car second
> > >>>>>> generation
> > >>>>> 
> > >>>>> Isn't "renesas,jpu-gen2" meant as a fallback?
> > >>>>> 
> > >>>>> I.e. the DTS should have one of '7790 and '7791, AND the gen2
> > >>>>> fallback, so we can make the driver match against '7790 and '7791 is
> > >>>>> we find out about an incompatibility.
> > >>>> 
> > >>>> Is there a document that clearly states that there is such a thing
> > >>>> as jpu-gen2 in hardware? If not I would prefer not to add a binding
> > >>>> for it.
> > >>> 
> > >>> We do have a document that describes the "JPEG Processing Unit (JPU)",
> > >>> as found in the following members of the "Second Generation R-Car
> > >>> Series Products": "R-Car H2", "R-Car M2-W", "R-Car M2-N", and "R-Car
> > >>> V2H".
> > >> 
> > >> Oh, that is nice :)
> > >> 
> > >> From my point of view that ticks a lot of boxes.
> > >> But I wonder if we can come up with a better name than jpu,-gen2.
> > > 
> > > "jpu-rcar-gen2"?
> > 
> > I guess that is a slight improvement.
> > 
> > But suppose some gen2 SoC exists or comes to exists that
> > has different IP. Suppose there is more than one that same
> > the same IP that is different to the SoCs covered by the
> > existing compat string?
> 
> That's exactly the information we need to request from the hardware team :-)

Agreed.
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  
Mikhail Ulyanov Sept. 24, 2014, 1:38 p.m. UTC | #11
On Tue, 26 Aug 2014 11:42:57 +0900
Simon Horman <horms@verge.net.au> wrote:

> On Tue, Aug 26, 2014 at 02:02:00AM +0200, Laurent Pinchart wrote:
> > Hi Simon,
> > 
> > On Tuesday 26 August 2014 08:57:20 Simon Horman wrote:
> > > On Mon, Aug 25, 2014 at 02:59:46PM +0200, Geert Uytterhoeven
> > > wrote:
> > > > On Mon, Aug 25, 2014 at 2:35 PM, Mikhail Ulyanov wrote:
> > > > >
> > > > > +  - compatible: should containg one of the following:
> > > > > +                       - "renesas,jpu-r8a7790" for R-Car H2
> > > > > +                       - "renesas,jpu-r8a7791" for R-Car M2
> > > > > +                       - "renesas,jpu-gen2" for R-Car second
> > > > > generation
> > > > 
> > > > Isn't "renesas,jpu-gen2" meant as a fallback?
> > > > 
> > > > I.e. the DTS should have one of '7790 and '7791, AND the gen2
> > > > fallback, so we can make the driver match against '7790 and
> > > > '7791 is we find out about an incompatibility.
> > > 
> > > Is there a document that clearly states that there is such a thing
> > > as jpu-gen2 in hardware? If not I would prefer not to add a
> > > binding for it.
> > 
> > How about going the other way around and requesting that document ?
> 
> Good idea, I will make a request.

Hi Simon,

Is there any update on this topic from HW team? 
If no, should i left it as is?
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
  

Patch

diff --git a/Documentation/devicetree/bindings/media/renesas,jpu.txt b/Documentation/devicetree/bindings/media/renesas,jpu.txt
new file mode 100644
index 0000000..44b07df
--- /dev/null
+++ b/Documentation/devicetree/bindings/media/renesas,jpu.txt
@@ -0,0 +1,24 @@ 
+* Renesas JPEG processing unit.
+
+The JPEG processing unit (JPU) incorporates the JPEG codec with an encoding
+and decoding function conforming to the JPEG baseline process, so that the JPU
+can encode image data and decode JPEG data quickly.
+It can be found in the Renesas R-Car second generation SoCs.
+
+Required properties:
+  - compatible: should containg one of the following:
+			- "renesas,jpu-r8a7790" for R-Car H2
+			- "renesas,jpu-r8a7791" for R-Car M2
+			- "renesas,jpu-gen2" for R-Car second generation
+
+  - reg: Base address and length of the registers block for the JPU.
+  - interrupts: JPU interrupt specifier.
+  - clocks: A phandle + clock-specifier pair for the JPU functional clock.
+
+Example: R8A7790 (R-Car H2) JPU node
+	jpeg-codec@fe980000 {
+		compatible = "renesas,jpu-r8a7790";
+		reg = <0 0xfe980000 0 0x10300>;
+		interrupts = <0 272 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&mstp1_clks R8A7790_CLK_JPU>;
+	};