diff mbox series

[01/10] dt-bindings: display: renesas: Add R-Car LVDS encoder DT bindings

Message ID 20180112005858.26472-2-laurent.pinchart+renesas@ideasonboard.com
State Superseded, archived
Headers show
Series R-Car DU: Convert LVDS code to bridge driver | expand

Commit Message

Laurent Pinchart Jan. 12, 2018, 12:58 a.m. UTC
The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
corresponding device tree bindings.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 .../bindings/display/bridge/renesas,lvds.txt       | 54 ++++++++++++++++++++++
 MAINTAINERS                                        |  1 +
 2 files changed, 55 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt

Comments

Geert Uytterhoeven Jan. 12, 2018, 9:45 a.m. UTC | #1
Hi Laurent,

On Fri, Jan 12, 2018 at 1:58 AM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> corresponding device tree bindings.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> @@ -0,0 +1,54 @@
> +Renesas R-Car LVDS Encoder
> +==========================
> +
> +These DT bindings describe the LVDS encoder embedded in the Renesas R-Car Gen2
> +and Gen3 SoCs.
> +
> +Required properties:
> +
> +- compatible : Shall contain one of
> +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS encoders
> +  - "renesas,lvds-r8a7790" for R8A7790 (R-Car H2) compatible LVDS encoders
> +  - "renesas,lvds-r8a7791" for R8A7791 (R-Car M2-W) compatible LVDS encoders
> +  - "renesas,lvds-r8a7793" for R8A7791 (R-Car M2-N) compatible LVDS encoders
> +  - "renesas,lvds-r8a7795" for R8A7795 (R-Car H3) compatible LVDS encoders
> +  - "renesas,lvds-r8a7796" for R8A7796 (R-Car M3-W) compatible LVDS encoders
> +
> +- reg: Base address and length for the memory-mapped registers
> +- clocks: A phandle + clock-specifier pair for the functional clock

Please document the "resets" property, too, and add it to the example.
According to the rcar-3.6.0 BSP, reset support is needed desperately.

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 devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Jan. 12, 2018, 10:13 a.m. UTC | #2
Hi Laurent,

On Fri, Jan 12, 2018 at 1:58 AM, Laurent Pinchart
<laurent.pinchart+renesas@ideasonboard.com> wrote:
> The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> corresponding device tree bindings.
>
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>

> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> @@ -0,0 +1,54 @@
> +Renesas R-Car LVDS Encoder
> +==========================
> +
> +These DT bindings describe the LVDS encoder embedded in the Renesas R-Car Gen2
> +and Gen3 SoCs.
> +
> +Required properties:
> +
> +- compatible : Shall contain one of
> +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS encoders
> +  - "renesas,lvds-r8a7790" for R8A7790 (R-Car H2) compatible LVDS encoders
> +  - "renesas,lvds-r8a7791" for R8A7791 (R-Car M2-W) compatible LVDS encoders
> +  - "renesas,lvds-r8a7793" for R8A7791 (R-Car M2-N) compatible LVDS encoders
> +  - "renesas,lvds-r8a7795" for R8A7795 (R-Car H3) compatible LVDS encoders
> +  - "renesas,lvds-r8a7796" for R8A7796 (R-Car M3-W) compatible LVDS encoders

As this is a new binding, please use "renesas,<soc>-lvds".

BTW, would it make sense to use "renesas,<soc>-du" for the new DU binding, too?
Or have you reserved that for the future version that will have a one-to-one
mapping between device nodes and DU channels? ;-)

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 devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Biju Das Jan. 12, 2018, 12:59 p.m. UTC | #3
Hi,

> Subject: [PATCH 01/10] dt-bindings: display: renesas: Add R-Car LVDS encoder
> DT bindings
>
> The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> corresponding device tree bindings.
>
> Signed-off-by: Laurent Pinchart
> <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  .../bindings/display/bridge/renesas,lvds.txt       | 54
> ++++++++++++++++++++++
>  MAINTAINERS                                        |  1 +
>  2 files changed, 55 insertions(+)
>  create mode 100644
> Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
>
> diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> new file mode 100644
> index 000000000000..459c56822eda
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> @@ -0,0 +1,54 @@
> +Renesas R-Car LVDS Encoder
> +==========================
> +
> +These DT bindings describe the LVDS encoder embedded in the Renesas
> +R-Car Gen2 and Gen3 SoCs.
> +
> +Required properties:
> +
> +- compatible : Shall contain one of
> +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS
> +encoders

