Re: [PATCH 2/4] dt-bindings: raspberrypi,bcm2835-firmware: Include 'reboot-mode.yaml'
From: Gregor Herburger
Date: Tue Jun 30 2026 - 09:56:58 EST
Hi Conor,
On Fri, Jun 26, 2026 at 04:57:35PM +0100, Conor Dooley wrote:
> On Fri, Jun 26, 2026 at 09:35:05AM +0200, Gregor Herburger wrote:
> > The Raspberry Pi firmware allows to set a reboot mode called tryboot
> > that allows to try booting from a different partition to allow updating
> > of the boot partition. Allow reboot mode properties by referencing the
> > reboot-mode schema.
> >
> > Signed-off-by: Gregor Herburger <gregor.herburger@xxxxxxxxxxxxx>
> > ---
> > .../devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml | 5 ++++-
> > 1 file changed, 4 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
> > index 983ea80eaec97..30b490e0d9fb3 100644
> > --- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
> > +++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
> > @@ -133,11 +133,14 @@ properties:
> > required:
> > - compatible
> >
> > +allOf:
> > + - $ref: /schemas/power/reset/reboot-mode.yaml#
> > +
> > required:
> > - compatible
> > - mboxes
> >
> > -additionalProperties: false
> > +unevaluatedProperties: false
>
> I think you should keep additionalProperties: false and add
> mode-normal: true
> mode-tryboot: true
>
> (I don't know if the latter works though, you may need to have a $ref to
> uint32-array).
>
> What you've done permits freeform reboot modes, but I think only normal
> and tryboot are valid?
Ah yes good point. I do think it should be restricted to
'mode-{normal,tryboot}'.
Sashiko also suggested to set maxItems to 1 and I think that is a good idea as
well, because afaik the firmware only accepts a 32bit value for the reboot flag.
The $ref to uin32 is not needed that is already enforced by the
patternProperties "^mode-.*$": in reboot-mode.yaml.
Therefore I will add the following (and keep additionalProperties: false):
properties:
...
mode-normal:
maxItems: 1
mode-tryboot:
maxItems: 1
allOf:
- $ref: /schemas/power/reset/reboot-mode.yaml#
I will do some more testing and send a v2 later.
Regards
--
Gregor Herburger
Linutronix GmbH | Bahnhofstrasse 3 | D-88690 Uhldingen-Mühlhofen
Phone: +49 7556 25 999 35; Fax.: +49 7556 25 999 99
Hinweise zum Datenschutz finden Sie hier (Informations on data privacy
can be found here): https://linutronix.de/legal/data-protection.php
Linutronix GmbH | Firmensitz (Registered Office): Uhldingen-Mühlhofen |
Registergericht (Registration Court): Amtsgericht Freiburg i.Br., HRB700
806 | Geschäftsführer (Managing Directors): Dr. Wilfried Wessner,
Katharina Kopp, Alexander Gieringer