From: sashiko-bot@kernel.org
To: "Aleksa Paunovic" <aleksa.paunovic@htecgroup.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v3 5/8] dt-bindings: timer: Add MIPS P8700 ACLINT MTIMER
Date: Mon, 16 Nov 2026 12:13:25 +0000 [thread overview]
Message-ID: <sashiko-outbox-216995@kernel.org> (raw)
In-Reply-To: <20261116-p8700-dts-v3-5-ec5d4b7de39f@htecgroup.com>
Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] dt-bindings: timer: unwieldy conditionals and broken reg-names
in c900 mtimer
--
commit c813dc9b1038dccb749c89c6352de2cfcd1ce9b4
Author: Aleksa Paunovic <aleksa.paunovic@htecgroup.com>
dt-bindings: timer: Add MIPS P8700 ACLINT MTIMER
This commit adds the mips,p8700-aclint-mtimer compatible and support for
both mtime and mtimecmp register regions to thead,c900-aclint-mtimer.yaml.
> diff --git a/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml b/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml
> index cf7c82e980f67..a5ebe04ade9ed 100644
> --- a/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml
> +++ b/Documentation/devicetree/bindings/timer/thead,c900-aclint-mtimer.yaml
> @@ -21,13 +21,19 @@ properties:
> - enum:
> - anlogic,dr1v90-aclint-mtimer
> - const: nuclei,ux900-aclint-mtimer
> + - const: mips,p8700-aclint-mtimer
>
> reg:
> + minItems: 1
> items:
> + - description: MTIME Registers, or MTIMECMP Registers if only one
> + region is present
> - description: MTIMECMP Registers
>
> reg-names:
> + minItems: 1
> items:
> + - enum: [ mtime, mtimecmp ]
> - const: mtimecmp
>
> interrupts-extended:
> @@ -42,6 +48,26 @@ required:
> - reg-names
> - interrupts-extended
>
> +allOf:
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: mips,p8700-aclint-mtimer
> + then:
> + properties:
> + reg:
> + minItems: 2
> + reg-names:
> + minItems: 2
> + else:
> + properties:
> + reg:
> + maxItems: 1
> + reg-names:
> + items:
> + - const: mtimecmp
[Severity: Low]
Should mips,p8700-aclint-mtimer be split into its own binding schema rather
than overloading reg and reg-names in thead,c900-aclint-mtimer.yaml?
The existing compatibles in this binding only have a single mtimecmp region
and no memory-mapped mtime region, as noted in commit b91cf01cf3e6
("dt-bindings: timer: thead,c900-aclint-mtimer: separate mtime and mtimecmp
regs"). Combining the two-region MIPS layout with the single-region layout
forces item 0 of reg and reg-names to mean either mtime or mtimecmp and
requires an allOf if/then/else block to redefine both properties per
compatible.
In addition, the conditional reg-names constraints here are incomplete: the
then branch only sets minItems: 2 without constraining the first item to
const: mtime, which lets an invalid reg-names = "mtimecmp", "mtimecmp" pass
validation via the top-level enum, while the else branch overrides the
2-item list with a 1-item list without setting maxItems: 1.
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261116-p8700-dts-v3-0-ec5d4b7de39f@htecgroup.com?part=5
next prev parent reply other threads:[~2026-11-16 12:13 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-16 11:55 [PATCH v3 0/8] Add support for MIPS P8700 Aleksa Paunovic via B4 Relay
2026-11-16 11:55 ` [PATCH v3 1/8] dt-bindings: riscv: cpus: add mips,p8700 Aleksa Paunovic via B4 Relay
2026-11-16 11:55 ` [PATCH v3 2/8] dt-bindings: riscv: Add MIPS Boston board compatible Aleksa Paunovic via B4 Relay
2026-11-16 11:55 ` [PATCH v3 3/8] dt-bindings: interrupt-controller: Add MIPS P8700 APLIC Aleksa Paunovic via B4 Relay
2026-11-16 11:55 ` [PATCH v3 4/8] dt-bindings: interrupt-controller: Add MIPS P8700 ACLINT MSWI Aleksa Paunovic via B4 Relay
2026-11-16 11:55 ` [PATCH v3 5/8] dt-bindings: timer: Add MIPS P8700 ACLINT MTIMER Aleksa Paunovic via B4 Relay
2026-11-16 12:13 ` sashiko-bot [this message]
2026-11-16 11:55 ` [PATCH v3 6/8] riscv: dts: mips: Initial support for the P8700 Boston board Aleksa Paunovic via B4 Relay
2026-11-16 11:55 ` [PATCH v3 7/8] MAINTAINERS: Add entry for MIPS RISC-V SoC support Aleksa Paunovic via B4 Relay
2026-11-16 11:55 ` [PATCH v3 8/8] riscv: defconfig: Enable MIPS SoCs Aleksa Paunovic via B4 Relay
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-216995@kernel.org \
--to=sashiko-bot@kernel.org \
--cc=aleksa.paunovic@htecgroup.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@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