Typo. It should be R8A7743 .

Regards,
Biju




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Jan. 12, 2018, 1:26 p.m. UTC | #4
Hi Biju,

On Friday, 12 January 2018 14:59:53 EET Biju Das wrote:
> Hi,
> 
> > Subject: [PATCH 01/10] dt-bindings: display: renesas: Add R-Car LVDS
> > encoder DT bindings
> > 
> > The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> > corresponding device tree bindings.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > 
> >  .../bindings/display/bridge/renesas,lvds.txt       | 54 +++++++++++++++++
> >  MAINTAINERS                                        |  1 +
> >  2 files changed, 55 insertions(+)
> >  create mode 100644
> > 
> > Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt new
> > file mode 100644
> > index 000000000000..459c56822eda
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > @@ -0,0 +1,54 @@
> > +Renesas R-Car LVDS Encoder
> > +==========================
> > +
> > +These DT bindings describe the LVDS encoder embedded in the Renesas
> > +R-Car Gen2 and Gen3 SoCs.
> > +
> > +Required properties:
> > +
> > +- compatible : Shall contain one of
> > +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS
> > +encoders
> 
> Typo. It should be R8A7743 .

Oops. Will fix in v2.
Laurent Pinchart Jan. 12, 2018, 1:29 p.m. UTC | #5
Hi Geert,

On Friday, 12 January 2018 12:13:18 EET Geert Uytterhoeven wrote:
> On Fri, Jan 12, 2018 at 1:58 AM, Laurent Pinchart wrote:
> > The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> > corresponding device tree bindings.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > 
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > @@ -0,0 +1,54 @@
> > +Renesas R-Car LVDS Encoder
> > +==========================
> > +
> > +These DT bindings describe the LVDS encoder embedded in the Renesas R-Car
> > Gen2 +and Gen3 SoCs.
> > +
> > +Required properties:
> > +
> > +- compatible : Shall contain one of
> > +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7790" for R8A7790 (R-Car H2) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7791" for R8A7791 (R-Car M2-W) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7793" for R8A7791 (R-Car M2-N) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7795" for R8A7795 (R-Car H3) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7796" for R8A7796 (R-Car M3-W) compatible LVDS
> > encoders
> 
> As this is a new binding, please use "renesas,<soc>-lvds".

I've recently been thinking that we made the wrong choice, <ip>-<soc> would be 
better in my opinion as it aligns with <ip>-<version>, but it's too late to 
change that, so I'll change the order here.

> BTW, would it make sense to use "renesas,<soc>-du" for the new DU binding,
> too? Or have you reserved that for the future version that will have a
> one-to-one mapping between device nodes and DU channels? ;-)

It's a good idea, let's reserve it for that evolution. If it ever happens ;-)
Laurent Pinchart Jan. 12, 2018, 1:36 p.m. UTC | #6
Hi Geert,

On Friday, 12 January 2018 11:45:56 EET Geert Uytterhoeven wrote:
> On Fri, Jan 12, 2018 at 1:58 AM, Laurent Pinchart wrote:
> > The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> > corresponding device tree bindings.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > 
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > @@ -0,0 +1,54 @@
> > +Renesas R-Car LVDS Encoder
> > +==========================
> > +
> > +These DT bindings describe the LVDS encoder embedded in the Renesas R-Car
> > Gen2 +and Gen3 SoCs.
> > +
> > +Required properties:
> > +
> > +- compatible : Shall contain one of
> > +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7790" for R8A7790 (R-Car H2) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7791" for R8A7791 (R-Car M2-W) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7793" for R8A7791 (R-Car M2-N) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7795" for R8A7795 (R-Car H3) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7796" for R8A7796 (R-Car M3-W) compatible LVDS
> > encoders
> > +
> > +- reg: Base address and length for the memory-mapped registers
> > +- clocks: A phandle + clock-specifier pair for the functional clock
> 
> Please document the "resets" property, too, and add it to the example.
> According to the rcar-3.6.0 BSP, reset support is needed desperately.

