diff mbox series

[1/9] dt-bindings: display: renesas,du: Document r8a774e1 bindings

Message ID 20200812140217.24251-2-prabhakar.mahadev-lad.rj@bp.renesas.com (mailing list archive)
State New
Delegated to: Kieran Bingham
Headers show
Series r8a774e1 add support for DU, HDMI and LVDS | expand

Commit Message

Prabhakar Aug. 12, 2020, 2:02 p.m. UTC
From: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>

Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.

Signed-off-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
---
 Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++
 1 file changed, 2 insertions(+)

Comments

Laurent Pinchart Aug. 12, 2020, 4:09 p.m. UTC | #1
Hi Prabhakar,

Thank you for the patch.

On Wed, Aug 12, 2020 at 03:02:09PM +0100, Lad Prabhakar wrote:
> From: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> 
> Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
> 
> Signed-off-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

> ---
>  Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt
> index 51cd4d162770..67cded5ad827 100644
> --- a/Documentation/devicetree/bindings/display/renesas,du.txt
> +++ b/Documentation/devicetree/bindings/display/renesas,du.txt
> @@ -10,6 +10,7 @@ Required Properties:
>      - "renesas,du-r8a774a1" for R8A774A1 (RZ/G2M) compatible DU
>      - "renesas,du-r8a774b1" for R8A774B1 (RZ/G2N) compatible DU
>      - "renesas,du-r8a774c0" for R8A774C0 (RZ/G2E) compatible DU
> +    - "renesas,du-r8a774e1" for R8A774E1 (RZ/G2H) compatible DU
>      - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU
>      - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU
>      - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU
> @@ -75,6 +76,7 @@ corresponding to each DU output.
>   R8A774A1 (RZ/G2M)      DPAD 0         HDMI 0         LVDS 0         -
>   R8A774B1 (RZ/G2N)      DPAD 0         HDMI 0         LVDS 0         -
>   R8A774C0 (RZ/G2E)      DPAD 0         LVDS 0         LVDS 1         -
> + R8A774E1 (RZ/G2H)      DPAD 0         HDMI 0         LVDS 0         -
>   R8A7779 (R-Car H1)     DPAD 0         DPAD 1         -              -
>   R8A7790 (R-Car H2)     DPAD 0         LVDS 0         LVDS 1         -
>   R8A7791 (R-Car M2-W)   DPAD 0         LVDS 0         -              -
Geert Uytterhoeven Aug. 13, 2020, 9:05 a.m. UTC | #2
Hi Prabhakar, Laurent, Kieran,

On Wed, Aug 12, 2020 at 4:02 PM Lad Prabhakar
<prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> From: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
>
> Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
>
> Signed-off-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> ---
>  Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++
>  1 file changed, 2 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt
> index 51cd4d162770..67cded5ad827 100644
> --- a/Documentation/devicetree/bindings/display/renesas,du.txt
> +++ b/Documentation/devicetree/bindings/display/renesas,du.txt
> @@ -10,6 +10,7 @@ Required Properties:
>      - "renesas,du-r8a774a1" for R8A774A1 (RZ/G2M) compatible DU
>      - "renesas,du-r8a774b1" for R8A774B1 (RZ/G2N) compatible DU
>      - "renesas,du-r8a774c0" for R8A774C0 (RZ/G2E) compatible DU
> +    - "renesas,du-r8a774e1" for R8A774E1 (RZ/G2H) compatible DU
>      - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU
>      - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU
>      - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU
> @@ -75,6 +76,7 @@ corresponding to each DU output.
>   R8A774A1 (RZ/G2M)      DPAD 0         HDMI 0         LVDS 0         -
>   R8A774B1 (RZ/G2N)      DPAD 0         HDMI 0         LVDS 0         -
>   R8A774C0 (RZ/G2E)      DPAD 0         LVDS 0         LVDS 1         -
> + R8A774E1 (RZ/G2H)      DPAD 0         HDMI 0         LVDS 0         -

As LVDS 0 is the fourth channel (DU3), should it be listed under port 3
instead of port 2?

I know we did it the same for R-Car M3-N and RZ/G2N.
But my main worry is adding support for R-Car H3-N later.

>   R8A7779 (R-Car H1)     DPAD 0         DPAD 1         -              -
>   R8A7790 (R-Car H2)     DPAD 0         LVDS 0         LVDS 1         -
>   R8A7791 (R-Car M2-W)   DPAD 0         LVDS 0         -              -

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

