Skip to contentSkip to conversation

Add ums512 clocks and relative bindings file

PATCH Superseded Cixi Geng 3 participants 11 messages Sep 9, 2022

Subsystems (4)

v7 of 8 Superseded Latest is v8 →

lore
Share & tools
lore

Cixi Geng

author
#0 lore raw

v7 cover Add ums512 clocks and relative bindings file

From: Cixi Geng <[email protected]>

This patchset is add the UMS512 clocks support

v2 changes:
adjust description and add the "sprd,ums512-glbregs,syscon,simple-mfd" compatibles to fix match failed logs in the dt_binding_check. add the property license and copyright notice.

v3 changes:
fix wrong indentation and hint: "maxItems" is not needed with an "items" list when use the latest dtschema.

v4 changes:
move the syscon bindins from clk to glbreg yaml file by pickup chunyan's patch for global registers bindings
fix the comments from Krzysztof in v3 patchset
add the Acked-by: Krzysztof in patch v4 3/4
fix the warning Prefer "GPL" over "GPL v2"

v5 changes:
Add review tags.
fix the comments in ums512-glbreg.yaml.

v6 changes:
No more send the patch 1/4 and 3/4 in V5 for applied by Stephen change GPL to GPL v2 license
fix the lack of space in some "{" and "}"
add check error for sprd_clk_regmap_init.

v7 changes:
Resend the patchset after the cross-tree patch merged use thr absolute path for the mfd refs of patternProperties

Chunyan Zhang (1):
dt-bindings: mfd: sprd: Add bindings for ums512 global registers

Cixi Geng (1):
clk: sprd: Add clocks support for UMS512

 .../bindings/mfd/sprd,ums512-glbreg.yaml      |   68 +
 drivers/clk/sprd/Kconfig                      |    6 +
 drivers/clk/sprd/Makefile                     |    1 +
 drivers/clk/sprd/ums512-clk.c                 | 2202 +++++++++++++++++
 4 files changed, 2277 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml
 create mode 100644 drivers/clk/sprd/ums512-clk.c
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH v7 1/2 dt-bindings: mfd: sprd: Add bindings for ums512 global registers

From: Chunyan Zhang <[email protected]>

Add bindings for Unisoc system global register which provide register map for clocks.

---
 .../bindings/mfd/sprd,ums512-glbreg.yaml      | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml new file +68 -0
new file mode 100644
index 000000000000..c8125dbd1d72
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2022 Unisoc Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/sprd,ums512-glbreg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Unisoc System Global Register
+
+maintainers:
+  - Orson Zhai <[email protected]>
+  - Baolin Wang <[email protected]>
+  - Chunyan Zhang <[email protected]>
+
+description:
+  Unisoc system global registers provide register map
+  for clocks and some multimedia modules of the SoC.
+
+properties:
+  compatible:
+    items:
+      - const: sprd,ums512-glbregs
+      - const: syscon
+      - const: simple-mfd
+
+  "#address-cells": true
+  "#size-cells": true
+
+  ranges:
+    maxItems: 1
+
+  reg:
+    maxItems: 1
+
+patternProperties:
+  "^clock-controller@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/clock/sprd,ums512-clk.yaml#
+    description:
+      Clock controller for the SoC clocks.
+
+required:
+  - compatible
+  - reg
+
+additionalProperties: false
+
+examples:
+  - |
+    ap_apb_regs: syscon@71000000 {
+      compatible = "sprd,ums512-glbregs", "syscon", "simple-mfd";
+      reg = <0x71000000 0x3000>;
+      #address-cells = <1>;
+      #size-cells = <1>;
+      ranges = <0 0x71000000 0x3000>;
+
+      clock-controller@0 {
+        compatible = "sprd,ums512-apahb-gate";
+        reg = <0x0 0x2000>;
+        #clock-cells = <1>;
+      };
+    };
+
+  - |
+    ap_intc5_regs: syscon@32360000 {
+      compatible = "sprd,ums512-glbregs", "syscon", "simple-mfd";
+      reg = <0x32360000 0x1000>;
+    };
Signature · 1 line
2.34.1
maintainer
#2 lore raw

Re: [PATCH V7 1/2] dt-bindings: mfd: sprd: Add bindings for ums512 global registers

Quoted 5 lines · Cixi Geng

From: Chunyan Zhang <[email protected]>

Add bindings for Unisoc system global register which provide register map for clocks.

Quoted 7 lines
---
 .../bindings/mfd/sprd,ums512-glbreg.yaml      | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml

I'll take this when the clk driver changes are merged.

Signature · 1 line
Lee Jones [李琼斯]
author
#3 lore raw

Re: [PATCH V7 1/2] dt-bindings: mfd: sprd: Add bindings for ums512 global registers

Quoted 16 lines · Lee Jones <[email protected]> 于2022年9月9日周五 16:10写道:
Quoted 5 lines · Cixi Geng

From: Chunyan Zhang <[email protected]>

Add bindings for Unisoc system global register which provide register map for clocks.

Quoted 7 lines
---
 .../bindings/mfd/sprd,ums512-glbreg.yaml      | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml
Quoted 1 line

I'll take this when the clk driver changes are merged.

this patch is depends on the clk dt-bingdings, which is already merged [1] so the patch can be applied without wating the clk driver
and the clk driver need merge this first

commitID (6a3a6c7ae0ef235faebf66bac56384dbd5f944dc)
[1]. https://lore.kernel.org/all/[email protected]/

Quoted 3 lines

--
Lee Jones [李琼斯]

#4 lore raw

Re: [PATCH V7 1/2] dt-bindings: mfd: sprd: Add bindings for ums512 global registers

Quoted 17 lines · Cixi Geng
Quoted 16 lines · Lee Jones <[email protected]> 于2022年9月9日周五 16:10写道:
Quoted 12 lines · Cixi Geng

From: Chunyan Zhang <[email protected]>

Add bindings for Unisoc system global register which provide register map for clocks.

---
 .../bindings/mfd/sprd,ums512-glbreg.yaml      | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml
Quoted 2 lines
Quoted 1 line

I'll take this when the clk driver changes are merged.

this patch is depends on the clk dt-bingdings, which is already merged [1]

which is merged to different tree, so this one here cannot go via MFD tree without cross-tree merges.

Anyway please respond to my comment.

Quoted 5 lines

so the patch can be applied without wating the clk driver and the clk driver need merge this first

commitID (6a3a6c7ae0ef235faebf66bac56384dbd5f944dc)
[1]. https://lore.kernel.org/all/[email protected]/

Best regards,
Krzysztof

author
#5 lore raw

Re: [PATCH V7 1/2] dt-bindings: mfd: sprd: Add bindings for ums512 global registers

Quoted 19 lines · Krzysztof Kozlowski <[email protected]> 于2022年9月9日周五 17:57写道:
Quoted 17 lines · Cixi Geng
Quoted 16 lines · Lee Jones <[email protected]> 于2022年9月9日周五 16:10写道:
Quoted 12 lines · Cixi Geng

From: Chunyan Zhang <[email protected]>

Add bindings for Unisoc system global register which provide register map for clocks.

---
 .../bindings/mfd/sprd,ums512-glbreg.yaml      | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml
Quoted 5 lines
Quoted 2 lines
Quoted 1 line

I'll take this when the clk driver changes are merged.

this patch is depends on the clk dt-bingdings, which is already merged [1]

which is merged to different tree, so this one here cannot go via MFD tree without cross-tree merges.

Hi Krzysztof:
I test on the latest kernel 506357871c18e06565840d71c2ef9f818e19f460 (torvalds/master) version:6.0.0.rc4
what you mean is I must warting your branch upgrade the cross-tree?

Quoted 2 lines

Anyway please respond to my comment.

it in different reply-letter, about the question "Hmm, why these are not const?" do your mean I should write as follow? what the different,
because I found both the two ways of writing are exist
"#address-cells":
const: 1

"#size-cells":
const: 1

Quoted 11 lines
Quoted 6 lines

so the patch can be applied without wating the clk driver and the clk driver need merge this first

commitID (6a3a6c7ae0ef235faebf66bac56384dbd5f944dc)
[1]. https://lore.kernel.org/all/[email protected]/

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH V7 1/2] dt-bindings: mfd: sprd: Add bindings for ums512 global registers