Good point. I'll make it mandatory in the new bindings but treat it as 
optional in the driver as the live DT patching doesn't create the reset 
properties.
Fabrizio Castro Jan. 12, 2018, 2 p.m. UTC | #7
Hi Laurent,

> Subject: Re: [PATCH 01/10] dt-bindings: display: renesas: Add R-Car LVDS encoder DT bindings
>
> Hi Biju,
>
> On Friday, 12 January 2018 14:59:53 EET Biju Das wrote:
> > Hi,
> >
> > > Subject: [PATCH 01/10] dt-bindings: display: renesas: Add R-Car LVDS
> > > encoder DT bindings
> > >
> > > The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> > > corresponding device tree bindings.
> > >
> > > Signed-off-by: Laurent Pinchart
> > > <laurent.pinchart+renesas@ideasonboard.com>
> > > ---
> > >
> > >  .../bindings/display/bridge/renesas,lvds.txt       | 54 +++++++++++++++++
> > >  MAINTAINERS                                        |  1 +
> > >  2 files changed, 55 insertions(+)
> > >  create mode 100644
> > >
> > > Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > >
> > > diff --git
> > > a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > > b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt new
> > > file mode 100644
> > > index 000000000000..459c56822eda
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > > @@ -0,0 +1,54 @@
> > > +Renesas R-Car LVDS Encoder
> > > +==========================
> > > +
> > > +These DT bindings describe the LVDS encoder embedded in the Renesas
> > > +R-Car Gen2 and Gen3 SoCs.
> > > +
> > > +Required properties:
> > > +
> > > +- compatible : Shall contain one of
> > > +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS

The following also needs polishing for v2:
"(R-Car RZ/G1M)" -> "(RZ/G1M)"

Thanks,
Fab

> > > +encoders
> >
> > Typo. It should be R8A7743 .
>
> Oops. Will fix in v2.
>
> --
> Regards,
>
> Laurent Pinchart




Renesas Electronics Europe Ltd, Dukes Meadow, Millboard Road, Bourne End, Buckinghamshire, SL8 5FH, UK. Registered in England & Wales under Registered No. 04586709.
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Jan. 12, 2018, 2:25 p.m. UTC | #8
Hi Fabrizio,

On Friday, 12 January 2018 16:00:31 EET Fabrizio Castro wrote:
> Hi Laurent,
> 
> > Subject: Re: [PATCH 01/10] dt-bindings: display: renesas: Add R-Car LVDS
> > encoder DT bindings
> > On Friday, 12 January 2018 14:59:53 EET Biju Das wrote:
> >> Hi,
> >> 
> >>> Subject: [PATCH 01/10] dt-bindings: display: renesas: Add R-Car LVDS
> >>> encoder DT bindings
> >>> 
> >>> The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> >>> corresponding device tree bindings.
> >>> 
> >>> Signed-off-by: Laurent Pinchart
> >>> <laurent.pinchart+renesas@ideasonboard.com>
> >>> ---
> >>> 
> >>>  .../bindings/display/bridge/renesas,lvds.txt       | 54 +++++++++++++++
> >>>  MAINTAINERS                                        |  1 +
> >>>  2 files changed, 55 insertions(+)
> >>>  create mode 100644
> >>> 
> >>> Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> >>> 
> >>> diff --git
> >>> a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> >>> b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> >>> new
> >>> file mode 100644
> >>> index 000000000000..459c56822eda
> >>> --- /dev/null
> >>> +++
> >>> b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> >>> @@ -0,0 +1,54 @@
> >>> +Renesas R-Car LVDS Encoder
> >>> +==========================
> >>> +
> >>> +These DT bindings describe the LVDS encoder embedded in the Renesas
> >>> +R-Car Gen2 and Gen3 SoCs.
> >>> +
> >>> +Required properties:
> >>> +
> >>> +- compatible : Shall contain one of
> >>> +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS
> 
> The following also needs polishing for v2:
> "(R-Car RZ/G1M)" -> "(RZ/G1M)"

