2020-08-12 14:03:53

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 0/9] r8a774e1 add support for DU, HDMI and LVDS

Hi All,

This patch series adds support for DU, HDMI and LVDS to RZ/G2H SoC.

Cheers,
Prabhakar

Lad Prabhakar (1):
arm64: dts: renesas: r8a774e1-hihope-rzg2h: Setup DU clocks

Marian-Cristian Rotariu (8):
dt-bindings: display: renesas,du: Document r8a774e1 bindings
drm: rcar-du: Add support for R8A774E1 SoC
arm64: dts: renesas: r8a774e1: Populate DU device node
dt-bindings: display: renesas,lvds: Document r8a774e1 bindings
dt-bindings: display: renesas,dw-hdmi: Add r8a774e1 support
arm64: dts: renesas: r8a774e1: Populate HDMI encoder node
drm: rcar-du: lvds: Add support for R8A774E1 SoC
arm64: dts: renesas: r8a774e1: Add LVDS device node

.../display/bridge/renesas,dw-hdmi.txt | 1 +
.../bindings/display/bridge/renesas,lvds.txt | 1 +
.../bindings/display/renesas,du.txt | 2 +
.../dts/renesas/r8a774e1-hihope-rzg2h.dts | 11 ++++
arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 61 ++++++++++++++++++-
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 30 +++++++++
drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 +
7 files changed, 104 insertions(+), 3 deletions(-)

--
2.17.1


2020-08-12 14:03:57

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 1/9] dt-bindings: display: renesas,du: Document r8a774e1 bindings

From: Marian-Cristian Rotariu <[email protected]>

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

Signed-off-by: Marian-Cristian Rotariu <[email protected]>
Signed-off-by: Lad Prabhakar <[email protected]>
---
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 - -
--
2.17.1

2020-08-12 14:04:05

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 2/9] drm: rcar-du: Add support for R8A774E1 SoC

From: Marian-Cristian Rotariu <[email protected]>

Hookup RZ/G2H (R8A774E1) to DU driver. R8A774E1 has one RGB output,
one LVDS output and one HDMI output.

Signed-off-by: Marian-Cristian Rotariu <[email protected]>
Signed-off-by: Lad Prabhakar <[email protected]>
---
drivers/gpu/drm/rcar-du/rcar_du_drv.c | 30 +++++++++++++++++++++++++++
1 file changed, 30 insertions(+)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index 3e67cf70f040..398c180b8731 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -186,6 +186,35 @@ static const struct rcar_du_device_info rcar_du_r8a774c0_info = {
.lvds_clk_mask = BIT(1) | BIT(0),
};

+static const struct rcar_du_device_info rcar_du_r8a774e1_info = {
+ .gen = 3,
+ .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
+ | RCAR_DU_FEATURE_VSP1_SOURCE
+ | RCAR_DU_FEATURE_INTERLACED
+ | RCAR_DU_FEATURE_TVM_SYNC,
+ .channels_mask = BIT(3) | BIT(1) | BIT(0),
+ .routes = {
+ /*
+ * R8A774E1 has one RGB output, one LVDS output and one HDMI
+ * output.
+ */
+ [RCAR_DU_OUTPUT_DPAD0] = {
+ .possible_crtcs = BIT(2),
+ .port = 0,
+ },
+ [RCAR_DU_OUTPUT_HDMI0] = {
+ .possible_crtcs = BIT(1),
+ .port = 1,
+ },
+ [RCAR_DU_OUTPUT_LVDS0] = {
+ .possible_crtcs = BIT(0),
+ .port = 2,
+ },
+ },
+ .num_lvds = 1,
+ .dpll_mask = BIT(1),
+};
+
static const struct rcar_du_device_info rcar_du_r8a7779_info = {
.gen = 1,
.features = RCAR_DU_FEATURE_INTERLACED
@@ -450,6 +479,7 @@ static const struct of_device_id rcar_du_of_table[] = {
{ .compatible = "renesas,du-r8a774a1", .data = &rcar_du_r8a774a1_info },
{ .compatible = "renesas,du-r8a774b1", .data = &rcar_du_r8a774b1_info },
{ .compatible = "renesas,du-r8a774c0", .data = &rcar_du_r8a774c0_info },
+ { .compatible = "renesas,du-r8a774e1", .data = &rcar_du_r8a774e1_info },
{ .compatible = "renesas,du-r8a7779", .data = &rcar_du_r8a7779_info },
{ .compatible = "renesas,du-r8a7790", .data = &rcar_du_r8a7790_info },
{ .compatible = "renesas,du-r8a7791", .data = &rcar_du_r8a7791_info },
--
2.17.1

2020-08-12 14:04:13

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 4/9] dt-bindings: display: renesas,lvds: Document r8a774e1 bindings

From: Marian-Cristian Rotariu <[email protected]>

Document the RZ/G2H (R8A774E1) LVDS bindings.

Signed-off-by: Marian-Cristian Rotariu <[email protected]>
Signed-off-by: Lad Prabhakar <[email protected]>
---
.../devicetree/bindings/display/bridge/renesas,lvds.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
index c62ce2494ed9..42743d0d24b3 100644
--- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
+++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
@@ -12,6 +12,7 @@ Required properties:
- "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders
- "renesas,r8a774b1-lvds" for R8A774B1 (RZ/G2N) compatible LVDS encoders
- "renesas,r8a774c0-lvds" for R8A774C0 (RZ/G2E) compatible LVDS encoders
+ - "renesas,r8a774e1-lvds" for R8A774E1 (RZ/G2H) compatible LVDS encoders
- "renesas,r8a7790-lvds" for R8A7790 (R-Car H2) compatible LVDS encoders
- "renesas,r8a7791-lvds" for R8A7791 (R-Car M2-W) compatible LVDS encoders
- "renesas,r8a7793-lvds" for R8A7793 (R-Car M2-N) compatible LVDS encoders
--
2.17.1

2020-08-12 14:04:29

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 3/9] arm64: dts: renesas: r8a774e1: Populate DU device node

