linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] r8a7742: Enable DU and LVDS
@ 2020-08-07 17:49 Lad Prabhakar
  2020-08-07 17:49 ` [PATCH 1/7] dt-bindings: display: renesas,du: Document the r8a7742 bindings Lad Prabhakar
                   ` (7 more replies)
  0 siblings, 8 replies; 32+ messages in thread
From: Lad Prabhakar @ 2020-08-07 17:49 UTC (permalink / raw)
  To: Geert Uytterhoeven, Laurent Pinchart, Kieran Bingham,
	David Airlie, Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	linux-renesas-soc
  Cc: linux-kernel, devicetree, Prabhakar, Lad Prabhakar

Hi All,

This patch series adds support for DU and LVDS to r8a7742
SoC and enables LCD support on r8a7742-iwg21d-q7 board.

This patch series applies on top of [1].

[1] https://git.kernel.org/pub/scm/linux/kernel/git/geert/
    renesas-devel.git/log/?h=renesas-arm-dt-for-v5.10

Cheers,
Prabhakar

Lad Prabhakar (7):
  dt-bindings: display: renesas,du: Document the r8a7742 bindings
  drm: rcar-du: Add r8a7742 support
  dt-bindings: display: renesas,lvds: Document r8a7742 bindings
  drm: rcar-du: lvds: Add r8a7742 support
  ARM: dts: r8a7742: Add DU support
  ARM: dts: r8a7742: Add LVDS support
  ARM: dts: r8a7742-iwg21d-q7: Add LCD support

 .../bindings/display/bridge/renesas,lvds.txt  |  1 +
 .../bindings/display/renesas,du.txt           |  2 +
 arch/arm/boot/dts/r8a7742-iwg21d-q7.dts       | 84 +++++++++++++++++
 arch/arm/boot/dts/r8a7742.dtsi                | 89 +++++++++++++++++++
 drivers/gpu/drm/rcar-du/rcar_du_drv.c         |  5 +-
 drivers/gpu/drm/rcar-du/rcar_lvds.c           |  1 +
 6 files changed, 180 insertions(+), 2 deletions(-)

-- 
2.17.1


^ permalink raw reply	[flat|nested] 32+ messages in thread

* [PATCH 1/7] dt-bindings: display: renesas,du: Document the r8a7742 bindings
  2020-08-07 17:49 [PATCH 0/7] r8a7742: Enable DU and LVDS Lad Prabhakar
@ 2020-08-07 17:49 ` Lad Prabhakar
  2020-08-08 20:59   ` Laurent Pinchart
  2020-08-24 22:20   ` [PATCH 1/7] dt-bindings: display: renesas, du: " Rob Herring
  2020-08-07 17:49 ` [PATCH 2/7] drm: rcar-du: Add r8a7742 support Lad Prabhakar
                   ` (6 subsequent siblings)
  7 siblings, 2 replies; 32+ messages in thread
From: Lad Prabhakar @ 2020-08-07 17:49 UTC (permalink / raw)
  To: Geert Uytterhoeven, Laurent Pinchart, Kieran Bingham,
	David Airlie, Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	linux-renesas-soc
  Cc: linux-kernel, devicetree, Prabhakar, Lad Prabhakar

Document the RZ/G1H (R8A7742) SoC in the R-Car DU bindings.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@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..3f1e3ca4bea9 100644
--- a/Documentation/devicetree/bindings/display/renesas,du.txt
+++ b/Documentation/devicetree/bindings/display/renesas,du.txt
@@ -3,6 +3,7 @@
 Required Properties:
 
   - compatible: must be one of the following.
+    - "renesas,du-r8a7742" for R8A7742 (RZ/G1H) compatible DU
     - "renesas,du-r8a7743" for R8A7743 (RZ/G1M) compatible DU
     - "renesas,du-r8a7744" for R8A7744 (RZ/G1N) compatible DU
     - "renesas,du-r8a7745" for R8A7745 (RZ/G1E) compatible DU
@@ -68,6 +69,7 @@ corresponding to each DU output.
 
                         Port0          Port1          Port2          Port3
 -----------------------------------------------------------------------------
+ R8A7742 (RZ/G1H)       DPAD 0         LVDS 0         LVDS 1         -
  R8A7743 (RZ/G1M)       DPAD 0         LVDS 0         -              -
  R8A7744 (RZ/G1N)       DPAD 0         LVDS 0         -              -
  R8A7745 (RZ/G1E)       DPAD 0         DPAD 1         -              -
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 2/7] drm: rcar-du: Add r8a7742 support
  2020-08-07 17:49 [PATCH 0/7] r8a7742: Enable DU and LVDS Lad Prabhakar
  2020-08-07 17:49 ` [PATCH 1/7] dt-bindings: display: renesas,du: Document the r8a7742 bindings Lad Prabhakar
@ 2020-08-07 17:49 ` Lad Prabhakar
  2020-08-08 21:02   ` Laurent Pinchart
  2020-08-07 17:49 ` [PATCH 3/7] dt-bindings: display: renesas,lvds: Document r8a7742 bindings Lad Prabhakar
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 32+ messages in thread
From: Lad Prabhakar @ 2020-08-07 17:49 UTC (permalink / raw)
  To: Geert Uytterhoeven, Laurent Pinchart, Kieran Bingham,
	David Airlie, Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	linux-renesas-soc
  Cc: linux-kernel, devicetree, Prabhakar, Lad Prabhakar

Add direct support for the r8a7742 (RZ/G1H).

The RZ/G1H shares a common, compatible configuration with the r8a7790
(R-Car H2) so that device info structure is reused, the only difference
being TCON is unsupported on RZ/G1H (Currently unsupported by the driver).

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
---
 drivers/gpu/drm/rcar-du/rcar_du_drv.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
index 3e67cf70f040..7e286c7a7a6c 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
@@ -216,8 +216,8 @@ static const struct rcar_du_device_info rcar_du_r8a7790_info = {
 	.channels_mask = BIT(2) | BIT(1) | BIT(0),
 	.routes = {
 		/*
-		 * R8A7790 has one RGB output, two LVDS outputs and one
-		 * (currently unsupported) TCON output.
+		 * R8A7742 and R8A7790 each have one RGB output and two LVDS outputs. Additionally
+		 * R8A7790 supports one TCON output (currently unsupported by the driver).
 		 */
 		[RCAR_DU_OUTPUT_DPAD0] = {
 			.possible_crtcs = BIT(2) | BIT(1) | BIT(0),
@@ -443,6 +443,7 @@ static const struct rcar_du_device_info rcar_du_r8a7799x_info = {
 };
 
 static const struct of_device_id rcar_du_of_table[] = {
+	{ .compatible = "renesas,du-r8a7742", .data = &rcar_du_r8a7790_info },
 	{ .compatible = "renesas,du-r8a7743", .data = &rzg1_du_r8a7743_info },
 	{ .compatible = "renesas,du-r8a7744", .data = &rzg1_du_r8a7743_info },
 	{ .compatible = "renesas,du-r8a7745", .data = &rzg1_du_r8a7745_info },
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 3/7] dt-bindings: display: renesas,lvds: Document r8a7742 bindings
  2020-08-07 17:49 [PATCH 0/7] r8a7742: Enable DU and LVDS Lad Prabhakar
  2020-08-07 17:49 ` [PATCH 1/7] dt-bindings: display: renesas,du: Document the r8a7742 bindings Lad Prabhakar
  2020-08-07 17:49 ` [PATCH 2/7] drm: rcar-du: Add r8a7742 support Lad Prabhakar
@ 2020-08-07 17:49 ` Lad Prabhakar
  2020-08-08 21:03   ` Laurent Pinchart
  2020-08-24 22:20   ` [PATCH 3/7] dt-bindings: display: renesas, lvds: " Rob Herring
  2020-08-07 17:49 ` [PATCH 4/7] drm: rcar-du: lvds: Add r8a7742 support Lad Prabhakar
                   ` (4 subsequent siblings)
  7 siblings, 2 replies; 32+ messages in thread
From: Lad Prabhakar @ 2020-08-07 17:49 UTC (permalink / raw)
  To: Geert Uytterhoeven, Laurent Pinchart, Kieran Bingham,
	David Airlie, Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	linux-renesas-soc
  Cc: linux-kernel, devicetree, Prabhakar, Lad Prabhakar

Document the RZ/G1H (R8A7742) LVDS bindings.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
---
 .../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..40aa809f41cd 100644
--- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
+++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
@@ -7,6 +7,7 @@ Gen2, R-Car Gen3 and RZ/G SoCs.
 Required properties:
 
 - compatible : Shall contain one of
+  - "renesas,r8a7742-lvds" for R8A7742 (RZ/G1H) compatible LVDS encoders
   - "renesas,r8a7743-lvds" for R8A7743 (RZ/G1M) compatible LVDS encoders
   - "renesas,r8a7744-lvds" for R8A7744 (RZ/G1N) compatible LVDS encoders
   - "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 4/7] drm: rcar-du: lvds: Add r8a7742 support
  2020-08-07 17:49 [PATCH 0/7] r8a7742: Enable DU and LVDS Lad Prabhakar
                   ` (2 preceding siblings ...)
  2020-08-07 17:49 ` [PATCH 3/7] dt-bindings: display: renesas,lvds: Document r8a7742 bindings Lad Prabhakar
@ 2020-08-07 17:49 ` Lad Prabhakar
  2020-08-08 21:06   ` Laurent Pinchart
  2020-08-07 17:49 ` [PATCH 5/7] ARM: dts: r8a7742: Add DU support Lad Prabhakar
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 32+ messages in thread
From: Lad Prabhakar @ 2020-08-07 17:49 UTC (permalink / raw)
  To: Geert Uytterhoeven, Laurent Pinchart, Kieran Bingham,
	David Airlie, Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	linux-renesas-soc
  Cc: linux-kernel, devicetree, Prabhakar, Lad Prabhakar

The LVDS encoders on RZ/G1H SoC is identical to the R-Car Gen2 family. Add
support for RZ/G1H (R8A7742) SoC to the LVDS encoder driver.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
---
 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..34b833cc05be 100644
--- a/drivers/gpu/drm/rcar-du/rcar_lvds.c
+++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c
@@ -982,6 +982,7 @@ static const struct rcar_lvds_device_info rcar_lvds_r8a77995_info = {
 };
 
 static const struct of_device_id rcar_lvds_of_table[] = {
+	{ .compatible = "renesas,r8a7742-lvds", .data = &rcar_lvds_gen2_info },
 	{ .compatible = "renesas,r8a7743-lvds", .data = &rcar_lvds_gen2_info },
 	{ .compatible = "renesas,r8a7744-lvds", .data = &rcar_lvds_gen2_info },
 	{ .compatible = "renesas,r8a774a1-lvds", .data = &rcar_lvds_gen3_info },
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 5/7] ARM: dts: r8a7742: Add DU support
  2020-08-07 17:49 [PATCH 0/7] r8a7742: Enable DU and LVDS Lad Prabhakar
                   ` (3 preceding siblings ...)
  2020-08-07 17:49 ` [PATCH 4/7] drm: rcar-du: lvds: Add r8a7742 support Lad Prabhakar
@ 2020-08-07 17:49 ` Lad Prabhakar
  2020-08-07 19:48   ` Sergei Shtylyov
  2020-08-08 21:15   ` Laurent Pinchart
  2020-08-07 17:49 ` [PATCH 6/7] ARM: dts: r8a7742: Add LVDS support Lad Prabhakar
                   ` (2 subsequent siblings)
  7 siblings, 2 replies; 32+ messages in thread
