Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Gregor Herburger" <gregor.herburger@linutronix.de>
Cc: conor+dt@kernel.org, devicetree@vger.kernel.org, robh@kernel.org
Subject: Re: [PATCH v2 2/4] dt-bindings: raspberrypi,bcm2835-firmware: Include 'reboot-mode.yaml'
Date: Tue, 30 Jun 2026 21:12:12 +0000	[thread overview]
Message-ID: <20260630211212.C83A01F00A3A@smtp.kernel.org> (raw)
In-Reply-To: <20260630-rpi-tryboot-v2-2-f68d2dc6aa27@linutronix.de>

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Medium] The DT schema inadvertently rejects generic reboot mode properties due to the retention of `additionalProperties: false` alongside a `$ref` in `allOf`, contradicting the stated intent.
--

commit f839a4f18593a7083b268a49226464a9e0f0e8b5
Author: Gregor Herburger <gregor.herburger@linutronix.de>

dt-bindings: raspberrypi,bcm2835-firmware: Include 'reboot-mode.yaml'

This commit allows reboot mode properties by referencing the
reboot-mode.yaml schema for the Raspberry Pi firmware. It restricts the
maxItems to 1 for specific modes because the firmware accepts a 32-bit
reboot flag.

> diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
> index 983ea80eaec97..28c5713860468 100644
> --- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
> +++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
[ ... ]
> @@ -133,6 +133,15 @@ properties:
>      required:
>        - compatible
>  
> +  mode-normal:
> +    maxItems: 1
> +
> +  mode-tryboot:
> +    maxItems: 1
> +
> +allOf:
> +  - $ref: /schemas/power/reset/reboot-mode.yaml#
> +

[Severity: Medium]
Will this schema inadvertently reject generic reboot mode properties due to
the retention of additionalProperties: false later in the file?

Because additionalProperties: false is used instead of
unevaluatedProperties: false, properties defined in the referenced
reboot-mode.yaml schema but omitted here are rejected. This prevents device
trees from using other standard reboot modes like mode-recovery or
mode-bootloader.

Could the mode-normal and mode-tryboot properties be replaced with a single
patternProperties rule for ^mode-.*$ to enforce the 32-bit cell restriction
across all reboot modes, while changing the schema to use
unevaluatedProperties: false?

>  required:
>    - compatible
>    - mboxes

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260630-rpi-tryboot-v2-0-f68d2dc6aa27@linutronix.de?part=2

  reply	other threads:[~2026-06-30 21:12 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-30 20:59 [PATCH v2 0/4] firmware: raspberrypi: Add support for the tryboot mode Gregor Herburger
2026-06-30 20:59 ` [PATCH v2 1/4] firmware: raspberrypi: reorder rpi_firmware_property_tag enum Gregor Herburger
2026-06-30 20:59 ` [PATCH v2 2/4] dt-bindings: raspberrypi,bcm2835-firmware: Include 'reboot-mode.yaml' Gregor Herburger
2026-06-30 21:12   ` sashiko-bot [this message]
2026-07-01  7:24   ` Krzysztof Kozlowski
2026-06-30 20:59 ` [PATCH v2 3/4] firmware: raspberrypi: Add reboot mode support Gregor Herburger
2026-06-30 21:13   ` sashiko-bot
2026-06-30 21:57   ` Stefan Wahren
2026-07-02  7:50     ` Gregor Herburger
2026-06-30 20:59 ` [PATCH v2 4/4] arm64: dts: broadcom: bcm2712: Add reboot modes to firmware node Gregor Herburger
2026-06-30 21:09   ` 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=20260630211212.C83A01F00A3A@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=gregor.herburger@linutronix.de \
    --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