Re: [PATCH v3 1/9] dt-bindings: reset: Add a binding for the RPi Firmware reset controller

From: Nicolas Saenz Julienne
Date: Wed Jun 17 2020 - 06:22:22 EST


Hi,

On Wed, 2020-06-17 at 11:55 +0200, Philipp Zabel wrote:
> Hi Nicolas,
>
> On Fri, 2020-06-12 at 19:13 +0200, Nicolas Saenz Julienne wrote:
> > The firmware running on the RPi VideoCore can be used to reset and
> > initialize HW controlled by the firmware.
> >
> > Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxx>
> > Reviewed-by: Florian Fainelli <f.fainelli@xxxxxxxxx>
> >
> > ---
> > Changes since v2:
> > - Add include file for reset IDs
> >
> > Changes since v1:
> > - Correct cells binding as per Florian's comment
> > - Change compatible string to be more generic
> >
> > .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 21 +++++++++++++++++++
> > .../reset/raspberrypi,firmware-reset.h | 13 ++++++++++++
> > 2 files changed, 34 insertions(+)
> > create mode 100644 include/dt-bindings/reset/raspberrypi,firmware-reset.h
> >
> > diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-
> > firmware.yaml
> > b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-
> > firmware.yaml
> > index b48ed875eb8e..23a885af3a28 100644
> > --- a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-
> > firmware.yaml
> > +++ b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-
> > firmware.yaml
> > @@ -39,6 +39,22 @@ properties:
> > - compatible
> > - "#clock-cells"
> >
> > + reset:
> > + type: object
> > +
> > + properties:
> > + compatible:
> > + const: raspberrypi,firmware-reset
> > +
> > + "#reset-cells":
> > + const: 1
> > + description: >
> > + The argument is the ID of the firmware reset line to affect.
> > +
> > + required:
> > + - compatible
> > + - "#reset-cells"
> > +
> > additionalProperties: false
> >
> > required:
> > @@ -55,5 +71,10 @@ examples:
> > compatible = "raspberrypi,firmware-clocks";
> > #clock-cells = <1>;
> > };
> > +
> > + reset: reset {
> > + compatible = "raspberrypi,firmware-reset";
> > + #reset-cells = <1>;
> > + };
> > };
> > ...
> > diff --git a/include/dt-bindings/reset/raspberrypi,firmware-reset.h
> > b/include/dt-bindings/reset/raspberrypi,firmware-reset.h
> > new file mode 100644
> > index 000000000000..1a4f4c792723
> > --- /dev/null
> > +++ b/include/dt-bindings/reset/raspberrypi,firmware-reset.h
> > @@ -0,0 +1,13 @@
> > +/* SPDX-License-Identifier: GPL-2.0 */
> > +/*
> > + * Copyright (c) 2020 Nicolas Saenz Julienne
> > + * Author: Nicolas Saenz Julienne <nsaenzjulienne@xxxxxxxx>
> > + */
> > +
> > +#ifndef _DT_BINDINGS_RASPBERRYPI_FIRMWARE_RESET_H
> > +#define _DT_BINDINGS_RASPBERRYPI_FIRMWARE_RESET_H
> > +
> > +#define RASPBERRYPI_FIRMWARE_RESET_ID_USB 0
> > +#define RASPBERRYPI_FIRMWARE_RESET_NUM_IDS 1
> > +
> > +#endif
>
> Are there going to be any more firmware controlled resets in the future?

There are not right now, but it's likely some will show up in the future. I
have some contenders in mind, which I'll request once we settle on a design
here, but it ultimately depends on what the RPi people decide to implement.

Regards,
Nicolas

Attachment: signature.asc
Description: This is a digitally signed message part