From: Marian-Cristian Rotariu <[email protected]>

Populate the DU device node properties in R8A774E1 SoC dtsi.

Signed-off-by: Marian-Cristian Rotariu <[email protected]>
Signed-off-by: Lad Prabhakar <[email protected]>
---
arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 19 ++++++++++++++++++-
1 file changed, 18 insertions(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
index abaa6d7f6b31..4b57c1ea762c 100644
--- a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
@@ -2623,22 +2623,39 @@
};

du: display@feb00000 {
+ compatible = "renesas,du-r8a774e1";
reg = <0 0xfeb00000 0 0x80000>;
+ interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
+ <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 724>,
+ <&cpg CPG_MOD 723>,
+ <&cpg CPG_MOD 721>;
+ clock-names = "du.0", "du.1", "du.3";
+ resets = <&cpg 724>, <&cpg 722>;
+ reset-names = "du.0", "du.3";
status = "disabled";

- /* placeholder */
+ renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
+
ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
+ du_out_rgb: endpoint {
+ };
};
port@1 {
reg = <1>;
+ du_out_hdmi0: endpoint {
+ };
};
port@2 {
reg = <2>;
+ du_out_lvds0: endpoint {
+ };
};
};
};
--
2.17.1

2020-08-12 14:04:29

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 7/9] drm: rcar-du: lvds: Add support for R8A774E1 SoC

From: Marian-Cristian Rotariu <[email protected]>

The LVDS encoder on RZ/G2H (R8A774E1) SoC is identical to R-Car Gen3 so
just reuse the rcar_lvds_gen3_info structure to hookup R8A774E1 to LVDS
encoder driver.

Signed-off-by: Marian-Cristian Rotariu <[email protected]>
Signed-off-by: Lad Prabhakar <[email protected]>
---
drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 +
1 file changed, 1 insertion(+)

diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c
index ab0d49618cf9..424ca2b7d9ac 100644
--- a/drivers/gpu/drm/rcar-du/rcar_lvds.c
+++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c
@@ -987,6 +987,7 @@ static const struct of_device_id rcar_lvds_of_table[] = {
{ .compatible = "renesas,r8a774a1-lvds", .data = &rcar_lvds_gen3_info },
{ .compatible = "renesas,r8a774b1-lvds", .data = &rcar_lvds_gen3_info },
{ .compatible = "renesas,r8a774c0-lvds", .data = &rcar_lvds_r8a77990_info },
+ { .compatible = "renesas,r8a774e1-lvds", .data = &rcar_lvds_gen3_info },
{ .compatible = "renesas,r8a7790-lvds", .data = &rcar_lvds_gen2_info },
{ .compatible = "renesas,r8a7791-lvds", .data = &rcar_lvds_gen2_info },
{ .compatible = "renesas,r8a7793-lvds", .data = &rcar_lvds_gen2_info },
--
2.17.1

2020-08-12 14:04:40

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 9/9] arm64: dts: renesas: r8a774e1-hihope-rzg2h: Setup DU clocks

Setup up the required clocks for the DU to be functional.

Signed-off-by: Lad Prabhakar <[email protected]>
---
arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts | 11 +++++++++++
1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts b/arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts
index cdbe527e9340..12f9242e263b 100644
--- a/arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts
+++ b/arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts
@@ -24,3 +24,14 @@
reg = <0x5 0x00000000 0x0 0x80000000>;
};
};
+
+&du {
+ clocks = <&cpg CPG_MOD 724>,
+ <&cpg CPG_MOD 723>,
+ <&cpg CPG_MOD 721>,
+ <&versaclock5 1>,
+ <&x302_clk>,
+ <&versaclock5 2>;
+ clock-names = "du.0", "du.1", "du.3",
+ "dclkin.0", "dclkin.1", "dclkin.3";
+};
--
2.17.1

2020-08-12 14:05:34

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 8/9] arm64: dts: renesas: r8a774e1: Add LVDS device node

From: Marian-Cristian Rotariu <[email protected]>

Add the LVDS device node to R8A774E1 to SoC dtsi and connect it with
the DU node.

Signed-off-by: Marian-Cristian Rotariu <[email protected]>
Signed-off-by: Lad Prabhakar <[email protected]>
---
arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 27 +++++++++++++++++++++++
1 file changed, 27 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
index 79efcd73cc46..f783ad8aeafa 100644
--- a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
@@ -2666,6 +2666,33 @@
port@2 {
reg = <2>;
du_out_lvds0: endpoint {
+ remote-endpoint = <&lvds0_in>;
+ };
+ };
+ };
+ };
+
+ lvds0: lvds@feb90000 {
+ compatible = "renesas,r8a774e1-lvds";
+ reg = <0 0xfeb90000 0 0x14>;
+ clocks = <&cpg CPG_MOD 727>;
+ power-domains = <&sysc R8A774E1_PD_ALWAYS_ON>;
+ resets = <&cpg 727>;
+ status = "disabled";
+
+ 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 {
};
};
};
--
2.17.1

2020-08-12 14:05:40

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 5/9] dt-bindings: display: renesas,dw-hdmi: Add r8a774e1 support

From: Marian-Cristian Rotariu <[email protected]>