I'll fix it too.

> >>> +encoders
> >> 
> >> Typo. It should be R8A7743 .
> > 
> > Oops. Will fix in v2.
Sergei Shtylyov Jan. 12, 2018, 3:13 p.m. UTC | #9
Hello!

On 01/12/2018 03:58 AM, Laurent Pinchart wrote:

> The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> corresponding device tree bindings.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>   .../bindings/display/bridge/renesas,lvds.txt       | 54 ++++++++++++++++++++++
>   MAINTAINERS                                        |  1 +
>   2 files changed, 55 insertions(+)
>   create mode 100644 Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> 
> diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> new file mode 100644
> index 000000000000..459c56822eda
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> @@ -0,0 +1,54 @@
> +Renesas R-Car LVDS Encoder
> +==========================
> +
> +These DT bindings describe the LVDS encoder embedded in the Renesas R-Car Gen2
> +and Gen3 SoCs.
> +
> +Required properties:
> +
> +- compatible : Shall contain one of
> +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS encoders
> +  - "renesas,lvds-r8a7790" for R8A7790 (R-Car H2) compatible LVDS encoders
> +  - "renesas,lvds-r8a7791" for R8A7791 (R-Car M2-W) compatible LVDS encoders
> +  - "renesas,lvds-r8a7793" for R8A7791 (R-Car M2-N) compatible LVDS encoders
> +  - "renesas,lvds-r8a7795" for R8A7795 (R-Car H3) compatible LVDS encoders
> +  - "renesas,lvds-r8a7796" for R8A7796 (R-Car M3-W) compatible LVDS encoders
> +
> +- reg: Base address and length for the memory-mapped registers
> +- clocks: A phandle + clock-specifier pair for the functional clock
> +
> +Requires nodes:
> +
> +The LVDS encoder has two video ports. Their connections are modelled using the
> +OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
> +
> +- Video port 0 corresponds to the parallel input

    s/parallel/RGB/, perhaps?

