Skip to contentSkip to conversation

Add PLL clocks driver for StarFive JH7110 SoC

PATCH Superseded Xingyu Wu 3 participants 18 messages Apr 14, 2023 – May 11, 2023

Subsystems (8)

v3 of 7 Superseded Latest is v7 →

lore
Share & tools
lore
author maintainer
#1 lore raw

PATCH v3 1/7 dt-bindings: clock: Add StarFive JH7110 PLL clock generator

In reply to Xingyu Wu

Add bindings for the PLL clock generator on the JH7110 RISC-V SoC.

---
 .../bindings/clock/starfive,jh7110-pll.yaml   | 46 +++++++++++++++++++
 .../dt-bindings/clock/starfive,jh7110-crg.h   |  6 +++
 2 files changed, 52 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/starfive,jh7110-pll.yaml
Documentation/devicetree/bindings/clock/starfive,jh7110-pll.yaml new file +46 -0
new file mode 100644
index 000000000000..8aa8c7b8e42f
@@ -0,0 +1,46 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/starfive,jh7110-pll.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 PLL Clock Generator
+
+description:
+  This PLL are high speed, low jitter frequency synthesizers in JH7110.
+  Each PLL clocks work in integer mode or fraction mode by some dividers,
+  and the configuration registers and dividers are set in several syscon
+  registers. So pll node should be a child of SYS-SYSCON node.
+  The formula for calculating frequency is that,
+  Fvco = Fref * (NI + NF) / M / Q1
+
+maintainers:
+  - Xingyu Wu <[email protected]>
+
+properties:
+  compatible:
+    const: starfive,jh7110-pll
+
+  clocks:
+    maxItems: 1
+    description: Main Oscillator (24 MHz)
+
+  '#clock-cells':
+    const: 1
+    description:
+      See <dt-bindings/clock/starfive,jh7110-crg.h> for valid indices.
+
+required:
+  - compatible
+  - clocks
+  - '#clock-cells'
+
+additionalProperties: false
+
+examples:
+  - |
+    pll-clock-controller {
+      compatible = "starfive,jh7110-pll";
+      clocks = <&osc>;
+      #clock-cells = <1>;
+    };
include/dt-bindings/clock/starfive,jh7110-crg.h +6 -0
index 06257bfd9ac1..086a6ddcf380 100644
@@ -6,6 +6,12 @@
 #ifndef __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__
 #define __DT_BINDINGS_CLOCK_STARFIVE_JH7110_CRG_H__
 
+/* PLL clocks */
+#define JH7110_CLK_PLL0_OUT			0
+#define JH7110_CLK_PLL1_OUT			1
+#define JH7110_CLK_PLL2_OUT			2
+#define JH7110_PLLCLK_END			3
+
 /* SYSCRG clocks */
 #define JH7110_SYSCLK_CPU_ROOT			0
 #define JH7110_SYSCLK_CPU_CORE			1
Signature · 1 line
2.25.1

Xingyu Wu

author maintainer
#0 lore raw

v3 cover Add PLL clocks driver for StarFive JH7110 SoC

This patch serises are to add PLL clocks driver and providers by writing and reading syscon registers for the StarFive JH7110 RISC-V SoC. And add documentation to describe StarFive System Controller(syscon) Registers.

PLL are high speed, low jitter frequency synthesizers in JH7110. Each PLL clocks work in integer mode or fraction mode by some dividers, and the dividers are set in several syscon registers.
The formula for calculating frequency is:
Fvco = Fref * (NI + NF) / M / Q1

The first patch adds docunmentation to describe PLL clock bindings, and the second patch adds driver to support PLL clocks for JH7110. The patch 3 modifies the SYSCRG dibindings and adds PLL clock inputs. The patch 4 modifies the system clock driver and changes PLL clock source from PLL clock controller instead of the fixed factor clocks. The patch 5 adds documentation to decribe syscon registers. And the patch 6 adds the stg/sys/aon syscon nodes for JH7110 SoC. The last patch adds PLL clock node and modifies the syscrg node in JH7110 dts file.

This patchset should be applied after these patchset about JH7110 basic clock drivers(Accepted and will merged in v6.4)[1].
[1] https://lore.kernel.org/all/[email protected]/

Changes since v2:
- Rebased on latest JH7110 basic clock drivers.
- Added the complete documentation to describe syscon register.
- Added syscon node in JH7110 dts file.
- Modified the clock rate selection to match the closest rate in PLL driver when setting rate.

v2: https://lore.kernel.org/all/[email protected]/

Changes since v1:
- Changed PLL clock node to be child of syscon node in dts.
- Modifed the definitions and names of function in PLL clock driver.
- Added commit to update syscon and syscrg dt-bindings.

v1: https://lore.kernel.org/all/[email protected]/

William Qiu (2):
dt-bindings: soc: starfive: Add StarFive syscon module
riscv: dts: starfive: jh7110: Add syscon nodes