Document RZ/G2H (R8A774E1) SoC bindings.

Signed-off-by: Marian-Cristian Rotariu <[email protected]>
Signed-off-by: Lad Prabhakar <[email protected]>
---
.../devicetree/bindings/display/bridge/renesas,dw-hdmi.txt | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt b/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt
index 819f3e31013c..f275997ab947 100644
--- a/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt
+++ b/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt
@@ -14,6 +14,7 @@ Required properties:
- compatible : Shall contain one or more of
- "renesas,r8a774a1-hdmi" for R8A774A1 (RZ/G2M) compatible HDMI TX
- "renesas,r8a774b1-hdmi" for R8A774B1 (RZ/G2N) compatible HDMI TX
+ - "renesas,r8a774e1-hdmi" for R8A774E1 (RZ/G2H) compatible HDMI TX
- "renesas,r8a7795-hdmi" for R8A7795 (R-Car H3) compatible HDMI TX
- "renesas,r8a7796-hdmi" for R8A7796 (R-Car M3-W) compatible HDMI TX
- "renesas,r8a77965-hdmi" for R8A77965 (R-Car M3-N) compatible HDMI TX
--
2.17.1

2020-08-12 14:08:07

by Prabhakar Mahadev Lad

[permalink] [raw]
Subject: [PATCH 6/9] arm64: dts: renesas: r8a774e1: Populate HDMI encoder node

From: Marian-Cristian Rotariu <[email protected]>

Populate HDMI node properties in R8A774E1 SoC dtsi.

Signed-off-by: Marian-Cristian Rotariu <[email protected]>
Signed-off-by: Lad Prabhakar <[email protected]>
---
arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 15 +++++++++++++--
1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
index 4b57c1ea762c..79efcd73cc46 100644
--- a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
@@ -2601,22 +2601,32 @@
};

hdmi0: hdmi@fead0000 {
+ compatible = "renesas,r8a774e1-hdmi",
+ "renesas,rcar-gen3-hdmi";
reg = <0 0xfead0000 0 0x10000>;
+ interrupts = <GIC_SPI 389 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cpg CPG_MOD 729>,
+ <&cpg CPG_CORE R8A774E1_CLK_HDMI>;
+ clock-names = "iahb", "isfr";
+ power-domains = <&sysc R8A774E1_PD_ALWAYS_ON>;
+ resets = <&cpg 729>;
status = "disabled";

- /* placeholder */
-
ports {
#address-cells = <1>;
#size-cells = <0>;

port@0 {
reg = <0>;
+ dw_hdmi0_in: endpoint {
+ remote-endpoint = <&du_out_hdmi0>;
+ };
};
port@1 {
reg = <1>;
};
port@2 {
+ /* HDMI sound */
reg = <2>;
};
};
@@ -2650,6 +2660,7 @@
port@1 {
reg = <1>;
du_out_hdmi0: endpoint {
+ remote-endpoint = <&dw_hdmi0_in>;
};
};
port@2 {
--
2.17.1

2020-08-12 16:10:51

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 1/9] dt-bindings: display: renesas,du: Document r8a774e1 bindings

Hi Prabhakar,

Thank you for the patch.

On Wed, Aug 12, 2020 at 03:02:09PM +0100, Lad Prabhakar wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

> ---
> 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 - -

--
Regards,

Laurent Pinchart

2020-08-12 16:14:45

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 2/9] drm: rcar-du: Add support for R8A774E1 SoC

Hi Prabhakar,

Thank you for the patch.

On Wed, Aug 12, 2020 at 03:02:10PM +0100, Lad Prabhakar wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Hookup RZ/G2H (R8A774E1) to DU driver. R8A774E1 has one RGB output,
> one LVDS output and one HDMI output.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