> +- Video port 1 corresponds to the LVDS output
> +
> +Each port shall have a single endpoint.
> +
> +
> +Example:
> +
> +	lvds0: lvds@feb90000 {
> +		compatible = "renesas,lvds-r8a7790";
> +		reg = <0 0xfeb90000 0 0x1c>;
> +		clocks = <&cpg CPG_MOD 726>;
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +				lvds0_in: endpoint {
> +					remote-endpoint = <&du_out_lvds0>;

    Err, that "du_out_lvds0" label no longer reflects reality, no?

[...]

MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Jan. 12, 2018, 8:34 p.m. UTC | #10
Hi Sergei,

On Friday, 12 January 2018 17:13:06 EET Sergei Shtylyov wrote:
> On 01/12/2018 03:58 AM, Laurent Pinchart wrote:
> > The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> > corresponding device tree bindings.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > 
> >  .../bindings/display/bridge/renesas,lvds.txt       | 54 +++++++++++++++++
> >  MAINTAINERS                                        |  1 +
> >   2 files changed, 55 insertions(+)
> >   create mode 100644
> >   Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt> 
> > diff --git
> > a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt new
> > file mode 100644
> > index 000000000000..459c56822eda
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > @@ -0,0 +1,54 @@
> > +Renesas R-Car LVDS Encoder
> > +==========================
> > +
> > +These DT bindings describe the LVDS encoder embedded in the Renesas R-Car
> > Gen2
> > +and Gen3 SoCs.
> > +
> > +Required properties:
> > +
> > +- compatible : Shall contain one of
> > +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7790" for R8A7790 (R-Car H2) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7791" for R8A7791 (R-Car M2-W) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7793" for R8A7791 (R-Car M2-N) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7795" for R8A7795 (R-Car H3) compatible LVDS
> > encoders
> > +  - "renesas,lvds-r8a7796" for R8A7796 (R-Car M3-W) compatible LVDS
> > encoders
> > +
> > +- reg: Base address and length for the memory-mapped registers
> > +- clocks: A phandle + clock-specifier pair for the functional clock
> > +
> > +Requires nodes:
> > +
> > +The LVDS encoder has two video ports. Their connections are modelled
> > using the
> > +OF graph bindings specified in Documentation/devicetree/bindings/
> > graph.txt.
> > +
> > +- Video port 0 corresponds to the parallel input
> 
> s/parallel/RGB/, perhaps?

Strictly speaking the LVDS output also carries RGB. I'll replace "parallel" 
with "parallel RGB".

> > +- Video port 1 corresponds to the LVDS output
> > +
> > +Each port shall have a single endpoint.
> > +
> > +
> > +Example:
> > +
> > +	lvds0: lvds@feb90000 {
> > +		compatible = "renesas,lvds-r8a7790";
> > +		reg = <0 0xfeb90000 0 0x1c>;
> > +		clocks = <&cpg CPG_MOD 726>;
> > +
> > +		ports {
> > +			#address-cells = <1>;
> > +			#size-cells = <0>;
> > +
> > +			port@0 {
> > +				reg = <0>;
> > +				lvds0_in: endpoint {
> > +					remote-endpoint = <&du_out_lvds0>;
> 
> Err, that "du_out_lvds0" label no longer reflects reality, no?

Well, it's the output of the DU connected to LVDS encoder 0, so I think the 
name still makes sense. If you can think of a better name feel free to propose 
one, otherwise I'll keep this one.
Simon Horman Jan. 15, 2018, 6:55 a.m. UTC | #11
On Fri, Jan 12, 2018 at 03:29:48PM +0200, Laurent Pinchart wrote:
> Hi Geert,
> 
> On Friday, 12 January 2018 12:13:18 EET Geert Uytterhoeven wrote:
> > On Fri, Jan 12, 2018 at 1:58 AM, Laurent Pinchart wrote:
> > > The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> > > corresponding device tree bindings.
> > > 
> > > Signed-off-by: Laurent Pinchart
> > > <laurent.pinchart+renesas@ideasonboard.com>
> > > 
> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > > @@ -0,0 +1,54 @@
> > > +Renesas R-Car LVDS Encoder
> > > +==========================
> > > +
> > > +These DT bindings describe the LVDS encoder embedded in the Renesas R-Car
> > > Gen2 +and Gen3 SoCs.
> > > +
> > > +Required properties:
> > > +
> > > +- compatible : Shall contain one of
> > > +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS
> > > encoders
> > > +  - "renesas,lvds-r8a7790" for R8A7790 (R-Car H2) compatible LVDS
> > > encoders
> > > +  - "renesas,lvds-r8a7791" for R8A7791 (R-Car M2-W) compatible LVDS
> > > encoders
> > > +  - "renesas,lvds-r8a7793" for R8A7791 (R-Car M2-N) compatible LVDS
> > > encoders
> > > +  - "renesas,lvds-r8a7795" for R8A7795 (R-Car H3) compatible LVDS
> > > encoders
> > > +  - "renesas,lvds-r8a7796" for R8A7796 (R-Car M3-W) compatible LVDS
> > > encoders
> > 
> > As this is a new binding, please use "renesas,<soc>-lvds".
> 
> I've recently been thinking that we made the wrong choice, <ip>-<soc> would be 
> better in my opinion as it aligns with <ip>-<version>, but it's too late to 
> change that, so I'll change the order here.

My recollection is that in the beginning we had a bit of a mixture but
leaned towards <ip>-<soc>, which made sense in my opinion. However, after
some discussion it was agreed that the best-practice for upstream was to
use <soc>-<ip>. Unless that situation has changed lets stock with using
<soc>-<ip> for new bindings.

> > BTW, would it make sense to use "renesas,<soc>-du" for the new DU binding,
> > too? Or have you reserved that for the future version that will have a
> > one-to-one mapping between device nodes and DU channels? ;-)
> 
> It's a good idea, let's reserve it for that evolution. If it ever happens ;-)
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Jan. 15, 2018, 6:59 a.m. UTC | #12
Hi Simon,

On Monday, 15 January 2018 08:55:29 EET Simon Horman wrote:
> On Fri, Jan 12, 2018 at 03:29:48PM +0200, Laurent Pinchart wrote:
> > On Friday, 12 January 2018 12:13:18 EET Geert Uytterhoeven wrote:
> >> On Fri, Jan 12, 2018 at 1:58 AM, Laurent Pinchart wrote:
> >>> The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> >>> corresponding device tree bindings.
> >>> 
> >>> Signed-off-by: Laurent Pinchart
> >>> <laurent.pinchart+renesas@ideasonboard.com>
> >>> 
> >>> --- /dev/null
> >>> +++
> >>> b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> >>> @@ -0,0 +1,54 @@
> >>> +Renesas R-Car LVDS Encoder
> >>> +==========================
> >>> +
> >>> +These DT bindings describe the LVDS encoder embedded in the Renesas
> >>> R-Car Gen2 +and Gen3 SoCs.
> >>> +
> >>> +Required properties:
> >>> +
> >>> +- compatible : Shall contain one of
> >>> +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS
> >>> encoders
> >>> +  - "renesas,lvds-r8a7790" for R8A7790 (R-Car H2) compatible LVDS
> >>> encoders
> >>> +  - "renesas,lvds-r8a7791" for R8A7791 (R-Car M2-W) compatible LVDS
> >>> encoders
> >>> +  - "renesas,lvds-r8a7793" for R8A7791 (R-Car M2-N) compatible LVDS
> >>> encoders
> >>> +  - "renesas,lvds-r8a7795" for R8A7795 (R-Car H3) compatible LVDS
> >>> encoders
> >>> +  - "renesas,lvds-r8a7796" for R8A7796 (R-Car M3-W) compatible LVDS
> >>> encoders
> >> 
> >> As this is a new binding, please use "renesas,<soc>-lvds".
> > 
> > I've recently been thinking that we made the wrong choice, <ip>-<soc>
> > would be better in my opinion as it aligns with <ip>-<version>, but it's
> > too late to change that, so I'll change the order here.
> 
> My recollection is that in the beginning we had a bit of a mixture but
> leaned towards <ip>-<soc>, which made sense in my opinion. However, after
> some discussion it was agreed that the best-practice for upstream was to
> use <soc>-<ip>. Unless that situation has changed lets stock with using
> <soc>-<ip> for new bindings.

Sure, that was my plan, and it seems I failed to explain it clearly. I too 
believe that <ip>-<soc> would be better, but as we have standardized on <soc>-
<ip> and as there's no strong reason to reconsider that decision at the 
moment, the next version of this patch will use <soc>-<ip>. It was a mistake 
in v1, not an attempt to change what we had agreed on.

> >> BTW, would it make sense to use "renesas,<soc>-du" for the new DU
> >> binding, too? Or have you reserved that for the future version that will
> >> have a one-to-one mapping between device nodes and DU channels? ;-)
> > 
> > It's a good idea, let's reserve it for that evolution. If it ever happens
> > ;-)
Simon Horman Jan. 15, 2018, 7:57 a.m. UTC | #13
On Mon, Jan 15, 2018 at 08:59:38AM +0200, Laurent Pinchart wrote:
> Hi Simon,
> 
> On Monday, 15 January 2018 08:55:29 EET Simon Horman wrote:
> > On Fri, Jan 12, 2018 at 03:29:48PM +0200, Laurent Pinchart wrote:
> > > On Friday, 12 January 2018 12:13:18 EET Geert Uytterhoeven wrote:
> > >> On Fri, Jan 12, 2018 at 1:58 AM, Laurent Pinchart wrote:
> > >>> The Renesas R-Car Gen2 and Gen3 SoCs have internal LVDS encoders. Add
> > >>> corresponding device tree bindings.
> > >>> 
> > >>> Signed-off-by: Laurent Pinchart
> > >>> <laurent.pinchart+renesas@ideasonboard.com>
> > >>> 
> > >>> --- /dev/null
> > >>> +++
> > >>> b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > >>> @@ -0,0 +1,54 @@
> > >>> +Renesas R-Car LVDS Encoder
> > >>> +==========================
> > >>> +
> > >>> +These DT bindings describe the LVDS encoder embedded in the Renesas
> > >>> R-Car Gen2 +and Gen3 SoCs.
> > >>> +
> > >>> +Required properties:
> > >>> +
> > >>> +- compatible : Shall contain one of
> > >>> +  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS
> > >>> encoders
> > >>> +  - "renesas,lvds-r8a7790" for R8A7790 (R-Car H2) compatible LVDS
> > >>> encoders
> > >>> +  - "renesas,lvds-r8a7791" for R8A7791 (R-Car M2-W) compatible LVDS
> > >>> encoders
> > >>> +  - "renesas,lvds-r8a7793" for R8A7791 (R-Car M2-N) compatible LVDS
> > >>> encoders
> > >>> +  - "renesas,lvds-r8a7795" for R8A7795 (R-Car H3) compatible LVDS
> > >>> encoders
> > >>> +  - "renesas,lvds-r8a7796" for R8A7796 (R-Car M3-W) compatible LVDS
> > >>> encoders
> > >> 
> > >> As this is a new binding, please use "renesas,<soc>-lvds".
> > > 
> > > I've recently been thinking that we made the wrong choice, <ip>-<soc>
> > > would be better in my opinion as it aligns with <ip>-<version>, but it's
> > > too late to change that, so I'll change the order here.
> > 
> > My recollection is that in the beginning we had a bit of a mixture but
> > leaned towards <ip>-<soc>, which made sense in my opinion. However, after
> > some discussion it was agreed that the best-practice for upstream was to
> > use <soc>-<ip>. Unless that situation has changed lets stock with using
> > <soc>-<ip> for new bindings.
> 
> Sure, that was my plan, and it seems I failed to explain it clearly. I too 
> believe that <ip>-<soc> would be better, but as we have standardized on <soc>-
> <ip> and as there's no strong reason to reconsider that decision at the 
> moment, the next version of this patch will use <soc>-<ip>. It was a mistake 
> in v1, not an attempt to change what we had agreed on.

Thanks, it seems that we are in complete agreement.

> > >> BTW, would it make sense to use "renesas,<soc>-du" for the new DU
> > >> binding, too? Or have you reserved that for the future version that will
> > >> have a one-to-one mapping between device nodes and DU channels? ;-)
> > > 
> > > It's a good idea, let's reserve it for that evolution. If it ever happens
> > > ;-)
> 
> -- 
> Regards,
> 
> Laurent Pinchart
> 
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Geert Uytterhoeven Jan. 15, 2018, 8:05 a.m. UTC | #14
Hi Laurent,

