linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Philipp Zabel <p.zabel@pengutronix.de>
To: devicetree@vger.kernel.org
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Neil Armstrong <narmstrong@baylibre.com>,
	linux-kernel@vger.kernel.org, Stephen Warren <swarren@nvidia.com>
Subject: [PATCH 14/14] dt-bindings: reset: Convert to yaml
Date: Thu,  7 Apr 2022 17:43:38 +0200	[thread overview]
Message-ID: <20220407154338.4190674-14-p.zabel@pengutronix.de> (raw)
In-Reply-To: <20220407154338.4190674-1-p.zabel@pengutronix.de>

Convert the common reset controller and reset consumer device tree
bindings to YAML schema.

Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Cc: Stephen Warren <swarren@nvidia.com>
---
 .../bindings/reset/reset-consumer.yaml        | 72 ++++++++++++++++++
 .../bindings/reset/reset-controller.yaml      | 50 +++++++++++++
 .../devicetree/bindings/reset/reset.txt       | 75 -------------------
 3 files changed, 122 insertions(+), 75 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/reset/reset-consumer.yaml
 create mode 100644 Documentation/devicetree/bindings/reset/reset-controller.yaml
 delete mode 100644 Documentation/devicetree/bindings/reset/reset.txt

diff --git a/Documentation/devicetree/bindings/reset/reset-consumer.yaml b/Documentation/devicetree/bindings/reset/reset-consumer.yaml
new file mode 100644
index 000000000000..e17229eb49c0
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/reset-consumer.yaml
@@ -0,0 +1,72 @@
+# SPDX-License-Identifier: GPL-2.0
+# Copyright 2012 Stephen Warren <swarren@nvidia.com>
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/reset-consumer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common reset signal consumer bindings
+
+maintainers:
+  - Philipp Zabel <p.zabel@pengutronix.de>
+
+description: |
+  Hardware blocks typically receive a reset signal. This signal is generated by
+  a reset provider (e.g. power management or clock module) and received by a
+  reset consumer (the module being reset, or a module managing when a sub-
+  ordinate module is reset). This binding exists to represent the consumers of
+  reset signals provided by reset controllers.
+
+  A reset signal is represented by the phandle of the provider, plus a reset
+  specifier - a list of DT cells that represents the reset signal within the
+  provider. The length (number of cells) and semantics of the reset specifier
+  are dictated by the binding of the reset provider, although common schemes
+  are described below.
+
+  A word on where to place reset signal consumers in device tree: It is possible
+  in hardware for a reset signal to affect multiple logically separate HW blocks
+  at once. In this case, it would be unwise to represent this reset signal in
+  the DT node of each affected HW block, since if activated, an unrelated block
+  may be reset. Instead, reset signals should be represented in the DT node
+  where it makes most sense to control it; this may be a bus node if all
+  children of the bus are affected by the reset signal, or an individual HW
+  block node for dedicated reset signals. The intent of this binding is to give
+  appropriate software access to the reset signals in order to manage the HW,
+  rather than to slavishly enumerate the reset signal that affects each HW
+  block.
+
+select: true
+
+properties:
+  resets:
+    $ref: /schemas/types.yaml#/definitions/phandle-array
+    description: |
+      List of phandle and reset specifier pairs, one pair for each reset signal
+      that affects the device, or that the device manages.
+      Note: if the reset provider specifies '0' for "#reset-cells", then only
+      the phandle portion of the pair will appear.
+
+  reset-names:
+    description: |
+      List of reset signal name strings sorted in the same order as the resets
+      property. Consumers drivers will use "reset-names" to match reset signal
+      names with reset specifiers.
+
+additionalProperties: true
+
+examples:
+  - |
+    // A device with a single reset signal named "reset".
+    device {
+        resets = <&rst 20>;
+        reset-names = "reset";
+    };
+  - |
+    // A bus that controls the reset signal of each of four subordinate
+    // devices. Consider for example a bus that fails to operate unless no
+    // child device has reset asserted.
+    bus {
+        resets = <&rst 10>, <&rst 11>, <&rst 12>, <&rst 11>;
+        reset-names = "i2s1", "i2s2", "dma", "mixer";
+    };
+...
diff --git a/Documentation/devicetree/bindings/reset/reset-controller.yaml b/Documentation/devicetree/bindings/reset/reset-controller.yaml
new file mode 100644
index 000000000000..33468f94f4c2
--- /dev/null
+++ b/Documentation/devicetree/bindings/reset/reset-controller.yaml
@@ -0,0 +1,50 @@
+# SPDX-License-Identifier: GPL-2.0
+# Copyright 2021 Stephen Warren <swarren@nvidia.com>
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/reset/reset-controller.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Common reset controller provider bindings
+
+maintainers:
+  - Philipp Zabel <p.zabel@pengutronix.de>
+
+description: |
+  This binding is intended to represent the hardware reset signals present
+  internally in most IC (SoC, FPGA, ...) designs. Reset signals for whole
+  standalone chips are most likely better represented as GPIOs, although there
+  are likely to be exceptions to this rule.
+
+  Hardware blocks typically receive a reset signal. This signal is generated by
+  a reset provider (e.g. power management or clock module) and received by a
+  reset consumer (the module being reset, or a module managing when a sub-
+  ordinate module is reset). This binding exists to represent the provider of
+  one or more reset signals.
+
+select:
+  anyOf:
+    - properties:
+        $nodename:
+          pattern: '^reset-controller'
+    - required:
+        - '#reset-cells'
+
+properties:
+  '#reset-cells':
+    $ref: /schemas/types.yaml#/definitions/uint32
+
+additionalProperties: true
+
+examples:
+  - |
+    // A reset controller providing multiple reset controls
+    rst: reset-controller {
+        #reset-cells = <1>;
+    };
+
+    // A reset consumer receiving a single reset signal with index 0
+    peripheral {
+        resets = <&rst 0>;
+    };
+...
diff --git a/Documentation/devicetree/bindings/reset/reset.txt b/Documentation/devicetree/bindings/reset/reset.txt
deleted file mode 100644
index 31db6ff84908..000000000000
--- a/Documentation/devicetree/bindings/reset/reset.txt
+++ /dev/null
@@ -1,75 +0,0 @@
-= Reset Signal Device Tree Bindings =
-
-This binding is intended to represent the hardware reset signals present
-internally in most IC (SoC, FPGA, ...) designs. Reset signals for whole
-standalone chips are most likely better represented as GPIOs, although there
-are likely to be exceptions to this rule.
-
-Hardware blocks typically receive a reset signal. This signal is generated by
-a reset provider (e.g. power management or clock module) and received by a
-reset consumer (the module being reset, or a module managing when a sub-
-ordinate module is reset). This binding exists to represent the provider and
-consumer, and provide a way to couple the two together.
-
-A reset signal is represented by the phandle of the provider, plus a reset
-specifier - a list of DT cells that represents the reset signal within the
-provider. The length (number of cells) and semantics of the reset specifier
-are dictated by the binding of the reset provider, although common schemes
-are described below.
-
-A word on where to place reset signal consumers in device tree: It is possible
-in hardware for a reset signal to affect multiple logically separate HW blocks
-at once. In this case, it would be unwise to represent this reset signal in
-the DT node of each affected HW block, since if activated, an unrelated block
-may be reset. Instead, reset signals should be represented in the DT node
-where it makes most sense to control it; this may be a bus node if all
-children of the bus are affected by the reset signal, or an individual HW
-block node for dedicated reset signals. The intent of this binding is to give
-appropriate software access to the reset signals in order to manage the HW,
-rather than to slavishly enumerate the reset signal that affects each HW
-block.
-
-= Reset providers =
-
-Required properties:
-#reset-cells:	Number of cells in a reset specifier; Typically 0 for nodes
-		with a single reset output and 1 for nodes with multiple
-		reset outputs.
-
-For example:
-
-	rst: reset-controller {
-		#reset-cells = <1>;
-	};
-
-= Reset consumers =
-
-Required properties:
-resets:		List of phandle and reset specifier pairs, one pair
-		for each reset signal that affects the device, or that the
-		device manages. Note: if the reset provider specifies '0' for
-		#reset-cells, then only the phandle portion of the pair will
-		appear.
-
-Optional properties:
-reset-names:	List of reset signal name strings sorted in the same order as
-		the resets property. Consumers drivers will use reset-names to
-		match reset signal names with reset specifiers.
-
-For example:
-
-	device {
-		resets = <&rst 20>;
-		reset-names = "reset";
-	};
-
-This represents a device with a single reset signal named "reset".
-
-	bus {
-		resets = <&rst 10> <&rst 11> <&rst 12> <&rst 11>;
-		reset-names = "i2s1", "i2s2", "dma", "mixer";
-	};
-
-This represents a bus that controls the reset signal of each of four sub-
-ordinate devices. Consider for example a bus that fails to operate unless no
-child device has reset asserted.
-- 
2.30.2


  parent reply	other threads:[~2022-04-07 15:44 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-04-07 15:43 [PATCH 01/14] dt-bindings: reset: amlogic,meson-axg-audio-arb: Convert to yaml Philipp Zabel
2022-04-07 15:43 ` [PATCH 02/14] dt-bindings: reset: ath79: " Philipp Zabel
2022-04-08 21:03   ` Rob Herring
2022-04-07 15:43 ` [PATCH 03/14] dt-bindings: reset: berlin: " Philipp Zabel
2022-04-08 21:04   ` Rob Herring
2022-04-07 15:43 ` [PATCH 04/14] dt-bindings: reset: bitmain,bm1880-reset: " Philipp Zabel
2022-04-08 21:05   ` Rob Herring
2022-04-07 15:43 ` [PATCH 05/14] dt-bindings: reset: lantiq,reset: " Philipp Zabel
2022-04-08 21:07   ` Rob Herring
2022-04-18 16:34   ` Martin Blumenstingl
2022-05-02 15:39     ` Philipp Zabel
2022-04-07 15:43 ` [PATCH 06/14] dt-bindings: reset: nuvoton,npcm-reset: " Philipp Zabel
2022-04-08 21:08   ` Rob Herring
2022-04-07 15:43 ` [PATCH 07/14] dt-bindings: reset: oxsemi,oxnas-reset: " Philipp Zabel
2022-04-08 15:43   ` Rob Herring
2022-04-07 15:43 ` [PATCH 08/14] dt-bindings: reset: snps,axs10x-reset: " Philipp Zabel
2022-04-08 21:09   ` Rob Herring
2022-04-07 15:43 ` [PATCH 09/14] dt-bindings: reset: snps,dw-reset: " Philipp Zabel
2022-04-08 15:43   ` Rob Herring
2022-04-08 18:25   ` Rob Herring
2022-04-11 13:59     ` Philipp Zabel
2022-04-07 15:43 ` [PATCH 10/14] dt-bindings: reset: snps,hsdk-reset: " Philipp Zabel
2022-04-08 21:12   ` Rob Herring
2022-04-07 15:43 ` [PATCH 11/14] dt-bindings: reset: socfpga: " Philipp Zabel
2022-04-08 21:12   ` Rob Herring
2022-04-07 15:43 ` [PATCH 12/14] dt-bindings: reset: st,sti-picophyreset: " Philipp Zabel
2022-04-08 21:13   ` Rob Herring
2022-04-07 15:43 ` [PATCH 13/14] dt-bindings: reset: st,sti-powerdown: " Philipp Zabel
2022-04-08 21:14   ` Rob Herring
2022-04-07 15:43 ` Philipp Zabel [this message]
2022-04-07 20:04   ` [PATCH 14/14] dt-bindings: reset: " Rob Herring
2022-05-05  1:08     ` Stephen Warren
2022-08-25 15:53       ` Rob Herring
2022-08-25 16:17         ` Stephen Warren
2022-04-08 21:03 ` [PATCH 01/14] dt-bindings: reset: amlogic,meson-axg-audio-arb: " Rob Herring
2022-04-18 16:32 ` Martin Blumenstingl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220407154338.4190674-14-p.zabel@pengutronix.de \
    --to=p.zabel@pengutronix.de \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=narmstrong@baylibre.com \
    --cc=robh+dt@kernel.org \
    --cc=swarren@nvidia.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).