All of lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Rob Herring (Arm)" <robh@kernel.org>
Cc: conor+dt@kernel.org, robh@kernel.org, linux-scsi@vger.kernel.org,
	devicetree@vger.kernel.org
Subject: Re: [PATCH v2] dt-bindings: scsi: Convert hisilicon,hip05-sas-v1 to DT schema
Date: Wed, 23 Sep 2026 19:23:03 +0000	[thread overview]
Message-ID: <20260923192304.16C031F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260923191511.2205564-1-robh@kernel.org>

Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] dt-bindings: missing allOf conditionals for version-specific constraints
- [Low] dt-bindings: missing interrupt-parent causes dt_binding_check failure
--

commit 1af097509c0514a80fd91089aea8a399516e8223
Author: Rob Herring (Arm) <robh@kernel.org>

dt-bindings: scsi: Convert hisilicon,hip05-sas-v1 to DT schema

This commit converts the HiSilicon SAS controller binding from a plain text
document to a DT schema. The old text file is removed and replaced with a
new YAML schema covering both v1 and v2 hardware variants.

> diff --git a/Documentation/devicetree/bindings/scsi/hisilicon,hip05-sas-v1.yaml b/Documentation/devicetree/bindings/scsi/hisilicon,hip05-sas-v1.yaml
> new file mode 100644
> index 0000000000000..27d4cf5078e6e
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/scsi/hisilicon,hip05-sas-v1.yaml
[ ... ]
> +  interrupts:
> +    description: >
> +      Interrupt specifiers for PHY, SATA, and completion queues; ordering and
> +      number depend on controller version.
[ ... ]
> +        - Completion queue interrupts - each completion queue has 1 interrupt
> +          source
> +    minItems: 58

[Severity: Medium]
Could this global minItems constraint inadvertently reject valid v2 hardware
configurations?

A typical v2 controller (8 phys, 32 queues) needs exactly 42 interrupts
(2 phy + 8 Sata + 32 CQ), which would inherently require fewer than 58
interrupts and fail schema validation.

> +    maxItems: 128
> +
> +  ctrl-reset-reg:
> +    description: Offset to controller reset register in SAS syscon region.
> +    $ref: /schemas/types.yaml#/definitions/uint32
[ ... ]
> +  ctrl-clock-ena-reg:
> +    description: Offset to controller clock enable register in SAS syscon region.
> +    $ref: /schemas/types.yaml#/definitions/uint32
> +
> +  hip06-sas-v2-quirk-amt:
> +    description:
> +      Indicates that the v2 controller has the "am-max-transmissions" limitation.
> +    type: boolean

[Severity: Medium]
Does this v2-specific quirk need an allOf conditional block with an if-then
restriction?

Without it, the quirk could silently pass schema validation on v1 hardware,
allowing it to be improperly set where it doesn't apply.

> +
> +  hisilicon,sas-syscon:
> +    description: Phandle of syscon used for SAS control.
> +    $ref: /schemas/types.yaml#/definitions/phandle
[ ... ]
> +examples:
> +  - |
> +    sas@c1000000 {
> +        compatible = "hisilicon,hip05-sas-v1";
> +        reg = <0xc1000000 0x10000>;
> +        dma-coherent;
> +        interrupts = <259 4>, <263 4>, <264 4>, /* phy0 */
> +                     <269 4>, <273 4>, <274 4>, /* phy1 */

[Severity: Low]
Does this example omit the interrupt-parent that was present in the original
text binding?

Without an overriding interrupt-parent, the default schema skeleton assumes a
GIC with 3 cells (#interrupt-cells = <3>). This causes dtc validation to fail
due to a size mismatch, as the 2-cell interrupts here do not align with the
default parent.

> +                     <279 4>, <283 4>, <284 4>, /* phy2 */
> +                     <289 4>, <293 4>, <294 4>, /* phy3 */

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

  reply	other threads:[~2026-09-23 19:23 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 19:15 [PATCH v2] dt-bindings: scsi: Convert hisilicon,hip05-sas-v1 to DT schema Rob Herring (Arm)
2026-09-23 19:23 ` sashiko-bot [this message]
2026-09-30 20:40 ` Rob Herring (Arm)

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=20260923192304.16C031F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-scsi@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.