From: Lad Prabhakar @ 2020-08-07 17:49 UTC (permalink / raw)
  To: Geert Uytterhoeven, Laurent Pinchart, Kieran Bingham,
	David Airlie, Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	linux-renesas-soc
  Cc: linux-kernel, devicetree, Prabhakar, Lad Prabhakar

Add du node to r8a7742 SoC DT. Boards that want to enable the DU
need to specify the output topology.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
---
 arch/arm/boot/dts/r8a7742.dtsi | 35 ++++++++++++++++++++++++++++++++++
 1 file changed, 35 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/boot/dts/r8a7742.dtsi
index 4a8d27dff9f7..a979a4b3de61 100644
--- a/arch/arm/boot/dts/r8a7742.dtsi
+++ b/arch/arm/boot/dts/r8a7742.dtsi
@@ -1509,6 +1509,41 @@
 			resets = <&cpg 408>;
 		};
 
+		du: display@feb00000 {
+			compatible = "renesas,du-r8a7742";
+			reg = <0 0xfeb00000 0 0x70000>;
+			interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
+				 <&cpg CPG_MOD 722>;
+			clock-names = "du.0", "du.1", "du.2";
+			resets = <&cpg 724>;
+			reset-names = "du.0";
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+					du_out_rgb: endpoint {
+					};
+				};
+				port@1 {
+					reg = <1>;
+					du_out_lvds0: endpoint {
+					};
+				};
+				port@2 {
+					reg = <2>;
+					du_out_lvds1: endpoint {
+					};
+				};
+			};
+		};
+
 		prr: chipid@ff000044 {
 			compatible = "renesas,prr";
 			reg = <0 0xff000044 0 4>;
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 6/7] ARM: dts: r8a7742: Add LVDS support
  2020-08-07 17:49 [PATCH 0/7] r8a7742: Enable DU and LVDS Lad Prabhakar
                   ` (4 preceding siblings ...)
  2020-08-07 17:49 ` [PATCH 5/7] ARM: dts: r8a7742: Add DU support Lad Prabhakar
@ 2020-08-07 17:49 ` Lad Prabhakar
  2020-08-08 21:13   ` Laurent Pinchart
  2020-08-07 17:49 ` [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support Lad Prabhakar
  2020-08-08 20:55 ` [PATCH 0/7] r8a7742: Enable DU and LVDS Laurent Pinchart
  7 siblings, 1 reply; 32+ messages in thread
From: Lad Prabhakar @ 2020-08-07 17:49 UTC (permalink / raw)
  To: Geert Uytterhoeven, Laurent Pinchart, Kieran Bingham,
	David Airlie, Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	linux-renesas-soc
  Cc: linux-kernel, devicetree, Prabhakar, Lad Prabhakar

Add LVDS encoder node to r8a7742 SoC DT.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
---
 arch/arm/boot/dts/r8a7742.dtsi | 54 ++++++++++++++++++++++++++++++++++
 1 file changed, 54 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/boot/dts/r8a7742.dtsi
index a979a4b3de61..a7e66220d63a 100644
--- a/arch/arm/boot/dts/r8a7742.dtsi
+++ b/arch/arm/boot/dts/r8a7742.dtsi
@@ -1534,11 +1534,65 @@
 				port@1 {
 					reg = <1>;
 					du_out_lvds0: endpoint {
+						remote-endpoint = <&lvds0_in>;
 					};
 				};
 				port@2 {
 					reg = <2>;
 					du_out_lvds1: endpoint {
+						remote-endpoint = <&lvds1_in>;
+					};
+				};
+			};
+		};
+
+		lvds0: lvds@feb90000 {
+			compatible = "renesas,r8a7742-lvds";
+			reg = <0 0xfeb90000 0 0x1c>;
+			clocks = <&cpg CPG_MOD 726>;
+			power-domains = <&sysc R8A7742_PD_ALWAYS_ON>;
+			resets = <&cpg 726>;
+			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 {
+					};
+				};
+			};
+		};
+
+		lvds1: lvds@feb94000 {
+			compatible = "renesas,r8a7742-lvds";
+			reg = <0 0xfeb94000 0 0x1c>;
+			clocks = <&cpg CPG_MOD 725>;
+			power-domains = <&sysc R8A7742_PD_ALWAYS_ON>;
+			resets = <&cpg 725>;
+			status = "disabled";
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port@0 {
+					reg = <0>;
+					lvds1_in: endpoint {
+						remote-endpoint = <&du_out_lvds1>;
+					};
+				};
+				port@1 {
+					reg = <1>;
+					lvds1_out: endpoint {
 					};
 				};
 			};
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support
  2020-08-07 17:49 [PATCH 0/7] r8a7742: Enable DU and LVDS Lad Prabhakar
                   ` (5 preceding siblings ...)
  2020-08-07 17:49 ` [PATCH 6/7] ARM: dts: r8a7742: Add LVDS support Lad Prabhakar
@ 2020-08-07 17:49 ` Lad Prabhakar
  2020-08-08 21:22   ` Laurent Pinchart
  2020-08-11 11:26   ` Laurent Pinchart
  2020-08-08 20:55 ` [PATCH 0/7] r8a7742: Enable DU and LVDS Laurent Pinchart
  7 siblings, 2 replies; 32+ messages in thread
From: Lad Prabhakar @ 2020-08-07 17:49 UTC (permalink / raw)
  To: Geert Uytterhoeven, Laurent Pinchart, Kieran Bingham,
	David Airlie, Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	linux-renesas-soc
  Cc: linux-kernel, devicetree, Prabhakar, Lad Prabhakar

The iwg21d comes with a 7" capacitive touch screen, therefore
add support for it.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
---
 arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 84 +++++++++++++++++++++++++
 1 file changed, 84 insertions(+)

diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
index b3461a61a4bf..cf59fd61e422 100644
--- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
+++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
@@ -30,6 +30,7 @@
 
 /dts-v1/;
 #include "r8a7742-iwg21m.dtsi"
+#include <dt-bindings/pwm/pwm.h>
 
 / {
 	model = "iWave Systems RainboW-G21D-Qseven board based on RZ/G1H";
@@ -52,6 +53,50 @@
 		clock-frequency = <26000000>;
 	};
 
+	lcd_backlight: backlight {
+		compatible = "pwm-backlight";
+		pwms = <&tpu 2 5000000 0>;
+		brightness-levels = <0 4 8 16 32 64 128 255>;
+		pinctrl-0 = <&backlight_pins>;
+		pinctrl-names = "default";
+		default-brightness-level = <7>;
+		enable-gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>;
+	};
+
+	lvds-receiver {
+		compatible = "ti,ds90cf384a", "lvds-decoder";
+		powerdown-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;
+
+		ports {
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			port@0 {
+				reg = <0>;
+				lvds_receiver_in: endpoint {
+					remote-endpoint = <&lvds0_out>;
+				};
+			};
+			port@1 {
+				reg = <1>;
+				lvds_receiver_out: endpoint {
+					remote-endpoint = <&panel_in>;
+				};
+			};
+		};
+	};
+
+	panel {
+		compatible = "edt,etm0700g0dh6";
+		backlight = <&lcd_backlight>;
+
+		port {
+			panel_in: endpoint {
+				remote-endpoint = <&lvds_receiver_out>;
+			};
+		};
+	};
+
 	reg_1p5v: 1p5v {
 		compatible = "regulator-fixed";
 		regulator-name = "1P5V";
@@ -129,12 +174,31 @@
 		VDDIO-supply = <&reg_3p3v>;
 		VDDD-supply = <&reg_1p5v>;
 	};
+
+	touch: touchpanel@38 {
+		compatible = "edt,edt-ft5406";
+		reg = <0x38>;
+		interrupt-parent = <&gpio0>;
+		interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
+	};
 };
 
 &cmt0 {
 	status = "okay";
 };
 
+&du {
+	status = "okay";
+};
+
+&gpio0 {
+	touch-interrupt {
+		gpio-hog;
+		gpios = <24 GPIO_ACTIVE_LOW>;
+		input;
+	};
+};
+
 &hsusb {
 	pinctrl-0 = <&usb0_pins>;
 	pinctrl-names = "default";
@@ -165,6 +229,11 @@
 		function = "avb";
 	};
 
+	backlight_pins: backlight {
+		groups = "tpu0_to2";
+		function = "tpu0";
+	};
+
 	i2c2_pins: i2c2 {
 		groups = "i2c2_b";
 		function = "i2c2";
@@ -208,6 +277,17 @@
 	};
 };
 
+&lvds0 {
+	status = "okay";
+	ports {
+		port@1 {
+			lvds0_out: endpoint {
+				remote-endpoint = <&lvds_receiver_in>;
+			};
+		};
+	};
+};
+
 &rcar_sound {
 	pinctrl-0 = <&sound_pins>;
 	pinctrl-names = "default";
@@ -261,6 +341,10 @@
 	shared-pin;
 };
 
+&tpu {
+	status = "okay";
+};
+
 &usbphy {
 	status = "okay";
 };
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 32+ messages in thread

* Re: [PATCH 5/7] ARM: dts: r8a7742: Add DU support
  2020-08-07 17:49 ` [PATCH 5/7] ARM: dts: r8a7742: Add DU support Lad Prabhakar
@ 2020-08-07 19:48   ` Sergei Shtylyov
  2020-08-07 20:22     ` Lad, Prabhakar
  2020-08-08 21:15   ` Laurent Pinchart
  1 sibling, 1 reply; 32+ messages in thread
From: Sergei Shtylyov @ 2020-08-07 19:48 UTC (permalink / raw)
  To: Lad Prabhakar, Geert Uytterhoeven, Laurent Pinchart,
	Kieran Bingham, David Airlie, Rob Herring, Magnus Damm,
	Daniel Vetter, dri-devel, linux-renesas-soc
  Cc: linux-kernel, devicetree, Prabhakar

Hello!

On 8/7/20 8:49 PM, Lad Prabhakar wrote:

> Add du node to r8a7742 SoC DT. Boards that want to enable the DU

  Both "du" and "DU" on a single line? :-)

> need to specify the output topology.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
[...]

MBR, Sergei

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 5/7] ARM: dts: r8a7742: Add DU support
  2020-08-07 19:48   ` Sergei Shtylyov
@ 2020-08-07 20:22     ` Lad, Prabhakar
  2020-08-10  8:53       ` Geert Uytterhoeven
  0 siblings, 1 reply; 32+ messages in thread
From: Lad, Prabhakar @ 2020-08-07 20:22 UTC (permalink / raw)
  To: Sergei Shtylyov
  Cc: Lad Prabhakar, Geert Uytterhoeven, Laurent Pinchart,
	Kieran Bingham, David Airlie, Rob Herring, Magnus Damm,
	Daniel Vetter, dri-devel, Linux-Renesas, LKML,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Sergei,

Thank you for the review.

On Fri, Aug 7, 2020 at 8:48 PM Sergei Shtylyov
<sergei.shtylyov@gmail.com> wrote:
>
> Hello!
>
> On 8/7/20 8:49 PM, Lad Prabhakar wrote:
>
> > Add du node to r8a7742 SoC DT. Boards that want to enable the DU
>
>   Both "du" and "DU" on a single line? :-)
>
Argh my bad.

Cheers,
Prabhakar

> > need to specify the output topology.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> [...]
>
> MBR, Sergei

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 0/7] r8a7742: Enable DU and LVDS
  2020-08-07 17:49 [PATCH 0/7] r8a7742: Enable DU and LVDS Lad Prabhakar
                   ` (6 preceding siblings ...)
  2020-08-07 17:49 ` [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support Lad Prabhakar
@ 2020-08-08 20:55 ` Laurent Pinchart
  2020-08-09 21:43   ` Lad, Prabhakar
  7 siblings, 1 reply; 32+ messages in thread
From: Laurent Pinchart @ 2020-08-08 20:55 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Geert Uytterhoeven, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, dri-devel, linux-renesas-soc,
	linux-kernel, devicetree, Prabhakar

Hi Prabhakar,

Thank you for the patches.

On Fri, Aug 07, 2020 at 06:49:47PM +0100, Lad Prabhakar wrote:
> Hi All,
> 
> This patch series adds support for DU and LVDS to r8a7742
> SoC and enables LCD support on r8a7742-iwg21d-q7 board.
> 
> This patch series applies on top of [1].
> 
> [1] https://git.kernel.org/pub/scm/linux/kernel/git/geert/
>     renesas-devel.git/log/?h=renesas-arm-dt-for-v5.10

The driver changes will need to go through the DRM/KMS tree, and I'd
recommend the DT binding changes to go the same route as well. I can
handle the rebase when applying, and once the bindings get accept, you
can ask Geert to upstream the last 3 patchs. Would that work for you ?

> Lad Prabhakar (7):
>   dt-bindings: display: renesas,du: Document the r8a7742 bindings
>   drm: rcar-du: Add r8a7742 support
>   dt-bindings: display: renesas,lvds: Document r8a7742 bindings
>   drm: rcar-du: lvds: Add r8a7742 support
>   ARM: dts: r8a7742: Add DU support
>   ARM: dts: r8a7742: Add LVDS support
>   ARM: dts: r8a7742-iwg21d-q7: Add LCD support
> 
>  .../bindings/display/bridge/renesas,lvds.txt  |  1 +
>  .../bindings/display/renesas,du.txt           |  2 +
>  arch/arm/boot/dts/r8a7742-iwg21d-q7.dts       | 84 +++++++++++++++++
>  arch/arm/boot/dts/r8a7742.dtsi                | 89 +++++++++++++++++++
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c         |  5 +-
>  drivers/gpu/drm/rcar-du/rcar_lvds.c           |  1 +
>  6 files changed, 180 insertions(+), 2 deletions(-)

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 1/7] dt-bindings: display: renesas,du: Document the r8a7742 bindings
  2020-08-07 17:49 ` [PATCH 1/7] dt-bindings: display: renesas,du: Document the r8a7742 bindings Lad Prabhakar
@ 2020-08-08 20:59   ` Laurent Pinchart
  2020-08-24 22:20   ` [PATCH 1/7] dt-bindings: display: renesas, du: " Rob Herring
  1 sibling, 0 replies; 32+ messages in thread
From: Laurent Pinchart @ 2020-08-08 20:59 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Geert Uytterhoeven, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, dri-devel, linux-renesas-soc,
	linux-kernel, devicetree, Prabhakar

Hi Prabhakar,

Thank you for the patch.

On Fri, Aug 07, 2020 at 06:49:48PM +0100, Lad Prabhakar wrote:
> Document the RZ/G1H (R8A7742) SoC in the R-Car DU bindings.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@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..3f1e3ca4bea9 100644
> --- a/Documentation/devicetree/bindings/display/renesas,du.txt
> +++ b/Documentation/devicetree/bindings/display/renesas,du.txt
> @@ -3,6 +3,7 @@
>  Required Properties:
>  
>    - compatible: must be one of the following.
> +    - "renesas,du-r8a7742" for R8A7742 (RZ/G1H) compatible DU
>      - "renesas,du-r8a7743" for R8A7743 (RZ/G1M) compatible DU
>      - "renesas,du-r8a7744" for R8A7744 (RZ/G1N) compatible DU
>      - "renesas,du-r8a7745" for R8A7745 (RZ/G1E) compatible DU
> @@ -68,6 +69,7 @@ corresponding to each DU output.
>  
>                          Port0          Port1          Port2          Port3
>  -----------------------------------------------------------------------------
> + R8A7742 (RZ/G1H)       DPAD 0         LVDS 0         LVDS 1         -
>   R8A7743 (RZ/G1M)       DPAD 0         LVDS 0         -              -
>   R8A7744 (RZ/G1N)       DPAD 0         LVDS 0         -              -
>   R8A7745 (RZ/G1E)       DPAD 0         DPAD 1         -              -

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 2/7] drm: rcar-du: Add r8a7742 support
  2020-08-07 17:49 ` [PATCH 2/7] drm: rcar-du: Add r8a7742 support Lad Prabhakar
@ 2020-08-08 21:02   ` Laurent Pinchart
  2020-08-09 20:38     ` Lad, Prabhakar
  0 siblings, 1 reply; 32+ messages in thread
From: Laurent Pinchart @ 2020-08-08 21:02 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Geert Uytterhoeven, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, dri-devel, linux-renesas-soc,
	linux-kernel, devicetree, Prabhakar

Hi Prabhakar,

Thank you for the patch.

On Fri, Aug 07, 2020 at 06:49:49PM +0100, Lad Prabhakar wrote:
> Add direct support for the r8a7742 (RZ/G1H).
> 
> The RZ/G1H shares a common, compatible configuration with the r8a7790
> (R-Car H2) so that device info structure is reused, the only difference
> being TCON is unsupported on RZ/G1H (Currently unsupported by the driver).
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> ---
>  drivers/gpu/drm/rcar-du/rcar_du_drv.c | 5 +++--
>  1 file changed, 3 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> index 3e67cf70f040..7e286c7a7a6c 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> @@ -216,8 +216,8 @@ static const struct rcar_du_device_info rcar_du_r8a7790_info = {
>  	.channels_mask = BIT(2) | BIT(1) | BIT(0),
>  	.routes = {
>  		/*
> -		 * R8A7790 has one RGB output, two LVDS outputs and one
> -		 * (currently unsupported) TCON output.
> +		 * R8A7742 and R8A7790 each have one RGB output and two LVDS outputs. Additionally
> +		 * R8A7790 supports one TCON output (currently unsupported by the driver).

Once we support TCON we'll have to split this, but for now I suppose
it's fine. Would you however mind wrapping this to 80 columns ? I can do
so when applying if it's fine with you.

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

>  		 */
>  		[RCAR_DU_OUTPUT_DPAD0] = {
>  			.possible_crtcs = BIT(2) | BIT(1) | BIT(0),
> @@ -443,6 +443,7 @@ static const struct rcar_du_device_info rcar_du_r8a7799x_info = {
>  };
>  
>  static const struct of_device_id rcar_du_of_table[] = {
> +	{ .compatible = "renesas,du-r8a7742", .data = &rcar_du_r8a7790_info },
>  	{ .compatible = "renesas,du-r8a7743", .data = &rzg1_du_r8a7743_info },
>  	{ .compatible = "renesas,du-r8a7744", .data = &rzg1_du_r8a7743_info },
>  	{ .compatible = "renesas,du-r8a7745", .data = &rzg1_du_r8a7745_info },

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 3/7] dt-bindings: display: renesas,lvds: Document r8a7742 bindings
  2020-08-07 17:49 ` [PATCH 3/7] dt-bindings: display: renesas,lvds: Document r8a7742 bindings Lad Prabhakar
@ 2020-08-08 21:03   ` Laurent Pinchart
  2020-08-08 21:05     ` Laurent Pinchart
  2020-08-24 22:20   ` [PATCH 3/7] dt-bindings: display: renesas, lvds: " Rob Herring
  1 sibling, 1 reply; 32+ messages in thread
From: Laurent Pinchart @ 2020-08-08 21:03 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Geert Uytterhoeven, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, dri-devel, linux-renesas-soc,
	linux-kernel, devicetree, Prabhakar

Hi Prabhakar,

Thank you for the patch.

On Fri, Aug 07, 2020 at 06:49:50PM +0100, Lad Prabhakar wrote:
> Document the RZ/G1H (R8A7742) LVDS bindings.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>

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

> ---
>  .../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..40aa809f41cd 100644
> --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> @@ -7,6 +7,7 @@ Gen2, R-Car Gen3 and RZ/G SoCs.
>  Required properties:
>  
>  - compatible : Shall contain one of
> +  - "renesas,r8a7742-lvds" for R8A7742 (RZ/G1H) compatible LVDS encoders
>    - "renesas,r8a7743-lvds" for R8A7743 (RZ/G1M) compatible LVDS encoders
>    - "renesas,r8a7744-lvds" for R8A7744 (RZ/G1N) compatible LVDS encoders
>    - "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 3/7] dt-bindings: display: renesas,lvds: Document r8a7742 bindings
  2020-08-08 21:03   ` Laurent Pinchart
@ 2020-08-08 21:05     ` Laurent Pinchart
  2020-08-09 21:10       ` Lad, Prabhakar
  0 siblings, 1 reply; 32+ messages in thread
From: Laurent Pinchart @ 2020-08-08 21:05 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Geert Uytterhoeven, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, dri-devel, linux-renesas-soc,
	linux-kernel, devicetree, Prabhakar