{oetje,eeting}s,

                        Geert
Prabhakar Aug. 13, 2020, 10:38 a.m. UTC | #3
Hi Geert,

Thank you for the review.

On Thu, Aug 13, 2020 at 10:05 AM Geert Uytterhoeven
<geert@linux-m68k.org> wrote:
>
> Hi Prabhakar, Laurent, Kieran,
>
> On Wed, Aug 12, 2020 at 4:02 PM Lad Prabhakar
> <prabhakar.mahadev-lad.rj@bp.renesas.com> wrote:
> > From: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> >
> > Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
> >
> > Signed-off-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > ---
> >  Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt
> > index 51cd4d162770..67cded5ad827 100644
> > --- a/Documentation/devicetree/bindings/display/renesas,du.txt
> > +++ b/Documentation/devicetree/bindings/display/renesas,du.txt
> > @@ -10,6 +10,7 @@ Required Properties:
> >      - "renesas,du-r8a774a1" for R8A774A1 (RZ/G2M) compatible DU
> >      - "renesas,du-r8a774b1" for R8A774B1 (RZ/G2N) compatible DU
> >      - "renesas,du-r8a774c0" for R8A774C0 (RZ/G2E) compatible DU
> > +    - "renesas,du-r8a774e1" for R8A774E1 (RZ/G2H) compatible DU
> >      - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU
> >      - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU
> >      - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU
> > @@ -75,6 +76,7 @@ corresponding to each DU output.
> >   R8A774A1 (RZ/G2M)      DPAD 0         HDMI 0         LVDS 0         -
> >   R8A774B1 (RZ/G2N)      DPAD 0         HDMI 0         LVDS 0         -
> >   R8A774C0 (RZ/G2E)      DPAD 0         LVDS 0         LVDS 1         -
> > + R8A774E1 (RZ/G2H)      DPAD 0         HDMI 0         LVDS 0         -
>
> As LVDS 0 is the fourth channel (DU3), should it be listed under port 3
> instead of port 2?
>
> I know we did it the same for R-Car M3-N and RZ/G2N.
> But my main worry is adding support for R-Car H3-N later.
>
I do agree too, with the below diff I tested the LVDS output on RZ/G2N
Rev2 board and things work fine. But only thing it doesn't explain is
why does LVDS work on DU2 for G2[H/N] boards :D

Geert, Laurent, Kieran If you agree with the below changes I shall
post a proper patch fixing it for RZ/G2[HN]

diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
index d661724fc28a..0b087d287202 100644
--- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
@@ -2540,8 +2540,8 @@
                                                remote-endpoint =
<&dw_hdmi0_in>;
                                        };
                                };
