Re: [PATCH 2/4] dt-bindings: raspberrypi,bcm2835-firmware: Include 'reboot-mode.yaml'

From: Conor Dooley

Date: Tue Jun 30 2026 - 13:08:16 EST


On Tue, Jun 30, 2026 at 03:56:32PM +0200, Gregor Herburger wrote:
> 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.

Cool, sounds good to me.

Attachment: signature.asc
Description: PGP signature