diff mbox

arm64: dts: r8a7795: salvator-x: Add DU0 and DU3 external dot clocks

Message ID 20170112005330.8094-1-laurent.pinchart+renesas@ideasonboard.com (mailing list archive)
State Not Applicable
Headers show

Commit Message

Laurent Pinchart Jan. 12, 2017, 12:53 a.m. UTC
The clocks are generated by an I2C-controlled programmable clock
generator.

Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
---
 arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 29 ++++++++++++++++++++--
 1 file changed, 27 insertions(+), 2 deletions(-)

Hi Marek,

With this patch applied on top of a merge of my HDMI output series and your
VC5 series, I've successfully tested VGA output and LVDS output on the
Salvator-X H3 board. You can thus add

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

to patch 2/2.

Comments

Marek Vasut Jan. 12, 2017, 12:57 a.m. UTC | #1
On 01/12/2017 01:53 AM, Laurent Pinchart wrote:
> The clocks are generated by an I2C-controlled programmable clock
> generator.
> 
> Signed-off-by: Laurent Pinchart <laurent.pinchart+renesas@ideasonboard.com>
> ---
>  arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 29 ++++++++++++++++++++--
>  1 file changed, 27 insertions(+), 2 deletions(-)
> 
> Hi Marek,
> 
> With this patch applied on top of a merge of my HDMI output series and your
> VC5 series, I've successfully tested VGA output and LVDS output on the
> Salvator-X H3 board. You can thus add
> 
> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

Thanks!

Minor nit below :)

> to patch 2/2.
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> index 2dc0887fc400..22be583be4bc 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> @@ -178,6 +178,12 @@
>  		clock-frequency = <33000000>;
>  	};
>  
> +	x23_clk: x23-clock {
> +		compatible = "fixed-clock";
> +		#clock-cells = <0>;
> +		clock-frequency = <25000000>;
> +	};
> +
>  	hdmi0-out {
>  		compatible = "hdmi-connector";
>  		label = "HDMI0 OUT";
> @@ -271,10 +277,15 @@
>  		 <&cpg CPG_MOD 722>,
>  		 <&cpg CPG_MOD 721>,
>  		 <&cpg CPG_MOD 727>,
> +		 <&versaclock5 1>,
>  		 <&x21_clk>,
> -		 <&x22_clk>;
> +		 <&x22_clk>,
> +		 <&versaclock5 2>;
>  	clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0",
> -		      "dclkin.1", "dclkin.2";
> +		      "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
> +
> +	assigned-clocks = <&versaclock5 1>, <&versaclock5 2>;
> +	assigned-clock-rates = <148500000>, <108000000>;

I think you want to remove these two lines ^^^^^^^^^

>  	ports {
>  		port@0 {
> @@ -460,6 +471,20 @@
>  	};
>  };
>  
> +&i2c4 {
> +	status = "okay";
> +
> +	clock-frequency = <100000>;
> +
> +	versaclock5: clock-generator@6a {
> +		compatible = "idt,5p49v5923";
> +		reg = <0x6a>;
> +		#clock-cells = <1>;
> +		clocks = <&x23_clk>;
> +		clock-names = "xin";
> +	};
> +};
> +
>  &rcar_sound {
>  	pinctrl-0 = <&sound_pins &sound_clk_pins>;
>  	pinctrl-names = "default";
>
Laurent Pinchart Jan. 12, 2017, 1:48 a.m. UTC | #2
Hi Marek,

On Thursday 12 Jan 2017 01:57:09 Marek Vasut wrote:
> On 01/12/2017 01:53 AM, Laurent Pinchart wrote:
> > The clocks are generated by an I2C-controlled programmable clock
> > generator.
> > 
> > Signed-off-by: Laurent Pinchart
> > <laurent.pinchart+renesas@ideasonboard.com>
> > ---
> > 
> >  arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 29 +++++++++++++++--
> >  1 file changed, 27 insertions(+), 2 deletions(-)
> > 
> > Hi Marek,
> > 
> > With this patch applied on top of a merge of my HDMI output series and
> > your VC5 series, I've successfully tested VGA output and LVDS output on
> > the Salvator-X H3 board. You can thus add
> > 
> > Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
> 
> Thanks!
> 
> Minor nit below :)
> 
> > to patch 2/2.
> > 
> > diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index
> > 2dc0887fc400..22be583be4bc 100644
> > --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
> > @@ -178,6 +178,12 @@
> >  		clock-frequency = <33000000>;
> >  	};
> > 
> > +	x23_clk: x23-clock {
> > +		compatible = "fixed-clock";
> > +		#clock-cells = <0>;
> > +		clock-frequency = <25000000>;
> > +	};
> > +
> >  	hdmi0-out {
> >  		compatible = "hdmi-connector";
> >  		label = "HDMI0 OUT";
> > @@ -271,10 +277,15 @@
> >  		 <&cpg CPG_MOD 722>,
> >  		 <&cpg CPG_MOD 721>,
> >  		 <&cpg CPG_MOD 727>,
> > +		 <&versaclock5 1>,
> >  		 <&x21_clk>,
> > -		 <&x22_clk>;
> > +		 <&x22_clk>,
> > +		 <&versaclock5 2>;
> > 
> >  	clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0",
> > -		      "dclkin.1", "dclkin.2";
> > +		      "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
> > +
> > +	assigned-clocks = <&versaclock5 1>, <&versaclock5 2>;
> > +	assigned-clock-rates = <148500000>, <108000000>;
> 
> I think you want to remove these two lines ^^^^^^^^^

You're right. I've tested the patch with those two lines removed, and things 
still work fine. I'll resubmit.
diff mbox

Patch

diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
index 2dc0887fc400..22be583be4bc 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
+++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts
@@ -178,6 +178,12 @@ 
 		clock-frequency = <33000000>;
 	};
 
+	x23_clk: x23-clock {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <25000000>;
+	};
+
 	hdmi0-out {
 		compatible = "hdmi-connector";
 		label = "HDMI0 OUT";
@@ -271,10 +277,15 @@ 
 		 <&cpg CPG_MOD 722>,
 		 <&cpg CPG_MOD 721>,
 		 <&cpg CPG_MOD 727>,
+		 <&versaclock5 1>,
 		 <&x21_clk>,
-		 <&x22_clk>;
+		 <&x22_clk>,
+		 <&versaclock5 2>;
 	clock-names = "du.0", "du.1", "du.2", "du.3", "lvds.0",
-		      "dclkin.1", "dclkin.2";
+		      "dclkin.0", "dclkin.1", "dclkin.2", "dclkin.3";
+
+	assigned-clocks = <&versaclock5 1>, <&versaclock5 2>;
+	assigned-clock-rates = <148500000>, <108000000>;
 
 	ports {
 		port@0 {
@@ -460,6 +471,20 @@ 
 	};
 };
 
+&i2c4 {
+	status = "okay";
+
+	clock-frequency = <100000>;
+
+	versaclock5: clock-generator@6a {
+		compatible = "idt,5p49v5923";
+		reg = <0x6a>;
+		#clock-cells = <1>;
+		clocks = <&x23_clk>;
+		clock-names = "xin";
+	};
+};
+
 &rcar_sound {
 	pinctrl-0 = <&sound_pins &sound_clk_pins>;
 	pinctrl-names = "default";