On Sun, Aug 09, 2020 at 12:03:27AM +0300, Laurent Pinchart wrote:
> Hi Prabhakar,
> 
> Thank you for the patch.
> 
> On Fri, Aug 07, 2020 at 06:49:50PM +0100, Lad Prabhakar wrote:
> > Document the RZ/G1H (R8A7742) LVDS bindings.
> > 
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> 
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

I actually spoke too soon, this binding has been concerted to YAML in
drm-next. I can fix this when applying, no need to resubmit just for
this.

> > ---
> >  .../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..40aa809f41cd 100644
> > --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > @@ -7,6 +7,7 @@ Gen2, R-Car Gen3 and RZ/G SoCs.
> >  Required properties:
> >  
> >  - compatible : Shall contain one of
> > +  - "renesas,r8a7742-lvds" for R8A7742 (RZ/G1H) compatible LVDS encoders
> >    - "renesas,r8a7743-lvds" for R8A7743 (RZ/G1M) compatible LVDS encoders
> >    - "renesas,r8a7744-lvds" for R8A7744 (RZ/G1N) compatible LVDS encoders
> >    - "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 4/7] drm: rcar-du: lvds: Add r8a7742 support
  2020-08-07 17:49 ` [PATCH 4/7] drm: rcar-du: lvds: Add r8a7742 support Lad Prabhakar
@ 2020-08-08 21:06   ` Laurent Pinchart
  0 siblings, 0 replies; 32+ messages in thread
From: Laurent Pinchart @ 2020-08-08 21:06 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Geert Uytterhoeven, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, dri-devel, linux-renesas-soc,
	linux-kernel, devicetree, Prabhakar

Hi Prabhakar,

Thank you for the patch.

On Fri, Aug 07, 2020 at 06:49:51PM +0100, Lad Prabhakar wrote:
> The LVDS encoders on RZ/G1H SoC is identical to the R-Car Gen2 family. Add
> support for RZ/G1H (R8A7742) SoC to the LVDS encoder driver.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>

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

> ---
>  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..34b833cc05be 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_lvds.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_lvds.c
> @@ -982,6 +982,7 @@ static const struct rcar_lvds_device_info rcar_lvds_r8a77995_info = {
>  };
>  
>  static const struct of_device_id rcar_lvds_of_table[] = {
> +	{ .compatible = "renesas,r8a7742-lvds", .data = &rcar_lvds_gen2_info },
>  	{ .compatible = "renesas,r8a7743-lvds", .data = &rcar_lvds_gen2_info },
>  	{ .compatible = "renesas,r8a7744-lvds", .data = &rcar_lvds_gen2_info },
>  	{ .compatible = "renesas,r8a774a1-lvds", .data = &rcar_lvds_gen3_info },

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 6/7] ARM: dts: r8a7742: Add LVDS support
  2020-08-07 17:49 ` [PATCH 6/7] ARM: dts: r8a7742: Add LVDS support Lad Prabhakar
@ 2020-08-08 21:13   ` Laurent Pinchart
  2020-08-09 21:29     ` Lad, Prabhakar
  0 siblings, 1 reply; 32+ messages in thread
From: Laurent Pinchart @ 2020-08-08 21:13 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Geert Uytterhoeven, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, dri-devel, linux-renesas-soc,
	linux-kernel, devicetree, Prabhakar

Hi Prabhakar,

Thank you for the patch.

On Fri, Aug 07, 2020 at 06:49:53PM +0100, Lad Prabhakar wrote:
> Add LVDS encoder node to r8a7742 SoC DT.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> ---
>  arch/arm/boot/dts/r8a7742.dtsi | 54 ++++++++++++++++++++++++++++++++++
>  1 file changed, 54 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/boot/dts/r8a7742.dtsi
> index a979a4b3de61..a7e66220d63a 100644
> --- a/arch/arm/boot/dts/r8a7742.dtsi
> +++ b/arch/arm/boot/dts/r8a7742.dtsi
> @@ -1534,11 +1534,65 @@
>  				port@1 {
>  					reg = <1>;
>  					du_out_lvds0: endpoint {
> +						remote-endpoint = <&lvds0_in>;
>  					};
>  				};
>  				port@2 {
>  					reg = <2>;
>  					du_out_lvds1: endpoint {
> +						remote-endpoint = <&lvds1_in>;
> +					};
> +				};
> +			};
> +		};
> +
> +		lvds0: lvds@feb90000 {
> +			compatible = "renesas,r8a7742-lvds";
> +			reg = <0 0xfeb90000 0 0x1c>;

Isn't 0x14 enough for the size ? 0x1c won't hurt though. Same comment
below.

With or without this addressed,

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

> +			clocks = <&cpg CPG_MOD 726>;
> +			power-domains = <&sysc R8A7742_PD_ALWAYS_ON>;
> +			resets = <&cpg 726>;
> +			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 {
> +					};
> +				};
> +			};
> +		};
> +
> +		lvds1: lvds@feb94000 {
> +			compatible = "renesas,r8a7742-lvds";
> +			reg = <0 0xfeb94000 0 0x1c>;
> +			clocks = <&cpg CPG_MOD 725>;
> +			power-domains = <&sysc R8A7742_PD_ALWAYS_ON>;
> +			resets = <&cpg 725>;
> +			status = "disabled";
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +					lvds1_in: endpoint {
> +						remote-endpoint = <&du_out_lvds1>;
> +					};
> +				};
> +				port@1 {
> +					reg = <1>;
> +					lvds1_out: endpoint {
>  					};
>  				};
>  			};

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 5/7] ARM: dts: r8a7742: Add DU support
  2020-08-07 17:49 ` [PATCH 5/7] ARM: dts: r8a7742: Add DU support Lad Prabhakar
  2020-08-07 19:48   ` Sergei Shtylyov
@ 2020-08-08 21:15   ` Laurent Pinchart
  1 sibling, 0 replies; 32+ messages in thread
From: Laurent Pinchart @ 2020-08-08 21:15 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Geert Uytterhoeven, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, dri-devel, linux-renesas-soc,
	linux-kernel, devicetree, Prabhakar

Hi Prabhakar,

Thank you for the patch.

On Fri, Aug 07, 2020 at 06:49:52PM +0100, Lad Prabhakar wrote:
> Add du node to r8a7742 SoC DT. Boards that want to enable the DU
> need to specify the output topology.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>

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

