Skip to contentSkip to conversation

dt-bindings: reset: convert the xlnx,zynqmp-reset.txt to yaml

PATCH Superseded Piyush Mehta 2 participants 3 messages Jun 9, 2023

Subsystems (4)

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dt-bindings: reset: convert the xlnx,zynqmp-reset.txt to yaml

Convert the binding to DT schema format. It also updates the reset-controller description.

---
- Addressed the Krzysztof review comment:
- Update DT binding to fix the dt_binding_check warning.

---
 .../bindings/reset/xlnx,zynqmp-reset.txt      | 55 ----------------
 .../bindings/reset/xlnx,zynqmp-reset.yaml     | 64 +++++++++++++++++++
 2 files changed, 64 insertions(+), 55 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.txt
 create mode 100644 Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml
Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.txt deleted +0 -55
deleted file mode 100644
index ed836868dbf1..000000000000
@@ -1,55 +0,0 @@
---------------------------------------------------------------------------
- =  Zynq UltraScale+ MPSoC and Versal reset driver binding =
---------------------------------------------------------------------------
-The Zynq UltraScale+ MPSoC and Versal has several different resets.
-
-See Chapter 36 of the Zynq UltraScale+ MPSoC TRM (UG) for more information
-about zynqmp resets.
-
-Please also refer to reset.txt in this directory for common reset
-controller binding usage.
-
-Required Properties:
-- compatible:	"xlnx,zynqmp-reset" for Zynq UltraScale+ MPSoC platform
-		"xlnx,versal-reset" for Versal platform
-- #reset-cells:	Specifies the number of cells needed to encode reset
-		line, should be 1
-
--------
-Example
--------
-
-firmware {
-	zynqmp_firmware: zynqmp-firmware {
-		compatible = "xlnx,zynqmp-firmware";
-		method = "smc";
-
-		zynqmp_reset: reset-controller {
-			compatible = "xlnx,zynqmp-reset";
-			#reset-cells = <1>;
-		};
-	};
-};
-
-Specifying reset lines connected to IP modules
-==============================================
-
-Device nodes that need access to reset lines should
-specify them as a reset phandle in their corresponding node as
-specified in reset.txt.
-
-For list of all valid reset indices for Zynq UltraScale+ MPSoC see
-<dt-bindings/reset/xlnx-zynqmp-resets.h>
-For list of all valid reset indices for Versal see
-<dt-bindings/reset/xlnx-versal-resets.h>
-
-Example:
-
-serdes: zynqmp_phy@fd400000 {
-	...
-
-	resets = <&zynqmp_reset ZYNQMP_RESET_SATA>;
-	reset-names = "sata_rst";
-
-	...
-};
Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml new file +64 -0

64 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw
Quoted 8 lines · Piyush Mehta

Convert the binding to DT schema format. It also updates the reset-controller description.

---
- Addressed the Krzysztof review comment:
- Update DT binding to fix the dt_binding_check warning.

...

Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml line 7

Quoted 13 lines
Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml new file +7 -0
new file mode 100644
index 000000000000..a39b17599e05
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/xlnx,zynqmp-reset.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Zynq UltraScale+ MPSoC and Versal reset binding

Drop "binding"

Quoted 30 lines
Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml new file +30 -0
+
+maintainers:
+  - Piyush Mehta <[email protected]>
+
+description: |
+  The Zynq UltraScale+ MPSoC and Versal has several different resets.
+
+  The PS reset subsystem is responsible for handling the external reset
+  input to the device and that all internal reset requirements are met
+  for the system (as a whole) and for the functional units.
+
+  Please also refer to reset.txt in this directory for common reset
+  controller binding usage. Device nodes that need access to reset
+  lines should specify them as a reset phandle in their corresponding
+  node as specified in reset.txt.
+
+  For list of all valid reset indices for Zynq UltraScale+ MPSoC
+  <dt-bindings/reset/xlnx-zynqmp-resets.h>
+
+  For list of all valid reset indices for Versal
+  <dt-bindings/reset/xlnx-versal-resets.h>
+
+properties:
+  compatible:
+    enum:
+      - xlnx,zynqmp-reset
+      - xlnx,versal-reset
+
+  "#reset-cells":
+    const: 1

Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml line 47

Quoted 10 lines
Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml new file +10 -0
+
+required:
+  - compatible
+  - "#reset-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/reset/xlnx-zynqmp-resets.h>

Drop, won't be needed after removing unrelated parts.

Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml line 49

Quoted 2 lines
Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml new file +2 -0
+
+    firmware {

Drop

Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml line 50

Quoted 1 line
Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml new file +1 -0
+        zynqmp_firmware: zynqmp-firmware {

Drop, three level of indentations for that simple reset-controller...

Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml line 62

Quoted 12 lines
Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml new file +12 -0
+            zynqmp_reset: reset-controller {
+                compatible = "xlnx,zynqmp-reset";
+                #reset-cells = <1>;
+            };
+        };
+    };
+
+    /* Specifying sata reset control of devices */
+    sata {
+        resets = <&zynqmp_reset ZYNQMP_RESET_SATA>;
+        reset-names = "sata_rst";
+    };

Drop this - not related.

Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml line 64

Quoted 2 lines
Documentation/devicetree/bindings/reset/xlnx,zynqmp-reset.yaml new file +2 -0
+
+...

Best regards,
Krzysztof

#2 lore raw
In reply to Piyush Mehta
Quoted 4 lines · Piyush Mehta

Convert the binding to DT schema format. It also updates the reset-controller description.

Quoted 8 lines

---
- Addressed the Krzysztof review comment:
- Update DT binding to fix the dt_binding_check warning.

---
 .../bindings/reset/xlnx,zynqmp-reset.txt      | 55 ----------------
 .../bindings/reset/xlnx,zynqmp-reset.yaml     | 64 +++++++++++++++++++

You forgot to update xlnx,zynqmp-firmware.yaml. It was wrong from the beginning, but now you can fix it in this commit.

Best regards,
Krzysztof