diff mbox

[09/13] ARM: dts: mediatek: Enable clock support for Mediatek MT8135.

Message ID 1423478845-2835-10-git-send-email-s.hauer@pengutronix.de (mailing list archive)
State New, archived
Headers show

Commit Message

Sascha Hauer Feb. 9, 2015, 10:47 a.m. UTC
From: James Liao <jamesjj.liao@mediatek.com>

This patch adds MT8135 clock controllers into device tree.

Signed-off-by: James Liao <jamesjj.liao@mediatek.com>
Signed-off-by: Henry Chen <henryc.chen@mediatek.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
---
 arch/arm/boot/dts/mt8135.dtsi | 39 +++++++++++++++++++++++++++++++++++++++
 1 file changed, 39 insertions(+)

Comments

Russell King - ARM Linux Feb. 9, 2015, 10:51 a.m. UTC | #1
On Mon, Feb 09, 2015 at 11:47:21AM +0100, Sascha Hauer wrote:
> From: James Liao <jamesjj.liao@mediatek.com>
> 
> This patch adds MT8135 clock controllers into device tree.
> @@ -86,6 +87,18 @@
>  			clock-frequency = <32000>;
>  			#clock-cells = <0>;
>  		};
> +
> +		clk_null: clk_null {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <0>;
> +		};
> +
> +		clk26m: clk26m {
> +			compatible = "fixed-clock";
> +			#clock-cells = <0>;
> +			clock-frequency = <26000000>;
> +		};

Is this supposed to be here?
Sascha Hauer Feb. 9, 2015, 11:25 a.m. UTC | #2
On Mon, Feb 09, 2015 at 10:51:34AM +0000, Russell King - ARM Linux wrote:
> On Mon, Feb 09, 2015 at 11:47:21AM +0100, Sascha Hauer wrote:
> > From: James Liao <jamesjj.liao@mediatek.com>
> > 
> > This patch adds MT8135 clock controllers into device tree.
> > @@ -86,6 +87,18 @@
> >  			clock-frequency = <32000>;
> >  			#clock-cells = <0>;
> >  		};
> > +
> > +		clk_null: clk_null {
> > +			compatible = "fixed-clock";
> > +			#clock-cells = <0>;
> > +			clock-frequency = <0>;
> > +		};
> > +
> > +		clk26m: clk26m {
> > +			compatible = "fixed-clock";
> > +			#clock-cells = <0>;
> > +			clock-frequency = <26000000>;
> > +		};
> 
> Is this supposed to be here?

The clock support needs at least the clk26m clk. Do you think it should
be in another patch or not present at all?

Sascha
Russell King - ARM Linux Feb. 9, 2015, 11:27 a.m. UTC | #3
On Mon, Feb 09, 2015 at 12:25:00PM +0100, Sascha Hauer wrote:
> On Mon, Feb 09, 2015 at 10:51:34AM +0000, Russell King - ARM Linux wrote:
> > On Mon, Feb 09, 2015 at 11:47:21AM +0100, Sascha Hauer wrote:
> > > From: James Liao <jamesjj.liao@mediatek.com>
> > > 
> > > This patch adds MT8135 clock controllers into device tree.
> > > @@ -86,6 +87,18 @@
> > >  			clock-frequency = <32000>;
> > >  			#clock-cells = <0>;
> > >  		};
> > > +
> > > +		clk_null: clk_null {
> > > +			compatible = "fixed-clock";
> > > +			#clock-cells = <0>;
> > > +			clock-frequency = <0>;
> > > +		};
> > > +
> > > +		clk26m: clk26m {
> > > +			compatible = "fixed-clock";
> > > +			#clock-cells = <0>;
> > > +			clock-frequency = <26000000>;
> > > +		};
> > 
> > Is this supposed to be here?
> 
> The clock support needs at least the clk26m clk. Do you think it should
> be in another patch or not present at all?

I didn't see anything which referenced either clk_null or clk26m in this
patch.  My main concern was that clk_null, but my concern grew when I
found that clk26m wasn't referenced either.

