linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Add Display support
@ 2019-10-01 12:15 Biju Das
  2019-10-01 12:15 ` [PATCH 1/8] arm64: dts: renesas: hihope-common: Move du clk properties out of common dtsi Biju Das
                   ` (7 more replies)
  0 siblings, 8 replies; 19+ messages in thread
From: Biju Das @ 2019-10-01 12:15 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Simon Horman, Laurent Pinchart, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

This patch adds display support for hihope RZ/G2N board.

This patch depend upon
https://patchwork.kernel.org/project/linux-renesas-soc/list/?series=177939

Biju Das (8):
  arm64: dts: renesas: hihope-common: Move du clk properties out of
    common dtsi
  arm64: dts: renesas: r8a774b1: Add DU device to DT
  arm64: dts: renesas: r8a774b1: Add HDMI encoder instance
  arm64: dts: renesas: r8a774b1-hihope-rzg2n: Add display clock
    properties
  arm64: dts: renesas: r8a774b1: Add FDP1 device nodes
  arm64: dts: renesas: r8a774b1: Add PWM device nodes
  arm64: dts: renesas: hihope-rzg2-ex: Enable backlight
  arm64: dts: renesas: hihope-rzg2-ex: Add LVDS panel support

 arch/arm64/boot/dts/renesas/hihope-common.dtsi     |   8 --
 arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi    |  50 ++++++++
 .../boot/dts/renesas/r8a774a1-hihope-rzg2m.dts     |  11 ++
 .../boot/dts/renesas/r8a774b1-hihope-rzg2n.dts     |  11 ++
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi          | 133 +++++++++++++++++++++
 arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi   |  37 ++++++
 6 files changed, 242 insertions(+), 8 deletions(-)
 create mode 100644 arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi

-- 
2.7.4


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

* [PATCH 1/8] arm64: dts: renesas: hihope-common: Move du clk properties out of common dtsi
  2019-10-01 12:15 [PATCH 0/8] Add Display support Biju Das
@ 2019-10-01 12:15 ` Biju Das
  2019-10-01 18:11   ` Laurent Pinchart
  2019-10-01 12:15 ` [PATCH 2/8] arm64: dts: renesas: r8a774b1: Add DU device to DT Biju Das
                   ` (6 subsequent siblings)
  7 siblings, 1 reply; 19+ messages in thread
From: Biju Das @ 2019-10-01 12:15 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Simon Horman, Laurent Pinchart, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

RZ/G2N board is pin compatible with RZ/G2M board. However on the SoC
side RZ/G2N uses DU3 where as RZ/G2M uses DU2 for the DPAD. In order to
reuse the common dtsi for both the boards, it is required to move du clock
properties from common dtsi to board specific dts.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/hihope-common.dtsi        |  8 --------
 arch/arm64/boot/dts/renesas/r8a774a1-hihope-rzg2m.dts | 11 +++++++++++
 2 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
index 3e376d2..355d0a2 100644
--- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
+++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
@@ -142,14 +142,6 @@
 };
 
 &du {
-	clocks = <&cpg CPG_MOD 724>,
-		 <&cpg CPG_MOD 723>,
-		 <&cpg CPG_MOD 722>,
-		 <&versaclock5 1>,
-		 <&x302_clk>,
-		 <&versaclock5 2>;
-	clock-names = "du.0", "du.1", "du.2",
-		      "dclkin.0", "dclkin.1", "dclkin.2";
 	status = "okay";
 };
 
diff --git a/arch/arm64/boot/dts/renesas/r8a774a1-hihope-rzg2m.dts b/arch/arm64/boot/dts/renesas/r8a774a1-hihope-rzg2m.dts
index 93ca973..96f2fb0 100644
--- a/arch/arm64/boot/dts/renesas/r8a774a1-hihope-rzg2m.dts
+++ b/arch/arm64/boot/dts/renesas/r8a774a1-hihope-rzg2m.dts
@@ -24,3 +24,14 @@
 		reg = <0x6 0x00000000 0x0 0x80000000>;
 	};
 };
+
+&du {
+	clocks = <&cpg CPG_MOD 724>,
+		 <&cpg CPG_MOD 723>,
+		 <&cpg CPG_MOD 722>,
+		 <&versaclock5 1>,
+		 <&x302_clk>,
+		 <&versaclock5 2>;
+	clock-names = "du.0", "du.1", "du.2",
+		      "dclkin.0", "dclkin.1", "dclkin.2";
+};
-- 
2.7.4


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

