linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH RESEND v2 0/2] NPCM845 reset and clock device tree updates
@ 2025-09-01 13:24 Tomer Maimon
  2025-09-01 13:24 ` [PATCH RESEND v2 1/2] arm64: dts: nuvoton: combine NPCM845 reset and clk nodes Tomer Maimon
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tomer Maimon @ 2025-09-01 13:24 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, avifishman70,
	tali.perry1, joel, venture, yuenn, benjaminfair
  Cc: openbmc, devicetree, linux-kernel, Tomer Maimon

This series updates the NPCM845 device tree for the integrated reset and
clock controller using the auxiliary device framework.
Patch 1 combines the reset and clock nodes into nuvoton,npcm845-reset.
Patch 2 adds a 25 MHz refclk and updates peripherals to use it.

Tested on NPCM845 evaluation board.

Changes since version 1:
	- Tested in version 6.17.rc1.

Tomer Maimon (2):
  arm64: dts: nuvoton: combine NPCM845 reset and clk nodes
  arm64: dts: nuvoton: add refclk and update peripheral clocks for
    NPCM845

 .../dts/nuvoton/nuvoton-common-npcm8xx.dtsi   | 20 ++++++++-----------
 .../boot/dts/nuvoton/nuvoton-npcm845-evb.dts  |  6 ++++++
 2 files changed, 14 insertions(+), 12 deletions(-)

-- 
2.34.1


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

* [PATCH RESEND v2 1/2] arm64: dts: nuvoton: combine NPCM845 reset and clk nodes
  2025-09-01 13:24 [PATCH RESEND v2 0/2] NPCM845 reset and clock device tree updates Tomer Maimon
@ 2025-09-01 13:24 ` Tomer Maimon
  2025-09-01 13:24 ` [PATCH RESEND v2 2/2] arm64: dts: nuvoton: add refclk and update peripheral clocks for NPCM845 Tomer Maimon
  2025-09-03  7:34 ` [PATCH RESEND v2 0/2] NPCM845 reset and clock device tree updates Andrew Jeffery
  2 siblings, 0 replies; 4+ messages in thread
From: Tomer Maimon @ 2025-09-01 13:24 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, avifishman70,
	tali.perry1, joel, venture, yuenn, benjaminfair
  Cc: openbmc, devicetree, linux-kernel, Tomer Maimon

Combine the NPCM845 reset and clock controller nodes into a single node
with compatible "nuvoton,npcm845-reset" in nuvoton-common-npcm8xx.dtsi,
using the auxiliary device framework to provide clock functionality.

Update the register range to 0xC4 to cover the shared reset and clock
registers at 0xf0801000.

Remove the separate nuvoton,npcm845-clk node, as the reset driver now
handles clocks via an auxiliary device.

Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
---
 .../boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi      | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi b/arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi
index acd3137d2464..e4053ffefe90 100644
--- a/arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi
+++ b/arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi
@@ -42,17 +42,12 @@ ahb {
 		interrupt-parent = <&gic>;
 		ranges;
 
-		rstc: reset-controller@f0801000 {
+		clk: rstc: reset-controller@f0801000 {
 			compatible = "nuvoton,npcm845-reset";
-			reg = <0x0 0xf0801000 0x0 0x78>;
-			#reset-cells = <2>;
+			reg = <0x0 0xf0801000 0x0 0xC4>;
 			nuvoton,sysgcr = <&gcr>;
-		};
-
-		clk: clock-controller@f0801000 {
-			compatible = "nuvoton,npcm845-clk";
+			#reset-cells = <2>;
 			#clock-cells = <1>;
-			reg = <0x0 0xf0801000 0x0 0x1000>;
 		};
 
 		apb {
-- 
2.34.1


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

* [PATCH RESEND v2 2/2] arm64: dts: nuvoton: add refclk and update peripheral clocks for NPCM845
  2025-09-01 13:24 [PATCH RESEND v2 0/2] NPCM845 reset and clock device tree updates Tomer Maimon
  2025-09-01 13:24 ` [PATCH RESEND v2 1/2] arm64: dts: nuvoton: combine NPCM845 reset and clk nodes Tomer Maimon
@ 2025-09-01 13:24 ` Tomer Maimon
  2025-09-03  7:34 ` [PATCH RESEND v2 0/2] NPCM845 reset and clock device tree updates Andrew Jeffery
  2 siblings, 0 replies; 4+ messages in thread
From: Tomer Maimon @ 2025-09-01 13:24 UTC (permalink / raw)
  To: robh+dt, krzysztof.kozlowski+dt, conor+dt, avifishman70,
	tali.perry1, joel, venture, yuenn, benjaminfair
  Cc: openbmc, devicetree, linux-kernel, Tomer Maimon

Add a 25 MHz fixed-clock node (refclk) in the NPCM845-EVB board device
tree to represent the external reference clock used by the NPCM845 reset
and clock controller.

Update peripherals (timer0, watchdog0-2) in the NPCM845 device tree to
reference this refclk directly instead of the previous clock controller
output (NPCM8XX_CLK_REFCLK).

Signed-off-by: Tomer Maimon <tmaimon77@gmail.com>
---
 arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi | 9 +++++----
 arch/arm64/boot/dts/nuvoton/nuvoton-npcm845-evb.dts     | 6 ++++++
 2 files changed, 11 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi b/arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi
index e4053ffefe90..ee7da5e8f95b 100644
--- a/arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi
+++ b/arch/arm64/boot/dts/nuvoton/nuvoton-common-npcm8xx.dtsi
@@ -47,6 +47,7 @@ clk: rstc: reset-controller@f0801000 {
 			reg = <0x0 0xf0801000 0x0 0xC4>;
 			nuvoton,sysgcr = <&gcr>;
 			#reset-cells = <2>;
+			clocks = <&refclk>;
 			#clock-cells = <1>;
 		};
 
@@ -71,7 +72,7 @@ timer0: timer@8000 {
 				compatible = "nuvoton,npcm845-timer";
 				interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
 				reg = <0x8000 0x1C>;
-				clocks = <&clk NPCM8XX_CLK_REFCLK>;
+				clocks = <&refclk>;
 				clock-names = "refclk";
 			};
 
@@ -143,7 +144,7 @@ watchdog0: watchdog@801c {
 				interrupts = <GIC_SPI 47 IRQ_TYPE_LEVEL_HIGH>;
 				reg = <0x801c 0x4>;
 				status = "disabled";
-				clocks = <&clk NPCM8XX_CLK_REFCLK>;
+				clocks = <&refclk>;
 				syscon = <&gcr>;
 			};
 
@@ -152,7 +153,7 @@ watchdog1: watchdog@901c {
 				interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>;
 				reg = <0x901c 0x4>;
 				status = "disabled";
-				clocks = <&clk NPCM8XX_CLK_REFCLK>;
+				clocks = <&refclk>;
 				syscon = <&gcr>;
 			};
 
@@ -161,7 +162,7 @@ watchdog2: watchdog@a01c {
 				interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
 				reg = <0xa01c 0x4>;
 				status = "disabled";
-				clocks = <&clk NPCM8XX_CLK_REFCLK>;
+				clocks = <&refclk>;
 				syscon = <&gcr>;
 			};
 		};
diff --git a/arch/arm64/boot/dts/nuvoton/nuvoton-npcm845-evb.dts b/arch/arm64/boot/dts/nuvoton/nuvoton-npcm845-evb.dts
index eeceb5b292a8..2638ee1c3846 100644
--- a/arch/arm64/boot/dts/nuvoton/nuvoton-npcm845-evb.dts
+++ b/arch/arm64/boot/dts/nuvoton/nuvoton-npcm845-evb.dts
@@ -19,6 +19,12 @@ chosen {
 	memory@0 {
 		reg = <0x0 0x0 0x0 0x40000000>;
 	};
+
+	refclk: refclk-25mhz {
+		compatible = "fixed-clock";
+		clock-frequency = <25000000>;
+		#clock-cells = <0>;
+	};
 };
 
 &serial0 {
-- 
2.34.1


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

* Re: [PATCH RESEND v2 0/2] NPCM845 reset and clock device tree updates
  2025-09-01 13:24 [PATCH RESEND v2 0/2] NPCM845 reset and clock device tree updates Tomer Maimon
  2025-09-01 13:24 ` [PATCH RESEND v2 1/2] arm64: dts: nuvoton: combine NPCM845 reset and clk nodes Tomer Maimon
  2025-09-01 13:24 ` [PATCH RESEND v2 2/2] arm64: dts: nuvoton: add refclk and update peripheral clocks for NPCM845 Tomer Maimon
@ 2025-09-03  7:34 ` Andrew Jeffery
  2 siblings, 0 replies; 4+ messages in thread
From: Andrew Jeffery @ 2025-09-03  7:34 UTC (permalink / raw)
  To: Tomer Maimon, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	avifishman70, tali.perry1, joel, venture, yuenn, benjaminfair
  Cc: openbmc, devicetree, linux-kernel

Hi Tomer,

On Mon, 2025-09-01 at 16:24 +0300, Tomer Maimon wrote:
> This series updates the NPCM845 device tree for the integrated reset and
> clock controller using the auxiliary device framework.
> Patch 1 combines the reset and clock nodes into nuvoton,npcm845-reset.
> Patch 2 adds a 25 MHz refclk and updates peripherals to use it.
> 
> Tested on NPCM845 evaluation board.
> 
> Changes since version 1:
>         - Tested in version 6.17.rc1.
> 
> Tomer Maimon (2):
>   arm64: dts: nuvoton: combine NPCM845 reset and clk nodes
>   arm64: dts: nuvoton: add refclk and update peripheral clocks for
>     NPCM845
> 
>  .../dts/nuvoton/nuvoton-common-npcm8xx.dtsi   | 20 ++++++++-----------
>  .../boot/dts/nuvoton/nuvoton-npcm845-evb.dts  |  6 ++++++
>  2 files changed, 14 insertions(+), 12 deletions(-)
> 

The changes are already applied and on their way into mainline:

https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/commit/?h=soc/dt&id=1b8086f1729b8f22e60ba93676602174a3b0a4fc

Thanks,

Andrew

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

end of thread, other threads:[~2025-09-03  7:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-09-01 13:24 [PATCH RESEND v2 0/2] NPCM845 reset and clock device tree updates Tomer Maimon
2025-09-01 13:24 ` [PATCH RESEND v2 1/2] arm64: dts: nuvoton: combine NPCM845 reset and clk nodes Tomer Maimon
2025-09-01 13:24 ` [PATCH RESEND v2 2/2] arm64: dts: nuvoton: add refclk and update peripheral clocks for NPCM845 Tomer Maimon
2025-09-03  7:34 ` [PATCH RESEND v2 0/2] NPCM845 reset and clock device tree updates Andrew Jeffery

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