If the MT8135 needs it, shouldn't something in its description reference
this clock?
Sascha Hauer Feb. 9, 2015, 11:44 a.m. UTC | #4
On Mon, Feb 09, 2015 at 11:27:21AM +0000, Russell King - ARM Linux wrote:
> On Mon, Feb 09, 2015 at 12:25:00PM +0100, Sascha Hauer wrote:
> > On Mon, Feb 09, 2015 at 10:51:34AM +0000, Russell King - ARM Linux wrote:
> > > On Mon, Feb 09, 2015 at 11:47:21AM +0100, Sascha Hauer wrote:
> > > > From: James Liao <jamesjj.liao@mediatek.com>
> > > > 
> > > > This patch adds MT8135 clock controllers into device tree.
> > > > @@ -86,6 +87,18 @@
> > > >  			clock-frequency = <32000>;
> > > >  			#clock-cells = <0>;
> > > >  		};
> > > > +
> > > > +		clk_null: clk_null {
> > > > +			compatible = "fixed-clock";
> > > > +			#clock-cells = <0>;
> > > > +			clock-frequency = <0>;
> > > > +		};
> > > > +
> > > > +		clk26m: clk26m {
> > > > +			compatible = "fixed-clock";
> > > > +			#clock-cells = <0>;
> > > > +			clock-frequency = <26000000>;
> > > > +		};
> > > 
> > > Is this supposed to be here?
> > 
> > The clock support needs at least the clk26m clk. Do you think it should
> > be in another patch or not present at all?
> 
> I didn't see anything which referenced either clk_null or clk26m in this
> patch.  My main concern was that clk_null, but my concern grew when I
> found that clk26m wasn't referenced either.
> 
> If the MT8135 needs it, shouldn't something in its description reference
> this clock?

It's used in the code. The mt8135 clk code directly uses the names of
these three clocks as parent_names.

Sascha
diff mbox

Patch

diff --git a/arch/arm/boot/dts/mt8135.dtsi b/arch/arm/boot/dts/mt8135.dtsi
index 7d56a98..7cb5e84 100644
--- a/arch/arm/boot/dts/mt8135.dtsi
+++ b/arch/arm/boot/dts/mt8135.dtsi
@@ -12,6 +12,7 @@ 
  * GNU General Public License for more details.
  */
 
+#include <dt-bindings/clock/mt8135-clk.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include "skeleton64.dtsi"
@@ -86,6 +87,18 @@ 
 			clock-frequency = <32000>;
 			#clock-cells = <0>;
 		};
+
+		clk_null: clk_null {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <0>;
+		};
+
+		clk26m: clk26m {
+			compatible = "fixed-clock";
+			#clock-cells = <0>;
+			clock-frequency = <26000000>;
+		};
 	};
 
 	soc {
@@ -94,6 +107,26 @@ 
 		compatible = "simple-bus";
 		ranges;
 
+		topckgen: topckgen@10000000 {
+			compatible = "mediatek,mt8135-topckgen";
+			reg = <0 0x10000000 0 0x1000>;
+			#clock-cells = <1>;
+		};
+
+		infracfg: infracfg@10001000 {
+			#reset-cells = <1>;
+			#clock-cells = <1>;
+			compatible = "mediatek,mt8135-infracfg", "syscon";
+			reg = <0 0x10001000 0 0x1000>;
+		};
+
+		pericfg: pericfg@10003000 {
+			#reset-cells = <1>;
+			#clock-cells = <1>;
+			compatible = "mediatek,mt8135-pericfg", "syscon";
+			reg = <0 0x10003000 0 0x1000>;
+		};
+
 		timer: timer@10008000 {
 			compatible = "mediatek,mt8135-timer",
 					"mediatek,mt6577-timer";
@@ -103,6 +136,12 @@ 
 			clock-names = "system-clk", "rtc-clk";
 		};
 
+		apmixedsys: apmixedsys@10209000 {
+			compatible = "mediatek,mt8135-apmixedsys";
+			reg = <0 0x10209000 0 0x1000>;
+			#clock-cells = <1>;
+		};
+
 		gic: interrupt-controller@10211000 {
 			compatible = "arm,cortex-a15-gic";
 			interrupt-controller;