> ---
> drivers/gpu/drm/rcar-du/rcar_du_drv.c | 30 +++++++++++++++++++++++++++
> 1 file changed, 30 insertions(+)
>
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> index 3e67cf70f040..398c180b8731 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -186,6 +186,35 @@ static const struct rcar_du_device_info rcar_du_r8a774c0_info = {
> .lvds_clk_mask = BIT(1) | BIT(0),
> };
>
> +static const struct rcar_du_device_info rcar_du_r8a774e1_info = {
> + .gen = 3,
> + .features = RCAR_DU_FEATURE_CRTC_IRQ_CLOCK
> + | RCAR_DU_FEATURE_VSP1_SOURCE
> + | RCAR_DU_FEATURE_INTERLACED
> + | RCAR_DU_FEATURE_TVM_SYNC,
> + .channels_mask = BIT(3) | BIT(1) | BIT(0),
> + .routes = {
> + /*
> + * R8A774E1 has one RGB output, one LVDS output and one HDMI
> + * output.
> + */
> + [RCAR_DU_OUTPUT_DPAD0] = {
> + .possible_crtcs = BIT(2),
> + .port = 0,
> + },
> + [RCAR_DU_OUTPUT_HDMI0] = {
> + .possible_crtcs = BIT(1),
> + .port = 1,
> + },
> + [RCAR_DU_OUTPUT_LVDS0] = {
> + .possible_crtcs = BIT(0),
> + .port = 2,
> + },
> + },
> + .num_lvds = 1,
> + .dpll_mask = BIT(1),
> +};
> +
> static const struct rcar_du_device_info rcar_du_r8a7779_info = {
> .gen = 1,
> .features = RCAR_DU_FEATURE_INTERLACED
> @@ -450,6 +479,7 @@ static const struct of_device_id rcar_du_of_table[] = {
> { .compatible = "renesas,du-r8a774a1", .data = &rcar_du_r8a774a1_info },
> { .compatible = "renesas,du-r8a774b1", .data = &rcar_du_r8a774b1_info },
> { .compatible = "renesas,du-r8a774c0", .data = &rcar_du_r8a774c0_info },
> + { .compatible = "renesas,du-r8a774e1", .data = &rcar_du_r8a774e1_info },
> { .compatible = "renesas,du-r8a7779", .data = &rcar_du_r8a7779_info },
> { .compatible = "renesas,du-r8a7790", .data = &rcar_du_r8a7790_info },
> { .compatible = "renesas,du-r8a7791", .data = &rcar_du_r8a7791_info },

--
Regards,

Laurent Pinchart

2020-08-12 16:17:46

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 3/9] arm64: dts: renesas: r8a774e1: Populate DU device node

Hi Prabhakar,

Thank you for the patch.

On Wed, Aug 12, 2020 at 03:02:11PM +0100, Lad Prabhakar wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Populate the DU device node properties in R8A774E1 SoC dtsi.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

> ---
> arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 19 ++++++++++++++++++-
> 1 file changed, 18 insertions(+), 1 deletion(-)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
> index abaa6d7f6b31..4b57c1ea762c 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
> @@ -2623,22 +2623,39 @@
> };
>
> du: display@feb00000 {
> + compatible = "renesas,du-r8a774e1";
> reg = <0 0xfeb00000 0 0x80000>;
> + interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cpg CPG_MOD 724>,
> + <&cpg CPG_MOD 723>,
> + <&cpg CPG_MOD 721>;
> + clock-names = "du.0", "du.1", "du.3";
> + resets = <&cpg 724>, <&cpg 722>;
> + reset-names = "du.0", "du.3";
> status = "disabled";
>
> - /* placeholder */
> + renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
> +
> ports {
> #address-cells = <1>;
> #size-cells = <0>;
>
> port@0 {
> reg = <0>;
> + du_out_rgb: endpoint {
> + };
> };
> port@1 {
> reg = <1>;
> + du_out_hdmi0: endpoint {
> + };
> };
> port@2 {
> reg = <2>;
> + du_out_lvds0: endpoint {
> + };
> };
> };
> };

--
Regards,

Laurent Pinchart

2020-08-12 16:20:02

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 4/9] dt-bindings: display: renesas,lvds: Document r8a774e1 bindings

On Wed, Aug 12, 2020 at 07:17:59PM +0300, Laurent Pinchart wrote:
> Hi Prabhakar,
>
> Thank you for the patch.
>
> On Wed, Aug 12, 2020 at 03:02:12PM +0100, Lad Prabhakar wrote:
> > From: Marian-Cristian Rotariu <[email protected]>
> >
> > Document the RZ/G2H (R8A774E1) LVDS bindings.
> >
> > Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> > Signed-off-by: Lad Prabhakar <[email protected]>
> > ---
> > .../devicetree/bindings/display/bridge/renesas,lvds.txt | 1 +
>
> This binding has been converted to YAML. I'll apply the patch manually
> as it's a one-liner.
>
> diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
> index 4ca5a904b0ea..0fe0c49403f8 100644
> --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
> +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
> @@ -22,6 +22,7 @@ properties:
> - renesas,r8a774a1-lvds # for RZ/G2M compatible LVDS encoders
> - renesas,r8a774b1-lvds # for RZ/G2N compatible LVDS encoders
> - renesas,r8a774c0-lvds # for RZ/G2E compatible LVDS encoders
> + - renesas,r8a774e1-lvds # for RZ/G2H compatible LVDS encoders
> - renesas,r8a7790-lvds # for R-Car H2 compatible LVDS encoders
> - renesas,r8a7791-lvds # for R-Car M2-W compatible LVDS encoders
> - renesas,r8a7793-lvds # for R-Car M2-N compatible LVDS encoders
>
> If you see any issue there, please let me know.

And I forgot to mention,

Reviewed-by: Laurent Pinchart <[email protected]>

> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > index c62ce2494ed9..42743d0d24b3 100644
> > --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > @@ -12,6 +12,7 @@ Required properties:
> > - "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders
> > - "renesas,r8a774b1-lvds" for R8A774B1 (RZ/G2N) compatible LVDS encoders
> > - "renesas,r8a774c0-lvds" for R8A774C0 (RZ/G2E) compatible LVDS encoders
> > + - "renesas,r8a774e1-lvds" for R8A774E1 (RZ/G2H) compatible LVDS encoders
> > - "renesas,r8a7790-lvds" for R8A7790 (R-Car H2) compatible LVDS encoders
> > - "renesas,r8a7791-lvds" for R8A7791 (R-Car M2-W) compatible LVDS encoders
> > - "renesas,r8a7793-lvds" for R8A7793 (R-Car M2-N) compatible LVDS encoders

--
Regards,

Laurent Pinchart

2020-08-12 16:21:12

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 4/9] dt-bindings: display: renesas,lvds: Document r8a774e1 bindings

Hi Prabhakar,

Thank you for the patch.

On Wed, Aug 12, 2020 at 03:02:12PM +0100, Lad Prabhakar wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Document the RZ/G2H (R8A774E1) LVDS bindings.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>
> ---
> .../devicetree/bindings/display/bridge/renesas,lvds.txt | 1 +

This binding has been converted to YAML. I'll apply the patch manually
as it's a one-liner.

diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
index 4ca5a904b0ea..0fe0c49403f8 100644
--- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
+++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.yaml
@@ -22,6 +22,7 @@ properties:
- renesas,r8a774a1-lvds # for RZ/G2M compatible LVDS encoders
- renesas,r8a774b1-lvds # for RZ/G2N compatible LVDS encoders
- renesas,r8a774c0-lvds # for RZ/G2E compatible LVDS encoders
+ - renesas,r8a774e1-lvds # for RZ/G2H compatible LVDS encoders
- renesas,r8a7790-lvds # for R-Car H2 compatible LVDS encoders
- renesas,r8a7791-lvds # for R-Car M2-W compatible LVDS encoders
- renesas,r8a7793-lvds # for R-Car M2-N compatible LVDS encoders

If you see any issue there, please let me know.

> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> index c62ce2494ed9..42743d0d24b3 100644
> --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> @@ -12,6 +12,7 @@ Required properties:
> - "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders
> - "renesas,r8a774b1-lvds" for R8A774B1 (RZ/G2N) compatible LVDS encoders
> - "renesas,r8a774c0-lvds" for R8A774C0 (RZ/G2E) compatible LVDS encoders
> + - "renesas,r8a774e1-lvds" for R8A774E1 (RZ/G2H) compatible LVDS encoders
> - "renesas,r8a7790-lvds" for R8A7790 (R-Car H2) compatible LVDS encoders
> - "renesas,r8a7791-lvds" for R8A7791 (R-Car M2-W) compatible LVDS encoders
> - "renesas,r8a7793-lvds" for R8A7793 (R-Car M2-N) compatible LVDS encoders

--
Regards,

Laurent Pinchart

2020-08-12 16:21:38

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 5/9] dt-bindings: display: renesas,dw-hdmi: Add r8a774e1 support

Hi Prabhakar,

Thank you for the patch.

On Wed, Aug 12, 2020 at 03:02:13PM +0100, Lad Prabhakar wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Document RZ/G2H (R8A774E1) SoC bindings.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

> ---
> .../devicetree/bindings/display/bridge/renesas,dw-hdmi.txt | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt b/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt
> index 819f3e31013c..f275997ab947 100644
> --- a/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt
> +++ b/Documentation/devicetree/bindings/display/bridge/renesas,dw-hdmi.txt
> @@ -14,6 +14,7 @@ Required properties:
> - compatible : Shall contain one or more of
> - "renesas,r8a774a1-hdmi" for R8A774A1 (RZ/G2M) compatible HDMI TX
> - "renesas,r8a774b1-hdmi" for R8A774B1 (RZ/G2N) compatible HDMI TX
> + - "renesas,r8a774e1-hdmi" for R8A774E1 (RZ/G2H) compatible HDMI TX
> - "renesas,r8a7795-hdmi" for R8A7795 (R-Car H3) compatible HDMI TX
> - "renesas,r8a7796-hdmi" for R8A7796 (R-Car M3-W) compatible HDMI TX
> - "renesas,r8a77965-hdmi" for R8A77965 (R-Car M3-N) compatible HDMI TX

--
Regards,

Laurent Pinchart

2020-08-12 16:29:56

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 6/9] arm64: dts: renesas: r8a774e1: Populate HDMI encoder node

Hi Prabhakar,

Thank you for the patch.

On Wed, Aug 12, 2020 at 03:02:14PM +0100, Lad Prabhakar wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Populate HDMI node properties in R8A774E1 SoC dtsi.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

> ---
> arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 15 +++++++++++++--
> 1 file changed, 13 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
> index 4b57c1ea762c..79efcd73cc46 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
> @@ -2601,22 +2601,32 @@
> };
>
> hdmi0: hdmi@fead0000 {
> + compatible = "renesas,r8a774e1-hdmi",
> + "renesas,rcar-gen3-hdmi";
> reg = <0 0xfead0000 0 0x10000>;
> + interrupts = <GIC_SPI 389 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cpg CPG_MOD 729>,
> + <&cpg CPG_CORE R8A774E1_CLK_HDMI>;
> + clock-names = "iahb", "isfr";
> + power-domains = <&sysc R8A774E1_PD_ALWAYS_ON>;
> + resets = <&cpg 729>;
> status = "disabled";
>
> - /* placeholder */
> -
> ports {
> #address-cells = <1>;
> #size-cells = <0>;
>
> port@0 {
> reg = <0>;
> + dw_hdmi0_in: endpoint {
> + remote-endpoint = <&du_out_hdmi0>;
> + };
> };
> port@1 {
> reg = <1>;
> };
> port@2 {
> + /* HDMI sound */
> reg = <2>;
> };
> };
> @@ -2650,6 +2660,7 @@
> port@1 {
> reg = <1>;
> du_out_hdmi0: endpoint {
> + remote-endpoint = <&dw_hdmi0_in>;
> };
> };
> port@2 {

--
Regards,

Laurent Pinchart

2020-08-12 16:31:01

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 7/9] drm: rcar-du: lvds: Add support for R8A774E1 SoC

Hi Prabhakar,

Thank you for the patch.

On Wed, Aug 12, 2020 at 03:02:15PM +0100, Lad Prabhakar wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> The LVDS encoder on RZ/G2H (R8A774E1) SoC is identical to R-Car Gen3 so
> just reuse the rcar_lvds_gen3_info structure to hookup R8A774E1 to LVDS
> encoder driver.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

> ---
> drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/drivers/gpu/drm/rcar-du/rcar_lvds.c b/drivers/gpu/drm/rcar-du/rcar_lvds.c
> index ab0d49618cf9..424ca2b7d9ac 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c
> @@ -987,6 +987,7 @@ static const struct of_device_id rcar_lvds_of_table[] = {
> { .compatible = "renesas,r8a774a1-lvds", .data = &rcar_lvds_gen3_info },
> { .compatible = "renesas,r8a774b1-lvds", .data = &rcar_lvds_gen3_info },
> { .compatible = "renesas,r8a774c0-lvds", .data = &rcar_lvds_r8a77990_info },
> + { .compatible = "renesas,r8a774e1-lvds", .data = &rcar_lvds_gen3_info },
> { .compatible = "renesas,r8a7790-lvds", .data = &rcar_lvds_gen2_info },
> { .compatible = "renesas,r8a7791-lvds", .data = &rcar_lvds_gen2_info },
> { .compatible = "renesas,r8a7793-lvds", .data = &rcar_lvds_gen2_info },

--
Regards,

Laurent Pinchart

2020-08-12 16:33:08

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 8/9] arm64: dts: renesas: r8a774e1: Add LVDS device node

Hi Prabhakar,

Thank you for the patch.

On Wed, Aug 12, 2020 at 03:02:16PM +0100, Lad Prabhakar wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Add the LVDS device node to R8A774E1 to SoC dtsi and connect it with
> the DU node.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Laurent Pinchart <[email protected]>

> ---
> arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 27 +++++++++++++++++++++++
> 1 file changed, 27 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
> index 79efcd73cc46..f783ad8aeafa 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
> @@ -2666,6 +2666,33 @@
> port@2 {
> reg = <2>;
> du_out_lvds0: endpoint {
> + remote-endpoint = <&lvds0_in>;
> + };
> + };
> + };
> + };
> +
> + lvds0: lvds@feb90000 {
> + compatible = "renesas,r8a774e1-lvds";
> + reg = <0 0xfeb90000 0 0x14>;
> + clocks = <&cpg CPG_MOD 727>;
> + power-domains = <&sysc R8A774E1_PD_ALWAYS_ON>;
> + resets = <&cpg 727>;
> + status = "disabled";
> +
> + 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 {
> };
> };
> };

