All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Gregory Williams" <gregory.williams@amd.com>
Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH 08/15] dt-bindings: clock: versal: add Versal Gen 2 compatible string
Date: Wed, 18 Nov 2026 23:44:53 +0000	[thread overview]
Message-ID: <sashiko-outbox-222207@kernel.org> (raw)
In-Reply-To: <20261118233211.4121361-9-gregory.williams@amd.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] dt-bindings: clock: versal: duplicate xlnx,versal2-clk in
  compatible oneOf
- [Medium] dt-bindings: clock: versal: missing clock-names validation in
  allOf block
--

commit fd8a0b655d481ee627fd749c39ad8be1171d696f
Author: Naman Trivedi <naman.trivedimanojbhai@amd.com>

dt-bindings: clock: versal: add Versal Gen 2 compatible string

This commit adds the xlnx,versal2-clk compatible string to the Xilinx
Versal clock controller DT binding schema.

> Add compatible string for Versal Gen 2 clock driver and validate
> clock-names for xlnx,versal2-clk compatible.

[Severity: Medium]
Does this patch actually update the clock-names validation for
xlnx,versal2-clk?

The commit message says it validates clock-names for xlnx,versal2-clk, but
the allOf conditional block in xlnx,versal-clk.yaml only checks for
xlnx,versal-net-clk:

Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml {
    ...
allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - xlnx,versal-net-clk
    then:
      properties:
        clocks:
          minItems: 3
        clock-names:
          minItems: 3
    else:
      properties:
        clocks:
          maxItems: 2
        clock-names:
          maxItems: 2
    ...
}

Because xlnx,versal2-clk is not added to that enum, it falls into the else
branch (maxItems: 2), which will fail dtbs_check if Versal Gen 2 specifies
all three input clocks (ref, pl_alt_ref, alt_ref) like Versal NET.

> diff --git a/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml b/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml
> index 1f36ccc4cde1d..e06f1ebc192ab 100644
> --- a/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml
> +++ b/Documentation/devicetree/bindings/clock/xlnx,versal-clk.yaml
> @@ -17,10 +17,13 @@ description: |
>  properties:
>    compatible:
>      oneOf:
> -      - const: xlnx,versal-clk
> +      - enum:
> +          - xlnx,versal-clk
> +          - xlnx,versal2-clk
>        - items:
>            - enum:
>                - xlnx,versal-net-clk
> +              - xlnx,versal2-clk
>            - const: xlnx,versal-clk

[Severity: Medium]
Should xlnx,versal2-clk be listed in only one branch of compatible.oneOf?

Adding xlnx,versal2-clk to both branches permits it both as a standalone
compatible string without a fallback and with the xlnx,versal-clk
fallback.  Also, at this point in the series (prior to commit "clk:
zynqmp: add compatible string for Versal Gen 2"), zynqmp_clock_of_match[]
in drivers/clk/zynqmp/clkc.c only matches xlnx,zynqmp-clk and
xlnx,versal-clk.  It looks like the addition under xlnx,versal-net-clk may
have been intended for the allOf block below.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261118233211.4121361-1-gregory.williams@amd.com?part=8

  reply	other threads:[~2026-11-18 23:44 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-18 23:31 [PATCH 00/15] accel: Add AMD Versal AI Engine driver (with Versal Gen 2 firmware support) Gregory Williams
2026-11-18 23:31 ` [PATCH 01/15] firmware: xilinx: Separate TF-A checking Gregory Williams
2026-11-18 23:31 ` [PATCH 02/15] firmware: xilinx: Call va_start after pm feature check Gregory Williams
2026-11-18 23:31 ` [PATCH 03/15] firmware: xilinx: Add comments about number of arguments Gregory Williams
2026-11-18 23:32 ` [PATCH 04/15] firmware: xilinx: Use match data for ZynqMP/Versal Gregory Williams
2026-11-18 23:32 ` [PATCH 05/15] firmware: xilinx: Rename zynqmp_pm_invoke_fw_fn() Gregory Williams
2026-11-18 23:32 ` [PATCH 06/15] dt-bindings: firmware: xilinx: Add Versal Gen 2 compatible string Gregory Williams
2026-11-19 10:53   ` Krzysztof Kozlowski
2026-11-18 23:32 ` [PATCH 07/15] firmware: xilinx: Add support for Versal Gen 2 Gregory Williams
2026-11-18 23:32 ` [PATCH 08/15] dt-bindings: clock: versal: add Versal Gen 2 compatible string Gregory Williams
2026-11-18 23:44   ` sashiko-bot [this message]
2026-11-19 10:55   ` Krzysztof Kozlowski
2026-11-18 23:32 ` [PATCH 09/15] clk: zynqmp: Add " Gregory Williams
2026-11-18 23:32 ` [PATCH 10/15] drivers: firmware: xilinx: Add IOCTL support for the AIE run time operations Gregory Williams
2026-11-18 23:32 ` [PATCH 11/15] dt-bindings: soc: xilinx: Add Versal AI Engine DT binding Gregory Williams
2026-11-18 23:45   ` sashiko-bot
2026-11-19 10:59   ` Krzysztof Kozlowski
2026-11-18 23:32 ` [PATCH 12/15] accel/amd-ai-engine: Add AMD AI Engine device driver Gregory Williams
2026-11-18 23:45   ` sashiko-bot
2026-11-18 23:32 ` [PATCH 13/15] accel/amd-ai-engine: Add pm ops for firmware calls Gregory Williams
2026-11-18 23:46   ` sashiko-bot
2026-11-18 23:32 ` [PATCH 14/15] accel/amd-ai-engine: Add support to enable/disable tile clocks Gregory Williams
2026-11-18 23:45   ` sashiko-bot
2026-11-18 23:32 ` [PATCH 15/15] accel/amd-ai-engine: Add reset operations Gregory Williams
2026-11-18 23:51   ` sashiko-bot
2026-11-19  8:19 ` [PATCH 00/15] accel: Add AMD Versal AI Engine driver (with Versal Gen 2 firmware support) Jerome Brunet

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-222207@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregory.williams@amd.com \
    --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 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.