Xingyu Wu (5):
dt-bindings: clock: Add StarFive JH7110 PLL clock generator
clk: starfive: Add StarFive JH7110 PLL clock driver
dt-bindings: clock: jh7110-syscrg: Add PLL clock inputs
clk: starfive: jh7110-sys: Modify PLL clocks source
riscv: dts: starfive: jh7110: Add PLL clock node and modify syscrg
node

 .../bindings/clock/starfive,jh7110-pll.yaml   |  46 ++
 .../clock/starfive,jh7110-syscrg.yaml         |  20 +-
 .../soc/starfive/starfive,jh7110-syscon.yaml  |  58 +++
 MAINTAINERS                                   |  12 +
 arch/riscv/boot/dts/starfive/jh7110.dtsi      |  29 +-
 drivers/clk/starfive/Kconfig                  |   9 +
 drivers/clk/starfive/Makefile                 |   1 +
 .../clk/starfive/clk-starfive-jh7110-pll.c    | 427 ++++++++++++++++++
 .../clk/starfive/clk-starfive-jh7110-pll.h    | 293 ++++++++++++
 .../clk/starfive/clk-starfive-jh7110-sys.c    |  31 +-
 .../dt-bindings/clock/starfive,jh7110-crg.h   |   6 +
 11 files changed, 903 insertions(+), 29 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/clock/starfive,jh7110-pll.yaml
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
 create mode 100644 drivers/clk/starfive/clk-starfive-jh7110-pll.c
 create mode 100644 drivers/clk/starfive/clk-starfive-jh7110-pll.h

base-commit: 197b6b60ae7bc51dd0814953c562833143b292aa
prerequisite-patch-id: 388b8adbb0fe2daf4d07a21eafd4f1bd50ce2403
prerequisite-patch-id: 1117ecaa40a353c667b71802ab34ecf9568d8bb2
prerequisite-patch-id: b00c6b21fbd0353d88b7c9b09093ba30b765f45b
prerequisite-patch-id: 08ec9027e8a5c6fdf201726833168c7464a9b94d
prerequisite-patch-id: fb5120248e48fe1faf053ae0b490c92507ec2b44
prerequisite-patch-id: 4b93d8d590b0a2abe7b4be5287232c494c35be4a
prerequisite-patch-id: 89f049f951e5acf75aab92541992f816fd0acc0d
prerequisite-patch-id: c09c4c68af017b8e5c97b515cb50b70c18a2e705
prerequisite-patch-id: 0df8ccb0e848c2df4c2da95026494bebecede92d
prerequisite-patch-id: 315303931e4b6499de7127a88113763f86e97e16
prerequisite-patch-id: 40cb8212ddb024c20593f73d8b87d9894877e172
prerequisite-patch-id: a1673a9e9f19d6fab5a51abb721e54e36636f067
prerequisite-patch-id: d57cc467fb036241b9276320ff076c4a30d376d6
prerequisite-patch-id: 6e563d68bc5dbf951d4ced17897f9cc4d56169fe
prerequisite-patch-id: 61ec2caa21fd0fc60e57977f7d16d3f72b135745
prerequisite-patch-id: 1387a7e87b446329dfc21f3e575ceae7ebcf954c
prerequisite-patch-id: 258ea5f9b8bf41b6981345dcc81795f25865d38f
prerequisite-patch-id: 8b6f2c9660c0ac0ee4e73e4c21aca8e6b75e81b9
prerequisite-patch-id: dbb0c0151b8bdf093e6ce79fd2fe3f60791a6e0b
prerequisite-patch-id: 9007c8610fdcd387592475949864edde874c20a2
prerequisite-patch-id: d57e95d31686772abc4c4d5aa1cadc344dc293cd
prerequisite-patch-id: 0a0ac5a8a90655b415f6b62e324f3db083cdaaee

Signature · 1 line
2.25.1
author maintainer
#3 lore raw

PATCH v3 3/7 dt-bindings: clock: jh7110-syscrg: Add PLL clock inputs

Add PLL clock inputs from PLL clock generator.

---
 .../clock/starfive,jh7110-syscrg.yaml         | 20 +++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/clock/starfive,jh7110-syscrg.yaml +18 -2
index 84373ae31644..55d4e7f09cd5 100644
@@ -27,6 +27,9 @@ properties:
           - description: External I2S RX left/right channel clock
           - description: External TDM clock
           - description: External audio master clock
+          - description: PLL0
+          - description: PLL1
+          - description: PLL2
 
       - items:
           - description: Main Oscillator (24 MHz)
@@ -38,6 +41,9 @@ properties:
           - description: External I2S RX left/right channel clock
           - description: External TDM clock
           - description: External audio master clock
+          - description: PLL0
+          - description: PLL1
+          - description: PLL2
 
   clock-names:
     oneOf:
@@ -52,6 +58,9 @@ properties:
           - const: i2srx_lrck_ext
           - const: tdm_ext
           - const: mclk_ext
+          - const: pll0_out
+          - const: pll1_out
+          - const: pll2_out
 
       - items:
           - const: osc
@@ -63,6 +72,9 @@ properties:
           - const: i2srx_lrck_ext
           - const: tdm_ext
           - const: mclk_ext
+          - const: pll0_out
+          - const: pll1_out
+          - const: pll2_out
 
   '#clock-cells':
     const: 1
@@ -93,12 +105,16 @@ examples:
                  <&gmac1_rgmii_rxin>,
                  <&i2stx_bclk_ext>, <&i2stx_lrck_ext>,
                  <&i2srx_bclk_ext>, <&i2srx_lrck_ext>,
-                 <&tdm_ext>, <&mclk_ext>;
+                 <&tdm_ext>, <&mclk_ext>,
+                 <&pllclk JH7110_CLK_PLL0_OUT>,
+                 <&pllclk JH7110_CLK_PLL1_OUT>,
+                 <&pllclk JH7110_CLK_PLL2_OUT>;
         clock-names = "osc", "gmac1_rmii_refin",
                       "gmac1_rgmii_rxin",
                       "i2stx_bclk_ext", "i2stx_lrck_ext",
                       "i2srx_bclk_ext", "i2srx_lrck_ext",