-                               port@2 {
-                                       reg = <2>;
+                               port@3 {
+                                       reg = <3>;
                                        du_out_lvds0: endpoint {
                                                remote-endpoint = <&lvds0_in>;
                                        };
diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index 3e67cf70f040..419d81c7763e 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -153,7 +153,7 @@ static const struct rcar_du_device_info
rcar_du_r8a774b1_info = {
                },
                [RCAR_DU_OUTPUT_LVDS0] = {
                        .possible_crtcs = BIT(0),
-                       .port = 2,
+                       .port = 3,
                },
        },
        .num_lvds = 1,

Cheers,
Prabhakar


> >   R8A7779 (R-Car H1)     DPAD 0         DPAD 1         -              -
> >   R8A7790 (R-Car H2)     DPAD 0         LVDS 0         LVDS 1         -
> >   R8A7791 (R-Car M2-W)   DPAD 0         LVDS 0         -              -
>
> Apart from that:
> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> {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
Laurent Pinchart Aug. 13, 2020, 10:59 a.m. UTC | #4
Hello,

On Thu, Aug 13, 2020 at 11:38:03AM +0100, Lad, Prabhakar wrote:
> On Thu, Aug 13, 2020 at 10:05 AM Geert Uytterhoeven wrote:
> > On Wed, Aug 12, 2020 at 4:02 PM Lad Prabhakar wrote:
> > > From: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > >
> > > Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
> > >
> > > Signed-off-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > ---
> > >  Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++
> > >  1 file changed, 2 insertions(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt
> > > index 51cd4d162770..67cded5ad827 100644
> > > --- a/Documentation/devicetree/bindings/display/renesas,du.txt
> > > +++ b/Documentation/devicetree/bindings/display/renesas,du.txt
> > > @@ -10,6 +10,7 @@ Required Properties:
> > >      - "renesas,du-r8a774a1" for R8A774A1 (RZ/G2M) compatible DU
> > >      - "renesas,du-r8a774b1" for R8A774B1 (RZ/G2N) compatible DU
> > >      - "renesas,du-r8a774c0" for R8A774C0 (RZ/G2E) compatible DU
> > > +    - "renesas,du-r8a774e1" for R8A774E1 (RZ/G2H) compatible DU
> > >      - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU
> > >      - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU
> > >      - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU
> > > @@ -75,6 +76,7 @@ corresponding to each DU output.
> > >   R8A774A1 (RZ/G2M)      DPAD 0         HDMI 0         LVDS 0         -
> > >   R8A774B1 (RZ/G2N)      DPAD 0         HDMI 0         LVDS 0         -
> > >   R8A774C0 (RZ/G2E)      DPAD 0         LVDS 0         LVDS 1         -
> > > + R8A774E1 (RZ/G2H)      DPAD 0         HDMI 0         LVDS 0         -
> >
> > As LVDS 0 is the fourth channel (DU3), should it be listed under port 3
> > instead of port 2?
> >
> > I know we did it the same for R-Car M3-N and RZ/G2N.
> > But my main worry is adding support for R-Car H3-N later.

Why should we do so ? The port number here isn't tied to the DU channel
number. It only identifies the output port. Many DUs can route DU
channel outputs to different output ports.

> I do agree too, with the below diff I tested the LVDS output on RZ/G2N
> Rev2 board and things work fine. But only thing it doesn't explain is
> why does LVDS work on DU2 for G2[H/N] boards :D
> 
> Geert, Laurent, Kieran If you agree with the below changes I shall
> post a proper patch fixing it for RZ/G2[HN]
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> index d661724fc28a..0b087d287202 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> @@ -2540,8 +2540,8 @@
>                                                 remote-endpoint =
> <&dw_hdmi0_in>;
>                                         };
>                                 };
> -                               port@2 {
> -                                       reg = <2>;
> +                               port@3 {
> +                                       reg = <3>;
>                                         du_out_lvds0: endpoint {
>                                                 remote-endpoint = <&lvds0_in>;
>                                         };
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> index 3e67cf70f040..419d81c7763e 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -153,7 +153,7 @@ static const struct rcar_du_device_info
> rcar_du_r8a774b1_info = {
>                 },
>                 [RCAR_DU_OUTPUT_LVDS0] = {
>                         .possible_crtcs = BIT(0),
> -                       .port = 2,
> +                       .port = 3,
>                 },
>         },
>         .num_lvds = 1,
> 
> > >   R8A7779 (R-Car H1)     DPAD 0         DPAD 1         -              -
> > >   R8A7790 (R-Car H2)     DPAD 0         LVDS 0         LVDS 1         -
> > >   R8A7791 (R-Car M2-W)   DPAD 0         LVDS 0         -              -
> >
> > Apart from that:
> > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Prabhakar Aug. 13, 2020, 11:08 a.m. UTC | #5
Hi Laurent,

On Thu, Aug 13, 2020 at 11:59 AM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hello,
>
> On Thu, Aug 13, 2020 at 11:38:03AM +0100, Lad, Prabhakar wrote:
> > On Thu, Aug 13, 2020 at 10:05 AM Geert Uytterhoeven wrote:
> > > On Wed, Aug 12, 2020 at 4:02 PM Lad Prabhakar wrote:
> > > > From: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > > >
> > > > Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
> > > >
> > > > Signed-off-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > > ---
> > > >  Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++
> > > >  1 file changed, 2 insertions(+)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt
> > > > index 51cd4d162770..67cded5ad827 100644
> > > > --- a/Documentation/devicetree/bindings/display/renesas,du.txt
> > > > +++ b/Documentation/devicetree/bindings/display/renesas,du.txt
> > > > @@ -10,6 +10,7 @@ Required Properties:
> > > >      - "renesas,du-r8a774a1" for R8A774A1 (RZ/G2M) compatible DU
> > > >      - "renesas,du-r8a774b1" for R8A774B1 (RZ/G2N) compatible DU
> > > >      - "renesas,du-r8a774c0" for R8A774C0 (RZ/G2E) compatible DU
> > > > +    - "renesas,du-r8a774e1" for R8A774E1 (RZ/G2H) compatible DU
> > > >      - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU
> > > >      - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU
> > > >      - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU
> > > > @@ -75,6 +76,7 @@ corresponding to each DU output.
> > > >   R8A774A1 (RZ/G2M)      DPAD 0         HDMI 0         LVDS 0         -
> > > >   R8A774B1 (RZ/G2N)      DPAD 0         HDMI 0         LVDS 0         -
> > > >   R8A774C0 (RZ/G2E)      DPAD 0         LVDS 0         LVDS 1         -
> > > > + R8A774E1 (RZ/G2H)      DPAD 0         HDMI 0         LVDS 0         -
> > >
> > > As LVDS 0 is the fourth channel (DU3), should it be listed under port 3
> > > instead of port 2?
> > >
> > > I know we did it the same for R-Car M3-N and RZ/G2N.
> > > But my main worry is adding support for R-Car H3-N later.
>
> Why should we do so ? The port number here isn't tied to the DU channel
> number. It only identifies the output port. Many DUs can route DU
> channel outputs to different output ports.
>
The binding document (renesas,du.txt) does state that "The following
table lists for each supported model the port number corresponding to
each DU output.", hence the confusion.

Cheers,
Prabhakar

> > I do agree too, with the below diff I tested the LVDS output on RZ/G2N
> > Rev2 board and things work fine. But only thing it doesn't explain is
> > why does LVDS work on DU2 for G2[H/N] boards :D
> >
> > Geert, Laurent, Kieran If you agree with the below changes I shall
> > post a proper patch fixing it for RZ/G2[HN]
> >
> > diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> > b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> > index d661724fc28a..0b087d287202 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> > @@ -2540,8 +2540,8 @@
> >                                                 remote-endpoint =
> > <&dw_hdmi0_in>;
> >                                         };
> >                                 };
> > -                               port@2 {
> > -                                       reg = <2>;
> > +                               port@3 {
> > +                                       reg = <3>;
> >                                         du_out_lvds0: endpoint {
> >                                                 remote-endpoint = <&lvds0_in>;
> >                                         };
> > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> > b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> > index 3e67cf70f040..419d81c7763e 100644
> > --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> > +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> > @@ -153,7 +153,7 @@ static const struct rcar_du_device_info
> > rcar_du_r8a774b1_info = {
> >                 },
> >                 [RCAR_DU_OUTPUT_LVDS0] = {
> >                         .possible_crtcs = BIT(0),
> > -                       .port = 2,
> > +                       .port = 3,
> >                 },
> >         },
> >         .num_lvds = 1,
> >
> > > >   R8A7779 (R-Car H1)     DPAD 0         DPAD 1         -              -
> > > >   R8A7790 (R-Car H2)     DPAD 0         LVDS 0         LVDS 1         -
> > > >   R8A7791 (R-Car M2-W)   DPAD 0         LVDS 0         -              -
> > >
> > > Apart from that:
> > > Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
>
> --
> Regards,
>
> Laurent Pinchart
Laurent Pinchart Aug. 13, 2020, 11:11 a.m. UTC | #6
Hi Prabhakar,

On Thu, Aug 13, 2020 at 12:08:58PM +0100, Lad, Prabhakar wrote:
> On Thu, Aug 13, 2020 at 11:59 AM Laurent Pinchart wrote:
> > On Thu, Aug 13, 2020 at 11:38:03AM +0100, Lad, Prabhakar wrote:
> >> On Thu, Aug 13, 2020 at 10:05 AM Geert Uytterhoeven wrote:
> >>> On Wed, Aug 12, 2020 at 4:02 PM Lad Prabhakar wrote:
> >>>> From: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> >>>>
> >>>> Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
> >>>>
> >>>> Signed-off-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> >>>> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> >>>> ---
> >>>>  Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++
> >>>>  1 file changed, 2 insertions(+)
> >>>>
> >>>> diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt
> >>>> index 51cd4d162770..67cded5ad827 100644
> >>>> --- a/Documentation/devicetree/bindings/display/renesas,du.txt
> >>>> +++ b/Documentation/devicetree/bindings/display/renesas,du.txt
> >>>> @@ -10,6 +10,7 @@ Required Properties:
> >>>>      - "renesas,du-r8a774a1" for R8A774A1 (RZ/G2M) compatible DU
> >>>>      - "renesas,du-r8a774b1" for R8A774B1 (RZ/G2N) compatible DU
> >>>>      - "renesas,du-r8a774c0" for R8A774C0 (RZ/G2E) compatible DU
> >>>> +    - "renesas,du-r8a774e1" for R8A774E1 (RZ/G2H) compatible DU
> >>>>      - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU
> >>>>      - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU
> >>>>      - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU
> >>>> @@ -75,6 +76,7 @@ corresponding to each DU output.
> >>>>   R8A774A1 (RZ/G2M)      DPAD 0         HDMI 0         LVDS 0         -
> >>>>   R8A774B1 (RZ/G2N)      DPAD 0         HDMI 0         LVDS 0         -
> >>>>   R8A774C0 (RZ/G2E)      DPAD 0         LVDS 0         LVDS 1         -
> >>>> + R8A774E1 (RZ/G2H)      DPAD 0         HDMI 0         LVDS 0         -
> >>>
> >>> As LVDS 0 is the fourth channel (DU3), should it be listed under port 3
> >>> instead of port 2?
> >>>
> >>> I know we did it the same for R-Car M3-N and RZ/G2N.
> >>> But my main worry is adding support for R-Car H3-N later.
> >
> > Why should we do so ? The port number here isn't tied to the DU channel
> > number. It only identifies the output port. Many DUs can route DU
> > channel outputs to different output ports.
> >
> The binding document (renesas,du.txt) does state that "The following
> table lists for each supported model the port number corresponding to
> each DU output.", hence the confusion.

It can be a bit confusing indeed. "DU output" here refers to the output
of the whoel DU, made of individual DU channels. Each DU channel is
listed as a DU device in the datasheet, and collectively they are the DU
device that Linux handles.

> >> I do agree too, with the below diff I tested the LVDS output on RZ/G2N
> >> Rev2 board and things work fine. But only thing it doesn't explain is
> >> why does LVDS work on DU2 for G2[H/N] boards :D
> >>
> >> Geert, Laurent, Kieran If you agree with the below changes I shall
> >> post a proper patch fixing it for RZ/G2[HN]
> >>
> >> diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> >> b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> >> index d661724fc28a..0b087d287202 100644
> >> --- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> >> +++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> >> @@ -2540,8 +2540,8 @@
> >>                                                 remote-endpoint =
> >> <&dw_hdmi0_in>;
> >>                                         };
> >>                                 };
> >> -                               port@2 {
> >> -                                       reg = <2>;
> >> +                               port@3 {
> >> +                                       reg = <3>;
> >>                                         du_out_lvds0: endpoint {
> >>                                                 remote-endpoint = <&lvds0_in>;
> >>                                         };
> >> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> >> b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> >> index 3e67cf70f040..419d81c7763e 100644
> >> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> >> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> >> @@ -153,7 +153,7 @@ static const struct rcar_du_device_info
> >> rcar_du_r8a774b1_info = {
> >>                 },
> >>                 [RCAR_DU_OUTPUT_LVDS0] = {
> >>                         .possible_crtcs = BIT(0),
> >> -                       .port = 2,
> >> +                       .port = 3,
> >>                 },
> >>         },
> >>         .num_lvds = 1,
> >>
> >>>>   R8A7779 (R-Car H1)     DPAD 0         DPAD 1         -              -
> >>>>   R8A7790 (R-Car H2)     DPAD 0         LVDS 0         LVDS 1         -
> >>>>   R8A7791 (R-Car M2-W)   DPAD 0         LVDS 0         -              -
> >>>
> >>> Apart from that:
> >>> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Prabhakar Aug. 13, 2020, 11:20 a.m. UTC | #7
Hi Laurent,

On Thu, Aug 13, 2020 at 12:11 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Prabhakar,
>
> On Thu, Aug 13, 2020 at 12:08:58PM +0100, Lad, Prabhakar wrote:
> > On Thu, Aug 13, 2020 at 11:59 AM Laurent Pinchart wrote:
> > > On Thu, Aug 13, 2020 at 11:38:03AM +0100, Lad, Prabhakar wrote:
> > >> On Thu, Aug 13, 2020 at 10:05 AM Geert Uytterhoeven wrote:
> > >>> On Wed, Aug 12, 2020 at 4:02 PM Lad Prabhakar wrote:
> > >>>> From: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > >>>>
> > >>>> Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
> > >>>>
> > >>>> Signed-off-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > >>>> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > >>>> ---
> > >>>>  Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++
> > >>>>  1 file changed, 2 insertions(+)
> > >>>>
> > >>>> diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt
> > >>>> index 51cd4d162770..67cded5ad827 100644
> > >>>> --- a/Documentation/devicetree/bindings/display/renesas,du.txt
> > >>>> +++ b/Documentation/devicetree/bindings/display/renesas,du.txt
> > >>>> @@ -10,6 +10,7 @@ Required Properties:
> > >>>>      - "renesas,du-r8a774a1" for R8A774A1 (RZ/G2M) compatible DU
> > >>>>      - "renesas,du-r8a774b1" for R8A774B1 (RZ/G2N) compatible DU
> > >>>>      - "renesas,du-r8a774c0" for R8A774C0 (RZ/G2E) compatible DU
> > >>>> +    - "renesas,du-r8a774e1" for R8A774E1 (RZ/G2H) compatible DU
> > >>>>      - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU
> > >>>>      - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU
> > >>>>      - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU
> > >>>> @@ -75,6 +76,7 @@ corresponding to each DU output.
> > >>>>   R8A774A1 (RZ/G2M)      DPAD 0         HDMI 0         LVDS 0         -
> > >>>>   R8A774B1 (RZ/G2N)      DPAD 0         HDMI 0         LVDS 0         -
> > >>>>   R8A774C0 (RZ/G2E)      DPAD 0         LVDS 0         LVDS 1         -
> > >>>> + R8A774E1 (RZ/G2H)      DPAD 0         HDMI 0         LVDS 0         -
> > >>>
> > >>> As LVDS 0 is the fourth channel (DU3), should it be listed under port 3
> > >>> instead of port 2?
> > >>>
> > >>> I know we did it the same for R-Car M3-N and RZ/G2N.
> > >>> But my main worry is adding support for R-Car H3-N later.
> > >
> > > Why should we do so ? The port number here isn't tied to the DU channel
> > > number. It only identifies the output port. Many DUs can route DU
> > > channel outputs to different output ports.
> > >
> > The binding document (renesas,du.txt) does state that "The following
> > table lists for each supported model the port number corresponding to
> > each DU output.", hence the confusion.
>
> It can be a bit confusing indeed. "DU output" here refers to the output
> of the whoel DU, made of individual DU channels. Each DU channel is
> listed as a DU device in the datasheet, and collectively they are the DU
> device that Linux handles.
>
Thanks for the clarification, that clears up the confusion.

Cheers,
Prabhakar
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt
index 51cd4d162770..67cded5ad827 100644
--- a/Documentation/devicetree/bindings/display/renesas,du.txt
+++ b/Documentation/devicetree/bindings/display/renesas,du.txt
@@ -10,6 +10,7 @@  Required Properties:
     - "renesas,du-r8a774a1" for R8A774A1 (RZ/G2M) compatible DU
     - "renesas,du-r8a774b1" for R8A774B1 (RZ/G2N) compatible DU
     - "renesas,du-r8a774c0" for R8A774C0 (RZ/G2E) compatible DU
+    - "renesas,du-r8a774e1" for R8A774E1 (RZ/G2H) compatible DU
     - "renesas,du-r8a7779" for R8A7779 (R-Car H1) compatible DU
     - "renesas,du-r8a7790" for R8A7790 (R-Car H2) compatible DU
     - "renesas,du-r8a7791" for R8A7791 (R-Car M2-W) compatible DU
@@ -75,6 +76,7 @@  corresponding to each DU output.
  R8A774A1 (RZ/G2M)      DPAD 0         HDMI 0         LVDS 0         -
  R8A774B1 (RZ/G2N)      DPAD 0         HDMI 0         LVDS 0         -
  R8A774C0 (RZ/G2E)      DPAD 0         LVDS 0         LVDS 1         -
+ R8A774E1 (RZ/G2H)      DPAD 0         HDMI 0         LVDS 0         -
  R8A7779 (R-Car H1)     DPAD 0         DPAD 1         -              -
  R8A7790 (R-Car H2)     DPAD 0         LVDS 0         LVDS 1         -
  R8A7791 (R-Car M2-W)   DPAD 0         LVDS 0         -              -