From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751033AbdE3GJQ (ORCPT ); Tue, 30 May 2017 02:09:16 -0400 Received: from mail-pf0-f195.google.com ([209.85.192.195]:34548 "EHLO mail-pf0-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750993AbdE3GJM (ORCPT ); Tue, 30 May 2017 02:09:12 -0400 From: Joel Stanley To: Philipp Zabel , Rob Herring , Mark Rutland Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Benjamin Herrenschmidt , Andrew Jeffery Subject: [PATCH v2 1/2] dt-bindings: reset: Add bindings for basic reset controller Date: Tue, 30 May 2017 15:38:50 +0930 Message-Id: <20170530060851.29923-2-joel@jms.id.au> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170530060851.29923-1-joel@jms.id.au> References: <20170530060851.29923-1-joel@jms.id.au> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This adds the bindings documentation for a basic single-register reset controller. The bindings describe a single 32-bit register that contains up to 32 reset lines, each deasserted by clearing the appropriate bit in the register. Optionally a property can be provided that changes this behaviour to assert on clear. Signed-off-by: Joel Stanley --- V2: Address review from Philipp: - add note about not auto clearing - add property for set to assert behaviour - use a decimal for the bit number Signed-off-by: Joel Stanley --- .../devicetree/bindings/reset/reset-basic.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/reset-basic.txt diff --git a/Documentation/devicetree/bindings/reset/reset-basic.txt b/Documentation/devicetree/bindings/reset/reset-basic.txt new file mode 100644 index 000000000000..c19e5368be67 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/reset-basic.txt @@ -0,0 +1,43 @@ +Basic single-register reset controller +====================================== + +This describes a generic reset controller where the reset lines are controlled +by single bits within a 32-bit memory location. The memory location is assumed +to be part of a syscon regmap. + +By default the bit will be cleared on deassert. This behaviour can be inverted +with the assert-on-clear property mentioned below. + +The bits are assumed to not be auto-clearing, and therefore can be read back to +determine the status. + +Reset controller required properties: + - compatible: should be "reset-basic" + - #reset-cells: must be set to 1 + - reg: reset register location within regmap + +Reset controller optional properties: + - assert-on-clear: add this property when the hardware should clear (set to 0) + the bit should to assert the reset. + When this property is omitted the default is to set the bit to assert the + reset + +Device node required properties: + - resets phandle + - bit number, counting from zero, for the desired reset line. Max is 31. + +Example: + +syscon { + compatible = "syscon"; + + uart_reset: reset-controller@c { + compatible = "reset-basic"; + #reset-cells = <1>; + reg = <0xc>; + }; +} + +&uart { + resets = <&uart_rest 4>; +} -- 2.11.0 From mboxrd@z Thu Jan 1 00:00:00 1970 From: Joel Stanley Subject: [PATCH v2 1/2] dt-bindings: reset: Add bindings for basic reset controller Date: Tue, 30 May 2017 15:38:50 +0930 Message-ID: <20170530060851.29923-2-joel@jms.id.au> References: <20170530060851.29923-1-joel@jms.id.au> Return-path: In-Reply-To: <20170530060851.29923-1-joel-U3u1mxZcP9KHXe+LvDLADg@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Philipp Zabel , Rob Herring , Mark Rutland Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, Benjamin Herrenschmidt , Andrew Jeffery List-Id: devicetree@vger.kernel.org This adds the bindings documentation for a basic single-register reset controller. The bindings describe a single 32-bit register that contains up to 32 reset lines, each deasserted by clearing the appropriate bit in the register. Optionally a property can be provided that changes this behaviour to assert on clear. Signed-off-by: Joel Stanley --- V2: Address review from Philipp: - add note about not auto clearing - add property for set to assert behaviour - use a decimal for the bit number Signed-off-by: Joel Stanley --- .../devicetree/bindings/reset/reset-basic.txt | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 Documentation/devicetree/bindings/reset/reset-basic.txt diff --git a/Documentation/devicetree/bindings/reset/reset-basic.txt b/Documentation/devicetree/bindings/reset/reset-basic.txt new file mode 100644 index 000000000000..c19e5368be67 --- /dev/null +++ b/Documentation/devicetree/bindings/reset/reset-basic.txt @@ -0,0 +1,43 @@ +Basic single-register reset controller +====================================== + +This describes a generic reset controller where the reset lines are controlled +by single bits within a 32-bit memory location. The memory location is assumed +to be part of a syscon regmap. + +By default the bit will be cleared on deassert. This behaviour can be inverted +with the assert-on-clear property mentioned below. + +The bits are assumed to not be auto-clearing, and therefore can be read back to +determine the status. + +Reset controller required properties: + - compatible: should be "reset-basic" + - #reset-cells: must be set to 1 + - reg: reset register location within regmap + +Reset controller optional properties: + - assert-on-clear: add this property when the hardware should clear (set to 0) + the bit should to assert the reset. + When this property is omitted the default is to set the bit to assert the + reset + +Device node required properties: + - resets phandle + - bit number, counting from zero, for the desired reset line. Max is 31. + +Example: + +syscon { + compatible = "syscon"; + + uart_reset: reset-controller@c { + compatible = "reset-basic"; + #reset-cells = <1>; + reg = <0xc>; + }; +} + +&uart { + resets = <&uart_rest 4>; +} -- 2.11.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html