diff mbox series

[1/9] dt-bindings: reset: Add a binding for the RPi Firmware USB reset

Message ID 20200608192701.18355-2-nsaenzjulienne@suse.de (mailing list archive)
State Superseded
Headers show
Series Raspberry Pi 4 USB firmware initialization rework | expand

Commit Message

Nicolas Saenz Julienne June 8, 2020, 7:26 p.m. UTC
The firmware running on the RPi VideoCore can be used to reset and
initialize the board's xHCI controller. The reset controller is passed
to the PCI device through the DT, hence this binding.

Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
---
 .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 21 +++++++++++++++++++
 1 file changed, 21 insertions(+)

Comments

Florian Fainelli June 8, 2020, 7:58 p.m. UTC | #1
On 6/8/2020 12:26 PM, Nicolas Saenz Julienne wrote:
> The firmware running on the RPi VideoCore can be used to reset and
> initialize the board's xHCI controller. The reset controller is passed
> to the PCI device through the DT, hence this binding.
> 
> Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> ---
>  .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 21 +++++++++++++++++++
>  1 file changed, 21 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
> index b48ed875eb8e..8f9d0986c28f 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"
>  
> +  usb-reset:
> +    type: object
> +
> +    properties:
> +      compatible:
> +        const: raspberrypi,firmware-usb-reset

I would make this less USB centric, even if this is the only consumer of
the reset controller for now, there could, in premise be other blocks
that require a reset (e.g.: V3D) that would involve going to the VPU
firmware because of various requirements (security, register blocking etc.).

> +
> +      "#clock-cells":

Did not you mean #reset-cells here?


> +        const: 0
> +        description: >
> +          There is only one reset line available, so no need for cell decoding.
> +
> +    required:
> +      - compatible
> +      - "#reset-cells"
> +
>      additionalProperties: false
>  
>  required:
> @@ -55,5 +71,10 @@ examples:
>              compatible = "raspberrypi,firmware-clocks";
>              #clock-cells = <1>;
>          };
> +
> +        usb_reset: usb-reset {
> +            compatible = "raspberrypi,firmware-usb-reset";
> +            #reset-cells = <0>;
> +        };
>      };
>  ...
>
Nicolas Saenz Julienne June 9, 2020, 11:14 a.m. UTC | #2
On Mon, 2020-06-08 at 12:58 -0700, Florian Fainelli wrote:
> 
> On 6/8/2020 12:26 PM, Nicolas Saenz Julienne wrote:
> > The firmware running on the RPi VideoCore can be used to reset and
> > initialize the board's xHCI controller. The reset controller is passed
> > to the PCI device through the DT, hence this binding.
> > 
> > Signed-off-by: Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
> > ---
> >  .../arm/bcm/raspberrypi,bcm2835-firmware.yaml | 21 +++++++++++++++++++
> >  1 file changed, 21 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-
> > firmware.yaml
> > b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-
> > firmware.yaml
> > index b48ed875eb8e..8f9d0986c28f 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"
> >  
> > +  usb-reset:
> > +    type: object
> > +
> > +    properties:
> > +      compatible:
> > +        const: raspberrypi,firmware-usb-reset
> 
> I would make this less USB centric, even if this is the only consumer of
> the reset controller for now, there could, in premise be other blocks
> that require a reset (e.g.: V3D) that would involve going to the VPU
> firmware because of various requirements (security, register blocking etc.).

I like the idea, I'll introduce this in v2.

> > +
> > +      "#clock-cells":
> 
> Did not you mean #reset-cells here?
> 

Sorry I missed that.

Regards,
Nicolas
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml b/Documentation/devicetree/bindings/arm/bcm/raspberrypi,bcm2835-firmware.yaml
index b48ed875eb8e..8f9d0986c28f 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"
 
+  usb-reset:
+    type: object
+
+    properties:
+      compatible:
+        const: raspberrypi,firmware-usb-reset
+
+      "#clock-cells":
+        const: 0
+        description: >
+          There is only one reset line available, so no need for cell decoding.
+
+    required:
+      - compatible
+      - "#reset-cells"
+
     additionalProperties: false
 
 required:
@@ -55,5 +71,10 @@  examples:
             compatible = "raspberrypi,firmware-clocks";
             #clock-cells = <1>;
         };
+
+        usb_reset: usb-reset {
+            compatible = "raspberrypi,firmware-usb-reset";
+            #reset-cells = <0>;
+        };
     };
 ...