diff mbox series

[1/5] dt-bindings: reset: ocelot: Add documentation for 'microchip,reset-switch-core' property

Message ID 20201116171159.1735315-2-gregory.clement@bootlin.com (mailing list archive)
State Not Applicable, archived
Headers show
Series Improve reset for ocelot and add support for new platfrom | expand

Commit Message

Gregory CLEMENT Nov. 16, 2020, 5:11 p.m. UTC
From: Lars Povlsen <lars.povlsen@microchip.com>

This documents the 'microchip,reset-switch-core' property in the
ocelot-reset driver.

Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
---
 .../devicetree/bindings/power/reset/ocelot-reset.txt        | 6 ++++++
 1 file changed, 6 insertions(+)

Comments

Alexandre Belloni Nov. 18, 2020, 10:59 a.m. UTC | #1
On 16/11/2020 18:11:55+0100, Gregory CLEMENT wrote:
> From: Lars Povlsen <lars.povlsen@microchip.com>
> 
> This documents the 'microchip,reset-switch-core' property in the
> ocelot-reset driver.
> 
> Signed-off-by: Lars Povlsen <lars.povlsen@microchip.com>
> ---
>  .../devicetree/bindings/power/reset/ocelot-reset.txt        | 6 ++++++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/power/reset/ocelot-reset.txt b/Documentation/devicetree/bindings/power/reset/ocelot-reset.txt
> index 4d530d815484..20fff03753ad 100644
> --- a/Documentation/devicetree/bindings/power/reset/ocelot-reset.txt
> +++ b/Documentation/devicetree/bindings/power/reset/ocelot-reset.txt
> @@ -9,9 +9,15 @@ microchip Sparx5 armv8 SoC's.
>  Required Properties:
>   - compatible: "mscc,ocelot-chip-reset" or "microchip,sparx5-chip-reset"
>  
> +Optional properties:
> +- microchip,reset-switch-core : Perform a switch core reset at the
> +  time of driver load. This is may be used to initialize the switch
> +  core to a known state (before other drivers are loaded).
> +

If this is to be used by the switchdev driver, then I would simply
register this reset as a proper reset controller (with the  driver/reset
API) and consume that from the switchdev driver.

However, the switch may also be configured from userspace in existing
products. In this case you'd have to expose a reset interface, either
from the drivers/reset core or with a specific consumer.

My point is that this property is not necessary.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/power/reset/ocelot-reset.txt b/Documentation/devicetree/bindings/power/reset/ocelot-reset.txt
index 4d530d815484..20fff03753ad 100644
--- a/Documentation/devicetree/bindings/power/reset/ocelot-reset.txt
+++ b/Documentation/devicetree/bindings/power/reset/ocelot-reset.txt
@@ -9,9 +9,15 @@  microchip Sparx5 armv8 SoC's.
 Required Properties:
  - compatible: "mscc,ocelot-chip-reset" or "microchip,sparx5-chip-reset"
 
+Optional properties:
+- microchip,reset-switch-core : Perform a switch core reset at the
+  time of driver load. This is may be used to initialize the switch
+  core to a known state (before other drivers are loaded).
+
 Example:
 	reset@1070008 {
 		compatible = "mscc,ocelot-chip-reset";
 		reg = <0x1070008 0x4>;
+		microchip,reset-switch-core;
 	};