Quoted 21 lines · Cixi Geng
Quoted 20 lines · Krzysztof Kozlowski <[email protected]> 于2022年9月9日周五 17:57写道:
Quoted 18 lines · Cixi Geng
Quoted 17 lines · Lee Jones <[email protected]> 于2022年9月9日周五 16:10写道:
Quoted 5 lines · Cixi Geng

From: Chunyan Zhang <[email protected]>

Add bindings for Unisoc system global register which provide register map for clocks.

Quoted 7 lines
---
 .../bindings/mfd/sprd,ums512-glbreg.yaml      | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml

I'll take this when the clk driver changes are merged.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

this patch is depends on the clk dt-bingdings, which is already merged [1]

which is merged to different tree, so this one here cannot go via MFD tree without cross-tree merges.

Hi Krzysztof:
I test on the latest kernel 506357871c18e06565840d71c2ef9f818e19f460 (torvalds/master) version:6.0.0.rc4
what you mean is I must warting your branch upgrade the cross-tree?

Ah, you linked email message so that rather indicated applying to clk tree, but indeed it is already in the mainline.

Quoted 9 lines
Quoted 1 line

Anyway please respond to my comment.

it in different reply-letter, about the question "Hmm, why these are not const?" do your mean I should write as follow? what the different,
because I found both the two ways of writing are exist
"#address-cells":
const: 1

"#size-cells":
const: 1

Yes.

Best regards,
Krzysztof

maintainer
#7 lore raw

Re: [PATCH V7 1/2] dt-bindings: mfd: sprd: Add bindings for ums512 global registers

Quoted 26 lines · Krzysztof Kozlowski
Quoted 25 lines · Cixi Geng
Quoted 24 lines · Krzysztof Kozlowski <[email protected]> 于2022年9月9日周五 17:57写道:
Quoted 17 lines · Cixi Geng
Quoted 16 lines · Lee Jones <[email protected]> 于2022年9月9日周五 16:10写道:
Quoted 12 lines · Cixi Geng

From: Chunyan Zhang <[email protected]>

Add bindings for Unisoc system global register which provide register map for clocks.

---
 .../bindings/mfd/sprd,ums512-glbreg.yaml      | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml
Quoted 2 lines
Quoted 1 line

I'll take this when the clk driver changes are merged.

this patch is depends on the clk dt-bingdings, which is already merged [1]

which is merged to different tree, so this one here cannot go via MFD tree without cross-tree merges.

Quoted 7 lines
Quoted 4 lines

Hi Krzysztof:
I test on the latest kernel 506357871c18e06565840d71c2ef9f818e19f460 (torvalds/master) version:6.0.0.rc4
what you mean is I must warting your branch upgrade the cross-tree?

Ah, you linked email message so that rather indicated applying to clk tree, but indeed it is already in the mainline.

... and also, I'm *still* not playing that game with DT bindings.

It's bad enough that we have to sync across subsystems to avoid build-breakages. If documentation comes together in -next and subsequently Mainline that should be adequate.

I doubt Linus is running DT checker(s) on each pull-request he merges, nor are there any stipulations for DT bindings to be bisectable post-merge.

Signature · 1 line
Lee Jones [李琼斯]
author
#8 lore raw

Re: [PATCH V7 1/2] dt-bindings: mfd: sprd: Add bindings for ums512 global registers

Quoted 39 lines · Lee Jones <[email protected]> 于2022年9月9日周五 19:50写道:
Quoted 26 lines · Krzysztof Kozlowski
Quoted 25 lines · Cixi Geng
Quoted 24 lines · Krzysztof Kozlowski <[email protected]> 于2022年9月9日周五 17:57写道:
Quoted 17 lines · Cixi Geng
Quoted 16 lines · Lee Jones <[email protected]> 于2022年9月9日周五 16:10写道:
Quoted 12 lines · Cixi Geng

From: Chunyan Zhang <[email protected]>

Add bindings for Unisoc system global register which provide register map for clocks.

---
 .../bindings/mfd/sprd,ums512-glbreg.yaml      | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml
Quoted 2 lines
Quoted 1 line

I'll take this when the clk driver changes are merged.

this patch is depends on the clk dt-bingdings, which is already merged [1]

which is merged to different tree, so this one here cannot go via MFD tree without cross-tree merges.

Quoted 7 lines
Quoted 4 lines

Hi Krzysztof:
I test on the latest kernel 506357871c18e06565840d71c2ef9f818e19f460 (torvalds/master) version:6.0.0.rc4
what you mean is I must warting your branch upgrade the cross-tree?

Ah, you linked email message so that rather indicated applying to clk tree, but indeed it is already in the mainline.

... and also, I'm *still* not playing that game with DT bindings.

Quoted 7 lines

It's bad enough that we have to sync across subsystems to avoid build-breakages. If documentation comes together in -next and subsequently Mainline that should be adequate.

I doubt Linus is running DT checker(s) on each pull-request he merges, nor are there any stipulations for DT bindings to be bisectable post-merge.

Thanks Lee and Krzysztof's review. I wiil send the patch a new version to add the adress-cell const property.and I think we have agreed on that the dependent patch already exist in mainline.
so these patches can applied as long as no other issues.

Best regards,
Cixi

Quoted 3 lines

--
Lee Jones [李琼斯]

#9 lore raw

Re: [PATCH V7 1/2] dt-bindings: mfd: sprd: Add bindings for ums512 global registers

In reply to Cixi Geng
Quoted 36 lines · Cixi Geng

From: Chunyan Zhang <[email protected]>

Add bindings for Unisoc system global register which provide register map for clocks.

---
 .../bindings/mfd/sprd,ums512-glbreg.yaml      | 68 +++++++++++++++++++
 1 file changed, 68 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml new file +17 -0
new file mode 100644
index 000000000000..c8125dbd1d72
@@ -0,0 +1,68 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+# Copyright 2022 Unisoc Inc.
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/sprd,ums512-glbreg.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Unisoc System Global Register
+
+maintainers:
+  - Orson Zhai <[email protected]>
+  - Baolin Wang <[email protected]>
+  - Chunyan Zhang <[email protected]>
+
+description:
+  Unisoc system global registers provide register map
+  for clocks and some multimedia modules of the SoC.

Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml line 27

Quoted 10 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml new file +10 -0
+
+properties:
+  compatible:
+    items:
+      - const: sprd,ums512-glbregs
+      - const: syscon
+      - const: simple-mfd
+
+  "#address-cells": true
+  "#size-cells": true

Hmm, why these are not const?

Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml line 33

Quoted 6 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml new file +6 -0
+
+  ranges:
+    maxItems: 1
+
+  reg:
+    maxItems: 1

Best regards,
Krzysztof

author
#10 lore raw

PATCH v7 2/2 clk: sprd: Add clocks support for UMS512

In reply to Cixi Geng

From: Cixi Geng <[email protected]>

Add the list of clocks for the Unisoc UMS512, along with clock initialization.

---
 drivers/clk/sprd/Kconfig      |    6 +
 drivers/clk/sprd/Makefile     |    1 +
 drivers/clk/sprd/ums512-clk.c | 2202 +++++++++++++++++++++++++++++++++
 3 files changed, 2209 insertions(+)
 create mode 100644 drivers/clk/sprd/ums512-clk.c
drivers/clk/sprd/Kconfig +6 -0
index e18c80fbe804..c744bd9d2f96 100644
@@ -21,4 +21,10 @@ config SPRD_SC9863A_CLK
 	help
 	  Support for the global clock controller on sc9863a devices.
 	  Say Y if you want to use peripheral devices on sc9863a SoC.
+
+config SPRD_UMS512_CLK
+	tristate "Support for the Spreadtrum UMS512 clocks"
+	help
+	  Support for the global clock controller on ums512 devices.
+	  Say Y if you want to use peripheral devices on ums512 SoC.
 endif
drivers/clk/sprd/Makefile +1 -0
index 41d90e0d7863..f25b2c3904fb 100644
@@ -11,3 +11,4 @@ clk-sprd-y	+= pll.o
 ## SoC support
 obj-$(CONFIG_SPRD_SC9860_CLK)	+= sc9860-clk.o
 obj-$(CONFIG_SPRD_SC9863A_CLK)	+= sc9863a-clk.o
+obj-$(CONFIG_SPRD_UMS512_CLK)	+= ums512-clk.o
drivers/clk/sprd/ums512-clk.c new file +2202 -0

2,202 lines not on this page · raw message

Signature · 1 line
2.34.1