From: sashiko-bot@kernel.org
To: "Arnab Layek" <arnab.layek@mediatek.com>
Cc: krzk+dt@kernel.org, conor+dt@kernel.org, robh@kernel.org,
devicetree@vger.kernel.org
Subject: Re: [PATCH v2 1/1] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions for MT8188
Date: Tue, 12 May 2026 02:46:53 +0000 [thread overview]
Message-ID: <20260512024654.165D6C2BCB0@smtp.kernel.org> (raw)
In-Reply-To: <20260511121004.2984149-2-arnab.layek@mediatek.com>
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] Schema constraint override failure for `memory-region` maxItems
--
commit 609e858e4a4e669b55ac4136f210e50fe09b79a7
Author: Arnab Layek <arnab.layek@mediatek.com>
dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions for MT8188
This commit attempts to allow up to two memory regions for MT8188
compatibles by adding an if/then block. The new regions are
documented with descriptions for the main SCP SRAM and the optional
SCP L1TCM.
> diff --git a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> index bdbb12118da43..df13be2026a67 100644
> --- a/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
> +++ b/Documentation/devicetree/bindings/remoteproc/mtk,scp.yaml
[ ... ]
> @@ -205,6 +205,27 @@ allOf:
> items:
> - const: cfg
> - const: l1tcm
> + - if:
> + properties:
> + compatible:
> + enum:
> + - mediatek,mt8188-scp
> + - mediatek,mt8188-scp-dual
> + then:
> + properties:
> + memory-region:
> + minItems: 1
> + items:
> + - description: Main SCP SRAM memory region
> + - description: Optional SCP L1TCM memory region
Does this code introduce a regression where 2 items are not actually allowed
for these compatibles?
In dt-schema, constraints are evaluated additively. The base schema
explicitly defines maxItems: 1 for memory-region. Because an if/then
block cannot override or relax a stricter constraint from the base schema,
a device tree specifying 2 memory regions for mediatek,mt8188-scp will
still violate the base maxItems: 1 constraint and fail dt_binding_check.
Does the global constraint need to be increased to maxItems: 2, and then
maxItems: 1 enforced selectively for other SoCs via conditional blocks?
> + patternProperties:
> + "^scp@[a-f0-9]+$":
> + properties:
> + memory-region:
> + minItems: 1
> + items:
> + - description: Main SCP SRAM memory region
> + - description: Optional SCP L1TCM memory region
Does this patternProperties block have the same regression?
The base patternProperties block for ^scp@[a-f0-9]+$ also defines
maxItems: 1 for memory-region, which would likewise prevent this
conditional block from allowing multiple items.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260511121004.2984149-2-arnab.layek@mediatek.com?part=1
prev parent reply other threads:[~2026-05-12 2:46 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-06 13:31 [PATCH] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions Arnab Layek
2026-05-06 13:36 ` Krzysztof Kozlowski
2026-05-11 12:10 ` [PATCH v2 0/1] dt-bindings: remoteproc: mtk,scp: Allow multiple memory regions for MT8188 Arnab Layek
2026-05-11 12:10 ` [PATCH v2 1/1] " Arnab Layek
2026-05-11 16:27 ` Conor Dooley
2026-05-12 2:46 ` sashiko-bot [this message]
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=20260512024654.165D6C2BCB0@smtp.kernel.org \
--to=sashiko-bot@kernel.org \
--cc=arnab.layek@mediatek.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=krzk+dt@kernel.org \
--cc=robh@kernel.org \
--cc=sashiko@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