> ---
>  arch/arm/boot/dts/r8a7742.dtsi | 35 ++++++++++++++++++++++++++++++++++
>  1 file changed, 35 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/boot/dts/r8a7742.dtsi
> index 4a8d27dff9f7..a979a4b3de61 100644
> --- a/arch/arm/boot/dts/r8a7742.dtsi
> +++ b/arch/arm/boot/dts/r8a7742.dtsi
> @@ -1509,6 +1509,41 @@
>  			resets = <&cpg 408>;
>  		};
>  
> +		du: display@feb00000 {
> +			compatible = "renesas,du-r8a7742";
> +			reg = <0 0xfeb00000 0 0x70000>;
> +			interrupts = <GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 268 IRQ_TYPE_LEVEL_HIGH>,
> +				     <GIC_SPI 269 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>,
> +				 <&cpg CPG_MOD 722>;
> +			clock-names = "du.0", "du.1", "du.2";
> +			resets = <&cpg 724>;
> +			reset-names = "du.0";
> +			status = "disabled";
> +
> +			ports {
> +				#address-cells = <1>;
> +				#size-cells = <0>;
> +
> +				port@0 {
> +					reg = <0>;
> +					du_out_rgb: endpoint {
> +					};
> +				};
> +				port@1 {
> +					reg = <1>;
> +					du_out_lvds0: endpoint {
> +					};
> +				};
> +				port@2 {
> +					reg = <2>;
> +					du_out_lvds1: endpoint {
> +					};
> +				};
> +			};
> +		};
> +
>  		prr: chipid@ff000044 {
>  			compatible = "renesas,prr";
>  			reg = <0 0xff000044 0 4>;

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support
  2020-08-07 17:49 ` [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support Lad Prabhakar
@ 2020-08-08 21:22   ` Laurent Pinchart
  2020-08-09 21:35     ` Lad, Prabhakar
  2020-08-11 11:26   ` Laurent Pinchart
  1 sibling, 1 reply; 32+ messages in thread
From: Laurent Pinchart @ 2020-08-08 21:22 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Geert Uytterhoeven, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, dri-devel, linux-renesas-soc,
	linux-kernel, devicetree, Prabhakar

Hi Prabhakar,

Thank you for the patch.

On Fri, Aug 07, 2020 at 06:49:54PM +0100, Lad Prabhakar wrote:
> The iwg21d comes with a 7" capacitive touch screen, therefore
> add support for it.

I can't review most of this properly as I don't have access to the
schematics. Is there a way to get it ?

> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> ---
>  arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 84 +++++++++++++++++++++++++
>  1 file changed, 84 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> index b3461a61a4bf..cf59fd61e422 100644
> --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> @@ -30,6 +30,7 @@
>  
>  /dts-v1/;
>  #include "r8a7742-iwg21m.dtsi"
> +#include <dt-bindings/pwm/pwm.h>
>  
>  / {
>  	model = "iWave Systems RainboW-G21D-Qseven board based on RZ/G1H";
> @@ -52,6 +53,50 @@
>  		clock-frequency = <26000000>;
>  	};
>  
> +	lcd_backlight: backlight {
> +		compatible = "pwm-backlight";
> +		pwms = <&tpu 2 5000000 0>;
> +		brightness-levels = <0 4 8 16 32 64 128 255>;
> +		pinctrl-0 = <&backlight_pins>;
> +		pinctrl-names = "default";
> +		default-brightness-level = <7>;
> +		enable-gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>;
> +	};
> +
> +	lvds-receiver {
> +		compatible = "ti,ds90cf384a", "lvds-decoder";
> +		powerdown-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;
> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +				lvds_receiver_in: endpoint {
> +					remote-endpoint = <&lvds0_out>;
> +				};
> +			};
> +			port@1 {
> +				reg = <1>;
> +				lvds_receiver_out: endpoint {
> +					remote-endpoint = <&panel_in>;
> +				};
> +			};
> +		};
> +	};
> +
> +	panel {
> +		compatible = "edt,etm0700g0dh6";
> +		backlight = <&lcd_backlight>;
> +
> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&lvds_receiver_out>;
> +			};
> +		};
> +	};
> +
>  	reg_1p5v: 1p5v {
>  		compatible = "regulator-fixed";
>  		regulator-name = "1P5V";
> @@ -129,12 +174,31 @@
>  		VDDIO-supply = <&reg_3p3v>;
>  		VDDD-supply = <&reg_1p5v>;
>  	};
> +
> +	touch: touchpanel@38 {
> +		compatible = "edt,edt-ft5406";
> +		reg = <0x38>;
> +		interrupt-parent = <&gpio0>;
> +		interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
> +	};
>  };
>  
>  &cmt0 {
>  	status = "okay";
>  };
>  
> +&du {
> +	status = "okay";
> +};
> +
> +&gpio0 {
> +	touch-interrupt {
> +		gpio-hog;
> +		gpios = <24 GPIO_ACTIVE_LOW>;
> +		input;

Is this required, won't requesting the interrupt be enough to configure
the pin properly ?

> +	};
> +};
> +
>  &hsusb {
>  	pinctrl-0 = <&usb0_pins>;
>  	pinctrl-names = "default";
> @@ -165,6 +229,11 @@
>  		function = "avb";
>  	};
>  
> +	backlight_pins: backlight {
> +		groups = "tpu0_to2";
> +		function = "tpu0";
> +	};
> +
>  	i2c2_pins: i2c2 {
>  		groups = "i2c2_b";
>  		function = "i2c2";
> @@ -208,6 +277,17 @@
>  	};
>  };
>  
> +&lvds0 {
> +	status = "okay";
> +	ports {
> +		port@1 {
> +			lvds0_out: endpoint {
> +				remote-endpoint = <&lvds_receiver_in>;
> +			};
> +		};
> +	};
> +};
> +
>  &rcar_sound {
>  	pinctrl-0 = <&sound_pins>;
>  	pinctrl-names = "default";
> @@ -261,6 +341,10 @@
>  	shared-pin;
>  };
>  
> +&tpu {
> +	status = "okay";
> +};
> +
>  &usbphy {
>  	status = "okay";
>  };

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 2/7] drm: rcar-du: Add r8a7742 support
  2020-08-08 21:02   ` Laurent Pinchart
@ 2020-08-09 20:38     ` Lad, Prabhakar
  2020-08-09 23:03       ` Laurent Pinchart
  0 siblings, 1 reply; 32+ messages in thread
From: Lad, Prabhakar @ 2020-08-09 20:38 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Lad Prabhakar, Geert Uytterhoeven, Kieran Bingham, David Airlie,
	Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	Linux-Renesas, LKML,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Laurent,

Thank you for the review.

On Sat, Aug 8, 2020 at 10:02 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Prabhakar,
>
> Thank you for the patch.
>
> On Fri, Aug 07, 2020 at 06:49:49PM +0100, Lad Prabhakar wrote:
> > Add direct support for the r8a7742 (RZ/G1H).
> >
> > The RZ/G1H shares a common, compatible configuration with the r8a7790
> > (R-Car H2) so that device info structure is reused, the only difference
> > being TCON is unsupported on RZ/G1H (Currently unsupported by the driver).
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > ---
> >  drivers/gpu/drm/rcar-du/rcar_du_drv.c | 5 +++--
> >  1 file changed, 3 insertions(+), 2 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> > index 3e67cf70f040..7e286c7a7a6c 100644
> > --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> > +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> > @@ -216,8 +216,8 @@ static const struct rcar_du_device_info rcar_du_r8a7790_info = {
> >       .channels_mask = BIT(2) | BIT(1) | BIT(0),
> >       .routes = {
> >               /*
> > -              * R8A7790 has one RGB output, two LVDS outputs and one
> > -              * (currently unsupported) TCON output.
> > +              * R8A7742 and R8A7790 each have one RGB output and two LVDS outputs. Additionally
> > +              * R8A7790 supports one TCON output (currently unsupported by the driver).
>
> Once we support TCON we'll have to split this, but for now I suppose
> it's fine. Would you however mind wrapping this to 80 columns ? I can do
> so when applying if it's fine with you.
>
Agreed once TCON is added this has to be split. But isn't  the column
size has been increased (checkpatch too doesn't complain about), but
feel free to wrapp it for 80 columns.

Cheers,
Prabhakar

> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> >                */
> >               [RCAR_DU_OUTPUT_DPAD0] = {
> >                       .possible_crtcs = BIT(2) | BIT(1) | BIT(0),
> > @@ -443,6 +443,7 @@ static const struct rcar_du_device_info rcar_du_r8a7799x_info = {
> >  };
> >
> >  static const struct of_device_id rcar_du_of_table[] = {
> > +     { .compatible = "renesas,du-r8a7742", .data = &rcar_du_r8a7790_info },
> >       { .compatible = "renesas,du-r8a7743", .data = &rzg1_du_r8a7743_info },
> >       { .compatible = "renesas,du-r8a7744", .data = &rzg1_du_r8a7743_info },
> >       { .compatible = "renesas,du-r8a7745", .data = &rzg1_du_r8a7745_info },
>
> --
> Regards,
>
> Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 3/7] dt-bindings: display: renesas,lvds: Document r8a7742 bindings
  2020-08-08 21:05     ` Laurent Pinchart
@ 2020-08-09 21:10       ` Lad, Prabhakar
  0 siblings, 0 replies; 32+ messages in thread
From: Lad, Prabhakar @ 2020-08-09 21:10 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Lad Prabhakar, Geert Uytterhoeven, Kieran Bingham, David Airlie,
	Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	Linux-Renesas, LKML,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Laurent,

Thank you for the review.

On Sat, Aug 8, 2020 at 10:05 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> On Sun, Aug 09, 2020 at 12:03:27AM +0300, Laurent Pinchart wrote:
> > Hi Prabhakar,
> >
> > Thank you for the patch.
> >
> > On Fri, Aug 07, 2020 at 06:49:50PM +0100, Lad Prabhakar wrote:
> > > Document the RZ/G1H (R8A7742) LVDS bindings.
> > >
> > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> >
> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> I actually spoke too soon, this binding has been concerted to YAML in
> drm-next. I can fix this when applying, no need to resubmit just for
> this.
>
Thank you for taking care of it.

Cheers,
Prabhakar

> > > ---
> > >  .../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..40aa809f41cd 100644
> > > --- a/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > > +++ b/Documentation/devicetree/bindings/display/bridge/renesas,lvds.txt
> > > @@ -7,6 +7,7 @@ Gen2, R-Car Gen3 and RZ/G SoCs.
> > >  Required properties:
> > >
> > >  - compatible : Shall contain one of
> > > +  - "renesas,r8a7742-lvds" for R8A7742 (RZ/G1H) compatible LVDS encoders
> > >    - "renesas,r8a7743-lvds" for R8A7743 (RZ/G1M) compatible LVDS encoders
> > >    - "renesas,r8a7744-lvds" for R8A7744 (RZ/G1N) compatible LVDS encoders
> > >    - "renesas,r8a774a1-lvds" for R8A774A1 (RZ/G2M) compatible LVDS encoders
>
> --
> Regards,
>
> Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 6/7] ARM: dts: r8a7742: Add LVDS support
  2020-08-08 21:13   ` Laurent Pinchart
@ 2020-08-09 21:29     ` Lad, Prabhakar
  2020-08-10  8:27       ` Geert Uytterhoeven
  0 siblings, 1 reply; 32+ messages in thread
From: Lad, Prabhakar @ 2020-08-09 21:29 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Lad Prabhakar, Geert Uytterhoeven, Kieran Bingham, David Airlie,
	Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	Linux-Renesas, LKML,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Laurent,

Thank you for the review.