-                      "tdm_ext", "mclk_ext";
+                      "tdm_ext", "mclk_ext",
+                      "pll0_out", "pll1_out", "pll2_out";
         #clock-cells = <1>;
         #reset-cells = <1>;
     };
Signature · 1 line
2.25.1
author maintainer
#4 lore raw

PATCH v3 4/7 clk: starfive: jh7110-sys: Modify PLL clocks source

In reply to Xingyu Wu

Modify PLL clocks source to be got from dts instead of the fixed factor clocks.

---
 drivers/clk/starfive/Kconfig                  |  1 +
 .../clk/starfive/clk-starfive-jh7110-sys.c    | 31 ++++---------------
 2 files changed, 7 insertions(+), 25 deletions(-)
drivers/clk/starfive/Kconfig +1 -0
index e306edf4defa..903a5097c642 100644
@@ -35,6 +35,7 @@ config CLK_STARFIVE_JH7110_SYS
 	select AUXILIARY_BUS
 	select CLK_STARFIVE_JH71X0
 	select RESET_STARFIVE_JH7110
+	select CLK_STARFIVE_JH7110_PLL
 	default ARCH_STARFIVE
 	help
 	  Say yes here to support the system clock controller on the
drivers/clk/starfive/clk-starfive-jh7110-sys.c +6 -25
index 5ec210644e1d..439999dc2191 100644
@@ -395,29 +395,6 @@ static int __init jh7110_syscrg_probe(struct platform_device *pdev)
 
 	dev_set_drvdata(priv->dev, (void *)(&priv->base));
 
-	/*
-	 * These PLL clocks are not actually fixed factor clocks and can be
-	 * controlled by the syscon registers of JH7110. They will be dropped
-	 * and registered in the PLL clock driver instead.
-	 */
-	/* 24MHz -> 1000.0MHz */
-	priv->pll[0] = devm_clk_hw_register_fixed_factor(priv->dev, "pll0_out",
-							 "osc", 0, 125, 3);
-	if (IS_ERR(priv->pll[0]))
-		return PTR_ERR(priv->pll[0]);
-
-	/* 24MHz -> 1066.0MHz */
-	priv->pll[1] = devm_clk_hw_register_fixed_factor(priv->dev, "pll1_out",
-							 "osc", 0, 533, 12);
-	if (IS_ERR(priv->pll[1]))
-		return PTR_ERR(priv->pll[1]);
-
-	/* 24MHz -> 1188.0MHz */
-	priv->pll[2] = devm_clk_hw_register_fixed_factor(priv->dev, "pll2_out",
-							 "osc", 0, 99, 2);
-	if (IS_ERR(priv->pll[2]))
-		return PTR_ERR(priv->pll[2]);
-
 	for (idx = 0; idx < JH7110_SYSCLK_END; idx++) {
 		u32 max = jh7110_sysclk_data[idx].max;
 		struct clk_parent_data parents[4] = {};
@@ -455,8 +432,12 @@ static int __init jh7110_syscrg_probe(struct platform_device *pdev)
 				parents[i].fw_name = "tdm_ext";
 			else if (pidx == JH7110_SYSCLK_MCLK_EXT)
 				parents[i].fw_name = "mclk_ext";
-			else
-				parents[i].hw = priv->pll[pidx - JH7110_SYSCLK_PLL0_OUT];
+			else if (pidx == JH7110_SYSCLK_PLL0_OUT)
+				parents[i].fw_name = "pll0_out";
+			else if (pidx == JH7110_SYSCLK_PLL1_OUT)
+				parents[i].fw_name = "pll1_out";
+			else if (pidx == JH7110_SYSCLK_PLL2_OUT)
+				parents[i].fw_name = "pll2_out";
 		}
 
 		clk->hw.init = &init;
Signature · 1 line
2.25.1
author maintainer
#5 lore raw

PATCH v3 5/7 dt-bindings: soc: starfive: Add StarFive syscon module

In reply to Xingyu Wu

From: William Qiu <[email protected]>

Add documentation to describe StarFive System Controller Registers.

---
 .../soc/starfive/starfive,jh7110-syscon.yaml  | 58 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +58 -0
new file mode 100644
index 000000000000..de086e74a229
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/starfive/starfive,jh7110-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 SoC system controller
+
+maintainers:
+  - William Qiu <[email protected]>
+
+description: |
+  The StarFive JH7110 SoC system controller provides register information such
+  as offset, mask and shift to configure related modules such as MMC and PCIe.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - starfive,jh7110-aon-syscon
+              - starfive,jh7110-sys-syscon
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: starfive,jh7110-stg-syscon
+          - const: syscon
+
+  reg:
+    maxItems: 1
+
+  clock-controller:
+    $ref: /schemas/clock/starfive,jh7110-pll.yaml#
+    type: object
+
+  power-controller:
+    $ref: /schemas/power/starfive,jh7110-pmu.yaml#
+    type: object
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    syscon@10240000 {
+        compatible = "starfive,jh7110-stg-syscon", "syscon";
+        reg = <0x10240000 0x1000>;
+    };
+
+    syscon@13030000 {
+        compatible = "starfive,jh7110-sys-syscon", "syscon", "simple-mfd";
+        reg = <0x13030000 0x1000>;
+    };
+
+...
MAINTAINERS +6 -0
index 03051ae2e9e5..0fafeea8ebdb 100644
@@ -19917,6 +19917,11 @@ S:	Supported
 F:	Documentation/devicetree/bindings/clock/starfive,jh7110-pll.yaml
 F:	drivers/clk/starfive/clk-starfive-jh7110-pll.*
 
