Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753130AbbK1VNO (ORCPT ); Sat, 28 Nov 2015 16:13:14 -0500 Received: from proxima.lp0.eu ([81.2.80.65]:51009 "EHLO proxima.lp0.eu" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752885AbbK1VNM (ORCPT ); Sat, 28 Nov 2015 16:13:12 -0500 To: devicetree@vger.kernel.org, Liam Girdwood , Mark Brown Cc: Rob Herring , Pawel Moll , Mark Rutland , Ian Campbell , Kumar Gala , linux-kernel@vger.kernel.org, Florian Fainelli , Jonas Gorski From: Simon Arlott Subject: [PATCH 1/2] regulator: Add regmap support to regulator-fixed device tree binding Message-ID: <565A18DD.60108@simon.arlott.org.uk> Date: Sat, 28 Nov 2015 21:13:01 +0000 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2428 Lines: 65 Add properties for regmap to the regulator-fixed device tree binding: * Reference the regmap phandle * Specify the enable offset and enable mask * Reuse enable-active-high for regmap This is required for Broadcom BCM63xx SoCs that enable power to individual peripherals by clearing a bit in the miscIddqCtrl register. Signed-off-by: Simon Arlott --- .../bindings/regulator/fixed-regulator.txt | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt index 4fae41d..b499a65 100644 --- a/Documentation/devicetree/bindings/regulator/fixed-regulator.txt +++ b/Documentation/devicetree/bindings/regulator/fixed-regulator.txt @@ -5,13 +5,18 @@ Required properties: Optional properties: - gpio: gpio to use for enable control +- regmap: regmap phandle to use for enable control +- regmap-offset: register offset when using regmap for enable control +- regmap-mask: register enable mask when using regmap for enable control - startup-delay-us: startup time in microseconds -- enable-active-high: Polarity of GPIO is Active high +- enable-active-high: Polarity of GPIO/regmap is Active high If this property is missing, the default assumed is Active low. - gpio-open-drain: GPIO is open drain type. If this property is missing then default assumption is false. -vin-supply: Input supply name. +Only one of gpio/regmap should be specified. + Any property defined as part of the core regulator binding, defined in regulator.txt, can also be used. However a fixed voltage regulator is expected to have the @@ -32,3 +37,17 @@ Example: gpio-open-drain; vin-supply = <&parent_reg>; }; + + xyz: fixedregulator@1 { + compatible = "regulator-fixed"; + regulator-name = "fixed-supply"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regmap = <&syscon>; + regmap-offset = <0x4>; + regmap-mask = <0x200>; + startup-delay-us = <70000>; + enable-active-high; + regulator-boot-on; + vin-supply = <&parent_reg>; + }; -- 2.1.4 -- Simon Arlott -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/