All of lore.kernel.org
 help / color / mirror / Atom feed
From: Conor Dooley <conor.dooley@microchip.com>
To: <mturquette@baylibre.com>, <sboyd@kernel.org>,
	<aou@eecs.berkeley.edu>, <paul.walmsley@sifive.com>,
	<palmer@rivosinc.com>, <a.zummo@towertech.it>,
	<alexandre.belloni@bootlin.com>, <robh+dt@kernel.org>,
	<krzk+dt@kernel.org>
Cc: <daire.mcnamara@microchip.com>, <linux-rtc@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-clk@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>,
	Conor Dooley <conor.dooley@microchip.com>
Subject: [PATCH v2 9/9] riscv: dts: microchip: reparent mpfs clocks
Date: Mon, 11 Apr 2022 09:59:17 +0100	[thread overview]
Message-ID: <20220411085916.941433-10-conor.dooley@microchip.com> (raw)
In-Reply-To: <20220411085916.941433-1-conor.dooley@microchip.com>

The 600M clock in the fabric is not the real reference, replace it with
a 125M clock which is the correct value for the icicle kit. Rename the
msspllclk node to mssrefclk since this is now the input to, not the
output of, the msspll clock. Control of the msspll clock has been moved
into the clock configurator, so add the register range for it to the clk
configurator. Finally, add a new output of the clock config block which
will provide the 1M reference clock for the MTIMER and the rtc.

Fixes: feeb38685523 ("Update the Icicle Kit device tree")
Reviewed-by: Daire McNamara <daire.mcnamara@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../boot/dts/microchip/microchip-mpfs-icicle-kit.dts      | 2 +-
 arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi         | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
index cd2fe80fa81a..3392153dd0f1 100644
--- a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
+++ b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
@@ -45,7 +45,7 @@ ddrc_cache_hi: memory@1000000000 {
 };
 
 &refclk {
-	clock-frequency = <600000000>;
+	clock-frequency = <125000000>;
 };
 
 &mmuart1 {
diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
index 3b48b7f35410..746c4d4e7686 100644
--- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
+++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
@@ -141,7 +141,7 @@ cpu4_intc: interrupt-controller {
 		};
 	};
 