On Mon, Jan 15, 2018 at 7:59 AM, Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Monday, 15 January 2018 08:55:29 EET Simon Horman wrote:
>> On Fri, Jan 12, 2018 at 03:29:48PM +0200, Laurent Pinchart wrote:
>> > On Friday, 12 January 2018 12:13:18 EET Geert Uytterhoeven wrote:
>> >> As this is a new binding, please use "renesas,<soc>-lvds".
>> >
>> > I've recently been thinking that we made the wrong choice, <ip>-<soc>
>> > would be better in my opinion as it aligns with <ip>-<version>, but it's
>> > too late to change that, so I'll change the order here.
>>
>> My recollection is that in the beginning we had a bit of a mixture but
>> leaned towards <ip>-<soc>, which made sense in my opinion. However, after
>> some discussion it was agreed that the best-practice for upstream was to
>> use <soc>-<ip>. Unless that situation has changed lets stock with using
>> <soc>-<ip> for new bindings.
>
> Sure, that was my plan, and it seems I failed to explain it clearly. I too
> believe that <ip>-<soc> would be better, but as we have standardized on <soc>-
> <ip> and as there's no strong reason to reconsider that decision at the
> moment, the next version of this patch will use <soc>-<ip>. It was a mistake
> in v1, not an attempt to change what we had agreed on.