+STARFIVE JH7110 SYSCON
+M:	William Qiu <[email protected]>
+S:	Supported
+F:	Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
+
 STARFIVE JH71X0 CLOCK DRIVERS
 M:	Emil Renner Berthing <[email protected]>
 M:	Hal Feng <[email protected]>
@@ -19954,6 +19959,7 @@ STARFIVE SOC DRIVERS
 M:	Conor Dooley <[email protected]>
 S:	Maintained
 T:	git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/
+F:	Documentation/devicetree/bindings/soc/starfive/
 F:	drivers/soc/starfive/
 
 STARFIVE TRNG DRIVER
Signature · 1 line
2.25.1
author maintainer
#2 lore raw

PATCH v3 2/7 clk: starfive: Add StarFive JH7110 PLL clock driver

In reply to Xingyu Wu

Add driver for the StarFive JH7110 PLL clock controller and they work by reading and setting syscon registers.

---
 MAINTAINERS                                   |   6 +
 drivers/clk/starfive/Kconfig                  |   8 +
 drivers/clk/starfive/Makefile                 |   1 +
 .../clk/starfive/clk-starfive-jh7110-pll.c    | 427 ++++++++++++++++++
 .../clk/starfive/clk-starfive-jh7110-pll.h    | 293 ++++++++++++
 5 files changed, 735 insertions(+)
 create mode 100644 drivers/clk/starfive/clk-starfive-jh7110-pll.c
 create mode 100644 drivers/clk/starfive/clk-starfive-jh7110-pll.h
MAINTAINERS +6 -0
index 4c0b39c44957..03051ae2e9e5 100644
@@ -19911,6 +19911,12 @@ S:	Supported
 F:	Documentation/devicetree/bindings/mmc/starfive*
 F:	drivers/mmc/host/dw_mmc-starfive.c
 
+STARFIVE JH7110 PLL CLOCK DRIVER
+M:	Xingyu Wu <[email protected]>
+S:	Supported
+F:	Documentation/devicetree/bindings/clock/starfive,jh7110-pll.yaml
+F:	drivers/clk/starfive/clk-starfive-jh7110-pll.*
+
 STARFIVE JH71X0 CLOCK DRIVERS
 M:	Emil Renner Berthing <[email protected]>
 M:	Hal Feng <[email protected]>
drivers/clk/starfive/Kconfig +8 -0
index 71c1148ee5f6..e306edf4defa 100644
@@ -21,6 +21,14 @@ config CLK_STARFIVE_JH7100_AUDIO
 	  Say Y or M here to support the audio clocks on the StarFive JH7100
 	  SoC.
 
+config CLK_STARFIVE_JH7110_PLL
+	bool "StarFive JH7110 PLL clock support"
+	depends on ARCH_STARFIVE || COMPILE_TEST
+	default ARCH_STARFIVE
+	help
+	  Say yes here to support the PLL clock controller on the
+	  StarFive JH7110 SoC.
+
 config CLK_STARFIVE_JH7110_SYS
 	bool "StarFive JH7110 system clock support"
 	depends on ARCH_STARFIVE || COMPILE_TEST
drivers/clk/starfive/Makefile +1 -0
index f3df7d957b1e..b48e539e52b0 100644
@@ -4,5 +4,6 @@ obj-$(CONFIG_CLK_STARFIVE_JH71X0)	+= clk-starfive-jh71x0.o
 obj-$(CONFIG_CLK_STARFIVE_JH7100)	+= clk-starfive-jh7100.o
 obj-$(CONFIG_CLK_STARFIVE_JH7100_AUDIO)	+= clk-starfive-jh7100-audio.o
 
+obj-$(CONFIG_CLK_STARFIVE_JH7110_PLL)	+= clk-starfive-jh7110-pll.o
 obj-$(CONFIG_CLK_STARFIVE_JH7110_SYS)	+= clk-starfive-jh7110-sys.o
 obj-$(CONFIG_CLK_STARFIVE_JH7110_AON)	+= clk-starfive-jh7110-aon.o
drivers/clk/starfive/clk-starfive-jh7110-pll.c new file +427 -0

427 lines not on this page · raw message

drivers/clk/starfive/clk-starfive-jh7110-pll.h new file +293 -0

293 lines not on this page · raw message

Signature · 1 line
2.25.1
author maintainer
#16 lore raw

PATCH v3 6/7 riscv: dts: starfive: jh7110: Add syscon nodes

In reply to Xingyu Wu

From: William Qiu <[email protected]>

Add stg_syscon/sys_syscon/aon_syscon nodes for JH7110 Soc.

---
 arch/riscv/boot/dts/starfive/jh7110.dtsi | 15 +++++++++++++++
 1 file changed, 15 insertions(+)
arch/riscv/boot/dts/starfive/jh7110.dtsi +15 -0
index 4c5fdb905da8..f271c3184d3a 100644
@@ -353,6 +353,11 @@ i2c2: i2c@10050000 {
 			status = "disabled";
 		};
 