On Sat, Aug 8, 2020 at 10:13 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Prabhakar,
>
> Thank you for the patch.
>
> On Fri, Aug 07, 2020 at 06:49:53PM +0100, Lad Prabhakar wrote:
> > Add LVDS encoder node to r8a7742 SoC DT.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > ---
> >  arch/arm/boot/dts/r8a7742.dtsi | 54 ++++++++++++++++++++++++++++++++++
> >  1 file changed, 54 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/boot/dts/r8a7742.dtsi
> > index a979a4b3de61..a7e66220d63a 100644
> > --- a/arch/arm/boot/dts/r8a7742.dtsi
> > +++ b/arch/arm/boot/dts/r8a7742.dtsi
> > @@ -1534,11 +1534,65 @@
> >                               port@1 {
> >                                       reg = <1>;
> >                                       du_out_lvds0: endpoint {
> > +                                             remote-endpoint = <&lvds0_in>;
> >                                       };
> >                               };
> >                               port@2 {
> >                                       reg = <2>;
> >                                       du_out_lvds1: endpoint {
> > +                                             remote-endpoint = <&lvds1_in>;
> > +                                     };
> > +                             };
> > +                     };
> > +             };
> > +
> > +             lvds0: lvds@feb90000 {
> > +                     compatible = "renesas,r8a7742-lvds";
> > +                     reg = <0 0xfeb90000 0 0x1c>;
>
> Isn't 0x14 enough for the size ? 0x1c won't hurt though. Same comment
> below.
>
Agreed, 0x1c comes from Gen-3 manuals.

Cheers,
Prabhakar

> With or without this addressed,
>
> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
>
> > +                     clocks = <&cpg CPG_MOD 726>;
> > +                     power-domains = <&sysc R8A7742_PD_ALWAYS_ON>;
> > +                     resets = <&cpg 726>;
> > +                     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 {
> > +                                     };
> > +                             };
> > +                     };
> > +             };
> > +
> > +             lvds1: lvds@feb94000 {
> > +                     compatible = "renesas,r8a7742-lvds";
> > +                     reg = <0 0xfeb94000 0 0x1c>;
> > +                     clocks = <&cpg CPG_MOD 725>;
> > +                     power-domains = <&sysc R8A7742_PD_ALWAYS_ON>;
> > +                     resets = <&cpg 725>;
> > +                     status = "disabled";
> > +
> > +                     ports {
> > +                             #address-cells = <1>;
> > +                             #size-cells = <0>;
> > +
> > +                             port@0 {
> > +                                     reg = <0>;
> > +                                     lvds1_in: endpoint {
> > +                                             remote-endpoint = <&du_out_lvds1>;
> > +                                     };
> > +                             };
> > +                             port@1 {
> > +                                     reg = <1>;
> > +                                     lvds1_out: endpoint {
> >                                       };
> >                               };
> >                       };
>
> --
> Regards,
>
> Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support
  2020-08-08 21:22   ` Laurent Pinchart
@ 2020-08-09 21:35     ` Lad, Prabhakar
  0 siblings, 0 replies; 32+ messages in thread
From: Lad, Prabhakar @ 2020-08-09 21:35 UTC (permalink / raw)
  To: Laurent Pinchart, Chris Paterson
  Cc: Lad Prabhakar, Geert Uytterhoeven, Kieran Bingham, David Airlie,
	Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	Linux-Renesas, LKML,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Laurent,

Thank you for the review.


On Sat, Aug 8, 2020 at 10:23 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Prabhakar,
>
> Thank you for the patch.
>
> On Fri, Aug 07, 2020 at 06:49:54PM +0100, Lad Prabhakar wrote:
> > The iwg21d comes with a 7" capacitive touch screen, therefore
> > add support for it.
>
> I can't review most of this properly as I don't have access to the
> schematics. Is there a way to get it ?
>
I'll check with Chris, how we could get the schematics for you.

> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > ---
> >  arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 84 +++++++++++++++++++++++++
> >  1 file changed, 84 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> > index b3461a61a4bf..cf59fd61e422 100644
> > --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> > +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> > @@ -30,6 +30,7 @@
> >
> >  /dts-v1/;
> >  #include "r8a7742-iwg21m.dtsi"
> > +#include <dt-bindings/pwm/pwm.h>
> >
> >  / {
> >       model = "iWave Systems RainboW-G21D-Qseven board based on RZ/G1H";
> > @@ -52,6 +53,50 @@
> >               clock-frequency = <26000000>;
> >       };
> >
> > +     lcd_backlight: backlight {
> > +             compatible = "pwm-backlight";
> > +             pwms = <&tpu 2 5000000 0>;
> > +             brightness-levels = <0 4 8 16 32 64 128 255>;
> > +             pinctrl-0 = <&backlight_pins>;
> > +             pinctrl-names = "default";
> > +             default-brightness-level = <7>;
> > +             enable-gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>;
> > +     };
> > +
> > +     lvds-receiver {
> > +             compatible = "ti,ds90cf384a", "lvds-decoder";
> > +             powerdown-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;
> > +
> > +             ports {
> > +                     #address-cells = <1>;
> > +                     #size-cells = <0>;
> > +
> > +                     port@0 {
> > +                             reg = <0>;
> > +                             lvds_receiver_in: endpoint {
> > +                                     remote-endpoint = <&lvds0_out>;
> > +                             };
> > +                     };
> > +                     port@1 {
> > +                             reg = <1>;
> > +                             lvds_receiver_out: endpoint {
> > +                                     remote-endpoint = <&panel_in>;
> > +                             };
> > +                     };
> > +             };
> > +     };
> > +
> > +     panel {
> > +             compatible = "edt,etm0700g0dh6";
> > +             backlight = <&lcd_backlight>;
> > +
> > +             port {
> > +                     panel_in: endpoint {
> > +                             remote-endpoint = <&lvds_receiver_out>;
> > +                     };
> > +             };
> > +     };
> > +
> >       reg_1p5v: 1p5v {
> >               compatible = "regulator-fixed";
> >               regulator-name = "1P5V";
> > @@ -129,12 +174,31 @@
> >               VDDIO-supply = <&reg_3p3v>;
> >               VDDD-supply = <&reg_1p5v>;
> >       };
> > +
> > +     touch: touchpanel@38 {
> > +             compatible = "edt,edt-ft5406";
> > +             reg = <0x38>;
> > +             interrupt-parent = <&gpio0>;
> > +             interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
> > +     };
> >  };
> >
> >  &cmt0 {
> >       status = "okay";
> >  };
> >
> > +&du {
> > +     status = "okay";
> > +};
> > +
> > +&gpio0 {
> > +     touch-interrupt {
> > +             gpio-hog;
> > +             gpios = <24 GPIO_ACTIVE_LOW>;
> > +             input;
>
> Is this required, won't requesting the interrupt be enough to configure
> the pin properly ?
>
Agreed.

Cheers,
Prabhakar

> > +     };
> > +};
> > +
> >  &hsusb {
> >       pinctrl-0 = <&usb0_pins>;
> >       pinctrl-names = "default";
> > @@ -165,6 +229,11 @@
> >               function = "avb";
> >       };
> >
> > +     backlight_pins: backlight {
> > +             groups = "tpu0_to2";
> > +             function = "tpu0";
> > +     };
> > +
> >       i2c2_pins: i2c2 {
> >               groups = "i2c2_b";
> >               function = "i2c2";
> > @@ -208,6 +277,17 @@
> >       };
> >  };
> >
> > +&lvds0 {
> > +     status = "okay";
> > +     ports {
> > +             port@1 {
> > +                     lvds0_out: endpoint {
> > +                             remote-endpoint = <&lvds_receiver_in>;
> > +                     };
> > +             };
> > +     };
> > +};
> > +
> >  &rcar_sound {
> >       pinctrl-0 = <&sound_pins>;
> >       pinctrl-names = "default";
> > @@ -261,6 +341,10 @@
> >       shared-pin;
> >  };
> >
> > +&tpu {
> > +     status = "okay";
> > +};
> > +
> >  &usbphy {
> >       status = "okay";
> >  };
>
> --
> Regards,
>
> Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 0/7] r8a7742: Enable DU and LVDS
  2020-08-08 20:55 ` [PATCH 0/7] r8a7742: Enable DU and LVDS Laurent Pinchart
@ 2020-08-09 21:43   ` Lad, Prabhakar
  2020-08-10  8:27     ` Geert Uytterhoeven
  0 siblings, 1 reply; 32+ messages in thread
From: Lad, Prabhakar @ 2020-08-09 21:43 UTC (permalink / raw)
  To: Laurent Pinchart, Geert Uytterhoeven
  Cc: Lad Prabhakar, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, dri-devel, Linux-Renesas, LKML,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Laurent,

Thank you for the quick review.

On Sat, Aug 8, 2020 at 9:55 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Prabhakar,
>
> Thank you for the patches.
>
> On Fri, Aug 07, 2020 at 06:49:47PM +0100, Lad Prabhakar wrote:
> > Hi All,
> >
> > This patch series adds support for DU and LVDS to r8a7742
> > SoC and enables LCD support on r8a7742-iwg21d-q7 board.
> >
> > This patch series applies on top of [1].
> >
> > [1] https://git.kernel.org/pub/scm/linux/kernel/git/geert/
> >     renesas-devel.git/log/?h=renesas-arm-dt-for-v5.10
>
> The driver changes will need to go through the DRM/KMS tree, and I'd
> recommend the DT binding changes to go the same route as well. I can
> handle the rebase when applying, and once the bindings get accept, you
> can ask Geert to upstream the last 3 patchs. Would that work for you ?
>
I'm OK with it as long as Geert is happy. (Fyi I still have bunch of
patches for G1H)

Cheers,
Prabhakar

> > Lad Prabhakar (7):
> >   dt-bindings: display: renesas,du: Document the r8a7742 bindings
> >   drm: rcar-du: Add r8a7742 support
> >   dt-bindings: display: renesas,lvds: Document r8a7742 bindings
> >   drm: rcar-du: lvds: Add r8a7742 support
> >   ARM: dts: r8a7742: Add DU support
> >   ARM: dts: r8a7742: Add LVDS support
> >   ARM: dts: r8a7742-iwg21d-q7: Add LCD support
> >
> >  .../bindings/display/bridge/renesas,lvds.txt  |  1 +
> >  .../bindings/display/renesas,du.txt           |  2 +
> >  arch/arm/boot/dts/r8a7742-iwg21d-q7.dts       | 84 +++++++++++++++++
> >  arch/arm/boot/dts/r8a7742.dtsi                | 89 +++++++++++++++++++
> >  drivers/gpu/drm/rcar-du/rcar_du_drv.c         |  5 +-
> >  drivers/gpu/drm/rcar-du/rcar_lvds.c           |  1 +
> >  6 files changed, 180 insertions(+), 2 deletions(-)
>
> --
> Regards,
>
> Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 2/7] drm: rcar-du: Add r8a7742 support
  2020-08-09 20:38     ` Lad, Prabhakar
@ 2020-08-09 23:03       ` Laurent Pinchart
  0 siblings, 0 replies; 32+ messages in thread
From: Laurent Pinchart @ 2020-08-09 23:03 UTC (permalink / raw)
  To: Lad, Prabhakar
  Cc: Lad Prabhakar, Geert Uytterhoeven, Kieran Bingham, David Airlie,
	Rob Herring, Magnus Damm, Daniel Vetter, dri-devel,
	Linux-Renesas, LKML,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Prabhakar,

On Sun, Aug 09, 2020 at 09:38:05PM +0100, Lad, Prabhakar wrote:
> On Sat, Aug 8, 2020 at 10:02 PM Laurent Pinchart wrote:
> > On Fri, Aug 07, 2020 at 06:49:49PM +0100, Lad Prabhakar wrote:
> > > Add direct support for the r8a7742 (RZ/G1H).
> > >
> > > The RZ/G1H shares a common, compatible configuration with the r8a7790
> > > (R-Car H2) so that device info structure is reused, the only difference
> > > being TCON is unsupported on RZ/G1H (Currently unsupported by the driver).
> > >
> > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > > ---
> > >  drivers/gpu/drm/rcar-du/rcar_du_drv.c | 5 +++--
> > >  1 file changed, 3 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/rcar-du/rcar_du_drv.c b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> > > index 3e67cf70f040..7e286c7a7a6c 100644
> > > --- a/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> > > +++ b/drivers/gpu/drm/rcar-du/rcar_du_drv.c
> > > @@ -216,8 +216,8 @@ static const struct rcar_du_device_info rcar_du_r8a7790_info = {
> > >       .channels_mask = BIT(2) | BIT(1) | BIT(0),
> > >       .routes = {
> > >               /*
> > > -              * R8A7790 has one RGB output, two LVDS outputs and one
> > > -              * (currently unsupported) TCON output.
> > > +              * R8A7742 and R8A7790 each have one RGB output and two LVDS outputs. Additionally
> > > +              * R8A7790 supports one TCON output (currently unsupported by the driver).
> >
> > Once we support TCON we'll have to split this, but for now I suppose
> > it's fine. Would you however mind wrapping this to 80 columns ? I can do
> > so when applying if it's fine with you.
>
> Agreed once TCON is added this has to be split. But isn't  the column
> size has been increased (checkpatch too doesn't complain about), but

It has, but it doesn't mean it's mandatory to increase line length :-)
I think aligning with the style of the existing code should be favoured.

> feel free to wrapp it for 80 columns.

OK, I'll do that.

> > Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> >
> > >                */
> > >               [RCAR_DU_OUTPUT_DPAD0] = {
> > >                       .possible_crtcs = BIT(2) | BIT(1) | BIT(0),
> > > @@ -443,6 +443,7 @@ static const struct rcar_du_device_info rcar_du_r8a7799x_info = {
> > >  };
> > >
> > >  static const struct of_device_id rcar_du_of_table[] = {
> > > +     { .compatible = "renesas,du-r8a7742", .data = &rcar_du_r8a7790_info },
> > >       { .compatible = "renesas,du-r8a7743", .data = &rzg1_du_r8a7743_info },
> > >       { .compatible = "renesas,du-r8a7744", .data = &rzg1_du_r8a7743_info },
> > >       { .compatible = "renesas,du-r8a7745", .data = &rzg1_du_r8a7745_info },

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 6/7] ARM: dts: r8a7742: Add LVDS support
  2020-08-09 21:29     ` Lad, Prabhakar
