diff mbox series

[RFC,net-next,04/12] dt-bindings: reset: Add lan966x switch reset bindings

Message ID 20210920095218.1108151-5-horatiu.vultur@microchip.com
State RFC
Headers show
Series Add lan966x driver | expand

Commit Message

Horatiu Vultur Sept. 20, 2021, 9:52 a.m. UTC
Document the lan966x switch reset device driver bindings

Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
---
 .../bindings/reset/lan966x,rst.yaml           | 58 +++++++++++++++++++
 1 file changed, 58 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/reset/lan966x,rst.yaml

Comments

Rob Herring (Arm) Sept. 23, 2021, 12:49 p.m. UTC | #1
On Mon, Sep 20, 2021 at 11:52:10AM +0200, Horatiu Vultur wrote:
> Document the lan966x switch reset device driver bindings
> 
> Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
> ---
>  .../bindings/reset/lan966x,rst.yaml           | 58 +++++++++++++++++++
>  1 file changed, 58 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/reset/lan966x,rst.yaml
> 
> diff --git a/Documentation/devicetree/bindings/reset/lan966x,rst.yaml b/Documentation/devicetree/bindings/reset/lan966x,rst.yaml
> new file mode 100644
> index 000000000000..97d6334e4e0a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/reset/lan966x,rst.yaml
> @@ -0,0 +1,58 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: "http://devicetree.org/schemas/reset/lan966x,rst.yaml#"
> +$schema: "http://devicetree.org/meta-schemas/core.yaml#"
> +
> +title: Microchip lan966x Switch Reset Controller
> +
> +maintainers:
> +  - Horatiu Vultur <horatiu.vultur@microchip.com>
> +  - UNGLinuxDriver@microchip.com
> +
> +description: |
> +  The Microchip lan966x Switch provides reset control and implements the
> +  following
> +  functions
> +    - One Time Switch Core Reset (Soft Reset)

This looks like just some grouping of separate reset controllers. If 
there are 3 h/w blocks providing resets, then the DT should have 3 reset 
providers.

> +
> +properties:
> +  $nodename:
> +    pattern: "^reset-controller$"

Don't use 'pattern' for fixed strings.

> +
> +  compatible:
> +    const: microchip,lan966x-switch-reset
> +
> +  "#reset-cells":
> +    const: 1
> +
> +  cpu-syscon:
> +    $ref: "/schemas/types.yaml#/definitions/phandle"
> +    description: syscon used to access CPU reset
> +
> +  switch-syscon:
> +    $ref: "/schemas/types.yaml#/definitions/phandle"
> +    description: syscon used to access SWITCH reset
> +
> +  chip-syscon:
> +    $ref: "/schemas/types.yaml#/definitions/phandle"
> +    description: syscon used to access CHIP reset
> +
> +required:
> +  - compatible
> +  - "#reset-cells"
> +  - cpu-syscon
> +  - switch-syscon
> +  - chip-syscon
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    reset: reset-controller {
> +        compatible = "microchip,lan966x-switch-reset";
> +        #reset-cells = <1>;
> +        cpu-syscon = <&cpu_ctrl>;
> +        switch-syscon = <&switch_ctrl>;
> +        chip-syscon = <&chip_ctrl>;
> +    };
> -- 
> 2.31.1
> 
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/reset/lan966x,rst.yaml b/Documentation/devicetree/bindings/reset/lan966x,rst.yaml
new file mode 100644
index 000000000000..97d6334e4e0a
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/lan966x,rst.yaml
@@ -0,0 +1,58 @@ 
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: "http://devicetree.org/schemas/reset/lan966x,rst.yaml#"
+$schema: "http://devicetree.org/meta-schemas/core.yaml#"
+
+title: Microchip lan966x Switch Reset Controller
+
+maintainers:
+  - Horatiu Vultur <horatiu.vultur@microchip.com>
+  - UNGLinuxDriver@microchip.com
+
+description: |
+  The Microchip lan966x Switch provides reset control and implements the
+  following
+  functions
+    - One Time Switch Core Reset (Soft Reset)
+
+properties:
+  $nodename:
+    pattern: "^reset-controller$"
+
+  compatible:
+    const: microchip,lan966x-switch-reset
+
+  "#reset-cells":
+    const: 1
+
+  cpu-syscon:
+    $ref: "/schemas/types.yaml#/definitions/phandle"
+    description: syscon used to access CPU reset
+
+  switch-syscon:
+    $ref: "/schemas/types.yaml#/definitions/phandle"
+    description: syscon used to access SWITCH reset
+
+  chip-syscon:
+    $ref: "/schemas/types.yaml#/definitions/phandle"
+    description: syscon used to access CHIP reset
+
+required:
+  - compatible
+  - "#reset-cells"
+  - cpu-syscon
+  - switch-syscon
+  - chip-syscon
+
+additionalProperties: false
+
+examples:
+  - |
+    reset: reset-controller {
+        compatible = "microchip,lan966x-switch-reset";
+        #reset-cells = <1>;
+        cpu-syscon = <&cpu_ctrl>;
+        switch-syscon = <&switch_ctrl>;
+        chip-syscon = <&chip_ctrl>;
+    };