Note that I believe you have to consider the full tuple "<vendor>,<soc>-<ip>"
to see the light: <soc> is more closely tied to <vendor>, than <ip> is.

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 devicetree" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Laurent Pinchart Jan. 15, 2018, 8:26 a.m. UTC | #15
Hi Geert,

On Monday, 15 January 2018 10:05:59 EET Geert Uytterhoeven wrote:
> On Mon, Jan 15, 2018 at 7:59 AM, Laurent Pinchart wrote:
> > On Monday, 15 January 2018 08:55:29 EET Simon Horman wrote:
> >> On Fri, Jan 12, 2018 at 03:29:48PM +0200, Laurent Pinchart wrote:
> >>> On Friday, 12 January 2018 12:13:18 EET Geert Uytterhoeven wrote:
> >>>> As this is a new binding, please use "renesas,<soc>-lvds".
> >>> 
> >>> I've recently been thinking that we made the wrong choice, <ip>-<soc>
> >>> would be better in my opinion as it aligns with <ip>-<version>, but
> >>> it's too late to change that, so I'll change the order here.
> >> 
> >> My recollection is that in the beginning we had a bit of a mixture but
> >> leaned towards <ip>-<soc>, which made sense in my opinion. However, after
> >> some discussion it was agreed that the best-practice for upstream was to
> >> use <soc>-<ip>. Unless that situation has changed lets stock with using
> >> <soc>-<ip> for new bindings.
> > 
> > Sure, that was my plan, and it seems I failed to explain it clearly. I too
> > believe that <ip>-<soc> would be better, but as we have standardized on
> > <soc>- <ip> and as there's no strong reason to reconsider that decision
> > at the moment, the next version of this patch will use <soc>-<ip>. It was
> > a mistake in v1, not an attempt to change what we had agreed on.
> 
> Note that I believe you have to consider the full tuple
> "<vendor>,<soc>-<ip>" to see the light: <soc> is more closely tied to
> <vendor>, than <ip> is.

