Add Unisoc's UMS512 clock support
Subsystems (4)
Chunyan Zhang
reviewerv4 cover Add Unisoc's UMS512 clock support
From: Chunyan Zhang <[email protected]>
Changes since v3:
* Added back 'reg' property as required;
* Added Rob's Reviewed-by on patch 2/4;
* Changed to dual license for sprd,ums512-clk.h;
Changes since v2:
* Fixed bindings check errors;
* Addressed Rob's comments;
* Added an example of syscon which doesn't include "#address-cells", "#size-cells", "ranges" properties, so removed these three properties from "required".
Changes since v1:
* Fixed errors founded on sprd,ums512-clk.yaml;
* Added a new bindings file for global register which would provide register map for clocks.
Chunyan Zhang (2):
dt-bindings: clk: sprd: Add bindings for ums512 clock controller
dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Xiongpeng Wu (2):
clk: sprd: Add dt-bindings include file for UMS512
clk: sprd: Add Unisoc's UMS512 clock driver
.../bindings/clock/sprd,ums512-clk.yaml | 72 + .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 + drivers/clk/sprd/Kconfig | 8 + drivers/clk/sprd/Makefile | 1 + drivers/clk/sprd/ums512-clk.c | 2197 +++++++++++++++++ include/dt-bindings/clock/sprd,ums512-clk.h | 396 +++ 6 files changed, 2742 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml create mode 100644 drivers/clk/sprd/ums512-clk.c create mode 100644 include/dt-bindings/clock/sprd,ums512-clk.h
Signature · 1 line
2.25.1
Chunyan Zhang
reviewerPATCH v4 1/4 dt-bindings: clk: sprd: Add bindings for ums512 clock controller
From: Chunyan Zhang <[email protected]>
Add a new bindings to describe ums512 clock compatible strings.
--- .../bindings/clock/sprd,ums512-clk.yaml | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml new file +72 -0
@@ -0,0 +1,72 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2019-2021 Unisoc Inc. +%YAML 1.2 +--- +$id: "http://devicetree.org/schemas/clock/sprd,ums512-clk.yaml#" +$schema: "http://devicetree.org/meta-schemas/core.yaml#" + +title: UMS512 Clock Control Unit Device Tree Bindings + +maintainers: + - Orson Zhai <[email protected]> + - Baolin Wang <[email protected]> + - Chunyan Zhang <[email protected]> + +properties: + "#clock-cells": + const: 1 + + compatible: + enum: + - sprd,ums512-apahb-gate + - sprd,ums512-ap-clk + - sprd,ums512-aonapb-clk + - sprd,ums512-pmu-gate + - sprd,ums512-g0-pll + - sprd,ums512-g2-pll + - sprd,ums512-g3-pll + - sprd,ums512-gc-pll + - sprd,ums512-aon-gate + - sprd,ums512-audcpapb-gate + - sprd,ums512-audcpahb-gate + - sprd,ums512-gpu-clk + - sprd,ums512-mm-clk + - sprd,ums512-mm-gate-clk + - sprd,ums512-apapb-gate + + clocks: + minItems: 1 + maxItems: 4 + description: | + The input parent clock(s) phandle for this clock, only list fixed + clocks which are declared in devicetree. + + clock-names: + minItems: 1 + maxItems: 4 + items: + - const: ext-26m + - const: ext-32k + - const: ext-4m + - const: rco-100m + + reg: + maxItems: 1 + +required: + - compatible + - '#clock-cells' + - reg + +additionalProperties: false + +examples: + - | + ap_clk: clock-controller@20200000 { + compatible = "sprd,ums512-ap-clk"; + reg = <0x20200000 0x1000>; + clocks = <&ext_26m>; + clock-names = "ext-26m"; + #clock-cells = <1>; + }; +...
Signature · 1 line
2.25.1
Re: [PATCH v4 1/4] dt-bindings: clk: sprd: Add bindings for ums512 clock controller
Quoted 10 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add a new bindings to describe ums512 clock compatible strings.
Signed-off-by Chunyan Zhang <[email protected]>--- .../bindings/clock/sprd,ums512-clk.yaml | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml
Re: [PATCH v4 1/4] dt-bindings: clk: sprd: Add bindings for ums512 clock controller
In reply to Chunyan ZhangHi Chunyan.
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add a new bindings to describe ums512 clock compatible strings.
Signed-off-by Chunyan Zhang <[email protected]>
Thanks for your patch!
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml line 46
Quoted 6 lines
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml new file +3
-0+ clock-names: + minItems: 1 + maxItems: 4
After applying this to my local tree, as it is a dependency for 2/4 in for-mfd-next:
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml:
properties:clock-names: {'required': ['maxItems']} is not allowed for {'minItems': 1, 'maxItems': 4, 'items': [{'const': 'ext-26m'}, {'const': 'ext-32k'}, {'const': 'ext-4m'}, {'const': 'rco-100m'}]}
hint: "maxItems" is not needed with an "items" list from schema $id: http://devicetree.org/meta-schemas/items.yaml#
so please drop the maxItems 4.
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml line 52
Quoted 6 lines
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml new file +6
-0+ items: + - const: ext-26m + - const: ext-32k + - const: ext-4m + - const: rco-100m +
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Chunyan Zhang
reviewerRe: [PATCH v4 1/4] dt-bindings: clk: sprd: Add bindings for ums512 clock controller
Hi Geert,
Thanks for the review.
Quoted 22 lines · Geert Uytterhoeven
Hi Chunyan.
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add a new bindings to describe ums512 clock compatible strings.
Signed-off-by Chunyan Zhang <[email protected]>Thanks for your patch!
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml line 46
Quoted 6 lines
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml new file +3
-0+ clock-names: + minItems: 1 + maxItems: 4After applying this to my local tree, as it is a dependency for 2/4 in for-mfd-next:
Quoted 8 lines
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml:
properties:clock-names: {'required': ['maxItems']} is not allowed for {'minItems': 1, 'maxItems': 4, 'items': [{'const': 'ext-26m'}, {'const': 'ext-32k'}, {'const': 'ext-4m'}, {'const': 'rco-100m'}]}
hint: "maxItems" is not needed with an "items" list from schema $id: http://devicetree.org/meta-schemas/items.yaml#so please drop the maxItems 4.
Ok, I will, but I don't have this compile error on my side, how do you get this error report?
I use the command below:
make -k dt_binding_check DT_SCHEMA_FILES=Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml and,
make -k dt_binding_check
Thanks,
Chunyan
Quoted 19 lines
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml line 52
Quoted 8 lines
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml new file +6
-0+ items: + - const: ext-26m + - const: ext-32k + - const: ext-4m + - const: rco-100m +Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [PATCH v4 1/4] dt-bindings: clk: sprd: Add bindings for ums512 clock controller
Hi Chunyan,
Quoted 26 lines · Chunyan Zhang
Quoted 16 lines · Geert Uytterhoeven
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml line 46
Quoted 11 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add a new bindings to describe ums512 clock compatible strings.Signed-off-by Chunyan Zhang <[email protected]>Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml new file +3
-0+ clock-names: + minItems: 1 + maxItems: 4After applying this to my local tree, as it is a dependency for 2/4 in for-mfd-next:
Quoted 8 lines
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml:
properties:clock-names: {'required': ['maxItems']} is not allowed for {'minItems': 1, 'maxItems': 4, 'items': [{'const': 'ext-26m'}, {'const': 'ext-32k'}, {'const': 'ext-4m'}, {'const': 'rco-100m'}]}
hint: "maxItems" is not needed with an "items" list from schema $id: http://devicetree.org/meta-schemas/items.yaml#so please drop the maxItems 4.
Quoted 8 lines
Ok, I will, but I don't have this compile error on my side, how do you get this error report?
I use the command below:
make -kdt_binding_checkDT_SCHEMA_FILES=Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml and,
make -kdt_binding_check
Do you have the latest dt-schema?
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Chunyan Zhang
reviewerPATCH v4 2/4 dt-bindings: mfd: sprd: Add bindings for ums512 global registers
In reply to Chunyan ZhangFrom: 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
@@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%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 Device Tree Bindings + +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: + "#address-cells": true + "#size-cells": true + + compatible: + items: + - const: sprd,ums512-glbregs + - const: syscon + - const: simple-mfd + + ranges: + maxItems: 1 + + reg: + maxItems: 1 + +patternProperties: + "^.*@[0-9a-f]+$": + # Child node + type: object + $ref: "../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.25.1
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoted 11 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add bindings for Unisoc system global register which provide register map for clocks.
Signed-off-by Chunyan Zhang <[email protected]>Reviewed-by Rob Herring <[email protected]>--- .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml
Unapplied v3 and applied this (v4) instead, thanks.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoted 8 lines · Lee Jones
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add bindings for Unisoc system global register which provide register map for clocks.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Chunyan Zhang <[email protected]>Reviewed-by Rob Herring <[email protected]>--- .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yamlUnapplied v3 and applied this (v4) instead, thanks.
What about the clock binding this depends on:
Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml'
xargs: dt-doc-validate: exited with status 255; aborting
make[1]: *** Deleting file 'Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml' Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml' make[1]: *** [scripts/Makefile.lib:385:Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml] Error 255
Once again, all the components of MFD bindings need to be applied together.
Rob
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoted 32 lines · Rob Herring
Quoted 8 lines · Lee Jones
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add bindings for Unisoc system global register which provide register map for clocks.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Chunyan Zhang <[email protected]>Reviewed-by Rob Herring <[email protected]>--- .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yamlUnapplied v3 and applied this (v4) instead, thanks.
What about the clock binding this depends on:
Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml'
xargs: dt-doc-validate: exited with status 255; aborting
make[1]: *** Deleting file 'Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml' Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml' make[1]: *** [scripts/Makefile.lib:385:Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml] Error 255
Quoted 1 line
Once again, all the components of MFD bindings need to be applied together.
I can't apply what is not sent to me.
This patch came in on its own.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Hi Lee,
Quoted 32 lines · Lee Jones
Quoted 31 lines · Rob Herring
Quoted 7 lines · Lee Jones
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add bindings for Unisoc system global register which provide register map for clocks.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Chunyan Zhang <[email protected]>Reviewed-by Rob Herring <[email protected]>--- .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yamlUnapplied v3 and applied this (v4) instead, thanks.
What about the clock binding this depends on:
Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml'
xargs: dt-doc-validate: exited with status 255; aborting
make[1]: *** Deleting file 'Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml' Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml' make[1]: *** [scripts/Makefile.lib:385:Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml] Error 255
Quoted 1 line
Quoted 1 line
Once again, all the components of MFD bindings need to be applied together.
Just ran into this, too...
Quoted 3 lines
I can't apply what is not sent to me.
This patch came in on its own.
Then please reject/postpone patches that don't build (yet) ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoted 37 lines · Geert Uytterhoeven
Hi Lee,
Quoted 32 lines · Lee Jones
Quoted 31 lines · Rob Herring
Quoted 7 lines · Lee Jones
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add bindings for Unisoc system global register which provide register map for clocks.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Chunyan Zhang <[email protected]>Reviewed-by Rob Herring <[email protected]>--- .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yamlUnapplied v3 and applied this (v4) instead, thanks.
What about the clock binding this depends on:
Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml'
xargs: dt-doc-validate: exited with status 255; aborting
make[1]: *** Deleting file 'Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml' Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml' make[1]: *** [scripts/Makefile.lib:385:Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml] Error 255Quoted 1 line
Quoted 1 line
Once again, all the components of MFD bindings need to be applied together.
Quoted 7 lines
Just ran into this, too...
Quoted 3 lines
I can't apply what is not sent to me.
This patch came in on its own.
Then please reject/postpone patches that don't build (yet) ;-)
I don't explicitly build DT documentation.
Since I use the build bots to let me know if there are strange !(C, ASM, arm, aarch64, mips, ppc, x86) build issues or ones with odd configuration possibilities (randconfig) in the repos I maintain, you might have to convince them that this is important too.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoted 46 lines · Lee Jones
Quoted 43 lines · Geert Uytterhoeven
Hi Lee,
Quoted 32 lines · Lee Jones
Quoted 31 lines · Rob Herring
Quoted 7 lines · Lee Jones
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add bindings for Unisoc system global register which provide register map for clocks.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Chunyan Zhang <[email protected]>Reviewed-by Rob Herring <[email protected]>--- .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yamlUnapplied v3 and applied this (v4) instead, thanks.
What about the clock binding this depends on:
Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml'
xargs: dt-doc-validate: exited with status 255; aborting
make[1]: *** Deleting file 'Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml' Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml' make[1]: *** [scripts/Makefile.lib:385:Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml] Error 255Quoted 1 line
Quoted 1 line
Once again, all the components of MFD bindings need to be applied together.
Just ran into this, too...
Quoted 3 lines
I can't apply what is not sent to me.
This patch came in on its own.
Quoted 8 lines
Quoted 1 line
Then please reject/postpone patches that don't build (yet) ;-)
I don't explicitly build DT documentation.
Since I use the build bots to let me know if there are strange !(C, ASM, arm, aarch64, mips, ppc, x86) build issues or ones with odd configuration possibilities (randconfig) in the repos I maintain, you might have to convince them that this is important too.
It's really just a matter of turning on the build in allyesconfig/allmodconfig builds. I've not done that primarily because there's one person I don't want to yell at me, but I could probably make it arm and/or arm64 only. It's really arch and config independent, so doing it multiple times is kind of pointless.
I assume for bots you mean kernel-ci mainly? Do you run that before stuff gets into linux-next? IMO, that's too late. But still a slight improvement if things go in via one tree. Otherwise, I see the breakage twice, 1st linux-next then the merge window.
Rob
Stephen Boyd
maintainerRe: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoting Rob Herring (2021-10-14 09:18:16)
Quoted 15 lines · Lee Jones
Quoted 7 lines
I don't explicitly build DT documentation.
Since I use the build bots to let me know if there are strange !(C, ASM, arm, aarch64, mips, ppc, x86) build issues or ones with odd configuration possibilities (randconfig) in the repos I maintain, you might have to convince them that this is important too.
It's really just a matter of turning on the build in allyesconfig/allmodconfig builds. I've not done that primarily because there's one person I don't want to yell at me, but I could probably make it arm and/or arm64 only. It's really arch and config independent, so doing it multiple times is kind of pointless.
Quoted 5 lines
I assume for bots you mean kernel-ci mainly? Do you run that before stuff gets into linux-next? IMO, that's too late. But still a slight improvement if things go in via one tree. Otherwise, I see the breakage twice, 1st linux-next then the merge window.
I run make dt_binding_check DT_SCHEMA_FILES="<path to yaml file>" but nowadays this seems to check all the bindings and not just the one binding I care to check. Did something break?
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoted 23 lines · Stephen Boyd
Quoting Rob Herring (2021-10-14 09:18:16)
Quoted 15 lines · Lee Jones
Quoted 7 lines
I don't explicitly build DT documentation.
Since I use the build bots to let me know if there are strange !(C, ASM, arm, aarch64, mips, ppc, x86) build issues or ones with odd configuration possibilities (randconfig) in the repos I maintain, you might have to convince them that this is important too.
It's really just a matter of turning on the build in allyesconfig/allmodconfig builds. I've not done that primarily because there's one person I don't want to yell at me, but I could probably make it arm and/or arm64 only. It's really arch and config independent, so doing it multiple times is kind of pointless.
Quoted 5 lines
I assume for bots you mean kernel-ci mainly? Do you run that before stuff gets into linux-next? IMO, that's too late. But still a slight improvement if things go in via one tree. Otherwise, I see the breakage twice, 1st linux-next then the merge window.
Quoted 3 lines
I run
make dt_binding_check DT_SCHEMA_FILES="<path to yaml file>"but nowadays this seems to check all the bindings and not just the one binding I care to check. Did something break?
It should apply all the schemas to the example in DT_SCHEMA_FILES. Originally, it only applied DT_SCHEMA_FILES schema to the example in DT_SCHEMA_FILES.
Rob
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Hi Rob, Stephen,
Quoted 23 lines · Rob Herring
Quoted 22 lines · Stephen Boyd
Quoting Rob Herring (2021-10-14 09:18:16)
Quoted 20 lines · Lee Jones
Quoted 7 lines
I don't explicitly build DT documentation.
Since I use the build bots to let me know if there are strange !(C, ASM, arm, aarch64, mips, ppc, x86) build issues or ones with odd configuration possibilities (randconfig) in the repos I maintain, you might have to convince them that this is important too.
It's really just a matter of turning on the build in allyesconfig/allmodconfig builds. I've not done that primarily because there's one person I don't want to yell at me, but I could probably make it arm and/or arm64 only. It's really arch and config independent, so doing it multiple times is kind of pointless.
I assume for bots you mean kernel-ci mainly? Do you run that before stuff gets into linux-next? IMO, that's too late. But still a slight improvement if things go in via one tree. Otherwise, I see the breakage twice, 1st linux-next then the merge window.
Quoted 7 lines
Quoted 3 lines
I run
make dt_binding_check DT_SCHEMA_FILES="<path to yaml file>"but nowadays this seems to check all the bindings and not just the one binding I care to check. Did something break?It should apply all the schemas to the example in
DT_SCHEMA_FILES. Originally, it only appliedDT_SCHEMA_FILESschema to the example inDT_SCHEMA_FILES.
Probably Stephen means that yamllint is still run on all files, which I tried to fix in [1]?
I've been running an improved version for months, but I haven't sent it out yet.
[1] https://lore.kernel.org/linux-devicetree/[email protected]
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Stephen Boyd
maintainerRe: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoting Geert Uytterhoeven (2021-10-15 10:09:10)
Quoted 34 lines
Hi Rob, Stephen,
Quoted 23 lines · Rob Herring
Quoted 22 lines · Stephen Boyd
Quoting Rob Herring (2021-10-14 09:18:16)
Quoted 20 lines · Lee Jones
Quoted 7 lines
I don't explicitly build DT documentation.
Since I use the build bots to let me know if there are strange !(C, ASM, arm, aarch64, mips, ppc, x86) build issues or ones with odd configuration possibilities (randconfig) in the repos I maintain, you might have to convince them that this is important too.
It's really just a matter of turning on the build in allyesconfig/allmodconfig builds. I've not done that primarily because there's one person I don't want to yell at me, but I could probably make it arm and/or arm64 only. It's really arch and config independent, so doing it multiple times is kind of pointless.
I assume for bots you mean kernel-ci mainly? Do you run that before stuff gets into linux-next? IMO, that's too late. But still a slight improvement if things go in via one tree. Otherwise, I see the breakage twice, 1st linux-next then the merge window.
Quoted 7 lines
Quoted 3 lines
I run
make dt_binding_check DT_SCHEMA_FILES="<path to yaml file>"but nowadays this seems to check all the bindings and not just the one binding I care to check. Did something break?It should apply all the schemas to the example in
DT_SCHEMA_FILES. Originally, it only appliedDT_SCHEMA_FILESschema to the example inDT_SCHEMA_FILES.
Quoted 6 lines
Probably Stephen means that yamllint is still run on all files, which I tried to fix in [1]?
I've been running an improved version for months, but I haven't sent it out yet.
Oh yeah probably. Do I need to carry this patch locally until it is fixed?
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Hi Stephen,
Quoted 36 lines · Stephen Boyd
Quoting Geert Uytterhoeven (2021-10-15 10:09:10)
Quoted 35 lines · Rob Herring
Quoted 23 lines · Stephen Boyd
Quoted 22 lines
Quoting Rob Herring (2021-10-14 09:18:16)
Quoted 20 lines · Lee Jones
Quoted 7 lines
I don't explicitly build DT documentation.
Since I use the build bots to let me know if there are strange !(C, ASM, arm, aarch64, mips, ppc, x86) build issues or ones with odd configuration possibilities (randconfig) in the repos I maintain, you might have to convince them that this is important too.
It's really just a matter of turning on the build in allyesconfig/allmodconfig builds. I've not done that primarily because there's one person I don't want to yell at me, but I could probably make it arm and/or arm64 only. It's really arch and config independent, so doing it multiple times is kind of pointless.
I assume for bots you mean kernel-ci mainly? Do you run that before stuff gets into linux-next? IMO, that's too late. But still a slight improvement if things go in via one tree. Otherwise, I see the breakage twice, 1st linux-next then the merge window.
Quoted 7 lines
Quoted 3 lines
I run
make dt_binding_check DT_SCHEMA_FILES="<path to yaml file>"but nowadays this seems to check all the bindings and not just the one binding I care to check. Did something break?It should apply all the schemas to the example in
DT_SCHEMA_FILES. Originally, it only appliedDT_SCHEMA_FILESschema to the example inDT_SCHEMA_FILES.Probably Stephen means that yamllint is still run on all files, which I tried to fix in [1]?
Quoted 6 lines
Quoted 3 lines
I've been running an improved version for months, but I haven't sent it out yet.
Oh yeah probably. Do I need to carry this patch locally until it is fixed?
Submitted the improved version:
https://lore.kernel.org/all/[email protected]
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
In reply to Rob HerringQuoted 62 lines · Rob Herring
Quoted 46 lines · Lee Jones
Quoted 43 lines · Geert Uytterhoeven
Hi Lee,
Quoted 32 lines · Lee Jones
Quoted 31 lines · Rob Herring
Quoted 7 lines · Lee Jones
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add bindings for Unisoc system global register which provide register map for clocks.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Chunyan Zhang <[email protected]>Reviewed-by Rob Herring <[email protected]>--- .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yamlUnapplied v3 and applied this (v4) instead, thanks.
What about the clock binding this depends on:
Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml'
xargs: dt-doc-validate: exited with status 255; aborting
make[1]: *** Deleting file 'Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml' Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml' make[1]: *** [scripts/Makefile.lib:385:Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml] Error 255Quoted 1 line
Quoted 1 line
Once again, all the components of MFD bindings need to be applied together.
Just ran into this, too...
Quoted 3 lines
I can't apply what is not sent to me.
This patch came in on its own.
Quoted 8 lines
Quoted 1 line
Then please reject/postpone patches that don't build (yet) ;-)
I don't explicitly build DT documentation.
Since I use the build bots to let me know if there are strange !(C, ASM, arm, aarch64, mips, ppc, x86) build issues or ones with odd configuration possibilities (randconfig) in the repos I maintain, you might have to convince them that this is important too.
It's really just a matter of turning on the build in allyesconfig/allmodconfig builds. I've not done that primarily because there's one person I don't want to yell at me, but I could probably make it arm and/or arm64 only. It's really arch and config independent, so doing it multiple times is kind of pointless.
Quoted 4 lines
I assume for bots you mean kernel-ci mainly? Do you run that before stuff gets into linux-next? IMO, that's too late. But still a slight improvement if things go in via one tree. Otherwise, I see the breakage twice, 1st linux-next then the merge window.
Kernel test robot <[email protected]> is the one that springs to mind.
Although, I'm sure there are other, less prolific implementations.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoted 65 lines · Lee Jones
Quoted 62 lines · Rob Herring
Quoted 46 lines · Lee Jones
Quoted 43 lines · Geert Uytterhoeven
Hi Lee,
Quoted 32 lines · Lee Jones
Quoted 31 lines · Rob Herring
Quoted 7 lines · Lee Jones
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add bindings for Unisoc system global register which provide register map for clocks.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Chunyan Zhang <[email protected]>Reviewed-by Rob Herring <[email protected]>--- .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yamlUnapplied v3 and applied this (v4) instead, thanks.
What about the clock binding this depends on:
Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml'
xargs: dt-doc-validate: exited with status 255; aborting
make[1]: *** Deleting file 'Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml' Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml' make[1]: *** [scripts/Makefile.lib:385:Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml] Error 255Quoted 1 line
Quoted 1 line
Once again, all the components of MFD bindings need to be applied together.
Just ran into this, too...
Quoted 3 lines
I can't apply what is not sent to me.
This patch came in on its own.
Quoted 8 lines
Quoted 1 line
Then please reject/postpone patches that don't build (yet) ;-)
I don't explicitly build DT documentation.
Since I use the build bots to let me know if there are strange !(C, ASM, arm, aarch64, mips, ppc, x86) build issues or ones with odd configuration possibilities (randconfig) in the repos I maintain, you might have to convince them that this is important too.
It's really just a matter of turning on the build in allyesconfig/allmodconfig builds. I've not done that primarily because there's one person I don't want to yell at me, but I could probably make it arm and/or arm64 only. It's really arch and config independent, so doing it multiple times is kind of pointless.
Quoted 6 lines
Quoted 4 lines
I assume for bots you mean kernel-ci mainly? Do you run that before stuff gets into linux-next? IMO, that's too late. But still a slight improvement if things go in via one tree. Otherwise, I see the breakage twice, 1st linux-next then the merge window.
Kernel test robot <[email protected]> is the one that springs to mind.
It already does sometimes. I haven't figured out when, but I randomly see some reports and doesn't report a lot of the cases.
Quoted 1 line
Although, I'm sure there are other, less prolific implementations.
Rob's bot, but that checks patches (not branches) and applies series so you won't get errors unless the series is in the wrong patch order.
Rob
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoted 71 lines · Rob Herring
Quoted 70 lines · Lee Jones
Quoted 66 lines · Rob Herring
Quoted 46 lines · Lee Jones
Quoted 43 lines · Geert Uytterhoeven
Hi Lee,
Quoted 32 lines · Lee Jones
Quoted 31 lines · Rob Herring
Quoted 7 lines · Lee Jones
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add bindings for Unisoc system global register which provide register map for clocks.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Chunyan Zhang <[email protected]>Reviewed-by Rob Herring <[email protected]>--- .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yamlUnapplied v3 and applied this (v4) instead, thanks.
What about the clock binding this depends on:
Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml'
xargs: dt-doc-validate: exited with status 255; aborting
make[1]: *** Deleting file 'Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml' Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml' make[1]: *** [scripts/Makefile.lib:385:Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml] Error 255Quoted 1 line
Quoted 1 line
Once again, all the components of MFD bindings need to be applied together.
Just ran into this, too...
Quoted 3 lines
I can't apply what is not sent to me.
This patch came in on its own.
Quoted 8 lines
Quoted 1 line
Then please reject/postpone patches that don't build (yet) ;-)
I don't explicitly build DT documentation.
Since I use the build bots to let me know if there are strange !(C, ASM, arm, aarch64, mips, ppc, x86) build issues or ones with odd configuration possibilities (randconfig) in the repos I maintain, you might have to convince them that this is important too.
It's really just a matter of turning on the build in allyesconfig/allmodconfig builds. I've not done that primarily because there's one person I don't want to yell at me, but I could probably make it arm and/or arm64 only. It's really arch and config independent, so doing it multiple times is kind of pointless.
I assume for bots you mean kernel-ci mainly? Do you run that before stuff gets into linux-next? IMO, that's too late. But still a slight improvement if things go in via one tree. Otherwise, I see the breakage twice, 1st linux-next then the merge window.
Quoted 4 lines
Quoted 1 line
Kernel test robot <[email protected]> is the one that springs to mind.
It already does sometimes. I haven't figured out when, but I randomly see some reports and doesn't report a lot of the cases.
It would be great if it can be figured it out.
Apart from my W=1 work, I seldom build/test/run obscure/specialist compiler flags/options. If someone can convince the 0-day builder bots that testing DT docs is a good idea when building for the appropriate architectures, I'm all in.
Quoted 4 lines
Quoted 1 line
Although, I'm sure there are other, less prolific implementations.
Rob's bot, but that checks patches (not branches) and applies series so you won't get errors unless the series is in the wrong patch order.
Right. Good tool, but solves a different problem.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
In reply to Rob HerringQuoted 33 lines · Rob Herring
Quoted 8 lines · Lee Jones
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add bindings for Unisoc system global register which provide register map for clocks.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Chunyan Zhang <[email protected]>Reviewed-by Rob Herring <[email protected]>--- .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yamlUnapplied v3 and applied this (v4) instead, thanks.
What about the clock binding this depends on:
Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml'
xargs: dt-doc-validate: exited with status 255; aborting
make[1]: *** Deleting file 'Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml' Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml' make[1]: *** [scripts/Makefile.lib:385:Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml] Error 255
Quoted 1 line
Once again, all the components of MFD bindings need to be applied together.
It seems that Stephen still has comments and there's a new check that causes the clock schema to fail, so this should be dropped or reverted.
Rob
Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoted 34 lines · Rob Herring
Quoted 33 lines · Rob Herring
Quoted 8 lines · Lee Jones
Quoted 5 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Add bindings for Unisoc system global register which provide register map for clocks.
Quoted 8 lines
Quoted 6 lines
Signed-off-by Chunyan Zhang <[email protected]>Reviewed-by Rob Herring <[email protected]>--- .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yamlUnapplied v3 and applied this (v4) instead, thanks.
What about the clock binding this depends on:
Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml'
xargs: dt-doc-validate: exited with status 255; aborting
make[1]: *** Deleting file 'Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml' Unknown file referenced: [Errno 2] No such file or directory:
'/usr/local/lib/python3.8/dist-packages/dtschema/schemas/clock/sprd,ums512-clk.yaml' make[1]: *** [scripts/Makefile.lib:385:Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.example.dt.yaml] Error 255
Quoted 5 lines
Quoted 1 line
Once again, all the components of MFD bindings need to be applied together.
It seems that Stephen still has comments and there's a new check that causes the clock schema to fail, so this should be dropped or reverted.
Dropped.
Signature · 4 lines
Lee Jones [李琼斯] Senior Technical Lead - Developer Services Linaro.org │ Open source software for Arm SoCs Follow Linaro: Facebook | Twitter | Blog
Stephen Boyd
maintainerRe: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
In reply to Chunyan ZhangQuoting Chunyan Zhang (2021-09-22 23:41:35)
Quoted 54 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml new file +48
-0@@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%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 Device Tree Bindings + +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: + "#address-cells": true + "#size-cells": true + + compatible: + items: + - const: sprd,ums512-glbregs + - const: syscon + - const: simple-mfd + + ranges: + maxItems: 1 + + reg: + maxItems: 1 + +patternProperties: + "^.*@[0-9a-f]+$": + # Child node + type: object + $ref: "../clock/sprd,ums512-clk.yaml" + description: + Clock controller for the SoC clocks. + +required: + - compatible + - reg + +additionalProperties: false + +examples:
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml line 58
Quoted 10 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml new file +10
-0+ - | + 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";
Why is this a subnode of a syscon and simple-mfd? Why not put the clock-controller@71000000 directly onto the bus? Does making it a child node help somehow?
Quoted 4 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml new file +4
-0+ reg = <0x0 0x2000>; + #clock-cells = <1>; + }; + };
Re:Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Hi Stephen,
Thanks for the review.
Quoted 60 lines · Stephen Boyd
Quoting Chunyan Zhang (2021-09-22 23:41:35)
Quoted 59 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml new file +53
-0@@ -0,0 +1,68 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%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 Device Tree Bindings + +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: + "#address-cells": true + "#size-cells": true + + compatible: + items: + - const: sprd,ums512-glbregs + - const: syscon + - const: simple-mfd + + ranges: + maxItems: 1 + + reg: + maxItems: 1 + +patternProperties: + "^.*@[0-9a-f]+$": + # Child node + type: object + $ref: "../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>;
Quoted 8 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml line 58
Quoted 5 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml new file +5
-0+ #size-cells = <1>; + ranges = <0 0x71000000 0x3000>; + + clock-controller@0 { + compatible = "sprd,ums512-apahb-gate";Why is this a subnode of a syscon and simple-mfd? Why not put the>clock-controller@71000000 directly onto the bus? Does making it a child node help somehow?
These clocks are at the same register range with global registers. I originally put them directly onto the bus indeed when submitting the patches for SC9863A clocks last year, and it had a private property named 'sprd,syscon' which could provide regmap for these clocks.
Rob suggested [1] us to make them a child of the syscon, and would not need the private property 'sprd, syscon' then.
Thanks,
Chunyan
[1] https://lkml.org/lkml/2019/12/26/212
Quoted 5 lines
Quoted 5 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml new file +4
-0+ reg = <0x0 0x2000>; + #clock-cells = <1>; + }; + };
Stephen Boyd
maintainerRe:Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoting ChunyanZhang (2021-10-13 16:49:40)
Quoted 19 lines
Quoted 17 lines · Stephen Boyd
Quoting Chunyan Zhang (2021-09-22 23:41:35)
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml line 58
Quoted 13 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml +12
-0+ +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";Why is this a subnode of a syscon and simple-mfd? Why not put the>clock-controller@71000000 directly onto the bus? Does making it a child node help somehow?
Quoted 3 lines
These clocks are at the same register range with global registers. I originally put them directly onto the bus indeed when submitting the patches for SC9863A clocks last year, and it had a private property named 'sprd,syscon' which could provide regmap for these clocks.
Rob suggested [1] us to make them a child of the syscon, and would not need the private property 'sprd, syscon' then.
Why do you need to use a syscon? Are the registers shared with some other driver?
2019 was two years ago...
Re:Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoted 20 lines · Stephen Boyd
Quoting ChunyanZhang (2021-10-13 16:49:40)
Quoted 19 lines
Quoted 17 lines · Stephen Boyd
Quoting Chunyan Zhang (2021-09-22 23:41:35)
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml line 58
Quoted 13 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml +12
-0+ +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";Why is this a subnode of a syscon and simple-mfd? Why not put the>clock-controller@71000000 directly onto the bus? Does making it a child node help somehow?
Quoted 6 lines
Quoted 3 lines
These clocks are at the same register range with global registers. I originally put them directly onto the bus indeed when submitting the patches for SC9863A clocks last year, and it had a private property named 'sprd,syscon' which could provide regmap for these clocks.
Rob suggested [1] us to make them a child of the syscon, and would not need the private property 'sprd, syscon' then.
Why do you need to use a syscon? Are the registers shared with some other driver?
Yes, shared with more than one devices which basically are multimedia devices. You may noticed that these are all gate clocks which are in the global registers ranges and are used to controll the enable status of some devices or some part of devices.
Quoted 2 lines
2019 was two years ago...
Humm... yes, submitted that patch set from 2019 to 2020 :)
Stephen Boyd
maintainerRe:Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoting ChunyanZhang (2021-10-13 19:02:44)
Quoted 21 lines
Quoted 20 lines · Stephen Boyd
Quoting ChunyanZhang (2021-10-13 16:49:40)
Quoted 19 lines
Quoted 17 lines · Stephen Boyd
Quoting Chunyan Zhang (2021-09-22 23:41:35)
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml line 58
Quoted 13 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml +12
-0+ +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";Why is this a subnode of a syscon and simple-mfd? Why not put the>clock-controller@71000000 directly onto the bus? Does making it a child node help somehow?
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
These clocks are at the same register range with global registers. I originally put them directly onto the bus indeed when submitting the patches for SC9863A clocks last year, and it had a private property named 'sprd,syscon' which could provide regmap for these clocks.
Rob suggested [1] us to make them a child of the syscon, and would not need the private property 'sprd, syscon' then.
Why do you need to use a syscon? Are the registers shared with some other driver?
Yes, shared with more than one devices which basically are multimedia devices. You may noticed that these are all gate clocks which are in the global registers ranges and are used to controll the enable status of some devices or some part of devices.
Where does the multimedia device address space start? I see 0x71000000 to 0x71002000 is for the clock-controller. Is the multimedia device at 0x71002000 to 0x71003000? If so they're next to each other but not sharing the same register space. Is ap_apb_regs more like a soft macro that combines a few clks with some multimedia device?
Re:Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Resend this since I forgot to switch to plain text mode :(
Quoted 26 lines · Stephen Boyd
Quoting ChunyanZhang (2021-10-13 19:02:44)
Quoted 25 lines
Quoted 24 lines · Stephen Boyd
Quoting ChunyanZhang (2021-10-13 16:49:40)
Quoted 22 lines
Quoted 17 lines · Stephen Boyd
Quoting Chunyan Zhang (2021-09-22 23:41:35)
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml line 58
Quoted 13 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml +12
-0+ +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";Why is this a subnode of a syscon and simple-mfd? Why not put the>clock-controller@71000000 directly onto the bus? Does making it a child node help somehow?
These clocks are at the same register range with global registers. I originally put them directly onto the bus indeed when submitting the patches for SC9863A clocks last year, and it had a private property named 'sprd,syscon' which could provide regmap for these clocks.
Rob suggested [1] us to make them a child of the syscon, and would not need the private property 'sprd, syscon' then.
Quoted 8 lines
Quoted 5 lines
Quoted 2 lines
Why do you need to use a syscon? Are the registers shared with some other driver?
Yes, shared with more than one devices which basically are multimedia devices. You may noticed that these are all gate clocks which are in the global registers ranges and are used to controll the enable status of some devices or some part of devices.
Where does the multimedia device address space start? I see
0x71000000
It doesn't mean that multimedia device address is in this space, multidedia devices have their own address space actually.
All the registers in this space (started from 0x71000000) are more like controll registers for device power, and they were designed as "global registers".
Some gate clocks are also in global register space, so we make this kind of clocks a subnode of syscon, and clock driver can use regmap which mapped by syscon to avoid remapping the same address space to more than one virtual addresses.
Hope I've made that clear, I'd like to give you an example, but I'm on a long leave and cannot look up the specification right now :( This is not a new issue, we discussed this when the first time I submitted the patches for sprd clocks IIRC.
Quoted 4 lines
to
0x71002000is for the clock-controller. Is the multimedia device at0x71002000to0x71003000? If so they're next to each other but not sharing the same register space. Isap_apb_regsmore like a soft macro that combines a few clks with some multimedia device?
Stephen Boyd
maintainerRe:Re: [PATCH v4 2/4] dt-bindings: mfd: sprd: Add bindings for ums512 global registers
Quoting ChunyanZhang (2021-10-14 01:18:15)
Quoted 33 lines
Resend this since I forgot to switch to plain text mode :(
Quoted 29 lines · Stephen Boyd
Quoting ChunyanZhang (2021-10-13 19:02:44)
Quoted 28 lines
Quoted 26 lines · Stephen Boyd
Quoting ChunyanZhang (2021-10-13 16:49:40)
Quoted 19 lines
Quoted 17 lines · Stephen Boyd
Quoting Chunyan Zhang (2021-09-22 23:41:35)
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml
Quoted 13 lines
Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yaml +12
-0+ +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";Why is this a subnode of a syscon and simple-mfd? Why not put the>clock-controller@71000000 directly onto the bus? Does making it a child node help somehow?
Quoted 3 lines
These clocks are at the same register range with global registers. I originally put them directly onto the bus indeed when submitting the patches for SC9863A clocks last year, and it had a private property named 'sprd,syscon' which could provide regmap for these clocks.
Rob suggested [1] us to make them a child of the syscon, and would not need the private property 'sprd, syscon' then.
Why do you need to use a syscon? Are the registers shared with some other driver?
Quoted 7 lines
Quoted 5 lines
Quoted 2 lines
Yes, shared with more than one devices which basically are multimedia devices. You may noticed that these are all gate clocks which are in the global registers ranges and are used to controll the enable status of some devices or some part of devices.
Where does the multimedia device address space start? I see
0x71000000It doesn't mean that multimedia device address is in this space, multidedia devices have their own address space actually.
Ok got it.
Quoted 2 lines
All the registers in this space (started from
0x71000000) are more like controll registers for device power, and they were designed as "global registers".
Some gate clocks are also in global register space, so we make this kind of clocks a subnode of syscon, and clock driver can use regmap which mapped by syscon to avoid remapping the same address space to more than one virtual addresses.
So it looks like we're making the "power controller" device into a syscon and then adding nodes in DT to describe the various pieces that some registers inside that correspond to, like clks, power domains, etc. I wonder why the ap_apb_regs device can't be a single node covering the entire register space and then use the auxiliary bus in the kernel to carve that device up into various kernel subsytems so that the appropriate maintainers can review it.
Quoted 3 lines
Hope I've made that clear, I'd like to give you an example, but I'm on a long leave and cannot look up the specification right now :( This is not a new issue, we discussed this when the first time I submitted the patches for sprd clocks IIRC.
Yes, I know it's not a new issue. Take care! We can pick this discussion back up when you get back from leave.
Chunyan Zhang
reviewerPATCH v4 3/4 clk: sprd: Add dt-bindings include file for UMS512
In reply to Chunyan ZhangFrom: Xiongpeng Wu <[email protected]>
This file defines all index of clocks included on Unisoc's UMS512 SoC.
--- include/dt-bindings/clock/sprd,ums512-clk.h | 396 ++++++++++++++++++++ 1 file changed, 396 insertions(+) create mode 100644 include/dt-bindings/clock/sprd,ums512-clk.h
include/dt-bindings/clock/sprd,ums512-clk.h new file +396 -0
@@ -0,0 +1,396 @@ +/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */ +/* +* Unisoc UMS512 SoC DTS file +* +* Copyright (C) 2019-2021, Unisoc Inc. +*/ + +#ifndef _DT_BINDINGS_CLK_UMS512_H_ +#define _DT_BINDINGS_CLK_UMS512_H_ + +#define CLK_26M_AUD 0 +#define CLK_13M 1 +#define CLK_6M5 2 +#define CLK_4M3 3 +#define CLK_2M 4 +#define CLK_1M 5 +#define CLK_250K 6 +#define CLK_RCO_25M 7 +#define CLK_RCO_4M 8 +#define CLK_RCO_2M 9 +#define CLK_ISPPLL_GATE 10 +#define CLK_DPLL0_GATE 11 +#define CLK_DPLL1_GATE 12 +#define CLK_LPLL_GATE 13 +#define CLK_TWPLL_GATE 14 +#define CLK_GPLL_GATE 15 +#define CLK_RPLL_GATE 16 +#define CLK_CPPLL_GATE 17 +#define CLK_MPLL0_GATE 18 +#define CLK_MPLL1_GATE 19 +#define CLK_MPLL2_GATE 20 +#define CLK_PMU_GATE_NUM (CLK_MPLL2_GATE + 1) + +#define CLK_DPLL0 0 +#define CLK_DPLL0_58M31 1 +#define CLK_ANLG_PHY_G0_NUM (CLK_DPLL0_58M31 + 1) + +#define CLK_MPLL1 0 +#define CLK_MPLL1_63M38 1 +#define CLK_ANLG_PHY_G2_NUM (CLK_MPLL1_63M38 + 1) + +#define CLK_RPLL 0 +#define CLK_AUDIO_GATE 1 +#define CLK_MPLL0 2 +#define CLK_MPLL0_56M88 3 +#define CLK_MPLL2 4 +#define CLK_MPLL2_47M13 5 +#define CLK_ANLG_PHY_G3_NUM (CLK_MPLL2_47M13 + 1) + +#define CLK_TWPLL 0 +#define CLK_TWPLL_768M 1 +#define CLK_TWPLL_384M 2 +#define CLK_TWPLL_192M 3 +#define CLK_TWPLL_96M 4 +#define CLK_TWPLL_48M 5 +#define CLK_TWPLL_24M 6 +#define CLK_TWPLL_12M 7 +#define CLK_TWPLL_512M 8 +#define CLK_TWPLL_256M 9 +#define CLK_TWPLL_128M 10 +#define CLK_TWPLL_64M 11 +#define CLK_TWPLL_307M2 12 +#define CLK_TWPLL_219M4 13 +#define CLK_TWPLL_170M6 14 +#define CLK_TWPLL_153M6 15 +#define CLK_TWPLL_76M8 16 +#define CLK_TWPLL_51M2 17 +#define CLK_TWPLL_38M4 18 +#define CLK_TWPLL_19M2 19 +#define CLK_TWPLL_12M29 20 +#define CLK_LPLL 21 +#define CLK_LPLL_614M4 22 +#define CLK_LPLL_409M6 23 +#define CLK_LPLL_245M76 24 +#define CLK_LPLL_30M72 25 +#define CLK_ISPPLL 26 +#define CLK_ISPPLL_468M 27 +#define CLK_ISPPLL_78M 28 +#define CLK_GPLL 29 +#define CLK_GPLL_40M 30 +#define CLK_CPPLL 31 +#define CLK_CPPLL_39M32 32 +#define CLK_ANLG_PHY_GC_NUM (CLK_CPPLL_39M32 + 1) + +#define CLK_AP_APB 0 +#define CLK_IPI 1 +#define CLK_AP_UART0 2 +#define CLK_AP_UART1 3 +#define CLK_AP_UART2 4 +#define CLK_AP_I2C0 5 +#define CLK_AP_I2C1 6 +#define CLK_AP_I2C2 7 +#define CLK_AP_I2C3 8 +#define CLK_AP_I2C4 9 +#define CLK_AP_SPI0 10 +#define CLK_AP_SPI1 11 +#define CLK_AP_SPI2 12 +#define CLK_AP_SPI3 13 +#define CLK_AP_IIS0 14 +#define CLK_AP_IIS1 15 +#define CLK_AP_IIS2 16 +#define CLK_AP_SIM 17 +#define CLK_AP_CE 18 +#define CLK_SDIO0_2X 19 +#define CLK_SDIO1_2X 20 +#define CLK_EMMC_2X 21 +#define CLK_VSP 22 +#define CLK_DISPC0 23 +#define CLK_DISPC0_DPI 24 +#define CLK_DSI_APB 25 +#define CLK_DSI_RXESC 26 +#define CLK_DSI_LANEBYTE 27 +#define CLK_VDSP 28 +#define CLK_VDSP_M 29 +#define CLK_AP_CLK_NUM (CLK_VDSP_M + 1) + +#define CLK_DSI_EB 0 +#define CLK_DISPC_EB 1 +#define CLK_VSP_EB 2 +#define CLK_VDMA_EB 3 +#define CLK_DMA_PUB_EB 4 +#define CLK_DMA_SEC_EB 5 +#define CLK_IPI_EB 6 +#define CLK_AHB_CKG_EB 7 +#define CLK_BM_CLK_EB 8 +#define CLK_AP_AHB_GATE_NUM (CLK_BM_CLK_EB + 1) + +#define CLK_AON_APB 0 +#define CLK_ADI 1 +#define CLK_AUX0 2 +#define CLK_AUX1 3 +#define CLK_AUX2 4 +#define CLK_PROBE 5 +#define CLK_PWM0 6 +#define CLK_PWM1 7 +#define CLK_PWM2 8 +#define CLK_PWM3 9 +#define CLK_EFUSE 10 +#define CLK_UART0 11 +#define CLK_UART1 12 +#define CLK_THM0 13 +#define CLK_THM1 14 +#define CLK_THM2 15 +#define CLK_THM3 16 +#define CLK_AON_I2C 17 +#define CLK_AON_IIS 18 +#define CLK_SCC 19 +#define CLK_APCPU_DAP 20 +#define CLK_APCPU_DAP_MTCK 21 +#define CLK_APCPU_TS 22 +#define CLK_DEBUG_TS 23 +#define CLK_DSI_TEST_S 24 +#define CLK_DJTAG_TCK 25 +#define CLK_DJTAG_TCK_HW 26 +#define CLK_AON_TMR 27 +#define CLK_AON_PMU 28 +#define CLK_DEBOUNCE 29 +#define CLK_APCPU_PMU 30 +#define CLK_TOP_DVFS 31 +#define CLK_OTG_UTMI 32 +#define CLK_OTG_REF 33 +#define CLK_CSSYS 34 +#define CLK_CSSYS_PUB 35 +#define CLK_CSSYS_APB 36 +#define CLK_AP_AXI 37 +#define CLK_AP_MM 38 +#define CLK_SDIO2_2X 39 +#define CLK_ANALOG_IO_APB 40 +#define CLK_DMC_REF_CLK 41 +#define CLK_EMC 42 +#define CLK_USB 43 +#define CLK_26M_PMU 44 +#define CLK_AON_APB_NUM (CLK_26M_PMU + 1) + +#define CLK_MM_AHB 0 +#define CLK_MM_MTX 1 +#define CLK_SENSOR0 2 +#define CLK_SENSOR1 3 +#define CLK_SENSOR2 4 +#define CLK_CPP 5 +#define CLK_JPG 6 +#define CLK_FD 7 +#define CLK_DCAM_IF 8 +#define CLK_DCAM_AXI 9 +#define CLK_ISP 10 +#define CLK_MIPI_CSI0 11 +#define CLK_MIPI_CSI1 12 +#define CLK_MIPI_CSI2 13 +#define CLK_MM_CLK_NUM (CLK_MIPI_CSI2 + 1) + +#define CLK_RC100M_CAL_EB 0 +#define CLK_DJTAG_TCK_EB 1 +#define CLK_DJTAG_EB 2 +#define CLK_AUX0_EB 3 +#define CLK_AUX1_EB 4 +#define CLK_AUX2_EB 5 +#define CLK_PROBE_EB 6 +#define CLK_MM_EB 7 +#define CLK_GPU_EB 8 +#define CLK_MSPI_EB 9 +#define CLK_APCPU_DAP_EB 10 +#define CLK_AON_CSSYS_EB 11 +#define CLK_CSSYS_APB_EB 12 +#define CLK_CSSYS_PUB_EB 13 +#define CLK_SDPHY_CFG_EB 14 +#define CLK_SDPHY_REF_EB 15 +#define CLK_EFUSE_EB 16 +#define CLK_GPIO_EB 17 +#define CLK_MBOX_EB 18 +#define CLK_KPD_EB 19 +#define CLK_AON_SYST_EB 20 +#define CLK_AP_SYST_EB 21 +#define CLK_AON_TMR_EB 22 +#define CLK_OTG_UTMI_EB 23 +#define CLK_OTG_PHY_EB 24 +#define CLK_SPLK_EB 25 +#define CLK_PIN_EB 26 +#define CLK_ANA_EB 27 +#define CLK_APCPU_TS0_EB 28 +#define CLK_APB_BUSMON_EB 29 +#define CLK_AON_IIS_EB 30 +#define CLK_SCC_EB 31 +#define CLK_THM0_EB 32 +#define CLK_THM1_EB 33 +#define CLK_THM2_EB 34 +#define CLK_ASIM_TOP_EB 35 +#define CLK_I2C_EB 36 +#define CLK_PMU_EB 37 +#define CLK_ADI_EB 38 +#define CLK_EIC_EB 39 +#define CLK_AP_INTC0_EB 40 +#define CLK_AP_INTC1_EB 41 +#define CLK_AP_INTC2_EB 42 +#define CLK_AP_INTC3_EB 43 +#define CLK_AP_INTC4_EB 44 +#define CLK_AP_INTC5_EB 45 +#define CLK_AUDCP_INTC_EB 46 +#define CLK_AP_TMR0_EB 47 +#define CLK_AP_TMR1_EB 48 +#define CLK_AP_TMR2_EB 49 +#define CLK_PWM0_EB 50 +#define CLK_PWM1_EB 51 +#define CLK_PWM2_EB 52 +#define CLK_PWM3_EB 53 +#define CLK_AP_WDG_EB 54 +#define CLK_APCPU_WDG_EB 55 +#define CLK_SERDES_EB 56 +#define CLK_ARCH_RTC_EB 57 +#define CLK_KPD_RTC_EB 58 +#define CLK_AON_SYST_RTC_EB 59 +#define CLK_AP_SYST_RTC_EB 60 +#define CLK_AON_TMR_RTC_EB 61 +#define CLK_EIC_RTC_EB 62 +#define CLK_EIC_RTCDV5_EB 63 +#define CLK_AP_WDG_RTC_EB 64 +#define CLK_AC_WDG_RTC_EB 65 +#define CLK_AP_TMR0_RTC_EB 66 +#define CLK_AP_TMR1_RTC_EB 67 +#define CLK_AP_TMR2_RTC_EB 68 +#define CLK_DCXO_LC_RTC_EB 69 +#define CLK_BB_CAL_RTC_EB 70 +#define CLK_AP_EMMC_RTC_EB 71 +#define CLK_AP_SDIO0_RTC_EB 72 +#define CLK_AP_SDIO1_RTC_EB 73 +#define CLK_AP_SDIO2_RTC_EB 74 +#define CLK_DSI_CSI_TEST_EB 75 +#define CLK_DJTAG_TCK_EN 76 +#define CLK_DPHY_REF_EB 77 +#define CLK_DMC_REF_EB 78 +#define CLK_OTG_REF_EB 79 +#define CLK_TSEN_EB 80 +#define CLK_TMR_EB 81 +#define CLK_RC100M_REF_EB 82 +#define CLK_RC100M_FDK_EB 83 +#define CLK_DEBOUNCE_EB 84 +#define CLK_DET_32K_EB 85 +#define CLK_TOP_CSSYS_EB 86 +#define CLK_AP_AXI_EN 87 +#define CLK_SDIO0_2X_EN 88 +#define CLK_SDIO0_1X_EN 89 +#define CLK_SDIO1_2X_EN 90 +#define CLK_SDIO1_1X_EN 91 +#define CLK_SDIO2_2X_EN 92 +#define CLK_SDIO2_1X_EN 93 +#define CLK_EMMC_2X_EN 94 +#define CLK_EMMC_1X_EN 95 +#define CLK_PLL_TEST_EN 96 +#define CLK_CPHY_CFG_EN 97 +#define CLK_DEBUG_TS_EN 98 +#define CLK_AON_APB_GATE_NUM (CLK_DEBUG_TS_EN + 1) + +#define CLK_MM_CPP_EB 0 +#define CLK_MM_JPG_EB 1 +#define CLK_MM_DCAM_EB 2 +#define CLK_MM_ISP_EB 3 +#define CLK_MM_CSI2_EB 4 +#define CLK_MM_CSI1_EB 5 +#define CLK_MM_CSI0_EB 6 +#define CLK_MM_CKG_EB 7 +#define CLK_ISP_AHB_EB 8 +#define CLK_MM_DVFS_EB 9 +#define CLK_MM_FD_EB 10 +#define CLK_MM_SENSOR2_EB 11 +#define CLK_MM_SENSOR1_EB 12 +#define CLK_MM_SENSOR0_EB 13 +#define CLK_MM_MIPI_CSI2_EB 14 +#define CLK_MM_MIPI_CSI1_EB 15 +#define CLK_MM_MIPI_CSI0_EB 16 +#define CLK_DCAM_AXI_EB 17 +#define CLK_ISP_AXI_EB 18 +#define CLK_MM_CPHY_EB 19 +#define CLK_MM_GATE_CLK_NUM (CLK_MM_CPHY_EB + 1) + +#define CLK_SIM0_EB 0 +#define CLK_IIS0_EB 1 +#define CLK_IIS1_EB 2 +#define CLK_IIS2_EB 3 +#define CLK_APB_REG_EB 4 +#define CLK_SPI0_EB 5 +#define CLK_SPI1_EB 6 +#define CLK_SPI2_EB 7 +#define CLK_SPI3_EB 8 +#define CLK_I2C0_EB 9 +#define CLK_I2C1_EB 10 +#define CLK_I2C2_EB 11 +#define CLK_I2C3_EB 12 +#define CLK_I2C4_EB 13 +#define CLK_UART0_EB 14 +#define CLK_UART1_EB 15 +#define CLK_UART2_EB 16 +#define CLK_SIM0_32K_EB 17 +#define CLK_SPI0_LFIN_EB 18 +#define CLK_SPI1_LFIN_EB 19 +#define CLK_SPI2_LFIN_EB 20 +#define CLK_SPI3_LFIN_EB 21 +#define CLK_SDIO0_EB 22 +#define CLK_SDIO1_EB 23 +#define CLK_SDIO2_EB 24 +#define CLK_EMMC_EB 25 +#define CLK_SDIO0_32K_EB 26 +#define CLK_SDIO1_32K_EB 27 +#define CLK_SDIO2_32K_EB 28 +#define CLK_EMMC_32K_EB 29 +#define CLK_AP_APB_GATE_NUM (CLK_EMMC_32K_EB + 1) + +#define CLK_GPU_CORE_EB 0 +#define CLK_GPU_CORE 1 +#define CLK_GPU_MEM_EB 2 +#define CLK_GPU_MEM 3 +#define CLK_GPU_SYS_EB 4 +#define CLK_GPU_SYS 5 +#define CLK_GPU_CLK_NUM (CLK_GPU_SYS + 1) + +#define CLK_AUDCP_IIS0_EB 0 +#define CLK_AUDCP_IIS1_EB 1 +#define CLK_AUDCP_IIS2_EB 2 +#define CLK_AUDCP_UART_EB 3 +#define CLK_AUDCP_DMA_CP_EB 4 +#define CLK_AUDCP_DMA_AP_EB 5 +#define CLK_AUDCP_SRC48K_EB 6 +#define CLK_AUDCP_MCDT_EB 7 +#define CLK_AUDCP_VBCIFD_EB 8 +#define CLK_AUDCP_VBC_EB 9 +#define CLK_AUDCP_SPLK_EB 10 +#define CLK_AUDCP_ICU_EB 11 +#define CLK_AUDCP_DMA_AP_ASHB_EB 12 +#define CLK_AUDCP_DMA_CP_ASHB_EB 13 +#define CLK_AUDCP_AUD_EB 14 +#define CLK_AUDCP_VBC_24M_EB 15 +#define CLK_AUDCP_TMR_26M_EB 16 +#define CLK_AUDCP_DVFS_ASHB_EB 17 +#define CLK_AUDCP_AHB_GATE_NUM (CLK_AUDCP_DVFS_ASHB_EB + 1) + +#define CLK_AUDCP_WDG_EB 0 +#define CLK_AUDCP_RTC_WDG_EB 1 +#define CLK_AUDCP_TMR0_EB 2 +#define CLK_AUDCP_TMR1_EB 3 +#define CLK_AUDCP_APB_GATE_NUM (CLK_AUDCP_TMR1_EB + 1) + +#define CLK_ACORE0 0 +#define CLK_ACORE1 1 +#define CLK_ACORE2 2 +#define CLK_ACORE3 3 +#define CLK_ACORE4 4 +#define CLK_ACORE5 5 +#define CLK_PCORE0 6 +#define CLK_PCORE1 7 +#define CLK_SCU 8 +#define CLK_ACE 9 +#define CLK_PERIPH 10 +#define CLK_GIC 11 +#define CLK_ATB 12 +#define CLK_DEBUG_APB 13 +#define CLK_APCPU_SEC_NUM (CLK_DEBUG_APB + 1) + +#endif /* _DT_BINDINGS_CLK_UMS512_H_ */
Signature · 1 line
2.25.1
Re: [PATCH v4 3/4] clk: sprd: Add dt-bindings include file for UMS512
Quoted 11 lines · Chunyan Zhang
From: Xiongpeng Wu <[email protected]>
This file defines all index of clocks included on Unisoc's UMS512 SoC.
Signed-off-by Xiongpeng Wu <[email protected]>Signed-off-by Chunyan Zhang <[email protected]>--- include/dt-bindings/clock/sprd,ums512-clk.h | 396 ++++++++++++++++++++ 1 file changed, 396 insertions(+) create mode 100644 include/dt-bindings/clock/sprd,ums512-clk.h
Chunyan Zhang
reviewerPATCH v4 4/4 clk: sprd: Add Unisoc's UMS512 clock driver
In reply to Chunyan ZhangFrom: Xiongpeng Wu <[email protected]>
Add clock driver to support UMS512 SoC.
--- drivers/clk/sprd/Kconfig | 8 + drivers/clk/sprd/Makefile | 1 + drivers/clk/sprd/ums512-clk.c | 2197 +++++++++++++++++++++++++++++++++ 3 files changed, 2206 insertions(+) create mode 100644 drivers/clk/sprd/ums512-clk.c
drivers/clk/sprd/Kconfig +8 -0
@@ -21,4 +21,12 @@ 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 Unisoc UMS512 clocks" + depends on (ARM64 && ARCH_SPRD) || COMPILE_TEST + default ARM64 && ARCH_SPRD + 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
@@ -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 +2197 -0
2,197 lines not on this page · raw message
Signature · 1 line
2.25.1
Hi Stephen,
Could you please help to apply this whole patch-set if no more comments?
Thanks,
Chunyan
Quoted 40 lines · Chunyan Zhang
From: Chunyan Zhang <[email protected]>
Changes since v3:
* Added back 'reg' property as required;
* Added Rob's Reviewed-by on patch 2/4;
* Changed to dual license for sprd,ums512-clk.h;Changes since v2:
* Fixed bindings check errors;
* Addressed Rob's comments;
* Added an example of syscon which doesn't include "#address-cells", "#size-cells", "ranges" properties, so removed these three properties from "required".Changes since v1:
* Fixed errors founded on sprd,ums512-clk.yaml;
* Added a new bindings file for global register which would provide register map for clocks.Chunyan Zhang (2):
dt-bindings: clk: sprd: Add bindings for ums512 clock controller
dt-bindings: mfd: sprd: Add bindings for ums512 global registersXiongpeng Wu (2):
clk: sprd: Add dt-bindings include file for UMS512
clk: sprd: Add Unisoc's UMS512 clock driver.../bindings/clock/sprd,ums512-clk.yaml | 72 + .../bindings/mfd/sprd,ums512-glbreg.yaml | 68 + drivers/clk/sprd/Kconfig | 8 + drivers/clk/sprd/Makefile | 1 + drivers/clk/sprd/ums512-clk.c | 2197 +++++++++++++++++ include/dt-bindings/clock/sprd,ums512-clk.h | 396 +++ 6 files changed, 2742 insertions(+)create mode 100644
Documentation/devicetree/bindings/clock/sprd,ums512-clk.yamlcreate mode 100644Documentation/devicetree/bindings/mfd/sprd,ums512-glbreg.yamlcreate mode 100644drivers/clk/sprd/ums512-clk.c
create mode 100644include/dt-bindings/clock/sprd,ums512-clk.hSignature · 1 line
2.25.1