* [PATCH 2/8] arm64: dts: renesas: r8a774b1: Add DU device to DT
  2019-10-01 12:15 [PATCH 0/8] Add Display support Biju Das
  2019-10-01 12:15 ` [PATCH 1/8] arm64: dts: renesas: hihope-common: Move du clk properties out of common dtsi Biju Das
@ 2019-10-01 12:15 ` Biju Das
  2019-10-01 18:13   ` Laurent Pinchart
  2019-10-01 12:15 ` [PATCH 3/8] arm64: dts: renesas: r8a774b1: Add HDMI encoder instance Biju Das
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 19+ messages in thread
From: Biju Das @ 2019-10-01 12:15 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Simon Horman, Laurent Pinchart, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Add the DU device to r8a774b1 SoC DT.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 38 +++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
index 9d5630a..777b45d 100644
--- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
@@ -1285,7 +1285,18 @@
 		};
 
 		du: display@feb00000 {
+			compatible = "renesas,du-r8a774b1";
 			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";
+			status = "disabled";
+
+			vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
 
 			ports {
 				#address-cells = <1>;
@@ -1304,6 +1315,33 @@
 				port@2 {
 					reg = <2>;
 					du_out_lvds0: endpoint {
+						remote-endpoint = <&lvds0_in>;
+					};
+				};
+			};
+		};
+
+		lvds0: lvds@feb90000 {
+			compatible = "renesas,r8a774b1-lvds";
+			reg = <0 0xfeb90000 0 0x14>;
+			clocks = <&cpg CPG_MOD 727>;
+			power-domains = <&sysc R8A774B1_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.7.4


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

* [PATCH 3/8] arm64: dts: renesas: r8a774b1: Add HDMI encoder instance
  2019-10-01 12:15 [PATCH 0/8] Add Display support Biju Das
  2019-10-01 12:15 ` [PATCH 1/8] arm64: dts: renesas: hihope-common: Move du clk properties out of common dtsi Biju Das
  2019-10-01 12:15 ` [PATCH 2/8] arm64: dts: renesas: r8a774b1: Add DU device to DT Biju Das
@ 2019-10-01 12:15 ` Biju Das
  2019-10-01 18:15   ` Laurent Pinchart
  2019-10-01 12:15 ` [PATCH 4/8] arm64: dts: renesas: r8a774b1-hihope-rzg2n: Add display clock properties Biju Das
                   ` (4 subsequent siblings)
  7 siblings, 1 reply; 19+ messages in thread
From: Biju Das @ 2019-10-01 12:15 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Simon Horman, Laurent Pinchart, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Add the HDMI encoder to the R8A774B1 DT in disabled state.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
index 777b45d..979be5a 100644
--- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
@@ -1267,7 +1267,16 @@
 		};
 
 		hdmi0: hdmi@fead0000 {
+			compatible = "renesas,r8a774b1-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 R8A774B1_CLK_HDMI>;
+			clock-names = "iahb", "isfr";
+			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
+			resets = <&cpg 729>;
+			status = "disabled";
 
 			ports {
 				#address-cells = <1>;
@@ -1276,11 +1285,16 @@
 				port@0 {
 					reg = <0>;
 					dw_hdmi0_in: endpoint {
+						remote-endpoint = <&du_out_hdmi0>;
 					};
 				};
 				port@1 {
 					reg = <1>;
 				};
+				port@2 {
+					/* HDMI sound */
+					reg = <2>;
+				};
 			};
 		};
 
@@ -1310,6 +1324,7 @@
 				port@1 {
 					reg = <1>;
 					du_out_hdmi0: endpoint {
+						remote-endpoint = <&dw_hdmi0_in>;
 					};
 				};
 				port@2 {
-- 
2.7.4


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

* [PATCH 4/8] arm64: dts: renesas: r8a774b1-hihope-rzg2n: Add display clock properties
  2019-10-01 12:15 [PATCH 0/8] Add Display support Biju Das
                   ` (2 preceding siblings ...)
  2019-10-01 12:15 ` [PATCH 3/8] arm64: dts: renesas: r8a774b1: Add HDMI encoder instance Biju Das
@ 2019-10-01 12:15 ` Biju Das
  2019-10-01 18:15   ` Laurent Pinchart
  2019-10-01 12:15 ` [PATCH 5/8] arm64: dts: renesas: r8a774b1: Add FDP1 device nodes Biju Das
                   ` (3 subsequent siblings)
  7 siblings, 1 reply; 19+ messages in thread
From: Biju Das @ 2019-10-01 12:15 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Simon Horman, Laurent Pinchart, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Add display clock properties for the HiHope RZ/G2N board.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts b/arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts
index c9e2119..9910c1a 100644
--- a/arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts
+++ b/arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts
@@ -25,6 +25,17 @@
 	};
 };
 
+&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";
+};
+
 &sdhi3 {
 	mmc-hs400-1_8v;
 };
-- 
2.7.4


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

* [PATCH 5/8] arm64: dts: renesas: r8a774b1: Add FDP1 device nodes
  2019-10-01 12:15 [PATCH 0/8] Add Display support Biju Das
                   ` (3 preceding siblings ...)
  2019-10-01 12:15 ` [PATCH 4/8] arm64: dts: renesas: r8a774b1-hihope-rzg2n: Add display clock properties Biju Das