--
Regards,

Laurent Pinchart

2020-08-12 16:38:04

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 9/9] arm64: dts: renesas: r8a774e1-hihope-rzg2h: Setup DU clocks

Hi Prabhakar,

Thank you for the patch.

On Wed, Aug 12, 2020 at 03:02:17PM +0100, Lad Prabhakar wrote:
> Setup up the required clocks for the DU to be functional.
>
> Signed-off-by: Lad Prabhakar <[email protected]>
> ---
> arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts b/arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts
> index cdbe527e9340..12f9242e263b 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts
> @@ -24,3 +24,14 @@
> reg = <0x5 0x00000000 0x0 0x80000000>;
> };
> };
> +
> +&du {
> + clocks = <&cpg CPG_MOD 724>,
> + <&cpg CPG_MOD 723>,
> + <&cpg CPG_MOD 721>,
> + <&versaclock5 1>,
> + <&x302_clk>,
> + <&versaclock5 2>;
> + clock-names = "du.0", "du.1", "du.3",
> + "dclkin.0", "dclkin.1", "dclkin.3";

I have no reason to doubt this is correct, but I also can't assess that
as I don't have access to the schematics.

Acked-by: Laurent Pinchart <[email protected]>

> +};

--
Regards,

Laurent Pinchart

2020-08-12 16:40:19

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 0/9] r8a774e1 add support for DU, HDMI and LVDS

Hi Prabhakar,

Thank you for the patches.

On Wed, Aug 12, 2020 at 03:02:08PM +0100, Lad Prabhakar wrote:
> Hi All,
>
> This patch series adds support for DU, HDMI and LVDS to RZ/G2H SoC.

I have added patches 1/9, 2/9, 4/9, 5/9 and 7/9 to my tree. I expect
Geert to handle the rest.

> Lad Prabhakar (1):
> arm64: dts: renesas: r8a774e1-hihope-rzg2h: Setup DU clocks
>
> Marian-Cristian Rotariu (8):
> dt-bindings: display: renesas,du: Document r8a774e1 bindings
> drm: rcar-du: Add support for R8A774E1 SoC
> arm64: dts: renesas: r8a774e1: Populate DU device node
> dt-bindings: display: renesas,lvds: Document r8a774e1 bindings
> dt-bindings: display: renesas,dw-hdmi: Add r8a774e1 support
> arm64: dts: renesas: r8a774e1: Populate HDMI encoder node
> drm: rcar-du: lvds: Add support for R8A774E1 SoC
> arm64: dts: renesas: r8a774e1: Add LVDS device node
>
> .../display/bridge/renesas,dw-hdmi.txt | 1 +
> .../bindings/display/bridge/renesas,lvds.txt | 1 +
> .../bindings/display/renesas,du.txt | 2 +
> .../dts/renesas/r8a774e1-hihope-rzg2h.dts | 11 ++++
> arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 61 ++++++++++++++++++-
> drivers/gpu/drm/rcar-du/rcar_du_drv.c | 30 +++++++++
> drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 +
> 7 files changed, 104 insertions(+), 3 deletions(-)

--
Regards,

Laurent Pinchart

2020-08-12 16:47:35

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 0/9] r8a774e1 add support for DU, HDMI and LVDS

Hi Laurent,

On Wed, Aug 12, 2020 at 5:39 PM Laurent Pinchart
<[email protected]> wrote:
>
> Hi Prabhakar,
>
> Thank you for the patches.
>
> On Wed, Aug 12, 2020 at 03:02:08PM +0100, Lad Prabhakar wrote:
> > Hi All,
> >
> > This patch series adds support for DU, HDMI and LVDS to RZ/G2H SoC.
>
> I have added patches 1/9, 2/9, 4/9, 5/9 and 7/9 to my tree. I expect
> Geert to handle the rest.
>
Thank you for the review and taking care of LVDS documentation binding patch.

