Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Sander Speetjens" <sander.speetjens@gmail.com>
Cc: devicetree@vger.kernel.org,
	"Alexandre Belloni" <alexandre.belloni@bootlin.com>,
	robh@kernel.org, linux-rtc@vger.kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v4 1/2] dt-bindings: rtc: Add property for Raspberry Pi 5 RTC
Date: Wed, 23 Sep 2026 13:21:12 +0000	[thread overview]
Message-ID: <20260923132113.5564B1F000FF@smtp.kernel.org> (raw)
In-Reply-To: <20260923131323.1099979-2-sander.speetjens@gmail.com>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] dt-bindings: minimum and maximum constraints are ignored due to array isolation
--

commit ff7cdbdeb8fcd609ef36f409f92bd2d94dc107d7
Author: Sander Speetjens <sander.speetjens@gmail.com>

dt-bindings: rtc: Add property for Raspberry Pi 5 RTC

The Raspberry Pi 5 has a built-in RTC that can be battery-backed
via the VBAT pin. Expose the trickle-voltage-millivolt DT property so the
driver can program the correct charge voltage for board specific
configurations with the attached battery.

> diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
> index 983ea80eaec97..9349fc8908a50 100644
> --- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
> +++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
> @@ -133,6 +133,13 @@ properties:
>      required:
>        - compatible
>  
> +  trickle-voltage-millivolt:
> +    allOf:
> +      - $ref: /schemas/rtc/rtc.yaml#/properties/trickle-voltage-millivolt
> +      - $ref: /schemas/types.yaml#/definitions/uint32
> +      - minimum: 1300
> +        maximum: 5000

[Severity: Low]
Are the minimum and maximum constraints ignored here due to being placed in a
separate dictionary under allOf?

In dt-schema, properties using scalar types like uint32 are parsed as arrays.
The JSON Schema minimum and maximum keywords only apply to numeric instances,
so when applied to an array, they are silently ignored. The dt-schema
preprocessor fixes this by pushing constraints into the items schema, but only
if they reside in the exact same dictionary as the reference to
/schemas/types.yaml#/definitions/uint32.

Because minimum and maximum are placed in a separate dictionary within the
allOf list, the preprocessor misses them, leaving them ineffective. Out-of-bounds
trickle-voltage-millivolt values could silently pass dt_binding_check validation.

> +
>  required:
>    - compatible
>    - mboxes

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260923131323.1099979-1-sander.speetjens@gmail.com?part=1

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

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23 13:13 [PATCH v4 0/2] Raspberry Pi 5 RTC driver Sander Speetjens
2026-09-23 13:13 ` [PATCH v4 1/2] dt-bindings: rtc: Add property for Raspberry Pi 5 RTC Sander Speetjens
2026-09-23 13:21   ` sashiko-bot [this message]
2026-09-23 16:37   ` Conor Dooley
2026-09-23 16:46     ` Sander Speetjens
2026-09-23 16:49       ` Conor Dooley
2026-09-23 13:13 ` [PATCH v4 2/2] rtc: Add Raspberry Pi 5 RTC driver Sander Speetjens
2026-09-23 13:29   ` sashiko-bot

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=20260923132113.5564B1F000FF@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=alexandre.belloni@bootlin.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-rtc@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sander.speetjens@gmail.com \
    --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