Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Christian Marangi" <ansuelsmth@gmail.com>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org
Cc: robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v13 1/5] dt-bindings: clock: airoha: Document support for AN7583 clock
Date: Tue, 17 Nov 2026 18:32:58 +0000	[thread overview]
Message-ID: <sashiko-outbox-219345@kernel.org> (raw)
In-Reply-To: <20261117182444.103123-2-ansuelsmth@gmail.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Low] dt-bindings: clock: airoha: unwieldy per-compatible conditionals
  in schema
- [Low] dt-bindings: clock: airoha: inaccurate description of
  airoha,chip-scu
--

commit f0ae95ef10113af9be9b8cf6b0ed7bcb3dcee33f
Author: Christian Marangi <ansuelsmth@gmail.com>

dt-bindings: clock: airoha: Document support for AN7583 clock

This commit documents the Airoha AN7583 clock and reset controller binding
in the EN7523 SCU schema, adding the airoha,chip-scu phandle property along
with clock and reset binding header constants for AN7583.

> diff --git a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
> index fc37786ac7ed8..05cd20ce3ab91 100644
> --- a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
> +++ b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
> @@ -31,6 +31,7 @@ properties:
>    compatible:
>      items:
>        - enum:
> +          - airoha,an7583-scu
>            - airoha,en7523-scu
>            - airoha,en7581-scu
>            - econet,en751221-scu
> @@ -57,12 +58,36 @@ properties:
>        available serdes port.
>      const: 1
>  
> +  airoha,chip-scu:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    description: phandle to the Chip SCU providing the registers required
> +      for configuring the PCIe related clocks and resets.

[Severity: Low]
As reported by Brian Masney on v9 [1], is the description of
airoha,chip-scu accurate?  As noted in the commit message and implemented in
drivers/clk/clk-en7523.c, the Chip SCU provides the registers used to read
base clock sources, dividers, and clock gates, whereas the main SCU
register block provides the registers for PCIe clocks, resets, and PHY
SERDES.

>  required:
>    - compatible
>    - reg
>    - '#clock-cells'
>  
>  allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          const: airoha,an7583-scu
> +
> +    then:
> +      properties:
> +        reg:
> +          maxItems: 1
> +
> +      required:
> +        - airoha,chip-scu
> +        - '#reset-cells'
> +        - '#phy-cells'
> +
> +    else:
> +      properties:
> +        airoha,chip-scu: false

[Severity: Low]
This isn't a bug, but with airoha,an7583-scu added, all four compatibles in
this schema now have separate per-compatible if-then blocks in allOf with
diverging constraints across reg, #phy-cells, #reset-cells, and
airoha,chip-scu.  Would it be cleaner to split the variants into separate
binding schemas (or consolidate shared constraints such as reg maxItems: 1)
rather than adding another per-compatible conditional block?

[1] https://lore.kernel.org/r/179383990045.753844.10400171550739497565.b4-review@b4

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117182444.103123-1-ansuelsmth@gmail.com?part=1

  reply	other threads:[~2026-11-17 18:32 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 18:24 [PATCH v13 0/5] clk: add support for Airoha AN7583 clock Christian Marangi
2026-11-17 18:24 ` [PATCH v13 1/5] dt-bindings: clock: airoha: Document support for " Christian Marangi
2026-11-17 18:32   ` sashiko-bot [this message]
2026-11-17 18:24 ` [PATCH v13 2/5] clk: en7523: use devm variant for clk_hw_register and fixed clock Christian Marangi
2026-11-17 18:24 ` [PATCH v13 3/5] clk: en7523: protect concurrent access to reset and PCI register Christian Marangi
2026-11-17 18:24 ` [PATCH v13 4/5] clk: en7523: generalize register clocks function Christian Marangi
2026-11-17 18:24 ` [PATCH v13 5/5] clk: en7523: add support for Airoha AN7583 clock Christian Marangi
2026-11-17 18:38   ` sashiko-bot

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=sashiko-outbox-219345@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=ansuelsmth@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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