Cheers,
Prabhakar

> > Lad Prabhakar (1):
> > arm64: dts: renesas: r8a774e1-hihope-rzg2h: Setup DU clocks
> >
> > Marian-Cristian Rotariu (8):
> > dt-bindings: display: renesas,du: Document r8a774e1 bindings
> > drm: rcar-du: Add support for R8A774E1 SoC
> > arm64: dts: renesas: r8a774e1: Populate DU device node
> > dt-bindings: display: renesas,lvds: Document r8a774e1 bindings
> > dt-bindings: display: renesas,dw-hdmi: Add r8a774e1 support
> > arm64: dts: renesas: r8a774e1: Populate HDMI encoder node
> > drm: rcar-du: lvds: Add support for R8A774E1 SoC
> > arm64: dts: renesas: r8a774e1: Add LVDS device node
> >
> > .../display/bridge/renesas,dw-hdmi.txt | 1 +
> > .../bindings/display/bridge/renesas,lvds.txt | 1 +
> > .../bindings/display/renesas,du.txt | 2 +
> > .../dts/renesas/r8a774e1-hihope-rzg2h.dts | 11 ++++
> > arch/arm64/boot/dts/renesas/r8a774e1.dtsi | 61 ++++++++++++++++++-
> > drivers/gpu/drm/rcar-du/rcar_du_drv.c | 30 +++++++++
> > drivers/gpu/drm/rcar-du/rcar_lvds.c | 1 +
> > 7 files changed, 104 insertions(+), 3 deletions(-)
>
> --
> Regards,
>
> Laurent Pinchart

2020-08-13 09:09:07

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 1/9] dt-bindings: display: renesas,du: Document r8a774e1 bindings

Hi Prabhakar, Laurent, Kieran,

On Wed, Aug 12, 2020 at 4:02 PM Lad Prabhakar
<[email protected]> wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>
> ---
> 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 <[email protected]>

{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2020-08-13 09:09:58

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 3/9] arm64: dts: renesas: r8a774e1: Populate DU device node

On Wed, Aug 12, 2020 at 4:03 PM Lad Prabhakar
<[email protected]> wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Populate the DU device node properties in R8A774E1 SoC dtsi.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>

> --- a/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a774e1.dtsi
> @@ -2623,22 +2623,39 @@
> };
>
> du: display@feb00000 {
> + compatible = "renesas,du-r8a774e1";
> reg = <0 0xfeb00000 0 0x80000>;
> + interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
> + <GIC_SPI 270 IRQ_TYPE_LEVEL_HIGH>;
> + clocks = <&cpg CPG_MOD 724>,
> + <&cpg CPG_MOD 723>,
> + <&cpg CPG_MOD 721>;
> + clock-names = "du.0", "du.1", "du.3";
> + resets = <&cpg 724>, <&cpg 722>;
> + reset-names = "du.0", "du.3";
> status = "disabled";
>
> - /* placeholder */
> + renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
> +
> ports {
> #address-cells = <1>;
> #size-cells = <0>;
>
> port@0 {
> reg = <0>;
> + du_out_rgb: endpoint {
> + };
> };
> port@1 {
> reg = <1>;
> + du_out_hdmi0: endpoint {
> + };
> };
> port@2 {
> reg = <2>;
> + du_out_lvds0: endpoint {
> + };

Waiting for the port number discussion to settle before queuein in
renesas-devel for v5.10.

> };
> };
> };
> --
> 2.17.1
>


--
Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2020-08-13 09:11:04

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 4/9] dt-bindings: display: renesas,lvds: Document r8a774e1 bindings

On Wed, Aug 12, 2020 at 4:03 PM Lad Prabhakar
<[email protected]> wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Document the RZ/G2H (R8A774E1) LVDS bindings.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>

For the logical change (ported to .yaml):
Reviewed-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2020-08-13 09:13:51

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 5/9] dt-bindings: display: renesas,dw-hdmi: Add r8a774e1 support

On Wed, Aug 12, 2020 at 4:03 PM Lad Prabhakar
<[email protected]> wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Document RZ/G2H (R8A774E1) SoC bindings.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2020-08-13 09:16:54

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 6/9] arm64: dts: renesas: r8a774e1: Populate HDMI encoder node

On Wed, Aug 12, 2020 at 4:03 PM Lad Prabhakar
<[email protected]> wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Populate HDMI node properties in R8A774E1 SoC dtsi.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>
i.e. will queue in renesas-devel for v5.10 (after resolving the port numbering).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2020-08-13 09:20:42

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 8/9] arm64: dts: renesas: r8a774e1: Add LVDS device node

On Wed, Aug 12, 2020 at 4:03 PM Lad Prabhakar
<[email protected]> wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Add the LVDS device node to R8A774E1 to SoC dtsi and connect it with
> the DU node.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>
i.e. will queue in renesas-devel for v5.10 (after resolving the port numbering).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2020-08-13 09:21:37

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH 9/9] arm64: dts: renesas: r8a774e1-hihope-rzg2h: Setup DU clocks

On Wed, Aug 12, 2020 at 4:03 PM Lad Prabhakar
<[email protected]> wrote:
> Setup up the required clocks for the DU to be functional.
>
> Signed-off-by: Lad Prabhakar <[email protected]>

Reviewed-by: Geert Uytterhoeven <[email protected]>
i.e. will queue in renesas-devel for v5.10 (after resolving the port numbering).

Gr{oetje,eeting}s,

Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

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

2020-08-13 10:41:48

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 1/9] dt-bindings: display: renesas,du: Document r8a774e1 bindings