I suppose there are pros and cons for both options :-) I see <soc> more as a 
version qualifier.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
new file mode 100644
index 000000000000..459c56822eda
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
@@ -0,0 +1,54 @@ 
+Renesas R-Car LVDS Encoder
+==========================
+
+These DT bindings describe the LVDS encoder embedded in the Renesas R-Car Gen2
+and Gen3 SoCs.
+
+Required properties:
+
+- compatible : Shall contain one of
+  - "renesas,lvds-r8a7743" for R8A7790 (R-Car RZ/G1M) compatible LVDS encoders
+  - "renesas,lvds-r8a7790" for R8A7790 (R-Car H2) compatible LVDS encoders
+  - "renesas,lvds-r8a7791" for R8A7791 (R-Car M2-W) compatible LVDS encoders
+  - "renesas,lvds-r8a7793" for R8A7791 (R-Car M2-N) compatible LVDS encoders
+  - "renesas,lvds-r8a7795" for R8A7795 (R-Car H3) compatible LVDS encoders
+  - "renesas,lvds-r8a7796" for R8A7796 (R-Car M3-W) compatible LVDS encoders
+
+- reg: Base address and length for the memory-mapped registers
+- clocks: A phandle + clock-specifier pair for the functional clock
+
+Requires nodes:
+
+The LVDS encoder has two video ports. Their connections are modelled using the
+OF graph bindings specified in Documentation/devicetree/bindings/graph.txt.
+
+- Video port 0 corresponds to the parallel input
+- Video port 1 corresponds to the LVDS output
+
+Each port shall have a single endpoint.
+
+
+Example:
+
+	lvds0: lvds@feb90000 {
+		compatible = "renesas,lvds-r8a7790";
+		reg = <0 0xfeb90000 0 0x1c>;
+		clocks = <&cpg CPG_MOD 726>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				lvds0_in: endpoint {
+					remote-endpoint = <&du_out_lvds0>;
+				};
+			};
+			port@1 {
+				reg = <1>;
+				lvds0_out: endpoint {
+				};
+			};
+		};
+	};
diff --git a/MAINTAINERS b/MAINTAINERS
index 40aea858c7ea..5609a7f5ac4d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -4725,6 +4725,7 @@  F:	drivers/gpu/drm/rcar-du/
 F:	drivers/gpu/drm/shmobile/
 F:	include/linux/platform_data/shmob_drm.h
 F:	Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt
+F:	Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
 F:	Documentation/devicetree/bindings/display/renesas,du.txt
 
 DRM DRIVERS FOR ROCKCHIP