devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: andy.tang@nxp.com
To: mturquette@baylibre.com, oss@buserror.net
Cc: sboyd@kernel.org, robh+dt@kernel.org, mark.rutland@arm.com,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	Yuantian Tang <andy.tang@nxp.com>
Subject: [PATCH 2/3] powerpc: t102x: upgrade the legacy clock node
Date: Wed, 19 Sep 2018 15:39:05 +0800	[thread overview]
Message-ID: <20180919073906.34187-2-andy.tang@nxp.com> (raw)
In-Reply-To: <20180919073906.34187-1-andy.tang@nxp.com>

From: Yuantian Tang <andy.tang@nxp.com>

There are issues in current lagacy clock node.
The compatible string is not correct and the clocks property
refers to the wrong node too.
Instead of fixing them, upgrade it to use new clock binding
which has been already ready to use.

Signed-off-by: Tang Yuantian <andy.tang@nxp.com>
---
 arch/powerpc/boot/dts/fsl/qoriq-clockgen.dtsi |   23 +++++++++++++++++++++++
 arch/powerpc/boot/dts/fsl/t1023si-post.dtsi   |   20 ++------------------
 arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi    |    4 ++--
 3 files changed, 27 insertions(+), 20 deletions(-)
 create mode 100644 arch/powerpc/boot/dts/fsl/qoriq-clockgen.dtsi

diff --git a/arch/powerpc/boot/dts/fsl/qoriq-clockgen.dtsi b/arch/powerpc/boot/dts/fsl/qoriq-clockgen.dtsi
new file mode 100644
index 0000000..49c6f86
--- /dev/null
+++ b/arch/powerpc/boot/dts/fsl/qoriq-clockgen.dtsi
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Device Tree Include file for NXP PowerPC family SoC.
+ *
+ * Copyright 2017 NXP
+ *
+ * Tang Yuantian <andy.tang@nxp.com>
+ *
+ */
+
+sysclk: sysclk {
+	compatible = "fixed-clock";
+	#clock-cells = <0>;
+	clock-frequency = <100000000>;
+	clock-output-names = "sysclk";
+};
+
+clockgen: global-utilities@e1000 {
+	compatible = "fsl,qoriq-clockgen";
+	reg = <0xe1000 0x1000>;
+	#clock-cells = <2>;
+	clocks = <&sysclk>;
+};
diff --git a/arch/powerpc/boot/dts/fsl/t1023si-post.dtsi b/arch/powerpc/boot/dts/fsl/t1023si-post.dtsi
index 4908af5..c77d3e9 100644
--- a/arch/powerpc/boot/dts/fsl/t1023si-post.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t1023si-post.dtsi
@@ -342,25 +342,9 @@
 		fsl,liodn-bits = <12>;
 	};
 
-/include/ "qoriq-clockgen2.dtsi"
+/include/ "qoriq-clockgen.dtsi"
 	global-utilities@e1000 {
-		compatible = "fsl,t1023-clockgen", "fsl,qoriq-clockgen-2.0";
-		mux0: mux0@0 {
-			#clock-cells = <0>;
-			reg = <0x0 4>;
-			compatible = "fsl,core-mux-clock";
-			clocks = <&pll0 0>, <&pll0 1>;
-			clock-names = "pll0_0", "pll0_1";
-			clock-output-names = "cmux0";
-		};
-		mux1: mux1@20 {
-			#clock-cells = <0>;
-			reg = <0x20 4>;
-			compatible = "fsl,core-mux-clock";
-			clocks = <&pll0 0>, <&pll0 1>;
-			clock-names = "pll0_0", "pll0_1";
-			clock-output-names = "cmux1";
-		};
+		compatible = "fsl,t1023-clockgen";
 	};
 
 	rcpm: global-utilities@e2000 {
diff --git a/arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi b/arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi
index 9d08a36..d87ea13 100644
--- a/arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi
+++ b/arch/powerpc/boot/dts/fsl/t102xsi-pre.dtsi
@@ -74,7 +74,7 @@
 		cpu0: PowerPC,e5500@0 {
 			device_type = "cpu";
 			reg = <0>;
-			clocks = <&mux0>;
+			clocks = <&clockgen 1 0>;
 			next-level-cache = <&L2_1>;
 			#cooling-cells = <2>;
 			L2_1: l2-cache {
@@ -84,7 +84,7 @@
 		cpu1: PowerPC,e5500@1 {
 			device_type = "cpu";
 			reg = <1>;
-			clocks = <&mux1>;
+			clocks = <&clockgen 1 1>;
 			next-level-cache = <&L2_2>;
 			#cooling-cells = <2>;
 			L2_2: l2-cache {
-- 
1.7.1

  reply	other threads:[~2018-09-19 13:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-19  7:39 [PATCH 1/3] clk: qoriq: add t1023 soc support andy.tang
2018-09-19  7:39 ` andy.tang [this message]
2018-09-19  7:39   ` [PATCH 3/3] " andy.tang
2018-10-20 23:53   ` [PATCH 2/3] powerpc: t102x: upgrade the legacy clock node Scott Wood
2018-10-22  1:34     ` Andy Tang
2018-10-22  5:20       ` Scott Wood
2018-10-22  7:48         ` Andy Tang
2018-10-16  6:17 ` [PATCH 1/3] clk: qoriq: add t1023 soc support Andy Tang
2018-10-17 15:27   ` Stephen Boyd
2018-10-18  1:00     ` Andy Tang
2018-10-19  6:28       ` Scott Wood
2018-10-19  6:47         ` Andy Tang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180919073906.34187-2-andy.tang@nxp.com \
    --to=andy.tang@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=mark.rutland@arm.com \
    --cc=mturquette@baylibre.com \
    --cc=oss@buserror.net \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).