Hi Geert,

Thank you for the review.

On Thu, Aug 13, 2020 at 10:05 AM Geert Uytterhoeven
<[email protected]> wrote:
>
> Hi Prabhakar, Laurent, Kieran,
>
> On Wed, Aug 12, 2020 at 4:02 PM Lad Prabhakar
> <[email protected]> wrote:
> > From: Marian-Cristian Rotariu <[email protected]>
> >
> > Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
> >
> > Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> > Signed-off-by: Lad Prabhakar <[email protected]>
> > ---
> > 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 <[email protected]>
>
> {oetje,eeting}s,
>
> Geert
>
> --
> Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
>
> 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

2020-08-13 11:00:46

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 1/9] dt-bindings: display: renesas,du: Document r8a774e1 bindings

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 <[email protected]>
> > >
> > > Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
> > >
> > > Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> > > Signed-off-by: Lad Prabhakar <[email protected]>
> > > ---
> > > 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 <[email protected]>

--
Regards,

Laurent Pinchart

2020-08-13 11:12:38

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 1/9] dt-bindings: display: renesas,du: Document r8a774e1 bindings

Hi Laurent,

On Thu, Aug 13, 2020 at 11:59 AM Laurent Pinchart
<[email protected]> 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 <[email protected]>
> > > >
> > > > Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
> > > >
> > > > Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> > > > Signed-off-by: Lad Prabhakar <[email protected]>
> > > > ---
> > > > 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 <[email protected]>
>
> --
> Regards,
>
> Laurent Pinchart

2020-08-13 11:13:43

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 1/9] dt-bindings: display: renesas,du: Document r8a774e1 bindings

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 <[email protected]>
> >>>>
> >>>> Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
> >>>>
> >>>> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> >>>> Signed-off-by: Lad Prabhakar <[email protected]>
> >>>> ---
> >>>> 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 <[email protected]>

--
Regards,

Laurent Pinchart

2020-08-13 11:25:15

by Lad, Prabhakar

[permalink] [raw]
Subject: Re: [PATCH 1/9] dt-bindings: display: renesas,du: Document r8a774e1 bindings

Hi Laurent,

On Thu, Aug 13, 2020 at 12:11 PM Laurent Pinchart
<[email protected]> 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 <[email protected]>
> > >>>>
> > >>>> Document the RZ/G2H (a.k.a. r8a774e1) SoC in the R-Car DU bindings.
> > >>>>
> > >>>> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> > >>>> Signed-off-by: Lad Prabhakar <[email protected]>
> > >>>> ---
> > >>>> 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

2020-08-13 12:59:16

by Laurent Pinchart

[permalink] [raw]
Subject: Re: [PATCH 9/9] arm64: dts: renesas: r8a774e1-hihope-rzg2h: Setup DU clocks

On Wed, Aug 12, 2020 at 07:36:54PM +0300, Laurent Pinchart wrote:
> Hi Prabhakar,
>
> Thank you for the patch.
>
> On Wed, Aug 12, 2020 at 03:02:17PM +0100, Lad Prabhakar wrote:
> > Setup up the required clocks for the DU to be functional.
> >
> > Signed-off-by: Lad Prabhakar <[email protected]>
> > ---
> > arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts | 11 +++++++++++
> > 1 file changed, 11 insertions(+)
> >
> > diff --git a/arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts b/arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts
> > index cdbe527e9340..12f9242e263b 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts
> > +++ b/arch/arm64/boot/dts/renesas/r8a774e1-hihope-rzg2h.dts
> > @@ -24,3 +24,14 @@
> > reg = <0x5 0x00000000 0x0 0x80000000>;
> > };
> > };
> > +
> > +&du {
> > + clocks = <&cpg CPG_MOD 724>,
> > + <&cpg CPG_MOD 723>,
> > + <&cpg CPG_MOD 721>,
> > + <&versaclock5 1>,
> > + <&x302_clk>,
> > + <&versaclock5 2>;
> > + clock-names = "du.0", "du.1", "du.3",
> > + "dclkin.0", "dclkin.1", "dclkin.3";
>
> I have no reason to doubt this is correct, but I also can't assess that
> as I don't have access to the schematics.
>
> Acked-by: Laurent Pinchart <[email protected]>

Upgrading to

Reviewed-by: Laurent Pinchart <[email protected]>

:-)

>
> > +};

--
Regards,

Laurent Pinchart

2020-08-24 23:21:15

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 4/9] dt-bindings: display: renesas, lvds: Document r8a774e1 bindings

On Wed, 12 Aug 2020 15:02:12 +0100, Lad Prabhakar wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Document the RZ/G2H (R8A774E1) LVDS bindings.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>
> ---
> .../devicetree/bindings/display/bridge/renesas,lvds.txt | 1 +
> 1 file changed, 1 insertion(+)
>

Acked-by: Rob Herring <[email protected]>

2020-08-24 23:23:46

by Rob Herring (Arm)

[permalink] [raw]
Subject: Re: [PATCH 5/9] dt-bindings: display: renesas, dw-hdmi: Add r8a774e1 support

On Wed, 12 Aug 2020 15:02:13 +0100, Lad Prabhakar wrote:
> From: Marian-Cristian Rotariu <[email protected]>
>
> Document RZ/G2H (R8A774E1) SoC bindings.
>
> Signed-off-by: Marian-Cristian Rotariu <[email protected]>
> Signed-off-by: Lad Prabhakar <[email protected]>
> ---
> .../devicetree/bindings/display/bridge/renesas,dw-hdmi.txt | 1 +
> 1 file changed, 1 insertion(+)
>

Acked-by: Rob Herring <[email protected]>