mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Conor Dooley <conor.dooley@microchip.com>
To: Junhui Liu <junhui.liu@pigmoral.tech>
Cc: Stephen Boyd <sboyd@kernel.org>,
	Brian Masney <bmasney+clk@redhat.com>,
	Jerome Brunet <jbrunet+clk@baylibre.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Conor Dooley <conor@kernel.org>, Paul Walmsley <pjw@kernel.org>,
	Palmer Dabbelt <palmer@dabbelt.com>,
	Albert Ou <aou@eecs.berkeley.edu>,
	Alexandre Ghiti <alex@ghiti.fr>,
	Brian Masney <bmasney@redhat.com>, Yixun Lan <dlan@kernel.org>,
	<linux-clk@vger.kernel.org>, <devicetree@vger.kernel.org>,
	<linux-kernel@vger.kernel.org>, <linux-riscv@lists.infradead.org>
Subject: Re: [PATCH 1/2] dt-bindings: clock: anlogic,dr1v90-cru: make external clocks optional
Date: Fri, 2 Oct 2026 08:17:00 +0100	[thread overview]
Message-ID: <20261002-oozy-reversal-e65157724bc3@wendy> (raw)
In-Reply-To: <20261002-dr1v90-cru-dt-fix-v1-1-c3e0b5d4c30d@pigmoral.tech>

[-- Attachment #1: Type: text/plain, Size: 2244 bytes --]

On Fri, Oct 02, 2026 at 02:07:00PM +0800, Junhui Liu wrote:
> The external CAN and WDT clocks are optional inputs routed from the
> board; the main oscillator is the only required clock. The binding
> currently requires all three clocks, which forces device trees to add
> stub fixed-clock nodes without a clock-frequency to satisfy it.
> 
> Allow the clocks and clock-names properties to contain just "osc",
> optionally followed by either or both of "can_ext" and "wdt_ext".
> 
> Fixes: 155d900e4c7d ("dt-bindings: clock: add Anlogic DR1V90 CRU")
> Signed-off-by: Junhui Liu <junhui.liu@pigmoral.tech>
> ---
>  .../bindings/clock/anlogic,dr1v90-cru.yaml         | 24 +++++++++++++++-------
>  1 file changed, 17 insertions(+), 7 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml b/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml
> index 11a92588e494..8bd7b78a58d8 100644
> --- a/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml
> +++ b/Documentation/devicetree/bindings/clock/anlogic,dr1v90-cru.yaml
> @@ -17,16 +17,26 @@ properties:
>      maxItems: 1
>  
>    clocks:
> -    items:
> -      - description: Main oscillator
> -      - description: External CAN clock
> -      - description: External WDT clock
> +    minItems: 1
> +    maxItems: 3
> +    description:
> +      The main oscillator is always required. An external CAN clock and an
> +      external WDT clock may additionally be provided if the board routes these
> +      clocks to the SoC.
>  
>    clock-names:
> -    items:
> +    oneOf:
>        - const: osc
> -      - const: can_ext
> -      - const: wdt_ext
> +      - items:
> +          - const: osc
> +          - const: can_ext
> +      - items:
> +          - const: osc
> +          - const: wdt_ext
> +      - items:
> +          - const: osc
> +          - const: can_ext
> +          - const: wdt_ext

This need not be so complicated. The following should do the trick:

clock-names:
  minItems: 1
  items:
    - const: osc
    - enum: [can_ext, wdt_ext]
    - const: wdt_ext

pwbot: changes-requested

>  
>    "#clock-cells":
>      const: 1
> 
> -- 
> 2.55.0
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

  reply	other threads:[~2026-10-02  7:18 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-02  6:06 [PATCH 0/2] riscv: dts: anlogic: dr1v90: fix clock dtbs_check errors Junhui Liu
2026-10-02  6:07 ` [PATCH 1/2] dt-bindings: clock: anlogic,dr1v90-cru: make external clocks optional Junhui Liu
2026-10-02  7:17   ` Conor Dooley [this message]
2026-10-02 15:55     ` Junhui Liu
2026-10-02  6:07 ` [PATCH 2/2] riscv: dts: anlogic: drop unused DR1V90 external clocks Junhui Liu
2026-10-02  7:09   ` Conor Dooley
2026-10-02 15:23     ` Brian Masney

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=20261002-oozy-reversal-e65157724bc3@wendy \
    --to=conor.dooley@microchip.com \
    --cc=alex@ghiti.fr \
    --cc=aou@eecs.berkeley.edu \
    --cc=bmasney+clk@redhat.com \
    --cc=bmasney@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=conor@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dlan@kernel.org \
    --cc=jbrunet+clk@baylibre.com \
    --cc=junhui.liu@pigmoral.tech \
    --cc=krzk+dt@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-riscv@lists.infradead.org \
    --cc=palmer@dabbelt.com \
    --cc=pjw@kernel.org \
    --cc=robh@kernel.org \
    --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

all inboxes | Powered by JetHome®