2021-09-23 06:43:43

by Chunyan Zhang

[permalink] [raw]
Subject: [PATCH 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.

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

diff --git a/Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml b/Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml
new file mode 100644
index 000000000000..992a5c150c7f
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml
@@ -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>;
+ };
+...
--
2.25.1


2021-09-27 19:51:02

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] dt-bindings: clk: sprd: Add bindings for ums512 clock controller

On Thu, 23 Sep 2021 14:41:34 +0800, Chunyan Zhang wrote:
> 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
>

Reviewed-by: Rob Herring <[email protected]>

2021-10-13 14:25:38

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] dt-bindings: clk: sprd: Add bindings for ums512 clock controller

Hi Chunyan.

On Thu, Sep 23, 2021 at 8:42 AM Chunyan Zhang <[email protected]> wrote:
> 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!

> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml

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


> + 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

2021-10-18 03:32:09

by Chunyan Zhang

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] dt-bindings: clk: sprd: Add bindings for ums512 clock controller

Hi Geert,

Thanks for the review.

On Wed, 13 Oct 2021 at 22:23, Geert Uytterhoeven <[email protected]> wrote:
>
> Hi Chunyan.
>
> On Thu, Sep 23, 2021 at 8:42 AM Chunyan Zhang <[email protected]> wrote:
> > 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!
>
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml
>
> > + 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.

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

>
>
> > + 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

2021-10-18 03:43:45

by Geert Uytterhoeven

[permalink] [raw]
Subject: Re: [PATCH v4 1/4] dt-bindings: clk: sprd: Add bindings for ums512 clock controller

Hi Chunyan,

On Sat, Oct 16, 2021 at 10:42 AM Chunyan Zhang <[email protected]> wrote:
> On Wed, 13 Oct 2021 at 22:23, Geert Uytterhoeven <[email protected]> wrote:
> > On Thu, Sep 23, 2021 at 8:42 AM Chunyan Zhang <[email protected]> wrote:
> > > From: Chunyan Zhang <[email protected]>
> > > Add a new bindings to describe ums512 clock compatible strings.
> > >
> > > Signed-off-by: Chunyan Zhang <[email protected]>

> > > --- /dev/null
> > > +++ b/Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml
> >
> > > + 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.
>
> 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

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