mbox series

[v7,0/8] Add RZ/{G2L,G2LC} and RZ/V2L DU support

Message ID 20230411120810.368437-1-biju.das.jz@bp.renesas.com
Headers show
Series Add RZ/{G2L,G2LC} and RZ/V2L DU support | expand

Message

Biju Das April 11, 2023, 12:08 p.m. UTC
RZ/G2L LCD controller composed of Frame compression Processor(FCPVD), Video
signal processor (VSPD) and Display unit(DU). The output of LCDC is
connected to Display parallel interface and MIPI link video interface.
 
The output from DSI is connected to ADV7535.

Created new CRTC/DRM driver specific to RZ/G2L alike SoCs using RCar DU lib.

This patch series tested on SMARC EVK based on RZ/{G2L,G2LC} and RZ/V2L SoCs.

This patch series depend upon [1]
[1] https://lore.kernel.org/linux-renesas-soc/20230411114235.366042-1-biju.das.jz@bp.renesas.com/T/#t

v6->v7:
 * Split DU lib and  RZ/G2L du driver as separate patch series as
   DU support added to more platforms based on RZ/G2L alike SoCs.
 * Rebased to latest drm-tip.
 * Added patch #2 for binding support for RZ/V2L DU
 * Added patch #4 for driver support for RZ/V2L DU
 * Added patch #5 for SoC DTSI support for RZ/G2L DU
 * Added patch #6 for SoC DTSI support for RZ/V2L DU
 * Added patch #7 for Enabling DU on SMARC EVK based on RZ/{G2L,V2L} SoCs.
 * Added patch #8 for Enabling DU on SMARC EVK based on RZ/G2LC SoC.

Biju Das (8):
  dt-bindings: display: Document Renesas RZ/G2L DU bindings
  dt-bindings: display: renesas,rzg2l-du: Document RZ/V2L DU bindings
  drm: rcar-du: Add RZ/G2L DU Support
  drm: rzg2l-du: Add RZ/V2L DU Support
  arm64: dts: renesas: r9a07g044: Add DU node
  arm64: dts: renesas: r9a07g054: Add DU node
  arm64: dts: renesas: rzg2l-smarc: Enable DU and link with DSI
  arm64: dts: renesas: rzg2lc-smarc: Enable DU and link with DSI

 .../bindings/display/renesas,rzg2l-du.yaml    | 129 ++++
 arch/arm64/boot/dts/renesas/r9a07g044.dtsi    |  14 +
 arch/arm64/boot/dts/renesas/r9a07g054.dtsi    |  14 +
 arch/arm64/boot/dts/renesas/rzg2l-smarc.dtsi  |  21 +
 arch/arm64/boot/dts/renesas/rzg2lc-smarc.dtsi |  21 +
 drivers/gpu/drm/rcar-du/Kconfig               |  17 +-
 drivers/gpu/drm/rcar-du/Makefile              |  13 +
 drivers/gpu/drm/rcar-du/rcar_du_crtc.h        |  10 +
 drivers/gpu/drm/rcar-du/rzg2l_du_crtc.c       | 716 ++++++++++++++++++
 drivers/gpu/drm/rcar-du/rzg2l_du_crtc.h       |  26 +
 drivers/gpu/drm/rcar-du/rzg2l_du_drv.c        | 197 +++++
 drivers/gpu/drm/rcar-du/rzg2l_du_drv.h        |  20 +
 drivers/gpu/drm/rcar-du/rzg2l_du_encoder.c    |  26 +
 drivers/gpu/drm/rcar-du/rzg2l_du_encoder.h    |  19 +
 drivers/gpu/drm/rcar-du/rzg2l_du_kms.c        | 157 ++++
 drivers/gpu/drm/rcar-du/rzg2l_du_kms.h        |  17 +
 drivers/gpu/drm/rcar-du/rzg2l_du_regs.h       |  67 ++
 drivers/gpu/drm/rcar-du/rzg2l_du_vsp.c        |  82 ++
 drivers/gpu/drm/rcar-du/rzg2l_du_vsp.h        |  30 +
 19 files changed, 1594 insertions(+), 2 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_du_crtc.c
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_du_crtc.h
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_du_drv.c
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_du_drv.h
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_du_encoder.c
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_du_encoder.h
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_du_kms.c
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_du_kms.h
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_du_regs.h
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_du_vsp.c
 create mode 100644 drivers/gpu/drm/rcar-du/rzg2l_du_vsp.h

Comments

