mirror of https://lore.kernel.org/linux-amlogic/
 help / color / mirror / Atom feed
* [PATCH 0/3] Describe the Amlogic S7 clock controllers
@ 2026-11-23  9:20 Carlo Caione
  2026-11-23  9:20 ` [PATCH 1/3] arm64: dts: amlogic: s7: add the SCMI firmware node Carlo Caione
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Carlo Caione @ 2026-11-23  9:20 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel, Carlo Caione

The S7 clocks come from the firmware, over SCMI, and from the PLL and
peripherals clock controllers. Add the SCMI node and the two clock
controllers to the S7 device tree.

This series depends on the S7 clock controllers series [1], which adds
the bindings and clock IDs used here. Jerome applied it to clk-amlogic.

[1] https://lore.kernel.org/all/20261120-upstream-s7-clk-v2-0-856cece3b9f2@baylibre.com/

---
Carlo Caione (3):
      arm64: dts: amlogic: s7: add the SCMI firmware node
      arm64: dts: amlogic: s7: add the PLL clock controller
      arm64: dts: amlogic: s7: add the peripherals clock controller

 arch/arm64/boot/dts/amlogic/amlogic-s7-scmi-clk.h | 27 ++++++++
 arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi       | 80 +++++++++++++++++++++++
 2 files changed, 107 insertions(+)
---
base-commit: 807a34cf91c1d91f2beb3cacef9eaa98bd56d172
change-id: 20261028-upstream-s7-clk-dt-f5b25465e9ec
prerequisite-change-id: 20261026-upstream-s7-clk-3fbe6f33652d:v2
prerequisite-patch-id: 9ce04eba818962dbb245b10f1709937eb8054600
prerequisite-patch-id: a02fe1ec065748194293c458aae0bd6f6e7f152d
prerequisite-patch-id: c04475f82637c268ace81e969b67c159a1b0ff4a
prerequisite-patch-id: 8b60ed5e40d0bda09cc368292cdd7cffc621fd8d
prerequisite-patch-id: 7e4acbe8258ab4bf7b5bfcaa0c7b764b011d8105
prerequisite-patch-id: b9efe5d77d21ce83acca108e1050c5ae1dfe9701

Best regards,
--  
Carlo Caione <ccaione@baylibre.com>


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

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

* [PATCH 1/3] arm64: dts: amlogic: s7: add the SCMI firmware node
  2026-11-23  9:20 [PATCH 0/3] Describe the Amlogic S7 clock controllers Carlo Caione
@ 2026-11-23  9:20 ` Carlo Caione
  2026-11-23  9:20 ` [PATCH 2/3] arm64: dts: amlogic: s7: add the PLL clock controller Carlo Caione
  2026-11-23  9:20 ` [PATCH 3/3] arm64: dts: amlogic: s7: add the peripherals " Carlo Caione
  2 siblings, 0 replies; 4+ messages in thread
From: Carlo Caione @ 2026-11-23  9:20 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel, Carlo Caione

The firmware of the Amlogic S7 SoC family exposes the clocks it owns
over SCMI. Add the SCMI node, its shared memory and a header with the
SCMI clock IDs.

Acked-by: Jerome Brunet <jbrunet@baylibre.com>
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/amlogic-s7-scmi-clk.h | 27 +++++++++++++++++++++
 arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi       | 29 +++++++++++++++++++++++
 2 files changed, 56 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/amlogic-s7-scmi-clk.h b/arch/arm64/boot/dts/amlogic/amlogic-s7-scmi-clk.h
