mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Chunyan Zhang <chunyan.zhang@unisoc.com>,
	Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org, Orson Zhai <orsonzhai@gmail.com>,
	Baolin Wang <baolin.wang@linux.alibaba.com>,
	Chunyan Zhang <zhang.lyra@gmail.com>
Subject: Re: [PATCH 1/3] dt-bindings: clk: sprd: Add UMS9620 support
Date: Thu, 4 Jan 2024 09:46:52 +0100	[thread overview]
Message-ID: <3a290bf9-928d-4d21-9c93-0d1db59d6fff@linaro.org> (raw)
In-Reply-To: <20231229085156.1490233-2-chunyan.zhang@unisoc.com>

On 29/12/2023 09:51, Chunyan Zhang wrote:
> Add UMS9620's clock compatible strings and descriptions for clock
> and clock-names for UMS9620.
> 
> Signed-off-by: Chunyan Zhang <chunyan.zhang@unisoc.com>
> ---
>  .../bindings/clock/sprd,ums512-clk.yaml       | 79 ++++++++++++++++---
>  1 file changed, 68 insertions(+), 11 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml b/Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml
> index 43d2b6c31357..dcad41a1fea7 100644
> --- a/Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml
> +++ b/Documentation/devicetree/bindings/clock/sprd,ums512-clk.yaml
> @@ -30,25 +30,38 @@ properties:
>        - sprd,ums512-mm-clk
>        - sprd,ums512-mm-gate-clk
>        - sprd,ums512-apapb-gate
> +      - sprd,ums9620-pmu-gate
> +      - sprd,ums9620-g1-pll
> +      - sprd,ums9620-g5l-pll
> +      - sprd,ums9620-g5r-pll
> +      - sprd,ums9620-g8-pll
> +      - sprd,ums9620-g9-pll
> +      - sprd,ums9620-g10-pll
> +      - sprd,ums9620-apapb-gate
> +      - sprd,ums9620-ap-clk
> +      - sprd,ums9620-apahb-gate
> +      - sprd,ums9620-aon-gate
> +      - sprd,ums9620-aonapb-clk
> +      - sprd,ums9620-topdvfs-clk
> +      - sprd,ums9620-ipaapb-gate
> +      - sprd,ums9620-ipa-clk
> +      - sprd,ums9620-ipaglb-gate
> +      - sprd,ums9620-ipadispc-gate
> +      - sprd,ums9620-pcieapb-gate
> +      - sprd,ums9620-pcie-clk
> +      - sprd,ums9620-mm-gate
> +      - sprd,ums9620-mm-clk
> +      - sprd,ums9620-dpu-vsp-gate
> +      - sprd,ums9620-dpu-vsp-clk
>  
>    "#clock-cells":
>      const: 1
>  
>    clocks:
> -    minItems: 1
> -    maxItems: 4

No, constraints stay here.

>      description: |
>        The input parent clock(s) phandle for the clock, only list
>        fixed clocks which are declared in devicetree.
>  
> -  clock-names:

No, you cannot just drop properties. Widest constraints stay here.

> -    minItems: 1
> -    items:
> -      - const: ext-26m
> -      - const: ext-32k
> -      - const: ext-4m
> -      - const: rco-100m
> -
>    reg:
>      maxItems: 1
>  
> @@ -57,7 +70,43 @@ required:
>    - '#clock-cells'
>    - reg
>  
> -additionalProperties: false
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            pattern: "^sprd,ums512-.*"
> +
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 1
> +          maxItems: 4
> +
> +        clock-names:
> +          minItems: 1
> +          items:
> +            - const: ext-26m
> +            - const: ext-32k
> +            - const: ext-4m
> +            - const: rco-100m
> +
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            pattern: "^sprd,ums9620-.*"
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 1
> +          maxItems: 6
> +
> +        clock-names:
> +          minItems: 1
> +          maxItems: 6

Missing names.

Most likely you are trying to stuff too many devices into one binding. I
suggest split, could be with some shared/common schema (see Qualcomm GCC
bindings).

> +
> +unevaluatedProperties: false
>  
>  examples:
>    - |
> @@ -68,4 +117,12 @@ examples:
>        clock-names = "ext-26m";
>        #clock-cells = <1>;
>      };
> +
> +    aonapb_gate: clock-controller@0 {
> +      compatible = "sprd,ums9620-aon-gate";

Drop entire example, no need for new example for every new compatible.



Best regards,
Krzysztof


  reply	other threads:[~2024-01-04  8:46 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-29  8:51 [PATCH 0/3] Add UMS9620 clocks driver and bindings Chunyan Zhang
2023-12-29  8:51 ` [PATCH 1/3] dt-bindings: clk: sprd: Add UMS9620 support Chunyan Zhang
2024-01-04  8:46   ` Krzysztof Kozlowski [this message]
2024-01-04  9:09     ` Chunyan Zhang
2024-01-04  9:21       ` Krzysztof Kozlowski
2024-01-04  9:26         ` Chunyan Zhang
2024-01-04  9:31           ` Krzysztof Kozlowski
2023-12-29  8:51 ` [PATCH 2/3] clk: sprd: Add dt-bindings include file for UMS9620 Chunyan Zhang
2024-01-04  8:48   ` Krzysztof Kozlowski
2023-12-29  8:51 ` [PATCH 3/3] clk: sprd: add support " Chunyan Zhang
2023-12-29 20:02   ` kernel test robot
2023-12-29 20:22   ` kernel test robot

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=3a290bf9-928d-4d21-9c93-0d1db59d6fff@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=baolin.wang@linux.alibaba.com \
    --cc=chunyan.zhang@unisoc.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=orsonzhai@gmail.com \
    --cc=robh+dt@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=zhang.lyra@gmail.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®