[PATCH 1/2] Documentation: Add GPIO reset binding to reset binding documentation

From: Philipp Zabel
Date: Fri Dec 20 2013 - 06:52:44 EST


Signed-off-by: Philipp Zabel <p.zabel@xxxxxxxxxxxxxx>
---
I'm not quite sure about whether the reset-gpio-names property should be used,
since the current GPIO scheme of prefixing the name would allow to add the
initially-in-reset property quite easily:
reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>, <&gpio5 12 GPIO_ACTIVE_HIGH>;
reset-gpio-names = "core", "phy";
vs
core-reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
phy-reset-gpios = <&gpio5 12 GPIO_ACTIVE_HIGH>;
phy-reset-initially-asserted;
for example.
---
Documentation/devicetree/bindings/reset/reset.txt | 26 +++++++++++++++++++++--
1 file changed, 24 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/reset/reset.txt b/Documentation/devicetree/bindings/reset/reset.txt
index 31db6ff..e40c6a7 100644
--- a/Documentation/devicetree/bindings/reset/reset.txt
+++ b/Documentation/devicetree/bindings/reset/reset.txt
@@ -2,8 +2,8 @@

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.
+standalone chips are most likely better represented as GPIOs, ideally using a
+common scheme as described below.

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
@@ -56,6 +56,20 @@ 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.

+= GPIO Reset consumers =
+
+For the common case of reset lines controlled by GPIOs, the GPIO binding
+documented in devicetree/bindings/gpio/gpio.txt should be used:
+
+Required properties:
+reset-gpios: List of reset GPIOs using standard GPIO bindings.
+
+Optional properties:
+reset-gpio-names: List of reset signal name strings sorted in the same
+ order as the reset-gpios property. Consumers drivers
+ will use reset-names to match reset signal names with
+ gpio-reset specifiers.
+
For example:

device {
@@ -65,6 +79,14 @@ For example:

This represents a device with a single reset signal named "reset".

+ device2 {
+ reset-gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
+ reset-gpio-names = "nreset";
+ };
+
+This represents a device with a single reset signal named "nreset", controlled
+by an active-low GPIO.
+
bus {
resets = <&rst 10> <&rst 11> <&rst 12> <&rst 11>;
reset-names = "i2s1", "i2s2", "dma", "mixer";
--
1.8.5.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/