Rob Herring (Arm) April 12, 2023, 3:27 p.m. UTC | #1
On Tue, 11 Apr 2023 13:08:04 +0100, Biju Das wrote:
> Document DU found in RZ/V2L SoC. The DU block is identical to RZ/G2L
> SoC and therefore use RZ/G2L fallback to avoid any driver changes.
> 
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v7:
>  * New patch.
> ---
>  .../devicetree/bindings/display/renesas,rzg2l-du.yaml    | 9 +++++++--
>  1 file changed, 7 insertions(+), 2 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Geert Uytterhoeven April 20, 2023, 2:47 p.m. UTC | #2
Hi Biju,

On Tue, Apr 11, 2023 at 2:08 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Add support for RZ/V2L DU. The RZ/V2L DU block is identical to
> RZ/G2L SoC.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v7:
>  * New patch.

Thanks for your patch!

> --- a/drivers/gpu/drm/rcar-du/rzg2l_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rzg2l_du_drv.c
> @@ -53,6 +53,7 @@ static const struct rcar_du_device_info rzg2l_du_r9a07g044_info = {
>
>  static const struct of_device_id rzg2l_du_of_table[] = {
>         { .compatible = "renesas,r9a07g044-du", .data = &rzg2l_du_r9a07g044_info },
> +       { .compatible = "renesas,r9a07g054-du", .data = &rzg2l_du_r9a07g044_info },
>         { /* sentinel */ }

So this change implies no fallback compatible value, OK.

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

Gr{oetje,eeting}s,

                        Geert
Geert Uytterhoeven April 20, 2023, 3:04 p.m. UTC | #3
Hi Biju,

On Tue, Apr 11, 2023 at 2:12 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> Add DU node to RZ/V2L SoC DTSI.
>
> Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> ---
> v7:
>  * New patch.

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

> --- a/arch/arm64/boot/dts/renesas/r9a07g054.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r9a07g054.dtsi
> @@ -677,6 +677,20 @@ fcpvd: fcp@10880000 {
>                         resets = <&cpg R9A07G054_LCDC_RESET_N>;
>                 };
>
> +               du: display@10890000 {
> +                       compatible = "renesas,r9a07g054-du";

I think you have to make your mind up about using a fallback compatible
value or not. As the VSP has one, I think the DU should have one, too.

> +                       reg = <0 0x10890000 0 0x10000>;
> +                       interrupts = <GIC_SPI 152 IRQ_TYPE_LEVEL_HIGH>;
> +                       clocks = <&cpg CPG_MOD R9A07G054_LCDC_CLK_A>,
> +                                <&cpg CPG_MOD R9A07G054_LCDC_CLK_P>,
> +                                <&cpg CPG_MOD R9A07G054_LCDC_CLK_D>;
> +                       clock-names = "aclk", "pclk", "vclk";
> +                       power-domains = <&cpg>;
> +                       resets = <&cpg R9A07G054_LCDC_RESET_N>;
> +                       renesas,vsps = <&vspd 0>;
> +                       status = "disabled";
> +               };
> +
>                 cpg: clock-controller@11010000 {
>                         compatible = "renesas,r9a07g054-cpg";
>                         reg = <0 0x11010000 0 0x10000>;

Gr{oetje,eeting}s,

                        Geert
Biju Das April 20, 2023, 3:10 p.m. UTC | #4
Hi Geert,

Thanks for the feedback.

> Subject: Re: [PATCH v7 2/8] dt-bindings: display: renesas,rzg2l-du: Document
> RZ/V2L DU bindings
> 
> Hi Biju,
> 
> On Tue, Apr 11, 2023 at 2:11 PM Biju Das <biju.das.jz@bp.renesas.com> wrote:
> > Document DU found in RZ/V2L SoC. The DU block is identical to RZ/G2L
> > SoC and therefore use RZ/G2L fallback to avoid any driver changes.
> >
> > Signed-off-by: Biju Das <biju.das.jz@bp.renesas.com>
> > ---
> > v7:
> >  * New patch.
> 
> Thanks for your patch!
> 
> > --- a/Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml
> > +++ b/Documentation/devicetree/bindings/display/renesas,rzg2l-du.yaml
> > @@ -16,8 +16,13 @@ description: |
> >
> >  properties:
> >    compatible:
> > -    enum:
> > -      - renesas,r9a07g044-du # RZ/G2{L,LC}
> > +    oneOf:
> > +      - enum:
> > +          - renesas,r9a07g044-du # RZ/G2{L,LC}
> > +      - items:
> > +          - enum:
> > +              - renesas,r9a07g054-vsp2    # RZ/V2L
> > +          - const: renesas,r9a07g044-vsp2 # RZ/G2L fallback
> 
> "*-vsp2", really? ;-)
> 
> And with s/vsp2/du/, it doesn't match patch 6/8, where you use
> "renesas,r9a07g054-du" without the fallback.

Oops, Typo. Copy paste error from vsp2.

OK, will use compatible r9a07g044-du as fallback in 6/8 and in driver.
as both G2L and V2L supports either DSI or DPI.

Cheers,
Biju