@ 2019-10-01 12:15 ` Biju Das
  2019-10-01 18:16   ` Laurent Pinchart
  2019-10-01 12:15 ` [PATCH 6/8] arm64: dts: renesas: r8a774b1: Add PWM " Biju Das
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 19+ messages in thread
From: Biju Das @ 2019-10-01 12:15 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Simon Horman, Laurent Pinchart, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

The r8a774b1 has a single FDP1 instance.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
index 979be5a..93b2e88 100644
--- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
@@ -1182,6 +1182,16 @@
 			/* placeholder */
 		};
 
+		fdp1@fe940000 {
+			compatible = "renesas,fdp1";
+			reg = <0 0xfe940000 0 0x2400>;
+			interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 119>;
+			power-domains = <&sysc R8A774B1_PD_A3VP>;
+			resets = <&cpg 119>;
+			renesas,fcp = <&fcpf0>;
+		};
+
 		fcpf0: fcp@fe950000 {
 			compatible = "renesas,fcpf";
 			reg = <0 0xfe950000 0 0x200>;
-- 
2.7.4


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

* [PATCH 6/8] arm64: dts: renesas: r8a774b1: Add PWM device nodes
  2019-10-01 12:15 [PATCH 0/8] Add Display support Biju Das
                   ` (4 preceding siblings ...)
  2019-10-01 12:15 ` [PATCH 5/8] arm64: dts: renesas: r8a774b1: Add FDP1 device nodes Biju Das
@ 2019-10-01 12:15 ` Biju Das
  2019-10-01 18:17   ` Laurent Pinchart
  2019-10-01 12:15 ` [PATCH 7/8] arm64: dts: renesas: hihope-rzg2-ex: Enable backlight Biju Das
  2019-10-01 12:15 ` [PATCH 8/8] arm64: dts: renesas: hihope-rzg2-ex: Add LVDS panel support Biju Das
  7 siblings, 1 reply; 19+ messages in thread
From: Biju Das @ 2019-10-01 12:15 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Simon Horman, Laurent Pinchart, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

This patch adds PWM device nodes to r8a774b1 SoC DT.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 70 +++++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
index 93b2e88..538e9ce 100644
--- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
@@ -940,6 +940,76 @@
 			/* placeholder */
 		};
 
+		pwm0: pwm@e6e30000 {
+			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
+			reg = <0 0xe6e30000 0 0x8>;
+			#pwm-cells = <2>;
+			clocks = <&cpg CPG_MOD 523>;
+			resets = <&cpg 523>;
+			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		pwm1: pwm@e6e31000 {
+			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
+			reg = <0 0xe6e31000 0 0x8>;
+			#pwm-cells = <2>;
+			clocks = <&cpg CPG_MOD 523>;
+			resets = <&cpg 523>;
+			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		pwm2: pwm@e6e32000 {
+			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
+			reg = <0 0xe6e32000 0 0x8>;
+			#pwm-cells = <2>;
+			clocks = <&cpg CPG_MOD 523>;
+			resets = <&cpg 523>;
+			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		pwm3: pwm@e6e33000 {
+			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
+			reg = <0 0xe6e33000 0 0x8>;
+			#pwm-cells = <2>;
+			clocks = <&cpg CPG_MOD 523>;
+			resets = <&cpg 523>;
+			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		pwm4: pwm@e6e34000 {
+			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
+			reg = <0 0xe6e34000 0 0x8>;
+			#pwm-cells = <2>;
+			clocks = <&cpg CPG_MOD 523>;
+			resets = <&cpg 523>;
+			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		pwm5: pwm@e6e35000 {
+			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
+			reg = <0 0xe6e35000 0 0x8>;
+			#pwm-cells = <2>;
+			clocks = <&cpg CPG_MOD 523>;
+			resets = <&cpg 523>;
+			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
+		pwm6: pwm@e6e36000 {
+			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
+			reg = <0 0xe6e36000 0 0x8>;
+			#pwm-cells = <2>;
+			clocks = <&cpg CPG_MOD 523>;
+			resets = <&cpg 523>;
+			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
+			status = "disabled";
+		};
+
 		scif0: serial@e6e60000 {
 			compatible = "renesas,scif-r8a774b1",
 				     "renesas,rcar-gen3-scif", "renesas,scif";
-- 
2.7.4


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

* [PATCH 7/8] arm64: dts: renesas: hihope-rzg2-ex: Enable backlight
  2019-10-01 12:15 [PATCH 0/8] Add Display support Biju Das
                   ` (5 preceding siblings ...)
  2019-10-01 12:15 ` [PATCH 6/8] arm64: dts: renesas: r8a774b1: Add PWM " Biju Das
@ 2019-10-01 12:15 ` Biju Das
  2019-10-01 18:18   ` Laurent Pinchart
  2019-10-01 12:15 ` [PATCH 8/8] arm64: dts: renesas: hihope-rzg2-ex: Add LVDS panel support Biju Das
  7 siblings, 1 reply; 19+ messages in thread
From: Biju Das @ 2019-10-01 12:15 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Simon Horman, Laurent Pinchart, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

This patch enables backlight support.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
index 4280b19..70f9a2a 100644
--- a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
+++ b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
@@ -13,6 +13,14 @@
 	chosen {
 		bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
 	};
+
+	backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pwm0 0 50000>;
+
+		brightness-levels = <0 2 8 16 32 64 128 255>;
+		default-brightness-level = <6>;
+	};
 };
 
 &avb {
@@ -82,4 +90,16 @@
 		groups = "can1_data";
 		function = "can1";
 	};
+
+	pwm0_pins: pwm0 {
+		groups = "pwm0";
+		function = "pwm0";
+	};
+};
+
+&pwm0 {
+	pinctrl-0 = <&pwm0_pins>;
+	pinctrl-names = "default";
+
+	status = "okay";
 };
-- 
2.7.4


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

* [PATCH 8/8] arm64: dts: renesas: hihope-rzg2-ex: Add LVDS panel support
  2019-10-01 12:15 [PATCH 0/8] Add Display support Biju Das
                   ` (6 preceding siblings ...)
  2019-10-01 12:15 ` [PATCH 7/8] arm64: dts: renesas: hihope-rzg2-ex: Enable backlight Biju Das
@ 2019-10-01 12:15 ` Biju Das
  2019-10-01 18:25   ` Laurent Pinchart
  7 siblings, 1 reply; 19+ messages in thread
From: Biju Das @ 2019-10-01 12:15 UTC (permalink / raw)
  To: Rob Herring, Mark Rutland
  Cc: Biju Das, Simon Horman, Laurent Pinchart, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

This patch adds support for Advantech idk-1110wr LVDS panel.
The HiHope RZ/G2[MN] is advertised as compatible with panel idk-1110wr
from Advantech, however the panel isn't sold alongside the board.

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
---
 arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi  | 30 +++++++++++++++++++
 arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi | 37 ++++++++++++++++++++++++
 2 files changed, 67 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi

diff --git a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
index 70f9a2a..ae1ef2d 100644
--- a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
+++ b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
@@ -5,6 +5,8 @@
  * Copyright (C) 2019 Renesas Electronics Corp.
  */
 
