diff mbox series

[v2,1/2] dt-bindings: reset: Add lan966x support

Message ID 20211012114238.2060101-2-horatiu.vultur@microchip.com
State Superseded, archived
Headers show
Series Extend Sparx5 switch reset driver for lan966x | expand

Checks

Context Check Description
robh/checkpatch success
robh/dt-meta-schema success
robh/dtbs-check success

Commit Message

Horatiu Vultur Oct. 12, 2021, 11:42 a.m. UTC
This adds support for lan966x.

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
 .../devicetree/bindings/reset/microchip,rst.yaml   | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

Comments

Philipp Zabel Oct. 12, 2021, 1:35 p.m. UTC | #1
Hi Horatiu,

On Tue, 2021-10-12 at 13:42 +0200, Horatiu Vultur wrote:
> This adds support for lan966x.
> 
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> ---
>  .../devicetree/bindings/reset/microchip,rst.yaml   | 14 +++++++++++++-
>  1 file changed, 13 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/reset/microchip,rst.yaml b/Documentation/devicetree/bindings/reset/microchip,rst.yaml
> index 370579aeeca1..622cf3d0455d 100644
> --- a/Documentation/devicetree/bindings/reset/microchip,rst.yaml
> +++ b/Documentation/devicetree/bindings/reset/microchip,rst.yaml
> @@ -20,7 +20,11 @@ properties:
>      pattern: "^reset-controller@[0-9a-f]+$"
>  
>    compatible:
> -    const: microchip,sparx5-switch-reset
> +    oneOf:
> +      - items:
> +          - const: microchip,sparx5-switch-reset
> +      - items:
> +          - const: microchip,lan966x-switch-reset
>  
>    reg:
>      items:
> @@ -37,6 +41,14 @@ properties:
>      $ref: "/schemas/types.yaml#/definitions/phandle"
>      description: syscon used to access CPU reset
>  
> +  cuphy-syscon:
> +    $ref: "/schemas/types.yaml#/definitions/phandle"
> +    description: syscon used to access CuPHY
> +
> +  gpios:

From the description I'd expect this to be called phy-reset-gpios.

> +    description: used for release of reset of the external PHY
> +    maxItems: 1
> +

Shouldn't an external PHY be described as a separate DT node, with its
own reset gpio?

regards
Philipp
Horatiu Vultur Oct. 12, 2021, 2:40 p.m. UTC | #2
The 10/12/2021 15:35, Philipp Zabel wrote:

Hi Philipp,
> 
> Hi Horatiu,
> 
> On Tue, 2021-10-12 at 13:42 +0200, Horatiu Vultur wrote:
> > This adds support for lan966x.
> >
> > Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> > ---
> >  .../devicetree/bindings/reset/microchip,rst.yaml   | 14 +++++++++++++-
> >  1 file changed, 13 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/reset/microchip,rst.yaml b/Documentation/devicetree/bindings/reset/microchip,rst.yaml
> > index 370579aeeca1..622cf3d0455d 100644
> > --- a/Documentation/devicetree/bindings/reset/microchip,rst.yaml
> > +++ b/Documentation/devicetree/bindings/reset/microchip,rst.yaml
> > @@ -20,7 +20,11 @@ properties:
> >      pattern: "^reset-controller@[0-9a-f]+$"
> >
> >    compatible:
> > -    const: microchip,sparx5-switch-reset
> > +    oneOf:
> > +      - items:
> > +          - const: microchip,sparx5-switch-reset
> > +      - items:
> > +          - const: microchip,lan966x-switch-reset
> >
> >    reg:
> >      items:
> > @@ -37,6 +41,14 @@ properties:
> >      $ref: "/schemas/types.yaml#/definitions/phandle"
> >      description: syscon used to access CPU reset
> >
> > +  cuphy-syscon:
> > +    $ref: "/schemas/types.yaml#/definitions/phandle"
> > +    description: syscon used to access CuPHY
> > +
> > +  gpios:
> 
> From the description I'd expect this to be called phy-reset-gpios.

Yes, I can rename this.

> 
> > +    description: used for release of reset of the external PHY
> > +    maxItems: 1
> > +
> 
> Shouldn't an external PHY be described as a separate DT node, with its
> own reset gpio?

I am not sure, this is more board specific than PHY specific. On lan966x
ung8290 board, the external PHYs are kept in reset until this GPIO is toggled.

> 
> regards
> Philipp
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/reset/microchip,rst.yaml b/Documentation/devicetree/bindings/reset/microchip,rst.yaml
index 370579aeeca1..622cf3d0455d 100644
--- a/Documentation/devicetree/bindings/reset/microchip,rst.yaml
+++ b/Documentation/devicetree/bindings/reset/microchip,rst.yaml
@@ -20,7 +20,11 @@  properties:
     pattern: "^reset-controller@[0-9a-f]+$"
 
   compatible:
-    const: microchip,sparx5-switch-reset
+    oneOf:
+      - items:
+          - const: microchip,sparx5-switch-reset
+      - items:
+          - const: microchip,lan966x-switch-reset
 
   reg:
     items:
@@ -37,6 +41,14 @@  properties:
     $ref: "/schemas/types.yaml#/definitions/phandle"
     description: syscon used to access CPU reset
 
+  cuphy-syscon:
+    $ref: "/schemas/types.yaml#/definitions/phandle"
+    description: syscon used to access CuPHY
+
+  gpios:
+    description: used for release of reset of the external PHY
+    maxItems: 1
+
 required:
   - compatible
   - reg