-	refclk: msspllclk {
+	refclk: mssrefclk {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 	};
@@ -190,7 +190,7 @@ plic: interrupt-controller@c000000 {
 
 		clkcfg: clkcfg@20002000 {
 			compatible = "microchip,mpfs-clkcfg";
-			reg = <0x0 0x20002000 0x0 0x1000>;
+			reg = <0x0 0x20002000 0x0 0x1000>, <0x0 0x3E001000 0x0 0x1000>;
 			clocks = <&refclk>;
 			#clock-cells = <1>;
 		};
@@ -393,8 +393,8 @@ rtc: rtc@20124000 {
 			reg = <0x0 0x20124000 0x0 0x1000>;
 			interrupt-parent = <&plic>;
 			interrupts = <80>, <81>;
-			clocks = <&clkcfg CLK_RTC>;
-			clock-names = "rtc";
+			clocks = <&clkcfg CLK_RTC>, <&clkcfg CLK_RTCREF>;
+			clock-names = "rtc", "rtcref";
 			status = "disabled";
 		};
 
-- 
2.35.1


WARNING: multiple messages have this Message-ID (diff)
From: Conor Dooley <conor.dooley@microchip.com>
To: <mturquette@baylibre.com>, <sboyd@kernel.org>,
	<aou@eecs.berkeley.edu>, <paul.walmsley@sifive.com>,
	<palmer@rivosinc.com>, <a.zummo@towertech.it>,
	<alexandre.belloni@bootlin.com>, <robh+dt@kernel.org>,
	<krzk+dt@kernel.org>
Cc: <daire.mcnamara@microchip.com>, <linux-rtc@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-clk@vger.kernel.org>,
	<linux-riscv@lists.infradead.org>,
	Conor Dooley <conor.dooley@microchip.com>
Subject: [PATCH v2 9/9] riscv: dts: microchip: reparent mpfs clocks
Date: Mon, 11 Apr 2022 09:59:17 +0100	[thread overview]
Message-ID: <20220411085916.941433-10-conor.dooley@microchip.com> (raw)
In-Reply-To: <20220411085916.941433-1-conor.dooley@microchip.com>

The 600M clock in the fabric is not the real reference, replace it with
a 125M clock which is the correct value for the icicle kit. Rename the
msspllclk node to mssrefclk since this is now the input to, not the
output of, the msspll clock. Control of the msspll clock has been moved
into the clock configurator, so add the register range for it to the clk
configurator. Finally, add a new output of the clock config block which
will provide the 1M reference clock for the MTIMER and the rtc.

Fixes: feeb38685523 ("Update the Icicle Kit device tree")
Reviewed-by: Daire McNamara <daire.mcnamara@microchip.com>
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../boot/dts/microchip/microchip-mpfs-icicle-kit.dts      | 2 +-
 arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi         | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
index cd2fe80fa81a..3392153dd0f1 100644
--- a/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
+++ b/arch/riscv/boot/dts/microchip/microchip-mpfs-icicle-kit.dts
@@ -45,7 +45,7 @@ ddrc_cache_hi: memory@1000000000 {
 };
 
 &refclk {
-	clock-frequency = <600000000>;
+	clock-frequency = <125000000>;
 };
 
 &mmuart1 {
diff --git a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
index 3b48b7f35410..746c4d4e7686 100644
--- a/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
+++ b/arch/riscv/boot/dts/microchip/microchip-mpfs.dtsi
@@ -141,7 +141,7 @@ cpu4_intc: interrupt-controller {
 		};
 	};
 
-	refclk: msspllclk {
+	refclk: mssrefclk {
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 	};
@@ -190,7 +190,7 @@ plic: interrupt-controller@c000000 {
 
 		clkcfg: clkcfg@20002000 {
 			compatible = "microchip,mpfs-clkcfg";
-			reg = <0x0 0x20002000 0x0 0x1000>;
+			reg = <0x0 0x20002000 0x0 0x1000>, <0x0 0x3E001000 0x0 0x1000>;
 			clocks = <&refclk>;
 			#clock-cells = <1>;
 		};
@@ -393,8 +393,8 @@ rtc: rtc@20124000 {
 			reg = <0x0 0x20124000 0x0 0x1000>;
 			interrupt-parent = <&plic>;
 			interrupts = <80>, <81>;
-			clocks = <&clkcfg CLK_RTC>;
-			clock-names = "rtc";
+			clocks = <&clkcfg CLK_RTC>, <&clkcfg CLK_RTCREF>;
+			clock-names = "rtc", "rtcref";
 			status = "disabled";
 		};
 
-- 
2.35.1


_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv

  parent reply	other threads:[~2022-04-11  9:01 UTC|newest]

Thread overview: 44+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-11  8:59 [PATCH v2 0/9] More PolarFire SoC Fixes for 5.18 Conor Dooley
2022-04-11  8:59 ` Conor Dooley
2022-04-11  8:59 ` [PATCH v2 1/9] clk: microchip: mpfs: fix parents for FIC clocks Conor Dooley
2022-04-11  8:59   ` Conor Dooley
2022-04-11  8:59 ` [PATCH v2 2/9] clk: microchip: mpfs: mark CLK_ATHENA as critical Conor Dooley
2022-04-11  8:59   ` Conor Dooley
2022-04-11  8:59 ` [PATCH v2 3/9] riscv: dts: microchip: fix usage of fic clocks on mpfs Conor Dooley
2022-04-11  8:59   ` Conor Dooley
2022-04-11  8:59 ` [PATCH v2 4/9] dt-bindings: clk: mpfs document msspll dri registers Conor Dooley
2022-04-11  8:59   ` Conor Dooley
2022-04-12 11:46   ` Krzysztof Kozlowski
2022-04-12 11:46     ` Krzysztof Kozlowski
2022-04-11  8:59 ` [PATCH v2 5/9] dt-bindings: clk: mpfs: add defines for two new clocks Conor Dooley
2022-04-11  8:59   ` Conor Dooley
2022-04-12 11:47   ` Krzysztof Kozlowski
2022-04-12 11:47     ` Krzysztof Kozlowski
2022-04-12 12:04     ` Conor.Dooley
2022-04-12 12:04       ` Conor.Dooley
2022-04-12 12:10       ` Krzysztof Kozlowski
2022-04-12 12:10         ` Krzysztof Kozlowski
2022-04-12 12:26         ` Conor.Dooley
2022-04-12 12:26           ` Conor.Dooley
2022-04-12 17:10           ` Krzysztof Kozlowski
2022-04-12 17:10             ` Krzysztof Kozlowski
2022-04-12 18:29             ` Conor Dooley
2022-04-12 18:29               ` Conor Dooley
2022-04-13  6:44               ` Krzysztof Kozlowski
2022-04-13  6:44                 ` Krzysztof Kozlowski
2022-04-11  8:59 ` [PATCH v2 6/9] dt-bindings: rtc: add refclk to mpfs-rtc Conor Dooley
2022-04-11  8:59   ` Conor Dooley
2022-04-12 11:48   ` Krzysztof Kozlowski
2022-04-12 11:48     ` Krzysztof Kozlowski
2022-04-12 11:50     ` Conor.Dooley
2022-04-12 11:50       ` Conor.Dooley
2022-04-11  8:59 ` [PATCH v2 7/9] clk: microchip: mpfs: re-parent the configurable clocks Conor Dooley
2022-04-11  8:59   ` Conor Dooley
2022-04-12 19:14   ` Stephen Boyd
2022-04-12 19:14     ` Stephen Boyd
2022-04-11  8:59 ` [PATCH v2 8/9] clk: microchip: mpfs: add RTCREF clock control Conor Dooley
2022-04-11  8:59   ` Conor Dooley
2022-04-11  8:59 ` Conor Dooley [this message]
2022-04-11  8:59   ` [PATCH v2 9/9] riscv: dts: microchip: reparent mpfs clocks Conor Dooley
2022-04-11 13:25   ` Conor.Dooley
2022-04-11 13:25     ` Conor.Dooley

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=20220411085916.941433-10-conor.dooley@microchip.com \
    --to=conor.dooley@microchip.com \
    --cc=a.zummo@towertech.it \
    --cc=alexandre.belloni@bootlin.com \
    --cc=aou@eecs.berkeley.edu \
    --cc=daire.mcnamara@microchip.com \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=palmer@rivosinc.com \
    --cc=paul.walmsley@sifive.com \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.