From: Rob Herring <robh@kernel.org>
To: Yang Xiwen <forbidden405@outlook.com>
Cc: Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
David Yang <mmyangfl@gmail.com>,
linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH RFC 3/4] dt-binding: clock: merge all hisilicon clock bindings to hisilicon,clock-reset-generator
Date: Thu, 22 Feb 2024 14:14:11 -0600 [thread overview]
Message-ID: <20240222201411.GA3765548-robh@kernel.org> (raw)
In-Reply-To: <20240216-clk-mv200-v1-3-a29ace29e636@outlook.com>
On Fri, Feb 16, 2024 at 07:37:53PM +0800, Yang Xiwen wrote:
> We don't need so many separated and duplicated dt-binding files. Merge
> them all and convert them to YAML.
>
> Signed-off-by: Yang Xiwen <forbidden405@outlook.com>
> ---
> .../devicetree/bindings/clock/hi3660-clock.txt | 47 -------
> .../devicetree/bindings/clock/hi3670-clock.txt | 43 -------
> .../devicetree/bindings/clock/hi6220-clock.txt | 52 --------
> .../devicetree/bindings/clock/hisi-crg.txt | 50 --------
> .../clock/hisilicon,clock-reset-generator.yaml | 139 +++++++++++++++++++++
> .../clock/hisilicon,hi3559av100-clock.yaml | 59 ---------
> 6 files changed, 139 insertions(+), 251 deletions(-)
> diff --git a/Documentation/devicetree/bindings/clock/hisilicon,clock-reset-generator.yaml b/Documentation/devicetree/bindings/clock/hisilicon,clock-reset-generator.yaml
> new file mode 100644
> index 000000000000..d37cd892473e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/hisilicon,clock-reset-generator.yaml
> @@ -0,0 +1,139 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/clock/hisilicon,clock-reset-generator.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Hisilicon SOC Clock and Reset Generator (CRG) module
> +
> +maintainers:
> + - Yang Xiwen <forbidden405@foxmail.com>
> +
> +description: |
Don't need '|' if no formatting. Here and elsewhere.
> + Hisilicon SOC clock control module which supports the clocks, resets and
> + power domains on various SoCs.
> +
> +properties:
> + compatible:
> + minItems: 1
> + items:
> + - enum:
> + - hisilicon,hi3559av100-clock
> + - hisilicon,hi3559av100-shub-clock
> + - hisilicon,hi3660-crgctrl
> + - hisilicon,hi3660-pctrl
> + - hisilicon,hi3660-pmuctrl
> + - hisilicon,hi3660-sctrl
> + - hisilicon,hi3660-iomcu
> + - hisilicon,hi3660-stub-clk
> + - hisilicon,hi3670-crgctrl
> + - hisilicon,hi3670-pctrl
> + - hisilicon,hi3670-pmuctrl
> + - hisilicon,hi3670-sctrl
> + - hisilicon,hi3670-iomcu
> + - hisilicon,hi3670-media1-crg
> + - hisilicon,hi3670-media2-crg
> + - hisilicon,hi6220-acpu-sctrl
> + - hisilicon,hi6220-aoctrl
> + - hisilicon,hi6220-sysctrl
> + - hisilicon,hi6220-mediactrl
> + - hisilicon,hi6220-pmctrl
> + - hisilicon,hi6220-stub-clk
> + - hisilicon,hi3516cv300-crg
> + - hisilicon,hi3516cv300-sysctrl
> + - hisilicon,hi3519-crg
> + - hisilicon,hi3798cv200-crg
> + - hisilicon,hi3798cv200-sysctrl
> + - const: syscon
> + - const: simple-mfd
> +
> + reg:
> + maxItems: 1
> +
> + '#clock-cells':
> + const: 1
> +
> + '#reset-cells':
> + enum: [1, 2]
> + description: |
> + First cell is reset request register offset.
> + Second cell is bit offset in reset request register.
> +
> + '#address-cells':
> + const: 1
> +
> + '#size-cells':
> + const: 1
> +
> + mboxes:
> + $ref: /schemas/types.yaml#/definitions/phandle-array
Standard property already has a type. You need to define how many
entries and what each one is if more than 1.
> + description: |
> + Phandle to the mailbox for sending msg to MCU
> + (See ../mailbox/hisilicon,hi3660-mailbox.txt for more info)
Convert or avoid adding new references to txt bindings.
> +
> + mbox-names:
> + $ref: /schemas/types.yaml#/definitions/string-array
> + description: |
> + Names of the mailboxes.
> +
> + hisilicon,hi6220-clk-sram:
> + $ref: /schemas/types.yaml#/definitions/phandle
> + description: |
> + Phandle to the syscon managing the SoC internal sram
> + the driver needs using the sram to pass parameters for frequency change.
> +
> + reset-controller:
> + type: object
> + description: |
> + Reset controller for Hi3798CV200 GMAC module
> +
> +required:
> + - compatible
> + - '#clock-cells'
> +
> +allOf:
> + - if:
> + properties:
> + compatible:
> + not:
> + contains:
> + enum:
> + - hisilicon,hi3798cv200-crg
> + then:
> + properties:
> + reset-controller: false
> + - oneOf:
> + - required:
> + - hisilicon,hi6220-clk-sram
> + - required:
> + - reg
> +
> +additionalProperties: false
> +
> +examples:
> + - |
> + #include <dt-bindings/clock/hi3559av100-clock.h>
> + soc {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + clock-controller@12010000 {
> + compatible = "hisilicon,hi3559av100-clock";
> + #clock-cells = <1>;
> + #reset-cells = <2>;
> + reg = <0x0 0x12010000 0x0 0x10000>;
> + };
> + };
> + - |
> + #include <dt-bindings/interrupt-controller/arm-gic.h>
> + #include <dt-bindings/clock/hi3660-clock.h>
> + soc {
> + #address-cells = <2>;
> + #size-cells = <2>;
> +
> + clock-controller@fff35000 {
> + compatible = "hisilicon,hi3660-crgctrl", "syscon";
> + reg = <0x0 0xfff35000 0x0 0x1000>;
> + #clock-cells = <1>;
> + };
> + };
next prev parent reply other threads:[~2024-02-22 23:21 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-16 11:37 [PATCH RFC 0/4] clk: hisilicon: add support for Hi3798MV200 Yang Xiwen via B4 Relay
2024-02-16 11:37 ` [PATCH RFC 1/4] dt-binding: clock: histb-clock: Add missing common clock and Hi3798MV200 specific clock definition Yang Xiwen via B4 Relay
2024-02-17 10:09 ` Krzysztof Kozlowski
2024-02-16 11:37 ` [PATCH RFC 2/4] clk: hisilicon: add CRG driver for Hi3798MV200 SoC Yang Xiwen via B4 Relay
2024-02-16 11:37 ` [PATCH RFC 3/4] dt-binding: clock: merge all hisilicon clock bindings to hisilicon,clock-reset-generator Yang Xiwen via B4 Relay
2024-02-22 20:14 ` Rob Herring [this message]
2024-02-22 23:24 ` Yang Xiwen
2024-02-16 11:37 ` [PATCH RFC 4/4] dt-binding: clock: hisilicon,clock-reset-controller: add Hi3798MV200 SoC support Yang Xiwen via B4 Relay
2024-02-16 13:11 ` Rob Herring
2024-02-18 20:57 ` Rob Herring
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=20240222201411.GA3765548-robh@kernel.org \
--to=robh@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=forbidden405@outlook.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mmyangfl@gmail.com \
--cc=mturquette@baylibre.com \
--cc=sboyd@kernel.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox