All of lore.kernel.org
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Thierry Bultel <thierry.bultel.yh@bp.renesas.com>
Cc: thierry.bultel@linatsea.fr, linux-renesas-soc@vger.kernel.org,
	geert@linux-m68k.org, paul.barker.ct@bp.renesas.com,
	Geert Uytterhoeven <geert+renesas@glider.be>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v4 02/13] dt-bindings: clock: Add cpg for the Renesas RZ/T2H SoC
Date: Fri, 7 Mar 2025 15:43:49 -0600	[thread overview]
Message-ID: <20250307214349.GA655306-robh@kernel.org> (raw)
In-Reply-To: <20250306152451.2356762-3-thierry.bultel.yh@bp.renesas.com>

On Thu, Mar 06, 2025 at 04:24:36PM +0100, Thierry Bultel wrote:
> Document RZ/T2H (a.k.a r9a09g077) cpg-mssr (Clock Pulse Generator) binding.
> 
> Signed-off-by: Thierry Bultel <thierry.bultel.yh@bp.renesas.com>
> ---
> Changes v3->v4:
>   - Handle maxItems and clocks names properly in schema. 
> ---
>  .../bindings/clock/renesas,cpg-mssr.yaml      | 56 +++++++++++++------
>  .../clock/renesas,r9a09g077-cpg-mssr.h        | 49 ++++++++++++++++
>  2 files changed, 89 insertions(+), 16 deletions(-)
>  create mode 100644 include/dt-bindings/clock/renesas,r9a09g077-cpg-mssr.h
> 
> diff --git a/Documentation/devicetree/bindings/clock/renesas,cpg-mssr.yaml b/Documentation/devicetree/bindings/clock/renesas,cpg-mssr.yaml
> index 77ce3615c65a..acbb555a064e 100644
> --- a/Documentation/devicetree/bindings/clock/renesas,cpg-mssr.yaml
> +++ b/Documentation/devicetree/bindings/clock/renesas,cpg-mssr.yaml
> @@ -52,9 +52,10 @@ properties:
>        - renesas,r8a779f0-cpg-mssr # R-Car S4-8
>        - renesas,r8a779g0-cpg-mssr # R-Car V4H
>        - renesas,r8a779h0-cpg-mssr # R-Car V4M
> +      - renesas,r9a09g077-cpg-mssr # RZ/T2H
>  
>    reg:
> -    maxItems: 1

Keep constraints at the top-level:

minItems: 1
maxItems: 2

> +    description: Registers base address

Don't need generic descriptions of common properties.

>  
>    clocks:
>      minItems: 1
> @@ -63,11 +64,6 @@ properties:
>    clock-names:
>      minItems: 1
>      maxItems: 2
> -    items:
> -      enum:
> -        - extal     # All
> -        - extalr    # Most R-Car Gen3 and RZ/G2
> -        - usb_extal # Most R-Car Gen2 and RZ/G1
>  
>    '#clock-cells':
>      description: |
> @@ -92,16 +88,6 @@ properties:
>        the datasheet.
>      const: 1
>  
> -if:
> -  not:
> -    properties:
> -      compatible:
> -        items:
> -          enum:
> -            - renesas,r7s9210-cpg-mssr
> -then:
> -  required:
> -    - '#reset-cells'
>  
>  required:
>    - compatible
> @@ -113,6 +99,44 @@ required:
>  
>  additionalProperties: false
>  
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: renesas,r9a09g077-cpg-mssr
> +    then:
> +      properties:
> +        reg:
> +          minItems: 2
> +          maxItems: 2

With the above, you only need minItems.

> +        clock-names:
> +          items:
> +            - const: extal
> +            - const: loco
> +    else:
> +      properties:
> +        reg:
> +          minItems: 1
> +          maxItems: 1

And only maxItems here.

