diff mbox series

[v4,1/4] dt-bindings: clk: sprd: Add bindings for ums512 clock controller

Message ID 20210923064137.60722-2-zhang.lyra@gmail.com (mailing list archive)
State Changes Requested, archived
Headers show
Series Add Unisoc's UMS512 clock support | expand

Commit Message

Chunyan Zhang Sept. 23, 2021, 6:41 a.m. UTC
From: Chunyan Zhang <chunyan.zhang@unisoc.com>

Add a new bindings to describe ums512 clock compatible strings.

Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
---
 .../bindings/clock/sprd,ums512-clk.yaml       | 72 +++++++++++++++++++
 1 file changed, 72 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml

Comments

Rob Herring (Arm) Sept. 27, 2021, 7:48 p.m. UTC | #1
On Thu, 23 Sep 2021 14:41:34 +0800, Chunyan Zhang wrote:
> From: Chunyan Zhang <chunyan.zhang@unisoc.com>
> 
> Add a new bindings to describe ums512 clock compatible strings.
> 
> Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
> ---
>  .../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 <robh@kernel.org>
Geert Uytterhoeven Oct. 13, 2021, 2:22 p.m. UTC | #2
Hi Chunyan.

On Thu, Sep 23, 2021 at 8:42 AM Chunyan Zhang <zhang.lyra@gmail.com> wrote:
> From: Chunyan Zhang <chunyan.zhang@unisoc.com>
>
> Add a new bindings to describe ums512 clock compatible strings.
>
> Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>

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 -- geert@linux-m68k.org

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 Oct. 16, 2021, 8:41 a.m. UTC | #3
Hi Geert,

Thanks for the review.

On Wed, 13 Oct 2021 at 22:23, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> Hi Chunyan.
>
> On Thu, Sep 23, 2021 at 8:42 AM Chunyan Zhang <zhang.lyra@gmail.com> wrote:
> > From: Chunyan Zhang <chunyan.zhang@unisoc.com>
> >
> > Add a new bindings to describe ums512 clock compatible strings.
> >
> > Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
>
> 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 -- geert@linux-m68k.org
>
> 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
Geert Uytterhoeven Oct. 17, 2021, 12:29 p.m. UTC | #4
Hi Chunyan,

On Sat, Oct 16, 2021 at 10:42 AM Chunyan Zhang <zhang.lyra@gmail.com> wrote:
> On Wed, 13 Oct 2021 at 22:23, Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> > On Thu, Sep 23, 2021 at 8:42 AM Chunyan Zhang <zhang.lyra@gmail.com> wrote:
> > > From: Chunyan Zhang <chunyan.zhang@unisoc.com>
> > > Add a new bindings to describe ums512 clock compatible strings.
> > >
> > > Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>

> > > --- /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 -- geert@linux-m68k.org

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
diff mbox series

Patch

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 <orsonzhai@gmail.com>
+  - Baolin Wang <baolin.wang7@gmail.com>
+  - Chunyan Zhang <zhang.lyra@gmail.com>
+
+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>;
+    };
+...