new file mode 100644
index 000000000000..71630bc94531
--- /dev/null
+++ b/arch/arm64/boot/dts/amlogic/amlogic-s7-scmi-clk.h
@@ -0,0 +1,27 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (c) 2026 BayLibre, SAS.
+ */
+
+#ifndef __DTS_AMLOGIC_S7_SCMI_CLK_H
+#define __DTS_AMLOGIC_S7_SCMI_CLK_H
+
+#define CLKID_DDR_PHY_OSC			0
+#define CLKID_USB1_PLL_OSC			1
+#define CLKID_TOP_PLL_OSC			2
+#define CLKID_HDMI_PLL_OSC			3
+#define CLKID_USB0_PHY_PLL_OSC			4
+#define CLKID_USB1_PHY_PLL_OSC			5
+#define CLKID_USB0_PLL_OSC			6
+#define CLKID_ETH_PLL_OSC			7
+#define CLKID_ADC_PLL_OSC			8
+#define CLKID_CPU_CLK				9
+#define CLKID_DSU_CLK				10
+#define CLKID_GP1_PLL				11
+#define CLKID_ACLKM				12
+#define CLKID_PWM_G				13
+#define CLKID_PWM_H				14
+#define CLKID_PWM_I				15
+#define CLKID_PWM_J				16
+
+#endif /* __DTS_AMLOGIC_S7_SCMI_CLK_H */
diff --git a/arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi
index 64440df4f542..69dec312e7d6 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi
@@ -8,6 +8,7 @@
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/amlogic,pinctrl.h>
 #include <dt-bindings/power/amlogic,s7-pwrc.h>
