Linux clock framework development
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Rob Herring (Arm)" <robh@kernel.org>
Cc: linux-clk@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH] dt-bindings: clock: Convert HiSilicon clocks to DT schema
Date: Fri, 02 Oct 2026 09:13:50 +0000	[thread overview]
Message-ID: <20261002091350.895461F00899@smtp.kernel.org> (raw)
In-Reply-To: <20261001212051.2227941-1-robh@kernel.org>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] dt-bindings: missing if-then constraints for stub clock properties
- [Low] dt-bindings: YAML conversion dropped all DT examples
--

commit 9d6ccc9389906ef23ff428ed84de04603566232a
Author: Rob Herring (Arm) <robh@kernel.org>
Date:   Thu Oct 1 21:20:48 2026 +0000

    dt-bindings: clock: Convert HiSilicon clocks to DT schema

This commit converts the HiSilicon Hi6220, Hi3660, and Hi3670 clock
bindings from legacy text format to YAML DT schema format. It also
splits out the stub clock binding into its own standalone document.

> diff --git a/Documentation/devicetree/bindings/clock/hisilicon,clocks.yaml b/Documentation/devicetree/bindings/clock/hisilicon,clocks.yaml
> new file mode 100644
> index 0000000000000..345c6d0e7a134
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/hisilicon,clocks.yaml

[ ... ]

> +required:
> +  - compatible
> +  - reg
> +  - '#clock-cells'
> +
> +additionalProperties: false

[Severity: Low]
Were the device tree examples intentionally omitted during the conversion?

The original hi3660-clock.txt and hi3670-clock.txt bindings included example
nodes, but they have been dropped entirely here. Running make dt_binding_check
will only validate the schema syntax itself, but without an examples block, it
will not validate any real configurations. This circumvents the primary
self-testing mechanism of the schema conversion.

> diff --git a/Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml b/Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml
> new file mode 100644
> index 0000000000000..4dd6a01bfd9db
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/clock/hisilicon,hi6220-stub-clk.yaml

[ ... ]

> +required:
> +  - compatible
> +  - '#clock-cells'
> +  - mboxes

[Severity: Medium]
Should there be conditional (if-then) constraints here to enforce
hardware-specific requirements?

The schema groups hisilicon,hi3660-stub-clk and hisilicon,hi6220-stub-clk,
but lacks variant-specific checks. Without conditional constraints, schema
validation will silently pass incomplete configurations that will later
cause the drivers to fail during probe.

For instance, the hi3660 driver unequivocally requires the reg property:

drivers/clk/hisilicon/clk-hi3660-stub.c:hi3660_stub_clk_probe() {
    ...
    freq_reg = devm_platform_ioremap_resource(pdev, 0);
    if (IS_ERR(freq_reg))
        return PTR_ERR(freq_reg);
    ...
}

Similarly, the hi6220 driver unequivocally requires the
hisilicon,hi6220-clk-sram property:

drivers/clk/hisilicon/clk-hi6220-stub.c:hi6220_stub_clk_probe() {
    ...
    stub_clk->dfs_map = syscon_regmap_lookup_by_phandle(np,
                        "hisilicon,hi6220-clk-sram");
    if (IS_ERR(stub_clk->dfs_map)) {
        dev_err(dev, "failed to get sram regmap\n");
        return PTR_ERR(stub_clk->dfs_map);
    }
    ...
}

> +
> +additionalProperties: false

[Severity: Low]
Just as with the hisilicon,clocks.yaml file, the examples from the original
hi6220-clock.txt bindings were completely dropped here. Is it possible to
restore the stub_clock example to ensure make dt_binding_check tests a valid
hardware configuration?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261001212051.2227941-1-robh@kernel.org?part=1

  reply	other threads:[~2026-10-02  9:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-10-01 21:20 [PATCH] dt-bindings: clock: Convert HiSilicon clocks to DT schema Rob Herring (Arm)
2026-10-02  9:13 ` sashiko-bot [this message]
2026-10-02 14:20   ` Rob Herring
2026-10-08 11:54 ` Wei Xu

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=20261002091350.895461F00899@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --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