@ 2020-08-10  8:27       ` Geert Uytterhoeven
  0 siblings, 0 replies; 32+ messages in thread
From: Geert Uytterhoeven @ 2020-08-10  8:27 UTC (permalink / raw)
  To: Lad, Prabhakar, Laurent Pinchart
  Cc: Lad Prabhakar, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, DRI Development, Linux-Renesas, LKML,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Prabhakar, Laurent,

On Sun, Aug 9, 2020 at 11:30 PM Lad, Prabhakar
<prabhakar.csengg@gmail.com> wrote:
> On Sat, Aug 8, 2020 at 10:13 PM Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> > On Fri, Aug 07, 2020 at 06:49:53PM +0100, Lad Prabhakar wrote:
> > > Add LVDS encoder node to r8a7742 SoC DT.
> > >
> > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > > ---
> > >  arch/arm/boot/dts/r8a7742.dtsi | 54 ++++++++++++++++++++++++++++++++++
> > >  1 file changed, 54 insertions(+)
> > >
> > > diff --git a/arch/arm/boot/dts/r8a7742.dtsi b/arch/arm/boot/dts/r8a7742.dtsi
> > > index a979a4b3de61..a7e66220d63a 100644
> > > --- a/arch/arm/boot/dts/r8a7742.dtsi
> > > +++ b/arch/arm/boot/dts/r8a7742.dtsi
> > > @@ -1534,11 +1534,65 @@
> > >                               port@1 {
> > >                                       reg = <1>;
> > >                                       du_out_lvds0: endpoint {
> > > +                                             remote-endpoint = <&lvds0_in>;
> > >                                       };
> > >                               };
> > >                               port@2 {
> > >                                       reg = <2>;
> > >                                       du_out_lvds1: endpoint {
> > > +                                             remote-endpoint = <&lvds1_in>;
> > > +                                     };
> > > +                             };
> > > +                     };
> > > +             };
> > > +
> > > +             lvds0: lvds@feb90000 {
> > > +                     compatible = "renesas,r8a7742-lvds";
> > > +                     reg = <0 0xfeb90000 0 0x1c>;
> >
> > Isn't 0x14 enough for the size ? 0x1c won't hurt though. Same comment
> > below.

I can fix that while applying.

> Agreed, 0x1c comes from Gen-3 manuals.

All R-Car Gen3 and RZ/G2 .dtsi use 0x14 or 0x20.
All R-Car Gen2 and RZ/G1 .dtsi use 0x1c, but their manual suggests 0x14, too?

Doesn't matter much, as the hardware address decoder probably uses a
multiple of 2, and page mapping granularity is at least 4 KiB anyway.

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

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v5.10, with the above fixed.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 0/7] r8a7742: Enable DU and LVDS
  2020-08-09 21:43   ` Lad, Prabhakar
@ 2020-08-10  8:27     ` Geert Uytterhoeven
  0 siblings, 0 replies; 32+ messages in thread
From: Geert Uytterhoeven @ 2020-08-10  8:27 UTC (permalink / raw)
  To: Lad, Prabhakar
  Cc: Laurent Pinchart, Lad Prabhakar, Kieran Bingham, David Airlie,
	Rob Herring, Magnus Damm, Daniel Vetter, DRI Development,
	Linux-Renesas, LKML,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Prabhakar,

On Sun, Aug 9, 2020 at 11:44 PM Lad, Prabhakar
<prabhakar.csengg@gmail.com> wrote:
> On Sat, Aug 8, 2020 at 9:55 PM Laurent Pinchart
> <laurent.pinchart@ideasonboard.com> wrote:
> > On Fri, Aug 07, 2020 at 06:49:47PM +0100, Lad Prabhakar wrote:
> > > This patch series adds support for DU and LVDS to r8a7742
> > > SoC and enables LCD support on r8a7742-iwg21d-q7 board.
> > >
> > > This patch series applies on top of [1].
> > >
> > > [1] https://git.kernel.org/pub/scm/linux/kernel/git/geert/
> > >     renesas-devel.git/log/?h=renesas-arm-dt-for-v5.10
> >
> > The driver changes will need to go through the DRM/KMS tree, and I'd
> > recommend the DT binding changes to go the same route as well. I can
> > handle the rebase when applying, and once the bindings get accept, you
> > can ask Geert to upstream the last 3 patchs. Would that work for you ?
> >
> I'm OK with it as long as Geert is happy. (Fyi I still have bunch of
> patches for G1H)

I'm fine with that.  BTW, I use an R-b from Laurent on the DT bindings
as the acceptance criterium, so you're good.

> > > Lad Prabhakar (7):
> > >   dt-bindings: display: renesas,du: Document the r8a7742 bindings
> > >   drm: rcar-du: Add r8a7742 support
> > >   dt-bindings: display: renesas,lvds: Document r8a7742 bindings
> > >   drm: rcar-du: lvds: Add r8a7742 support
> > >   ARM: dts: r8a7742: Add DU support
> > >   ARM: dts: r8a7742: Add LVDS support
> > >   ARM: dts: r8a7742-iwg21d-q7: Add LCD support

Gr{oetje,eeting}s,

                        Geert


--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 5/7] ARM: dts: r8a7742: Add DU support
  2020-08-07 20:22     ` Lad, Prabhakar
@ 2020-08-10  8:53       ` Geert Uytterhoeven
  0 siblings, 0 replies; 32+ messages in thread
From: Geert Uytterhoeven @ 2020-08-10  8:53 UTC (permalink / raw)
  To: Lad, Prabhakar
  Cc: Sergei Shtylyov, Lad Prabhakar, Geert Uytterhoeven,
	Laurent Pinchart, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, DRI Development, Linux-Renesas, LKML,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

On Fri, Aug 7, 2020 at 10:22 PM Lad, Prabhakar
<prabhakar.csengg@gmail.com> wrote:
> On Fri, Aug 7, 2020 at 8:48 PM Sergei Shtylyov
> <sergei.shtylyov@gmail.com> wrote:
> > On 8/7/20 8:49 PM, Lad Prabhakar wrote:
> > > Add du node to r8a7742 SoC DT. Boards that want to enable the DU
> >
> >   Both "du" and "DU" on a single line? :-)
> >
> Argh my bad.

No worries, I can replace the former one by "Display Unit (DU)" while
applying.

> > > need to specify the output topology.
> > >
> > > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > > Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>

Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
i.e. will queue in renesas-devel for v5.10, with the above fixed.

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support
  2020-08-07 17:49 ` [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support Lad Prabhakar
  2020-08-08 21:22   ` Laurent Pinchart
@ 2020-08-11 11:26   ` Laurent Pinchart
  2020-08-13 12:54     ` Lad, Prabhakar
  1 sibling, 1 reply; 32+ messages in thread
From: Laurent Pinchart @ 2020-08-11 11:26 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: Geert Uytterhoeven, Kieran Bingham, David Airlie, Rob Herring,
	Magnus Damm, Daniel Vetter, dri-devel, linux-renesas-soc,
	linux-kernel, devicetree, Prabhakar

Hi Prabhakar,

Thank you for the patch.

On Fri, Aug 07, 2020 at 06:49:54PM +0100, Lad Prabhakar wrote:
> The iwg21d comes with a 7" capacitive touch screen, therefore
> add support for it.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> ---
>  arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 84 +++++++++++++++++++++++++
>  1 file changed, 84 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> index b3461a61a4bf..cf59fd61e422 100644
> --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> @@ -30,6 +30,7 @@
>  
>  /dts-v1/;
>  #include "r8a7742-iwg21m.dtsi"
> +#include <dt-bindings/pwm/pwm.h>
>  
>  / {
>  	model = "iWave Systems RainboW-G21D-Qseven board based on RZ/G1H";
> @@ -52,6 +53,50 @@
>  		clock-frequency = <26000000>;
>  	};
>  
> +	lcd_backlight: backlight {
> +		compatible = "pwm-backlight";
> +		pwms = <&tpu 2 5000000 0>;
> +		brightness-levels = <0 4 8 16 32 64 128 255>;
> +		pinctrl-0 = <&backlight_pins>;
> +		pinctrl-names = "default";
> +		default-brightness-level = <7>;
> +		enable-gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>;

It's actually a power supply, not an enable GPIO, but it doesn't matter
much, I don't think there's a need to declare a regulator just for the
sake of it.

> +	};
> +
> +	lvds-receiver {
> +		compatible = "ti,ds90cf384a", "lvds-decoder";
> +		powerdown-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;

This should be handled as a shared power supply, as it's also needed for
the touch screen. Biju has sent patches for the iwg20d that fixes a
probe issue due to that problem, I think you can just copy the fix.

> +
> +		ports {
> +			#address-cells = <1>;
> +			#size-cells = <0>;
> +
> +			port@0 {
> +				reg = <0>;
> +				lvds_receiver_in: endpoint {
> +					remote-endpoint = <&lvds0_out>;
> +				};
> +			};
> +			port@1 {
> +				reg = <1>;
> +				lvds_receiver_out: endpoint {
> +					remote-endpoint = <&panel_in>;
> +				};
> +			};
> +		};
> +	};
> +
> +	panel {
> +		compatible = "edt,etm0700g0dh6";
> +		backlight = <&lcd_backlight>;
> +
> +		port {
> +			panel_in: endpoint {
> +				remote-endpoint = <&lvds_receiver_out>;
> +			};
> +		};
> +	};
> +
>  	reg_1p5v: 1p5v {
>  		compatible = "regulator-fixed";
>  		regulator-name = "1P5V";
> @@ -129,12 +174,31 @@
>  		VDDIO-supply = <&reg_3p3v>;
>  		VDDD-supply = <&reg_1p5v>;
>  	};
> +
> +	touch: touchpanel@38 {
> +		compatible = "edt,edt-ft5406";
> +		reg = <0x38>;
> +		interrupt-parent = <&gpio0>;
> +		interrupts = <24 IRQ_TYPE_EDGE_FALLING>;

Should the reset GPIO also be wired ? It seems to be shared with the
audio codec though, which is annoying.

> +	};
>  };
>  
>  &cmt0 {
>  	status = "okay";
>  };
>  
> +&du {
> +	status = "okay";
> +};
> +
> +&gpio0 {
> +	touch-interrupt {
> +		gpio-hog;
> +		gpios = <24 GPIO_ACTIVE_LOW>;
> +		input;
> +	};

Is this needed, or does requesting the interrupt in the touch screen
driver configured the GPIO to an input automatically ?

> +};
> +
>  &hsusb {
>  	pinctrl-0 = <&usb0_pins>;
>  	pinctrl-names = "default";
> @@ -165,6 +229,11 @@
>  		function = "avb";
>  	};
>  
> +	backlight_pins: backlight {
> +		groups = "tpu0_to2";
> +		function = "tpu0";
> +	};
> +
>  	i2c2_pins: i2c2 {
>  		groups = "i2c2_b";
>  		function = "i2c2";
> @@ -208,6 +277,17 @@
>  	};
>  };
>  
> +&lvds0 {
> +	status = "okay";
> +	ports {
> +		port@1 {
> +			lvds0_out: endpoint {
> +				remote-endpoint = <&lvds_receiver_in>;
> +			};
> +		};
> +	};
> +};
> +
>  &rcar_sound {
>  	pinctrl-0 = <&sound_pins>;
>  	pinctrl-names = "default";
> @@ -261,6 +341,10 @@
>  	shared-pin;
>  };
>  
> +&tpu {
> +	status = "okay";
> +};
> +
>  &usbphy {
>  	status = "okay";
>  };

-- 
Regards,

Laurent Pinchart

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support
  2020-08-11 11:26   ` Laurent Pinchart
@ 2020-08-13 12:54     ` Lad, Prabhakar
  0 siblings, 0 replies; 32+ messages in thread
From: Lad, Prabhakar @ 2020-08-13 12:54 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Lad Prabhakar, Geert Uytterhoeven, Kieran Bingham, David Airlie,
	Rob Herring, Magnus Damm, Daniel Vetter, DRI Development,
	Linux-Renesas, LKML,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS

Hi Laurent,

Thank you for the review.

On Tue, Aug 11, 2020 at 12:26 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
>
> Hi Prabhakar,
>
> Thank you for the patch.
>
> On Fri, Aug 07, 2020 at 06:49:54PM +0100, Lad Prabhakar wrote:
> > The iwg21d comes with a 7" capacitive touch screen, therefore
> > add support for it.
> >
> > Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> > Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> > ---
> >  arch/arm/boot/dts/r8a7742-iwg21d-q7.dts | 84 +++++++++++++++++++++++++
> >  1 file changed, 84 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> > index b3461a61a4bf..cf59fd61e422 100644
> > --- a/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> > +++ b/arch/arm/boot/dts/r8a7742-iwg21d-q7.dts
> > @@ -30,6 +30,7 @@
> >
> >  /dts-v1/;
> >  #include "r8a7742-iwg21m.dtsi"
> > +#include <dt-bindings/pwm/pwm.h>
> >
> >  / {
> >       model = "iWave Systems RainboW-G21D-Qseven board based on RZ/G1H";
> > @@ -52,6 +53,50 @@
> >               clock-frequency = <26000000>;
> >       };
> >
> > +     lcd_backlight: backlight {
> > +             compatible = "pwm-backlight";
> > +             pwms = <&tpu 2 5000000 0>;
> > +             brightness-levels = <0 4 8 16 32 64 128 255>;
> > +             pinctrl-0 = <&backlight_pins>;
> > +             pinctrl-names = "default";
> > +             default-brightness-level = <7>;
> > +             enable-gpios = <&gpio3 11 GPIO_ACTIVE_HIGH>;
>
> It's actually a power supply, not an enable GPIO, but it doesn't matter
> much, I don't think there's a need to declare a regulator just for the
> sake of it.
>
Agreed will leave it as is.

> > +     };
> > +
> > +     lvds-receiver {
> > +             compatible = "ti,ds90cf384a", "lvds-decoder";
> > +             powerdown-gpios = <&gpio5 28 GPIO_ACTIVE_LOW>;
>
> This should be handled as a shared power supply, as it's also needed for
> the touch screen. Biju has sent patches for the iwg20d that fixes a
> probe issue due to that problem, I think you can just copy the fix.
>
Done.

> > +
> > +             ports {
> > +                     #address-cells = <1>;
> > +                     #size-cells = <0>;
> > +
> > +                     port@0 {
> > +                             reg = <0>;
> > +                             lvds_receiver_in: endpoint {
> > +                                     remote-endpoint = <&lvds0_out>;
> > +                             };
> > +                     };
> > +                     port@1 {
> > +                             reg = <1>;
> > +                             lvds_receiver_out: endpoint {
> > +                                     remote-endpoint = <&panel_in>;
> > +                             };
> > +                     };
> > +             };
> > +     };
> > +
> > +     panel {
> > +             compatible = "edt,etm0700g0dh6";
> > +             backlight = <&lcd_backlight>;
> > +
> > +             port {
> > +                     panel_in: endpoint {
> > +                             remote-endpoint = <&lvds_receiver_out>;
> > +                     };
> > +             };
> > +     };
> > +
> >       reg_1p5v: 1p5v {
> >               compatible = "regulator-fixed";
> >               regulator-name = "1P5V";
> > @@ -129,12 +174,31 @@
> >               VDDIO-supply = <&reg_3p3v>;
> >               VDDD-supply = <&reg_1p5v>;
> >       };
> > +
> > +     touch: touchpanel@38 {
> > +             compatible = "edt,edt-ft5406";
> > +             reg = <0x38>;
> > +             interrupt-parent = <&gpio0>;
> > +             interrupts = <24 IRQ_TYPE_EDGE_FALLING>;
>
> Should the reset GPIO also be wired ? It seems to be shared with the
> audio codec though, which is annoying.
>
Done.

> > +     };
> >  };
> >
> >  &cmt0 {
> >       status = "okay";
> >  };
> >
> > +&du {
> > +     status = "okay";
> > +};
> > +
> > +&gpio0 {
> > +     touch-interrupt {
> > +             gpio-hog;
> > +             gpios = <24 GPIO_ACTIVE_LOW>;
> > +             input;
> > +     };
>
> Is this needed, or does requesting the interrupt in the touch screen
> driver configured the GPIO to an input automatically ?
>
Yes this is needed, the touch driver does not configure the pin as
GPIO input without this touch doesn't work.

Cheers,
Prabhakar

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 1/7] dt-bindings: display: renesas, du: Document the r8a7742 bindings
  2020-08-07 17:49 ` [PATCH 1/7] dt-bindings: display: renesas,du: Document the r8a7742 bindings Lad Prabhakar
  2020-08-08 20:59   ` Laurent Pinchart
@ 2020-08-24 22:20   ` Rob Herring
  1 sibling, 0 replies; 32+ messages in thread
From: Rob Herring @ 2020-08-24 22:20 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: dri-devel, Rob Herring, Kieran Bingham, Daniel Vetter,
	linux-renesas-soc, David Airlie, Magnus Damm, devicetree,
	linux-kernel, Prabhakar, Laurent Pinchart, Geert Uytterhoeven

On Fri, 07 Aug 2020 18:49:48 +0100, Lad Prabhakar wrote:
> Document the RZ/G1H (R8A7742) SoC in the R-Car DU bindings.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> ---
>  Documentation/devicetree/bindings/display/renesas,du.txt | 2 ++
>  1 file changed, 2 insertions(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 32+ messages in thread

* Re: [PATCH 3/7] dt-bindings: display: renesas, lvds: Document r8a7742 bindings
  2020-08-07 17:49 ` [PATCH 3/7] dt-bindings: display: renesas,lvds: Document r8a7742 bindings Lad Prabhakar
  2020-08-08 21:03   ` Laurent Pinchart
@ 2020-08-24 22:20   ` Rob Herring
  1 sibling, 0 replies; 32+ messages in thread
From: Rob Herring @ 2020-08-24 22:20 UTC (permalink / raw)
  To: Lad Prabhakar
  Cc: David Airlie, Kieran Bingham, Rob Herring, linux-kernel,
	Prabhakar, Geert Uytterhoeven, Laurent Pinchart, Magnus Damm,
	linux-renesas-soc, Daniel Vetter, devicetree, dri-devel

On Fri, 07 Aug 2020 18:49:50 +0100, Lad Prabhakar wrote:
> Document the RZ/G1H (R8A7742) LVDS bindings.
> 
> Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
> Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
> ---
>  .../devicetree/bindings/display/bridge/renesas,lvds.txt          | 1 +
>  1 file changed, 1 insertion(+)
> 

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 32+ messages in thread

end of thread, other threads:[~2020-08-24 22:21 UTC | newest]

Thread overview: 32+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-08-07 17:49 [PATCH 0/7] r8a7742: Enable DU and LVDS Lad Prabhakar
2020-08-07 17:49 ` [PATCH 1/7] dt-bindings: display: renesas,du: Document the r8a7742 bindings Lad Prabhakar
2020-08-08 20:59   ` Laurent Pinchart
2020-08-24 22:20   ` [PATCH 1/7] dt-bindings: display: renesas, du: " Rob Herring
2020-08-07 17:49 ` [PATCH 2/7] drm: rcar-du: Add r8a7742 support Lad Prabhakar
2020-08-08 21:02   ` Laurent Pinchart
2020-08-09 20:38     ` Lad, Prabhakar
2020-08-09 23:03       ` Laurent Pinchart
2020-08-07 17:49 ` [PATCH 3/7] dt-bindings: display: renesas,lvds: Document r8a7742 bindings Lad Prabhakar
2020-08-08 21:03   ` Laurent Pinchart
2020-08-08 21:05     ` Laurent Pinchart
2020-08-09 21:10       ` Lad, Prabhakar
2020-08-24 22:20   ` [PATCH 3/7] dt-bindings: display: renesas, lvds: " Rob Herring
2020-08-07 17:49 ` [PATCH 4/7] drm: rcar-du: lvds: Add r8a7742 support Lad Prabhakar
2020-08-08 21:06   ` Laurent Pinchart
2020-08-07 17:49 ` [PATCH 5/7] ARM: dts: r8a7742: Add DU support Lad Prabhakar
2020-08-07 19:48   ` Sergei Shtylyov
2020-08-07 20:22     ` Lad, Prabhakar
2020-08-10  8:53       ` Geert Uytterhoeven
2020-08-08 21:15   ` Laurent Pinchart
2020-08-07 17:49 ` [PATCH 6/7] ARM: dts: r8a7742: Add LVDS support Lad Prabhakar
2020-08-08 21:13   ` Laurent Pinchart
2020-08-09 21:29     ` Lad, Prabhakar
2020-08-10  8:27       ` Geert Uytterhoeven
2020-08-07 17:49 ` [PATCH 7/7] ARM: dts: r8a7742-iwg21d-q7: Add LCD support Lad Prabhakar
2020-08-08 21:22   ` Laurent Pinchart
2020-08-09 21:35     ` Lad, Prabhakar
2020-08-11 11:26   ` Laurent Pinchart
2020-08-13 12:54     ` Lad, Prabhakar
2020-08-08 20:55 ` [PATCH 0/7] r8a7742: Enable DU and LVDS Laurent Pinchart
2020-08-09 21:43   ` Lad, Prabhakar
2020-08-10  8:27     ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).