+#include "amlogic-s7-scmi-clk.h"
 
 / {
 	cpus {
@@ -109,6 +110,34 @@ xtal: xtal-clk {
 		#clock-cells = <0>;
 	};
 
+	sram@50f6000 {
+		compatible = "mmio-sram";
+		reg = <0x0 0x050f6000 0x0 0x100>;
+		#address-cells = <1>;
+		#size-cells = <1>;
+		ranges = <0 0x0 0x050f6000 0x100>;
+
+		scmi_shmem: sram@0 {
+			compatible = "arm,scmi-shmem";
+			reg = <0x0 0x100>;
+		};
+	};
+
+	firmware {
+		scmi: scmi {
+			compatible = "arm,scmi-smc";
+			arm,smc-id = <0x820000c1>;
+			shmem = <&scmi_shmem>;
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			scmi_clk: protocol@14 {
+				reg = <0x14>;
+				#clock-cells = <1>;
+			};
+		};
+	};
+
 	soc {
 		compatible = "simple-bus";
 		#address-cells = <2>;

-- 
2.56.1


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

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

* [PATCH 2/3] arm64: dts: amlogic: s7: add the PLL clock controller
  2026-11-23  9:20 [PATCH 0/3] Describe the Amlogic S7 clock controllers Carlo Caione
  2026-11-23  9:20 ` [PATCH 1/3] arm64: dts: amlogic: s7: add the SCMI firmware node Carlo Caione
@ 2026-11-23  9:20 ` Carlo Caione
  2026-11-23  9:20 ` [PATCH 3/3] arm64: dts: amlogic: s7: add the peripherals " Carlo Caione
  2 siblings, 0 replies; 4+ messages in thread
From: Carlo Caione @ 2026-11-23  9:20 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel, Carlo Caione

Add the PLL clock controller of the Amlogic S7 SoC family. The fixed,
GP0, HIFI0 and HIFI1 PLLs share one SCMI reference clock; the HDMI PLL
has its own.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi
index 69dec312e7d6..eb123d022bce 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi
@@ -7,6 +7,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/pinctrl/amlogic,pinctrl.h>
+#include <dt-bindings/clock/amlogic,s7-pll-clkc.h>
 #include <dt-bindings/power/amlogic,s7-pwrc.h>
 #include "amlogic-s7-scmi-clk.h"
 
@@ -161,6 +162,22 @@ apb: bus@fe000000 {
 			#size-cells = <2>;
 			ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
 
+			clkc_pll: clock-controller@8000 {
+				compatible = "amlogic,s7-pll-clkc";
+				reg = <0x0 0x8000 0x0 0x1e8>;
+				#clock-cells = <1>;
+				clocks = <&scmi_clk CLKID_TOP_PLL_OSC>,
+					 <&scmi_clk CLKID_TOP_PLL_OSC>,
+					 <&scmi_clk CLKID_TOP_PLL_OSC>,
+					 <&scmi_clk CLKID_TOP_PLL_OSC>,
+					 <&scmi_clk CLKID_HDMI_PLL_OSC>;
+				clock-names = "fix",
+					      "gp0",
+					      "hifi0",
+					      "hifi1",
+					      "hdmi";
+			};
+
 			uart_b: serial@7a000 {
 				compatible = "amlogic,s7-uart",
 					     "amlogic,meson-s4-uart";

-- 
2.56.1


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

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

* [PATCH 3/3] arm64: dts: amlogic: s7: add the peripherals clock controller
  2026-11-23  9:20 [PATCH 0/3] Describe the Amlogic S7 clock controllers Carlo Caione
  2026-11-23  9:20 ` [PATCH 1/3] arm64: dts: amlogic: s7: add the SCMI firmware node Carlo Caione
  2026-11-23  9:20 ` [PATCH 2/3] arm64: dts: amlogic: s7: add the PLL clock controller Carlo Caione
@ 2026-11-23  9:20 ` Carlo Caione
  2 siblings, 0 replies; 4+ messages in thread
From: Carlo Caione @ 2026-11-23  9:20 UTC (permalink / raw)
  To: Neil Armstrong, Kevin Hilman, Jerome Brunet, Martin Blumenstingl,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: linux-arm-kernel, linux-amlogic, devicetree, linux-kernel, Carlo Caione

Add the peripherals clock controller of the Amlogic S7 SoC family.

Signed-off-by: Carlo Caione <ccaione@baylibre.com>
---
 arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi | 34 +++++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi b/arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi
index eb123d022bce..5e0cce9149ff 100644
--- a/arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi
+++ b/arch/arm64/boot/dts/amlogic/amlogic-s7.dtsi
@@ -162,6 +162,40 @@ apb: bus@fe000000 {
 			#size-cells = <2>;
 			ranges = <0x0 0x0 0x0 0xfe000000 0x0 0x480000>;
 
+			clkc_periphs: clock-controller@0 {
+				compatible = "amlogic,s7-peripherals-clkc";
+				reg = <0x0 0x0 0x0 0x49c>;
+				#clock-cells = <1>;
+				clocks = <&clkc_pll CLKID_FCLK_DIV2>,
+					 <&clkc_pll CLKID_FCLK_DIV2P5>,
+					 <&clkc_pll CLKID_FCLK_DIV3>,
+					 <&clkc_pll CLKID_FCLK_DIV4>,
+					 <&clkc_pll CLKID_FCLK_DIV5>,
+					 <&clkc_pll CLKID_FCLK_DIV7>,
+					 <&clkc_pll CLKID_HIFI0_PLL>,
+					 <&clkc_pll CLKID_GP0_PLL>,
+					 <&clkc_pll CLKID_HIFI1_PLL>,
+					 <&scmi_clk CLKID_GP1_PLL>,
+					 <&clkc_pll CLKID_HDMI_PLL>,
+					 <&clkc_pll CLKID_HDMI_PLL_PIX>,
+					 <&xtal>,
+					 <&scmi_clk CLKID_ACLKM>;
+				clock-names = "fclk_div2",
+					      "fclk_div2p5",
+					      "fclk_div3",
+					      "fclk_div4",
+					      "fclk_div5",
+					      "fclk_div7",
+					      "hifi0_pll",
+					      "gp0_pll",
+					      "hifi1_pll",
+					      "gp1_pll",
+					      "hdmi_pll",
+					      "vid_pix",
+					      "xtal",
+					      "axi_frcpu";
+			};
+
 			clkc_pll: clock-controller@8000 {
 				compatible = "amlogic,s7-pll-clkc";
 				reg = <0x0 0x8000 0x0 0x1e8>;

-- 
2.56.1


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

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

end of thread, other threads:[~2026-11-23  9:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-23  9:20 [PATCH 0/3] Describe the Amlogic S7 clock controllers Carlo Caione
2026-11-23  9:20 ` [PATCH 1/3] arm64: dts: amlogic: s7: add the SCMI firmware node Carlo Caione
2026-11-23  9:20 ` [PATCH 2/3] arm64: dts: amlogic: s7: add the PLL clock controller Carlo Caione
2026-11-23  9:20 ` [PATCH 3/3] arm64: dts: amlogic: s7: add the peripherals " Carlo Caione

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®