+		stg_syscon: syscon@10240000 {
+			compatible = "starfive,jh7110-stg-syscon", "syscon";
+			reg = <0x0 0x10240000 0x0 0x1000>;
+		};
+
 		uart3: serial@12000000 {
 			compatible = "snps,dw-apb-uart";
 			reg = <0x0 0x12000000 0x0 0x10000>;
@@ -457,6 +462,11 @@ syscrg: clock-controller@13020000 {
 			#reset-cells = <1>;
 		};
 
+		sys_syscon: syscon@13030000 {
+			compatible = "starfive,jh7110-sys-syscon", "syscon", "simple-mfd";
+			reg = <0x0 0x13030000 0x0 0x1000>;
+		};
+
 		sysgpio: pinctrl@13040000 {
 			compatible = "starfive,jh7110-sys-pinctrl";
 			reg = <0x0 0x13040000 0x0 0x10000>;
@@ -486,6 +496,11 @@ aoncrg: clock-controller@17000000 {
 			#reset-cells = <1>;
 		};
 
+		aon_syscon: syscon@17010000 {
+			compatible = "starfive,jh7110-aon-syscon", "syscon", "simple-mfd";
+			reg = <0x0 0x17010000 0x0 0x1000>;
+		};
+
 		aongpio: pinctrl@17020000 {
 			compatible = "starfive,jh7110-aon-pinctrl";
 			reg = <0x0 0x17020000 0x0 0x10000>;
Signature · 1 line
2.25.1
author maintainer
#17 lore raw

PATCH v3 7/7 riscv: dts: starfive: jh7110: Add PLL clock node and modify syscrg node

In reply to Xingyu Wu

Add the PLL clock node for the Starfive JH7110 SoC and modify the SYSCRG node to add PLL clocks input.

---
 arch/riscv/boot/dts/starfive/jh7110.dtsi | 14 ++++++++++++--
 1 file changed, 12 insertions(+), 2 deletions(-)
arch/riscv/boot/dts/starfive/jh7110.dtsi +12 -2
index f271c3184d3a..27f8ef37d029 100644
@@ -452,12 +452,16 @@ syscrg: clock-controller@13020000 {
 				 <&gmac1_rgmii_rxin>,
 				 <&i2stx_bclk_ext>, <&i2stx_lrck_ext>,
 				 <&i2srx_bclk_ext>, <&i2srx_lrck_ext>,
-				 <&tdm_ext>, <&mclk_ext>;
+				 <&tdm_ext>, <&mclk_ext>,
+				 <&pllclk JH7110_CLK_PLL0_OUT>,
+				 <&pllclk JH7110_CLK_PLL1_OUT>,
+				 <&pllclk JH7110_CLK_PLL2_OUT>;
 			clock-names = "osc", "gmac1_rmii_refin",
 				      "gmac1_rgmii_rxin",
 				      "i2stx_bclk_ext", "i2stx_lrck_ext",
 				      "i2srx_bclk_ext", "i2srx_lrck_ext",
-				      "tdm_ext", "mclk_ext";
+				      "tdm_ext", "mclk_ext",
+				      "pll0_out", "pll1_out", "pll2_out";
 			#clock-cells = <1>;
 			#reset-cells = <1>;
 		};
@@ -465,6 +469,12 @@ syscrg: clock-controller@13020000 {
 		sys_syscon: syscon@13030000 {
 			compatible = "starfive,jh7110-sys-syscon", "syscon", "simple-mfd";
 			reg = <0x0 0x13030000 0x0 0x1000>;
+
+			pllclk: clock-controller {
+				compatible = "starfive,jh7110-pll";
+				clocks = <&osc>;
+				#clock-cells = <1>;
+			};
 		};
 
 		sysgpio: pinctrl@13040000 {
Signature · 1 line
2.25.1
maintainer
#6 lore raw

Re: [PATCH v3 5/7] dt-bindings: soc: starfive: Add StarFive syscon module

In reply to Xingyu Wu
Quoted 11 lines · Xingyu Wu

From: William Qiu <[email protected]>

Add documentation to describe StarFive System Controller Registers.

---
 .../soc/starfive/starfive,jh7110-syscon.yaml  | 58 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/clock/starfive,jh7110-pll.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

author maintainer
#7 lore raw

Re: [PATCH v3 5/7] dt-bindings: soc: starfive: Add StarFive syscon module

Quoted 33 lines · Rob Herring
Quoted 11 lines · Xingyu Wu

From: William Qiu <[email protected]>

Add documentation to describe StarFive System Controller Registers.

---
 .../soc/starfive/starfive,jh7110-syscon.yaml  | 58 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/clock/starfive,jh7110-pll.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

Quoted 6 lines

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

I have updated yamllint and dtschema, and tested it and didn't see this error. I asked william and also didn't see this. This error says the file:
http://devicetree.org/schemas/clock/starfive,jh7110-pll.yaml was not found. This file is added in patch 1 but patch 1 should be applied after these patchset about JH7110 basic clock drivers. I don't know if that's the reason.

Best regards,
Xingyu Wu

maintainer
#8 lore raw

Re: [PATCH v3 5/7] dt-bindings: soc: starfive: Add StarFive syscon module

Quoted 41 lines · Xingyu Wu
Quoted 33 lines · Rob Herring
Quoted 11 lines · Xingyu Wu

From: William Qiu <[email protected]>

Add documentation to describe StarFive System Controller Registers.

---
 .../soc/starfive/starfive,jh7110-syscon.yaml  | 58 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml

My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check' on your patch (DT_CHECKER_FLAGS is new in v5.13):

yamllint warnings/errors:

dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/clock/starfive,jh7110-pll.yaml

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]

The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:

Quoted 6 lines

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.

Quoted 5 lines

I have updated yamllint and dtschema, and tested it and didn't see this error. I asked william and also didn't see this. This error says the file:
http://devicetree.org/schemas/clock/starfive,jh7110-pll.yaml was not found. This file is added in patch 1 but patch 1 should be applied after these patchset about JH7110 basic clock drivers. I don't know if that's the reason.

Yes, patch 1 could not be applied[1].

Rob

[1] https://patchwork.ozlabs.org/project/devicetree-bindings/patch/[email protected]/

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

maintainer Reviewed-by on v3 5/7
#9 lore raw

Re: [PATCH v3 5/7] dt-bindings: soc: starfive: Add StarFive syscon module

In reply to Xingyu Wu
Quoted 11 lines · Xingyu Wu

From: William Qiu <[email protected]>

Add documentation to describe StarFive System Controller Registers.

---
 .../soc/starfive/starfive,jh7110-syscon.yaml  | 58 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
maintainer
#10 lore raw

Re: [PATCH v3 5/7] dt-bindings: soc: starfive: Add StarFive syscon module

In reply to Xingyu Wu
Quoted 45 lines · Xingyu Wu

From: William Qiu <[email protected]>

Add documentation to describe StarFive System Controller Registers.

---
 .../soc/starfive/starfive,jh7110-syscon.yaml  | 58 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +28 -0
new file mode 100644
index 000000000000..de086e74a229
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/starfive/starfive,jh7110-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 SoC system controller
+
+maintainers:
+  - William Qiu <[email protected]>
+
+description: |
+  The StarFive JH7110 SoC system controller provides register information such
+  as offset, mask and shift to configure related modules such as MMC and PCIe.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - starfive,jh7110-aon-syscon
+              - starfive,jh7110-sys-syscon
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: starfive,jh7110-stg-syscon
+          - const: syscon
+

Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml line 38

Quoted 10 lines
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +10 -0
+  reg:
+    maxItems: 1
+
+  clock-controller:
+    $ref: /schemas/clock/starfive,jh7110-pll.yaml#
+    type: object
+
+  power-controller:
+    $ref: /schemas/power/starfive,jh7110-pmu.yaml#
+    type: object

My plan was to grab this patch after the merge window, but there's been some back and forth [1] about what exactly should be a power-controller here. Given the merge window is open & I know Emil wants to look at the various clock bits for the JH7110, I don't think there's a pressing need for you to do anything here, but figured I'd at least mention how things are going on this thread too.

Thanks,
Conor.

1 - https://lore.kernel.org/linux-riscv/[email protected]/T/#m708770e9596098214df769bcc2bdaf9c1a46ca98

Quoted 47 lines
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +20 -0
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    syscon@10240000 {
+        compatible = "starfive,jh7110-stg-syscon", "syscon";
+        reg = <0x10240000 0x1000>;
+    };
+
+    syscon@13030000 {
+        compatible = "starfive,jh7110-sys-syscon", "syscon", "simple-mfd";
+        reg = <0x13030000 0x1000>;
+    };
+
+...
MAINTAINERS +6 -0
index 03051ae2e9e5..0fafeea8ebdb 100644
@@ -19917,6 +19917,11 @@ S:	Supported
 F:	Documentation/devicetree/bindings/clock/starfive,jh7110-pll.yaml
 F:	drivers/clk/starfive/clk-starfive-jh7110-pll.*
 
+STARFIVE JH7110 SYSCON
+M:	William Qiu <[email protected]>
+S:	Supported
+F:	Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
+
 STARFIVE JH71X0 CLOCK DRIVERS
 M:	Emil Renner Berthing <[email protected]>
 M:	Hal Feng <[email protected]>
@@ -19954,6 +19959,7 @@ STARFIVE SOC DRIVERS
 M:	Conor Dooley <[email protected]>
 S:	Maintained
 T:	git https://git.kernel.org/pub/scm/linux/kernel/git/conor/linux.git/
+F:	Documentation/devicetree/bindings/soc/starfive/
 F:	drivers/soc/starfive/
 
 STARFIVE TRNG DRIVER
Signature · 1 line
2.25.1
maintainer
#11 lore raw

Re: [PATCH v3 5/7] dt-bindings: soc: starfive: Add StarFive syscon module

Quoted 55 lines · Conor Dooley
Quoted 54 lines · Xingyu Wu

From: William Qiu <[email protected]>

Add documentation to describe StarFive System Controller Registers.

---
 .../soc/starfive/starfive,jh7110-syscon.yaml  | 58 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +37 -0
new file mode 100644
index 000000000000..de086e74a229
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/starfive/starfive,jh7110-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 SoC system controller
+
+maintainers:
+  - William Qiu <[email protected]>
+
+description: |
+  The StarFive JH7110 SoC system controller provides register information such
+  as offset, mask and shift to configure related modules such as MMC and PCIe.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - starfive,jh7110-aon-syscon
+              - starfive,jh7110-sys-syscon
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: starfive,jh7110-stg-syscon
+          - const: syscon
+
+  reg:
+    maxItems: 1
+
+  clock-controller:
+    $ref: /schemas/clock/starfive,jh7110-pll.yaml#
+    type: object
+
+  power-controller:
+    $ref: /schemas/power/starfive,jh7110-pmu.yaml#
Quoted 8 lines

Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml line 38

Quoted 1 line
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +1 -0
+    type: object

My plan was to grab this patch after the merge window, but there's been some back and forth [1] about what exactly should be a power-controller here. Given the merge window is open & I know Emil wants to look at the various clock bits for the JH7110, I don't think there's a pressing need for you to do anything here, but figured I'd at least mention how things are going on this thread too.

To follow up on this, it transpired in that thread that this node, not a child node, should be the power controller.

Up to you StarFive folk how you wish to resend, but I am fine with it being in this series, I shall just not pick up the soc driver patches until the resent binding is applied by Stephen.

Thanks,
Conor.

author maintainer
#12 lore raw

Re: [PATCH v3 5/7] dt-bindings: soc: starfive: Add StarFive syscon module

Quoted 65 lines · Conor Dooley
Quoted 55 lines · Conor Dooley
Quoted 54 lines · Xingyu Wu

From: William Qiu <[email protected]>

Add documentation to describe StarFive System Controller Registers.

---
 .../soc/starfive/starfive,jh7110-syscon.yaml  | 58 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +37 -0
new file mode 100644
index 000000000000..de086e74a229
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/starfive/starfive,jh7110-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 SoC system controller
+
+maintainers:
+  - William Qiu <[email protected]>
+
+description: |
+  The StarFive JH7110 SoC system controller provides register information such
+  as offset, mask and shift to configure related modules such as MMC and PCIe.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - starfive,jh7110-aon-syscon
+              - starfive,jh7110-sys-syscon
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: starfive,jh7110-stg-syscon
+          - const: syscon
+
+  reg:
+    maxItems: 1
+
+  clock-controller:
+    $ref: /schemas/clock/starfive,jh7110-pll.yaml#
+    type: object
+
+  power-controller:
+    $ref: /schemas/power/starfive,jh7110-pmu.yaml#
Quoted 8 lines

Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml line 38

Quoted 1 line
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +1 -0
+    type: object

My plan was to grab this patch after the merge window, but there's been some back and forth [1] about what exactly should be a power-controller here. Given the merge window is open & I know Emil wants to look at the various clock bits for the JH7110, I don't think there's a pressing need for you to do anything here, but figured I'd at least mention how things are going on this thread too.

Quoted 7 lines

To follow up on this, it transpired in that thread that this node, not a child node, should be the power controller.

Up to you StarFive folk how you wish to resend, but I am fine with it being in this series, I shall just not pick up the soc driver patches until the resent binding is applied by Stephen.

Thanks. I had discussed with changhuang.liang about this. And I will drop the 'starfive,jh7110-aon-syscon' and 'power-controller' in next patchset. Changhuang will take these in his patchset.

Best regards,
Xingyu Wu

maintainer
#13 lore raw

Re: [PATCH v3 5/7] dt-bindings: soc: starfive: Add StarFive syscon module

Quoted 69 lines · Xingyu Wu
Quoted 68 lines · Conor Dooley
Quoted 55 lines · Conor Dooley
Quoted 54 lines · Xingyu Wu

From: William Qiu <[email protected]>

Add documentation to describe StarFive System Controller Registers.

---
 .../soc/starfive/starfive,jh7110-syscon.yaml  | 58 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +37 -0
new file mode 100644
index 000000000000..de086e74a229
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/starfive/starfive,jh7110-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 SoC system controller
+
+maintainers:
+  - William Qiu <[email protected]>
+
+description: |
+  The StarFive JH7110 SoC system controller provides register information such
+  as offset, mask and shift to configure related modules such as MMC and PCIe.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - starfive,jh7110-aon-syscon
+              - starfive,jh7110-sys-syscon
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: starfive,jh7110-stg-syscon
+          - const: syscon
+
+  reg:
+    maxItems: 1
+
+  clock-controller:
+    $ref: /schemas/clock/starfive,jh7110-pll.yaml#
+    type: object
+
+  power-controller:
+    $ref: /schemas/power/starfive,jh7110-pmu.yaml#
Quoted 8 lines

Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml line 38

Quoted 1 line
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +1 -0
+    type: object

My plan was to grab this patch after the merge window, but there's been some back and forth [1] about what exactly should be a power-controller here. Given the merge window is open & I know Emil wants to look at the various clock bits for the JH7110, I don't think there's a pressing need for you to do anything here, but figured I'd at least mention how things are going on this thread too.

To follow up on this, it transpired in that thread that this node, not a child node, should be the power controller.

Quoted 8 lines
Quoted 4 lines

Up to you StarFive folk how you wish to resend, but I am fine with it being in this series, I shall just not pick up the soc driver patches until the resent binding is applied by Stephen.

Thanks. I had discussed with changhuang.liang about this. And I will drop the 'starfive,jh7110-aon-syscon' and 'power-controller' in next patchset. Changhuang will take these in his patchset.

Won't that result in broken bindings, since there's a ref to the pll binding? Keeping it in the same series (i.e. this one) makes
the most sense to me.

Cheers,
Conor.

Quoted 4 lines

Best regards,
Xingyu Wu

author maintainer
#14 lore raw

Re: [PATCH v3 5/7] dt-bindings: soc: starfive: Add StarFive syscon module

Quoted 77 lines · Conor Dooley
Quoted 74 lines · Xingyu Wu
Quoted 72 lines · Conor Dooley
Quoted 55 lines · Conor Dooley
Quoted 54 lines · Xingyu Wu

From: William Qiu <[email protected]>

Add documentation to describe StarFive System Controller Registers.

---
 .../soc/starfive/starfive,jh7110-syscon.yaml  | 58 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +37 -0
new file mode 100644
index 000000000000..de086e74a229
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/starfive/starfive,jh7110-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 SoC system controller
+
+maintainers:
+  - William Qiu <[email protected]>
+
+description: |
+  The StarFive JH7110 SoC system controller provides register information such
+  as offset, mask and shift to configure related modules such as MMC and PCIe.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - starfive,jh7110-aon-syscon
+              - starfive,jh7110-sys-syscon
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: starfive,jh7110-stg-syscon
+          - const: syscon
+
+  reg:
+    maxItems: 1
+
+  clock-controller:
+    $ref: /schemas/clock/starfive,jh7110-pll.yaml#
+    type: object
+
+  power-controller:
+    $ref: /schemas/power/starfive,jh7110-pmu.yaml#
Quoted 8 lines

Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml line 38

Quoted 1 line
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +1 -0
+    type: object

My plan was to grab this patch after the merge window, but there's been some back and forth [1] about what exactly should be a power-controller here. Given the merge window is open & I know Emil wants to look at the various clock bits for the JH7110, I don't think there's a pressing need for you to do anything here, but figured I'd at least mention how things are going on this thread too.

To follow up on this, it transpired in that thread that this node, not a child node, should be the power controller.

Up to you StarFive folk how you wish to resend, but I am fine with it being in this series, I shall just not pick up the soc driver patches until the resent binding is applied by Stephen.

Quoted 8 lines
Quoted 3 lines

Thanks. I had discussed with changhuang.liang about this. And I will drop the 'starfive,jh7110-aon-syscon' and 'power-controller' in next patchset. Changhuang will take these in his patchset.

Won't that result in broken bindings, since there's a ref to the pll binding? Keeping it in the same series (i.e. this one) makes
the most sense to me.

I will keep the 'sys-syscon' and 'stg-syscon'. The ref just follows the 'sys-syscon' so I also keep it and the pll binding.
I also hope to add the 'aon-syscon' in this same series but it should be the power controller, so I have to give up it.

Best regards,
Xingyu Wu

_______________________________________________
linux-riscv mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-riscv

author maintainer
#15 lore raw

Re: [PATCH v3 5/7] dt-bindings: soc: starfive: Add StarFive syscon module

Quoted 87 lines · Xingyu Wu
Quoted 77 lines · Conor Dooley
Quoted 74 lines · Xingyu Wu
Quoted 72 lines · Conor Dooley
Quoted 55 lines · Conor Dooley
Quoted 54 lines · Xingyu Wu

From: William Qiu <[email protected]>

Add documentation to describe StarFive System Controller Registers.

---
 .../soc/starfive/starfive,jh7110-syscon.yaml  | 58 +++++++++++++++++++
 MAINTAINERS                                   |  6 ++
 2 files changed, 64 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +37 -0
new file mode 100644
index 000000000000..de086e74a229
@@ -0,0 +1,58 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/soc/starfive/starfive,jh7110-syscon.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: StarFive JH7110 SoC system controller
+
+maintainers:
+  - William Qiu <[email protected]>
+
+description: |
+  The StarFive JH7110 SoC system controller provides register information such
+  as offset, mask and shift to configure related modules such as MMC and PCIe.
+
+properties:
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - starfive,jh7110-aon-syscon
+              - starfive,jh7110-sys-syscon
+          - const: syscon
+          - const: simple-mfd
+      - items:
+          - const: starfive,jh7110-stg-syscon
+          - const: syscon
+
+  reg:
+    maxItems: 1
+
+  clock-controller:
+    $ref: /schemas/clock/starfive,jh7110-pll.yaml#
+    type: object
+
+  power-controller:
+    $ref: /schemas/power/starfive,jh7110-pmu.yaml#
Quoted 8 lines

Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml line 38

Quoted 1 line
Documentation/devicetree/bindings/soc/starfive/starfive,jh7110-syscon.yaml new file +1 -0
+    type: object

My plan was to grab this patch after the merge window, but there's been some back and forth [1] about what exactly should be a power-controller here. Given the merge window is open & I know Emil wants to look at the various clock bits for the JH7110, I don't think there's a pressing need for you to do anything here, but figured I'd at least mention how things are going on this thread too.

To follow up on this, it transpired in that thread that this node, not a child node, should be the power controller.

Up to you StarFive folk how you wish to resend, but I am fine with it being in this series, I shall just not pick up the soc driver patches until the resent binding is applied by Stephen.

Quoted 8 lines
Quoted 3 lines

Thanks. I had discussed with changhuang.liang about this. And I will drop the 'starfive,jh7110-aon-syscon' and 'power-controller' in next patchset. Changhuang will take these in his patchset.

Won't that result in broken bindings, since there's a ref to the pll binding? Keeping it in the same series (i.e. this one) makes
the most sense to me.

Quoted 5 lines

I will keep the 'sys-syscon' and 'stg-syscon'. The ref just follows the 'sys-syscon' so I also keep it and the pll binding.
I also hope to add the 'aon-syscon' in this same series but it should be the power controller, so I have to give up it.

I synchronized with Chang Huang. It is decided to keep 'aon-syscon' as the power controller in this and do not add child node in 'aon-syscon'.
And I will update it in the next version of patch.

Best regards,
Xingyu Wu