From: Haylen Chu <heylenay@4d2.org>
To: Krzysztof Kozlowski <krzk@kernel.org>, Haylen Chu <heylenay@outlook.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Inochi Amaoto <inochiama@outlook.com>,
Chen Wang <unicornxdotw@foxmail.com>,
Jisheng Zhang <jszhang@kernel.org>
Subject: Re: [PATCH v2 2/3] dt-bindings: clock: spacemit: Add clock controllers of Spacemit K1 SoC
Date: Wed, 16 Oct 2024 12:10:52 +0000 [thread overview]
Message-ID: <Zw-tTEViagJFPFtv@ketchup> (raw)
In-Reply-To: <zsayhliz4a4fauzmvkimd4uzucuunt6gmkypjlqh4omle4uqx4@cbknudobc57g>
On Tue, Sep 17, 2024 at 08:39:37AM +0200, Krzysztof Kozlowski wrote:
> On Mon, Sep 16, 2024 at 10:23:09PM +0000, Haylen Chu wrote:
> > Add definition for the clock controllers of Spacemit K1 SoC. The clock
> > tree is managed by several SoC parts, thus different compatible strings
> > are added for each.
> >
> > spacemit,k1-syscon.yaml is updated as well to allow clock controller
> > being its subnode.
> >
> > Signed-off-by: Haylen Chu <heylenay@outlook.com>
>
> Please order patches correctly. First this, then the parent so you will
> not submit incomplete binding.
>
> You still must test it, though :(
Thanks for the tip.
> > ---
> > .../bindings/clock/spacemit,k1-ccu.yaml | 71 +++++++
> > .../soc/spacemit/spacemit,k1-syscon.yaml | 4 +
> > include/dt-bindings/clock/spacemit,k1-ccu.h | 198 ++++++++++++++++++
> > 3 files changed, 273 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/clock/spacemit,k1-ccu.yaml
> > create mode 100644 include/dt-bindings/clock/spacemit,k1-ccu.h
> >
> > diff --git a/Documentation/devicetree/bindings/clock/spacemit,k1-ccu.yaml b/Documentation/devicetree/bindings/clock/spacemit,k1-ccu.yaml
> > new file mode 100644
> > index 000000000000..0186722cfd87
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/spacemit,k1-ccu.yaml
> > @@ -0,0 +1,71 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/clock/spacemit,k1-ccu.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Spacemit K1 SoC Clock Controller
> > +
> > +maintainers:
> > + - Haylen Chu <heylenay@outlook.com>
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - spacemit,k1-ccu-apbs
> > + - spacemit,k1-ccu-mpmu
> > + - spacemit,k1-ccu-apbc
> > + - spacemit,k1-ccu-apmu
> > +
> > + clocks:
> > + minItems: 4
>
> Drop
>
> > + maxItems: 4
> > +
> > + clock-names:
> > + items:
> > + - const: clk_32k
> > + - const: vctcxo_1
> > + - const: vctcxo_24
> > + - const: vctcxo_3
> > +
> > + spacemit,mpmu:
> > + $ref: /schemas/types.yaml#/definitions/phandle
> > + description:
> > + Phandle to the syscon managing "Main PMU (MPMU)" registers. It is used to
> > + check PLL lock status.
> > +
> > + "#clock-cells":
> > + const: 1
> > + description:
> > + See <dt-bindings/clock/spacemit,k1-ccu.h> for valid indices.
> > +
> > +required:
> > + - compatible
> > + - "#clock-cells"
> > +
> > +additionalProperties: false
>
> Move it after allOf block
>
> > +
> > +allOf:
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: spacemit,k1-ccu-apbs
> > + then:
> > + required:
> > + - compatible
> > + - "#clock-cells"
>
> Drop both, redundant
>
>
> > + - spacemit,mpmu
> > +
> > +examples:
> > + - |
> > + syscon_apbs: system-control@d4090000 {
>
> Only one example, keep it in parent node.
Should I drop the example block in this binding completely and move it
to its parent's binding (the syscon) or just drop the parent here?
> > + compatible = "spacemit,k1-apbs-syscon", "syscon", "simple-mfd";
> > + reg = <0x0 0xd4090000 0x0 0x1000>;
> > +
> > + clk_apbs: clock-controller {
> > + compatible = "spacemit,k1-ccu-apbs";
> > + #clock-cells = <1>;
> > + spacemit,mpmu = <&syscon_mpmu>;
> > + };
> > + };
> > diff --git a/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml b/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml
> > index 4e3a72b48aff..08efda207101 100644
> > --- a/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml
> > +++ b/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml
> > @@ -27,6 +27,10 @@ properties:
> > reg:
> > maxItems: 1
> >
> > + clock-controller:
> > + $ref: /schemas/clock/spacemit,k1-ccu.yaml#
> > + type: object
> > +
>
> This MUST be part of other patch.
>
> Best regards,
> Krzysztof
>
I will adapt all the comments in next version.
Best regards,
Haylen Chu
WARNING: multiple messages have this Message-ID (diff)
From: Haylen Chu <heylenay@4d2.org>
To: Krzysztof Kozlowski <krzk@kernel.org>, Haylen Chu <heylenay@outlook.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
linux-riscv@lists.infradead.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
Inochi Amaoto <inochiama@outlook.com>,
Chen Wang <unicornxdotw@foxmail.com>,
Jisheng Zhang <jszhang@kernel.org>
Subject: Re: [PATCH v2 2/3] dt-bindings: clock: spacemit: Add clock controllers of Spacemit K1 SoC
Date: Wed, 16 Oct 2024 12:10:52 +0000 [thread overview]
Message-ID: <Zw-tTEViagJFPFtv@ketchup> (raw)
In-Reply-To: <zsayhliz4a4fauzmvkimd4uzucuunt6gmkypjlqh4omle4uqx4@cbknudobc57g>
On Tue, Sep 17, 2024 at 08:39:37AM +0200, Krzysztof Kozlowski wrote:
> On Mon, Sep 16, 2024 at 10:23:09PM +0000, Haylen Chu wrote:
> > Add definition for the clock controllers of Spacemit K1 SoC. The clock
> > tree is managed by several SoC parts, thus different compatible strings
> > are added for each.
> >
> > spacemit,k1-syscon.yaml is updated as well to allow clock controller
> > being its subnode.
> >
> > Signed-off-by: Haylen Chu <heylenay@outlook.com>
>
> Please order patches correctly. First this, then the parent so you will
> not submit incomplete binding.
>
> You still must test it, though :(
Thanks for the tip.
> > ---
> > .../bindings/clock/spacemit,k1-ccu.yaml | 71 +++++++
> > .../soc/spacemit/spacemit,k1-syscon.yaml | 4 +
> > include/dt-bindings/clock/spacemit,k1-ccu.h | 198 ++++++++++++++++++
> > 3 files changed, 273 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/clock/spacemit,k1-ccu.yaml
> > create mode 100644 include/dt-bindings/clock/spacemit,k1-ccu.h
> >
> > diff --git a/Documentation/devicetree/bindings/clock/spacemit,k1-ccu.yaml b/Documentation/devicetree/bindings/clock/spacemit,k1-ccu.yaml
> > new file mode 100644
> > index 000000000000..0186722cfd87
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/clock/spacemit,k1-ccu.yaml
> > @@ -0,0 +1,71 @@
> > +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/clock/spacemit,k1-ccu.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Spacemit K1 SoC Clock Controller
> > +
> > +maintainers:
> > + - Haylen Chu <heylenay@outlook.com>
> > +
> > +properties:
> > + compatible:
> > + enum:
> > + - spacemit,k1-ccu-apbs
> > + - spacemit,k1-ccu-mpmu
> > + - spacemit,k1-ccu-apbc
> > + - spacemit,k1-ccu-apmu
> > +
> > + clocks:
> > + minItems: 4
>
> Drop
>
> > + maxItems: 4
> > +
> > + clock-names:
> > + items:
> > + - const: clk_32k
> > + - const: vctcxo_1
> > + - const: vctcxo_24
> > + - const: vctcxo_3
> > +
> > + spacemit,mpmu:
> > + $ref: /schemas/types.yaml#/definitions/phandle
> > + description:
> > + Phandle to the syscon managing "Main PMU (MPMU)" registers. It is used to
> > + check PLL lock status.
> > +
> > + "#clock-cells":
> > + const: 1
> > + description:
> > + See <dt-bindings/clock/spacemit,k1-ccu.h> for valid indices.
> > +
> > +required:
> > + - compatible
> > + - "#clock-cells"
> > +
> > +additionalProperties: false
>
> Move it after allOf block
>
> > +
> > +allOf:
> > + - if:
> > + properties:
> > + compatible:
> > + contains:
> > + const: spacemit,k1-ccu-apbs
> > + then:
> > + required:
> > + - compatible
> > + - "#clock-cells"
>
> Drop both, redundant
>
>
> > + - spacemit,mpmu
> > +
> > +examples:
> > + - |
> > + syscon_apbs: system-control@d4090000 {
>
> Only one example, keep it in parent node.
Should I drop the example block in this binding completely and move it
to its parent's binding (the syscon) or just drop the parent here?
> > + compatible = "spacemit,k1-apbs-syscon", "syscon", "simple-mfd";
> > + reg = <0x0 0xd4090000 0x0 0x1000>;
> > +
> > + clk_apbs: clock-controller {
> > + compatible = "spacemit,k1-ccu-apbs";
> > + #clock-cells = <1>;
> > + spacemit,mpmu = <&syscon_mpmu>;
> > + };
> > + };
> > diff --git a/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml b/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml
> > index 4e3a72b48aff..08efda207101 100644
> > --- a/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml
> > +++ b/Documentation/devicetree/bindings/soc/spacemit/spacemit,k1-syscon.yaml
> > @@ -27,6 +27,10 @@ properties:
> > reg:
> > maxItems: 1
> >
> > + clock-controller:
> > + $ref: /schemas/clock/spacemit,k1-ccu.yaml#
> > + type: object
> > +
>
> This MUST be part of other patch.
>
> Best regards,
> Krzysztof
>
I will adapt all the comments in next version.
Best regards,
Haylen Chu
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2024-10-16 12:11 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-16 22:20 [PATCH v2 0/3] Add clock controller support for Spacemit K1 Haylen Chu
2024-09-16 22:20 ` Haylen Chu
2024-09-16 22:23 ` [PATCH v2 1/3] dt-bindings: soc: spacemit: Add spacemit,k1-syscon Haylen Chu
2024-09-16 22:23 ` Haylen Chu
2024-09-16 23:27 ` Rob Herring (Arm)
2024-09-16 23:27 ` Rob Herring (Arm)
2024-09-17 6:15 ` Krzysztof Kozlowski
2024-09-17 6:15 ` Krzysztof Kozlowski
2024-09-16 22:23 ` [PATCH v2 2/3] dt-bindings: clock: spacemit: Add clock controllers of Spacemit K1 SoC Haylen Chu
2024-09-16 22:23 ` Haylen Chu
2024-09-16 23:27 ` Rob Herring (Arm)
2024-09-16 23:27 ` Rob Herring (Arm)
2024-09-17 6:39 ` Krzysztof Kozlowski
2024-09-17 6:39 ` Krzysztof Kozlowski
2024-10-16 12:10 ` Haylen Chu [this message]
2024-10-16 12:10 ` Haylen Chu
2024-10-16 12:57 ` Krzysztof Kozlowski
2024-10-16 12:57 ` Krzysztof Kozlowski
2024-09-16 22:23 ` [PATCH v2 3/3] clk: spacemit: Add clock support for " Haylen Chu
2024-09-16 22:23 ` Haylen Chu
2024-09-19 23:08 ` Stephen Boyd
2024-09-19 23:08 ` Stephen Boyd
2024-11-27 11:20 ` Haylen Chu
2024-11-27 11:20 ` Haylen Chu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Zw-tTEViagJFPFtv@ketchup \
--to=heylenay@4d2.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=heylenay@outlook.com \
--cc=inochiama@outlook.com \
--cc=jszhang@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=mturquette@baylibre.com \
--cc=robh@kernel.org \
--cc=sboyd@kernel.org \
--cc=unicornxdotw@foxmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.