> +        clock-names:
> +          items:
> +            enum:
> +              - extal     # All
> +              - extalr    # Most R-Car Gen3 and RZ/G2
> +              - usb_extal # Most R-Car Gen2 and RZ/G1
> +
> +  - if:
> +      not:
> +        properties:
> +          compatible:
> +            items:
> +              enum:
> +                - renesas,r7s9210-cpg-mssr
> +    then:
> +      required:
> +        - '#reset-cells'
> +
>  examples:
>    - |
>      cpg: clock-controller@e6150000 {

  reply	other threads:[~2025-03-07 21:43 UTC|newest]

Thread overview: 35+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-06 15:24 [PATCH v4 00/13] Add initial support for Renesas RZ/T2H SoC Thierry Bultel
2025-03-06 15:24 ` [PATCH v4 01/13] dt-bindings: soc: Add Renesas RZ/T2H (R9A09G077) SoC Thierry Bultel
2025-03-07 21:40   ` Rob Herring (Arm)
2025-03-06 15:24 ` [PATCH v4 02/13] dt-bindings: clock: Add cpg for the Renesas RZ/T2H SoC Thierry Bultel
2025-03-07 21:43   ` Rob Herring [this message]
2025-03-06 15:24 ` [PATCH v4 03/13] dt-bindings: serial: Add compatible for Renesas RZ/T2H SoC in sci Thierry Bultel
2025-03-07 21:45   ` Rob Herring (Arm)
2025-03-06 15:24 ` [PATCH v4 04/13] soc: renesas: Add RZ/T2H (R9A09G077) config option Thierry Bultel
2025-03-06 15:24 ` [PATCH v4 05/13] clk: renesas: Pass sub struct of cpg_mssr_priv to cpg_clk_register Thierry Bultel
2025-03-06 15:24 ` [PATCH v4 06/13] clk: renesas: Add support for R9A09G077 SoC Thierry Bultel
2025-03-06 15:24 ` [PATCH v4 07/13] serial: sh-sci: Fix a comment about SCIFA Thierry Bultel
2025-03-18 21:50   ` Wolfram Sang
2025-03-06 15:24 ` [PATCH v4 08/13] serial: sh-sci: Introduced function pointers Thierry Bultel
2025-03-14 11:05   ` Geert Uytterhoeven
2025-03-17  9:55     ` Wolfram Sang
2025-03-17 10:27       ` Paul Barker
2025-03-18 21:45         ` Wolfram Sang
2025-03-24  9:25   ` Wolfram Sang
2025-03-24 10:02     ` Geert Uytterhoeven
2025-03-06 15:24 ` [PATCH v4 09/13] serial: sh-sci: Introduced sci_of_data Thierry Bultel
2025-03-24  9:37   ` Wolfram Sang
2025-03-24 10:03   ` Geert Uytterhoeven
2025-03-06 15:24 ` [PATCH v4 10/13] serial: sh-sci: Add support for RZ/T2H SCI Thierry Bultel
2025-03-24  9:43   ` Wolfram Sang
2025-03-24 12:49     ` Thierry Bultel
2025-03-24 21:56       ` Wolfram Sang
2025-03-25  6:29         ` Biju Das
2025-03-25  7:51           ` Wolfram Sang
2025-03-25 10:49             ` Thierry Bultel
2025-03-25 11:06               ` Wolfram Sang
2025-03-25 16:24               ` Geert Uytterhoeven
2025-03-06 15:24 ` [PATCH v4 11/13] arm64: dts: renesas: Add initial support for renesas RZ/T2H SoC Thierry Bultel
2025-03-06 15:24 ` [PATCH v4 12/13] arm64: dts: renesas: Add initial support for renesas RZ/T2H eval board Thierry Bultel
2025-03-06 15:24 ` [PATCH v4 13/13] arm64: defconfig: Enable Renesas RZ/T2H serial SCI Thierry Bultel
2025-03-24  9:44   ` Wolfram Sang

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=20250307214349.GA655306-robh@kernel.org \
    --to=robh@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert+renesas@glider.be \
    --cc=geert@linux-m68k.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-renesas-soc@vger.kernel.org \
    --cc=paul.barker.ct@bp.renesas.com \
    --cc=thierry.bultel.yh@bp.renesas.com \
    --cc=thierry.bultel@linatsea.fr \
    /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.