+#include "rzg2-panel-lvds.dtsi"
+
 / {
 	aliases {
 		ethernet0 = &avb;
@@ -51,6 +53,34 @@
 	status = "okay";
 };
 
+&gpio1 {
+	/*
+	 * When GP1_20 is LOW LVDS0 is connected to the LVDS connector
+	 * When GP1_20 is HIGH LVDS0 is connected to the LT8918L
+	 */
+	lvds-connector-en-gpio {
+		gpio-hog;
+		gpios = <20 GPIO_ACTIVE_HIGH>;
+		output-low;
+		line-name = "lvds-connector-en-gpio";
+	};
+};
+
+&lvds0 {
+	/* Uncomment  below line to enable lvds panel connected to RZ/G2N board
+	 */
+
+	/* status = "okay"; */
+
+	ports {
+		port@1 {
+			lvds_connector: endpoint {
+				remote-endpoint = <&panel_in_advantech_idk_1110wr>;
+			};
+		};
+	};
+};
+
 &pciec0 {
 	status = "okay";
 };
diff --git a/arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi b/arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi
new file mode 100644
index 0000000..768a8ec
--- /dev/null
+++ b/arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi
@@ -0,0 +1,37 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Device Tree Source for the LVDS panels connected to RZ/G2 boards
+ *
+ * Copyright (C) 2019 Renesas Electronics Corp.
+ */
+
+/ {
+
+	panel-lvds {
+		compatible = "advantech,idk-1110wr", "panel-lvds";
+
+		width-mm = <223>;
+		height-mm = <125>;
+
+		data-mapping = "jeida-24";
+
+		panel-timing {
+			/* 1024x600 @60Hz */
+			clock-frequency = <51200000>;
+			hactive = <1024>;
+			vactive = <600>;
+			hsync-len = <240>;
+			hfront-porch = <40>;
+			hback-porch = <40>;
+			vfront-porch = <15>;
+			vback-porch = <10>;
+			vsync-len = <10>;
+		};
+
+		port {
+			panel_in_advantech_idk_1110wr: endpoint {
+				remote-endpoint = <&lvds_connector>;
+			};
+		};
+	};
+};
-- 
2.7.4


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

* Re: [PATCH 1/8] arm64: dts: renesas: hihope-common: Move du clk properties out of common dtsi
  2019-10-01 12:15 ` [PATCH 1/8] arm64: dts: renesas: hihope-common: Move du clk properties out of common dtsi Biju Das
@ 2019-10-01 18:11   ` Laurent Pinchart
  2019-10-01 18:17     ` Geert Uytterhoeven
  0 siblings, 1 reply; 19+ messages in thread
From: Laurent Pinchart @ 2019-10-01 18:11 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Mark Rutland, Simon Horman, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Hi Biju,

Thank you for the patch.

On Tue, Oct 01, 2019 at 01:15:17PM +0100, Biju Das wrote:
> RZ/G2N board is pin compatible with RZ/G2M board. However on the SoC
> side RZ/G2N uses DU3 where as RZ/G2M uses DU2 for the DPAD. In order to
> reuse the common dtsi for both the boards, it is required to move du clock
> properties from common dtsi to board specific dts.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>

It would be nice if DT had a syntax that allowed extending an existing
property. It would allow us to write

&du {
	clocks += <&versaclock5 1>,
		  <&x302_clk>,
		  <&versaclock5 2>;
	clock-names += "dclkin.0", "dclkin.1", "dclkin.2";
};

in hihope-common.dtsi and be done with it.

Rob, do you think that's something worth adding ?

In any case, until we have that, this patch looks good to me.

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

> ---
>  arch/arm64/boot/dts/renesas/hihope-common.dtsi        |  8 --------
>  arch/arm64/boot/dts/renesas/r8a774a1-hihope-rzg2m.dts | 11 +++++++++++
>  2 files changed, 11 insertions(+), 8 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/renesas/hihope-common.dtsi b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> index 3e376d2..355d0a2 100644
> --- a/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> +++ b/arch/arm64/boot/dts/renesas/hihope-common.dtsi
> @@ -142,14 +142,6 @@
>  };
>  
>  &du {
> -	clocks = <&cpg CPG_MOD 724>,
> -		 <&cpg CPG_MOD 723>,
> -		 <&cpg CPG_MOD 722>,
> -		 <&versaclock5 1>,
> -		 <&x302_clk>,
> -		 <&versaclock5 2>;
> -	clock-names = "du.0", "du.1", "du.2",
> -		      "dclkin.0", "dclkin.1", "dclkin.2";
>  	status = "okay";
>  };
>  
> diff --git a/arch/arm64/boot/dts/renesas/r8a774a1-hihope-rzg2m.dts b/arch/arm64/boot/dts/renesas/r8a774a1-hihope-rzg2m.dts
> index 93ca973..96f2fb0 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774a1-hihope-rzg2m.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a774a1-hihope-rzg2m.dts
> @@ -24,3 +24,14 @@
>  		reg = <0x6 0x00000000 0x0 0x80000000>;
>  	};
>  };
> +
> +&du {
> +	clocks = <&cpg CPG_MOD 724>,
> +		 <&cpg CPG_MOD 723>,
> +		 <&cpg CPG_MOD 722>,
> +		 <&versaclock5 1>,
> +		 <&x302_clk>,
> +		 <&versaclock5 2>;
> +	clock-names = "du.0", "du.1", "du.2",
> +		      "dclkin.0", "dclkin.1", "dclkin.2";
> +};

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 2/8] arm64: dts: renesas: r8a774b1: Add DU device to DT
  2019-10-01 12:15 ` [PATCH 2/8] arm64: dts: renesas: r8a774b1: Add DU device to DT Biju Das
@ 2019-10-01 18:13   ` Laurent Pinchart
  0 siblings, 0 replies; 19+ messages in thread
From: Laurent Pinchart @ 2019-10-01 18:13 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Mark Rutland, Simon Horman, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Hi Biju,

Thank you for the patch.

On Tue, Oct 01, 2019 at 01:15:18PM +0100, Biju Das wrote:
> Add the DU device to r8a774b1 SoC DT.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>

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

> ---
>  arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 38 +++++++++++++++++++++++++++++++
>  1 file changed, 38 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> index 9d5630a..777b45d 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> @@ -1285,7 +1285,18 @@
>  		};
>  
>  		du: display@feb00000 {
> +			compatible = "renesas,du-r8a774b1";
>  			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";
> +			status = "disabled";
> +
> +			vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
>  
>  			ports {
>  				#address-cells = <1>;
> @@ -1304,6 +1315,33 @@
>  				port@2 {
>  					reg = <2>;
>  					du_out_lvds0: endpoint {
> +						remote-endpoint = <&lvds0_in>;
> +					};
> +				};
> +			};
> +		};
> +
> +		lvds0: lvds@feb90000 {
> +			compatible = "renesas,r8a774b1-lvds";
> +			reg = <0 0xfeb90000 0 0x14>;
> +			clocks = <&cpg CPG_MOD 727>;
> +			power-domains = <&sysc R8A774B1_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

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

* Re: [PATCH 3/8] arm64: dts: renesas: r8a774b1: Add HDMI encoder instance
  2019-10-01 12:15 ` [PATCH 3/8] arm64: dts: renesas: r8a774b1: Add HDMI encoder instance Biju Das
@ 2019-10-01 18:15   ` Laurent Pinchart
  0 siblings, 0 replies; 19+ messages in thread
From: Laurent Pinchart @ 2019-10-01 18:15 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Mark Rutland, Simon Horman, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Hi Biju,

Thank you for the patch.

On Tue, Oct 01, 2019 at 01:15:19PM +0100, Biju Das wrote:
> Add the HDMI encoder to the R8A774B1 DT in disabled state.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>

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

> ---
>  arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 15 +++++++++++++++
>  1 file changed, 15 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> index 777b45d..979be5a 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> @@ -1267,7 +1267,16 @@
>  		};
>  
>  		hdmi0: hdmi@fead0000 {
> +			compatible = "renesas,r8a774b1-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 R8A774B1_CLK_HDMI>;
> +			clock-names = "iahb", "isfr";
> +			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
> +			resets = <&cpg 729>;
> +			status = "disabled";
>  
>  			ports {
>  				#address-cells = <1>;
> @@ -1276,11 +1285,16 @@
>  				port@0 {
>  					reg = <0>;
>  					dw_hdmi0_in: endpoint {
> +						remote-endpoint = <&du_out_hdmi0>;
>  					};
>  				};
>  				port@1 {
>  					reg = <1>;
>  				};
> +				port@2 {
> +					/* HDMI sound */
> +					reg = <2>;
> +				};
>  			};
>  		};
>  
> @@ -1310,6 +1324,7 @@
>  				port@1 {
>  					reg = <1>;
>  					du_out_hdmi0: endpoint {
> +						remote-endpoint = <&dw_hdmi0_in>;
>  					};
>  				};
>  				port@2 {

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 4/8] arm64: dts: renesas: r8a774b1-hihope-rzg2n: Add display clock properties
  2019-10-01 12:15 ` [PATCH 4/8] arm64: dts: renesas: r8a774b1-hihope-rzg2n: Add display clock properties Biju Das
@ 2019-10-01 18:15   ` Laurent Pinchart
  0 siblings, 0 replies; 19+ messages in thread
From: Laurent Pinchart @ 2019-10-01 18:15 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Mark Rutland, Simon Horman, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Hi Biju,

Thank you for the patch.

On Tue, Oct 01, 2019 at 01:15:20PM +0100, Biju Das wrote:
> Add display clock properties for the HiHope RZ/G2N board.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>

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

> ---
>  arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts | 11 +++++++++++
>  1 file changed, 11 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts b/arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts
> index c9e2119..9910c1a 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a774b1-hihope-rzg2n.dts
> @@ -25,6 +25,17 @@
>  	};
>  };
>  
> +&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";
> +};
> +
>  &sdhi3 {
>  	mmc-hs400-1_8v;
>  };

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 5/8] arm64: dts: renesas: r8a774b1: Add FDP1 device nodes
  2019-10-01 12:15 ` [PATCH 5/8] arm64: dts: renesas: r8a774b1: Add FDP1 device nodes Biju Das
@ 2019-10-01 18:16   ` Laurent Pinchart
  0 siblings, 0 replies; 19+ messages in thread
From: Laurent Pinchart @ 2019-10-01 18:16 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Mark Rutland, Simon Horman, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Hi Biju,

Thank you for the patch.

On Tue, Oct 01, 2019 at 01:15:21PM +0100, Biju Das wrote:
> The r8a774b1 has a single FDP1 instance.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>

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

> ---
>  arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 10 ++++++++++
>  1 file changed, 10 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> index 979be5a..93b2e88 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> @@ -1182,6 +1182,16 @@
>  			/* placeholder */
>  		};
>  
> +		fdp1@fe940000 {
> +			compatible = "renesas,fdp1";
> +			reg = <0 0xfe940000 0 0x2400>;
> +			interrupts = <GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH>;
> +			clocks = <&cpg CPG_MOD 119>;
> +			power-domains = <&sysc R8A774B1_PD_A3VP>;
> +			resets = <&cpg 119>;
> +			renesas,fcp = <&fcpf0>;
> +		};
> +
>  		fcpf0: fcp@fe950000 {
>  			compatible = "renesas,fcpf";
>  			reg = <0 0xfe950000 0 0x200>;

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 6/8] arm64: dts: renesas: r8a774b1: Add PWM device nodes
  2019-10-01 12:15 ` [PATCH 6/8] arm64: dts: renesas: r8a774b1: Add PWM " Biju Das
@ 2019-10-01 18:17   ` Laurent Pinchart
  0 siblings, 0 replies; 19+ messages in thread
From: Laurent Pinchart @ 2019-10-01 18:17 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Mark Rutland, Simon Horman, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Hi Biju,

Thank you for the patch.

On Tue, Oct 01, 2019 at 01:15:22PM +0100, Biju Das wrote:
> This patch adds PWM device nodes to r8a774b1 SoC DT.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>

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

> ---
>  arch/arm64/boot/dts/renesas/r8a774b1.dtsi | 70 +++++++++++++++++++++++++++++++
>  1 file changed, 70 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> index 93b2e88..538e9ce 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> @@ -940,6 +940,76 @@
>  			/* placeholder */
>  		};
>  
> +		pwm0: pwm@e6e30000 {
> +			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
> +			reg = <0 0xe6e30000 0 0x8>;
> +			#pwm-cells = <2>;
> +			clocks = <&cpg CPG_MOD 523>;
> +			resets = <&cpg 523>;
> +			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
> +			status = "disabled";
> +		};
> +
> +		pwm1: pwm@e6e31000 {
> +			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
> +			reg = <0 0xe6e31000 0 0x8>;
> +			#pwm-cells = <2>;
> +			clocks = <&cpg CPG_MOD 523>;
> +			resets = <&cpg 523>;
> +			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
> +			status = "disabled";
> +		};
> +
> +		pwm2: pwm@e6e32000 {
> +			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
> +			reg = <0 0xe6e32000 0 0x8>;
> +			#pwm-cells = <2>;
> +			clocks = <&cpg CPG_MOD 523>;
> +			resets = <&cpg 523>;
> +			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
> +			status = "disabled";
> +		};
> +
> +		pwm3: pwm@e6e33000 {
> +			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
> +			reg = <0 0xe6e33000 0 0x8>;
> +			#pwm-cells = <2>;
> +			clocks = <&cpg CPG_MOD 523>;
> +			resets = <&cpg 523>;
> +			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
> +			status = "disabled";
> +		};
> +
> +		pwm4: pwm@e6e34000 {
> +			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
> +			reg = <0 0xe6e34000 0 0x8>;
> +			#pwm-cells = <2>;
> +			clocks = <&cpg CPG_MOD 523>;
> +			resets = <&cpg 523>;
> +			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
> +			status = "disabled";
> +		};
> +
> +		pwm5: pwm@e6e35000 {
> +			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
> +			reg = <0 0xe6e35000 0 0x8>;
> +			#pwm-cells = <2>;
> +			clocks = <&cpg CPG_MOD 523>;
> +			resets = <&cpg 523>;
> +			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
> +			status = "disabled";
> +		};
> +
> +		pwm6: pwm@e6e36000 {
> +			compatible = "renesas,pwm-r8a774b1", "renesas,pwm-rcar";
> +			reg = <0 0xe6e36000 0 0x8>;
> +			#pwm-cells = <2>;
> +			clocks = <&cpg CPG_MOD 523>;
> +			resets = <&cpg 523>;
> +			power-domains = <&sysc R8A774B1_PD_ALWAYS_ON>;
> +			status = "disabled";
> +		};
> +
>  		scif0: serial@e6e60000 {
>  			compatible = "renesas,scif-r8a774b1",
>  				     "renesas,rcar-gen3-scif", "renesas,scif";

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 1/8] arm64: dts: renesas: hihope-common: Move du clk properties out of common dtsi
  2019-10-01 18:11   ` Laurent Pinchart
@ 2019-10-01 18:17     ` Geert Uytterhoeven
  0 siblings, 0 replies; 19+ messages in thread
From: Geert Uytterhoeven @ 2019-10-01 18:17 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Biju Das, Rob Herring, Mark Rutland, Simon Horman,
	Kieran Bingham, Geert Uytterhoeven, Magnus Damm, Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Chris Paterson, Fabrizio Castro

Hi Laurent,

On Tue, Oct 1, 2019 at 8:11 PM Laurent Pinchart
<laurent.pinchart@ideasonboard.com> wrote:
> On Tue, Oct 01, 2019 at 01:15:17PM +0100, Biju Das wrote:
> > RZ/G2N board is pin compatible with RZ/G2M board. However on the SoC
> > side RZ/G2N uses DU3 where as RZ/G2M uses DU2 for the DPAD. In order to
> > reuse the common dtsi for both the boards, it is required to move du clock
> > properties from common dtsi to board specific dts.
> >
> > Signed-off-by: Biju Das <biju.das@bp.renesas.com>
>
> It would be nice if DT had a syntax that allowed extending an existing
> property. It would allow us to write
>
> &du {
>         clocks += <&versaclock5 1>,
>                   <&x302_clk>,
>                   <&versaclock5 2>;
>         clock-names += "dclkin.0", "dclkin.1", "dclkin.2";
> };
>
> in hihope-common.dtsi and be done with it.
>
> Rob, do you think that's something worth adding ?

Yeah, we already have /delete-property/, but not yet /append-property/.

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] 19+ messages in thread

* Re: [PATCH 7/8] arm64: dts: renesas: hihope-rzg2-ex: Enable backlight
  2019-10-01 12:15 ` [PATCH 7/8] arm64: dts: renesas: hihope-rzg2-ex: Enable backlight Biju Das
@ 2019-10-01 18:18   ` Laurent Pinchart
  0 siblings, 0 replies; 19+ messages in thread
From: Laurent Pinchart @ 2019-10-01 18:18 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Mark Rutland, Simon Horman, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Hi Biju,

Thank you for the patch.

On Tue, Oct 01, 2019 at 01:15:23PM +0100, Biju Das wrote:
> This patch enables backlight support.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>

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

> ---
>  arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi | 20 ++++++++++++++++++++
>  1 file changed, 20 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
> index 4280b19..70f9a2a 100644
> --- a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
> +++ b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
> @@ -13,6 +13,14 @@
>  	chosen {
>  		bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
>  	};
> +
> +	backlight {
> +		compatible = "pwm-backlight";
> +		pwms = <&pwm0 0 50000>;
> +
> +		brightness-levels = <0 2 8 16 32 64 128 255>;
> +		default-brightness-level = <6>;
> +	};
>  };
>  
>  &avb {
> @@ -82,4 +90,16 @@
>  		groups = "can1_data";
>  		function = "can1";
>  	};
> +
> +	pwm0_pins: pwm0 {
> +		groups = "pwm0";
> +		function = "pwm0";
> +	};
> +};
> +
> +&pwm0 {
> +	pinctrl-0 = <&pwm0_pins>;
> +	pinctrl-names = "default";
> +
> +	status = "okay";
>  };

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 8/8] arm64: dts: renesas: hihope-rzg2-ex: Add LVDS panel support
  2019-10-01 12:15 ` [PATCH 8/8] arm64: dts: renesas: hihope-rzg2-ex: Add LVDS panel support Biju Das
@ 2019-10-01 18:25   ` Laurent Pinchart
  2019-10-02  8:30     ` Biju Das
  0 siblings, 1 reply; 19+ messages in thread
From: Laurent Pinchart @ 2019-10-01 18:25 UTC (permalink / raw)
  To: Biju Das
  Cc: Rob Herring, Mark Rutland, Simon Horman, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Hi Biju,

Thank you for the patch.

On Tue, Oct 01, 2019 at 01:15:24PM +0100, Biju Das wrote:
> This patch adds support for Advantech idk-1110wr LVDS panel.
> The HiHope RZ/G2[MN] is advertised as compatible with panel idk-1110wr
> from Advantech, however the panel isn't sold alongside the board.
> 
> Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> ---
>  arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi  | 30 +++++++++++++++++++
>  arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi | 37 ++++++++++++++++++++++++
>  2 files changed, 67 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi
> 
> diff --git a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
> index 70f9a2a..ae1ef2d 100644
> --- a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
> +++ b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
> @@ -5,6 +5,8 @@
>   * Copyright (C) 2019 Renesas Electronics Corp.
>   */
>  
> +#include "rzg2-panel-lvds.dtsi"
> +
>  / {
>  	aliases {
>  		ethernet0 = &avb;
> @@ -51,6 +53,34 @@
>  	status = "okay";
>  };
>  
> +&gpio1 {
> +	/*
> +	 * When GP1_20 is LOW LVDS0 is connected to the LVDS connector
> +	 * When GP1_20 is HIGH LVDS0 is connected to the LT8918L
> +	 */
> +	lvds-connector-en-gpio {
> +		gpio-hog;
> +		gpios = <20 GPIO_ACTIVE_HIGH>;
> +		output-low;
> +		line-name = "lvds-connector-en-gpio";
> +	};
> +};
> +
> +&lvds0 {
> +	/* Uncomment  below line to enable lvds panel connected to RZ/G2N board
> +	 */
> +
> +	/* status = "okay"; */
> +
> +	ports {
> +		port@1 {
> +			lvds_connector: endpoint {
> +				remote-endpoint = <&panel_in_advantech_idk_1110wr>;
> +			};
> +		};
> +	};
> +};
> +
>  &pciec0 {
>  	status = "okay";
>  };
> diff --git a/arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi b/arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi
> new file mode 100644
> index 0000000..768a8ec
> --- /dev/null
> +++ b/arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi

Should this be named according to the panel name istead of just
"panel-lvds" ? It could be used by any board, and this board could also
use a different LVDS panel.

> @@ -0,0 +1,37 @@
> +// SPDX-License-Identifier: GPL-2.0
> +/*
> + * Device Tree Source for the LVDS panels connected to RZ/G2 boards
> + *
> + * Copyright (C) 2019 Renesas Electronics Corp.
> + */
> +
> +/ {
> +
> +	panel-lvds {
> +		compatible = "advantech,idk-1110wr", "panel-lvds";
> +
> +		width-mm = <223>;
> +		height-mm = <125>;
> +
> +		data-mapping = "jeida-24";
> +
> +		panel-timing {
> +			/* 1024x600 @60Hz */
> +			clock-frequency = <51200000>;
> +			hactive = <1024>;
> +			vactive = <600>;
> +			hsync-len = <240>;
> +			hfront-porch = <40>;
> +			hback-porch = <40>;
> +			vfront-porch = <15>;
> +			vback-porch = <10>;
> +			vsync-len = <10>;
> +		};
> +
> +		port {
> +			panel_in_advantech_idk_1110wr: endpoint {

Could we abbreviate the label name to panel_in ? That way the board .dts
wouldn't need to update the remote-endpoint phandle to use a different
panel, only the #include would need to be changed.

> +				remote-endpoint = <&lvds_connector>;
> +			};
> +		};
> +	};
> +};

For the same reason I would set the remote-endpoint for &lvds_connector
here. See arch/arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi for an example.


-- 
Regards,

Laurent Pinchart

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

* RE: [PATCH 8/8] arm64: dts: renesas: hihope-rzg2-ex: Add LVDS panel support
  2019-10-01 18:25   ` Laurent Pinchart
@ 2019-10-02  8:30     ` Biju Das
  0 siblings, 0 replies; 19+ messages in thread
From: Biju Das @ 2019-10-02  8:30 UTC (permalink / raw)
  To: Laurent Pinchart
  Cc: Rob Herring, Mark Rutland, Simon Horman, Kieran Bingham,
	Geert Uytterhoeven, Magnus Damm, linux-renesas-soc, devicetree,
	Chris Paterson, Fabrizio Castro

Hi Laurent,

Thanks for your feedback.

> Subject: Re: [PATCH 8/8] arm64: dts: renesas: hihope-rzg2-ex: Add LVDS
> panel support
> 
> Hi Biju,
> 
> Thank you for the patch.
> 
> On Tue, Oct 01, 2019 at 01:15:24PM +0100, Biju Das wrote:
> > This patch adds support for Advantech idk-1110wr LVDS panel.
> > The HiHope RZ/G2[MN] is advertised as compatible with panel idk-1110wr
> > from Advantech, however the panel isn't sold alongside the board.
> >
> > Signed-off-by: Biju Das <biju.das@bp.renesas.com>
> > ---
> >  arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi  | 30
> > +++++++++++++++++++  arch/arm64/boot/dts/renesas/rzg2-panel-
> lvds.dtsi
> > | 37 ++++++++++++++++++++++++
> >  2 files changed, 67 insertions(+)
> >  create mode 100644 arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi
> >
> > diff --git a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
> > b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
> > index 70f9a2a..ae1ef2d 100644
> > --- a/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
> > +++ b/arch/arm64/boot/dts/renesas/hihope-rzg2-ex.dtsi
> > @@ -5,6 +5,8 @@
> >   * Copyright (C) 2019 Renesas Electronics Corp.
> >   */
> >
> > +#include "rzg2-panel-lvds.dtsi"
> > +
> >  / {
> >  	aliases {
> >  		ethernet0 = &avb;
> > @@ -51,6 +53,34 @@
> >  	status = "okay";
> >  };
> >
> > +&gpio1 {
> > +	/*
> > +	 * When GP1_20 is LOW LVDS0 is connected to the LVDS connector
> > +	 * When GP1_20 is HIGH LVDS0 is connected to the LT8918L
> > +	 */
> > +	lvds-connector-en-gpio {
> > +		gpio-hog;
> > +		gpios = <20 GPIO_ACTIVE_HIGH>;
> > +		output-low;
> > +		line-name = "lvds-connector-en-gpio";
> > +	};
> > +};
> > +
> > +&lvds0 {
> > +	/* Uncomment  below line to enable lvds panel connected to
> RZ/G2N board
> > +	 */
> > +
> > +	/* status = "okay"; */
> > +
> > +	ports {
> > +		port@1 {
> > +			lvds_connector: endpoint {
> > +				remote-endpoint =
> <&panel_in_advantech_idk_1110wr>;
> > +			};
> > +		};
> > +	};
> > +};
> > +
> >  &pciec0 {
> >  	status = "okay";
> >  };
> > diff --git a/arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi
> > b/arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi
> > new file mode 100644 advantech,idk-2121wr
> > index 0000000..768a8ec
> > --- /dev/null
> > +++ b/arch/arm64/boot/dts/renesas/rzg2-panel-lvds.dtsi
> 
> Should this be named according to the panel name istead of just "panel-lvds"
> ? It could be used by any board, and this board could also use a different
> LVDS panel.

I thought ,we can use a common file for all the LVDS panels used by RZ/G2 boards and refer the panel from board dtsi.
For eg:- RZ/G2[MN] will refer " panel_in_advantech_idk_1110wr" and RZ/G2E will refer " panel_in_advantech_idk_2121wr"
If user wants a different panel, then  needs to define panel definitions in this file and use it.  But I am not sure it is the right thing to do.

OK. Anyway I will create a panel specific dtsi file and send V2.

> > @@ -0,0 +1,37 @@
> > +// SPDX-License-Identifier: GPL-2.0
> > +/*
> > + * Device Tree Source for the LVDS panels connected to RZ/G2 boards
> > + *
> > + * Copyright (C) 2019 Renesas Electronics Corp.
> > + */
> > +
> > +/ {
> > +
> > +	panel-lvds {
> > +		compatible = "advantech,idk-1110wr", "panel-lvds";
> > +
> > +		width-mm = <223>;
> > +		height-mm = <125>;
> > +
> > +		data-mapping = "jeida-24";
> > +
> > +		panel-timing {
> > +			/* 1024x600 @60Hz */
> > +			clock-frequency = <51200000>;
> > +			hactive = <1024>;
> > +			vactive = <600>;
> > +			hsync-len = <240>;
> > +			hfront-porch = <40>;
> > +			hback-porch = <40>;
> > +			vfront-porch = <15>;
> > +			vback-porch = <10>;
> > +			vsync-len = <10>;
> > +		};
> > +
> > +		port {
> > +			panel_in_advantech_idk_1110wr: endpoint {
> 
> Could we abbreviate the label name to panel_in ? That way the board .dts
> wouldn't need to update the remote-endpoint phandle to use a different
> panel, only the #include would need to be changed.

OK. Will change this.

> > +				remote-endpoint = <&lvds_connector>;
> > +			};
> > +		};
> > +	};
> > +};
> 
> For the same reason I would set the remote-endpoint for &lvds_connector
> here. See arch/arm/boot/dts/r8a77xx-aa104xd12-panel.dtsi for an example.

OK.  Will add this.

Regards,
Biju

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

end of thread, other threads:[~2019-10-02  8:30 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-01 12:15 [PATCH 0/8] Add Display support Biju Das
2019-10-01 12:15 ` [PATCH 1/8] arm64: dts: renesas: hihope-common: Move du clk properties out of common dtsi Biju Das
2019-10-01 18:11   ` Laurent Pinchart
2019-10-01 18:17     ` Geert Uytterhoeven
2019-10-01 12:15 ` [PATCH 2/8] arm64: dts: renesas: r8a774b1: Add DU device to DT Biju Das
2019-10-01 18:13   ` Laurent Pinchart
2019-10-01 12:15 ` [PATCH 3/8] arm64: dts: renesas: r8a774b1: Add HDMI encoder instance Biju Das
2019-10-01 18:15   ` Laurent Pinchart
2019-10-01 12:15 ` [PATCH 4/8] arm64: dts: renesas: r8a774b1-hihope-rzg2n: Add display clock properties Biju Das
2019-10-01 18:15   ` Laurent Pinchart
2019-10-01 12:15 ` [PATCH 5/8] arm64: dts: renesas: r8a774b1: Add FDP1 device nodes Biju Das
2019-10-01 18:16   ` Laurent Pinchart
2019-10-01 12:15 ` [PATCH 6/8] arm64: dts: renesas: r8a774b1: Add PWM " Biju Das
2019-10-01 18:17   ` Laurent Pinchart
2019-10-01 12:15 ` [PATCH 7/8] arm64: dts: renesas: hihope-rzg2-ex: Enable backlight Biju Das
2019-10-01 18:18   ` Laurent Pinchart
2019-10-01 12:15 ` [PATCH 8/8] arm64: dts: renesas: hihope-rzg2-ex: Add LVDS panel support Biju Das
2019-10-01 18:25   ` Laurent Pinchart
2019-10-02  8:30     ` Biju Das

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