From patchwork Thu Jan 22 15:39:04 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen-Yu Tsai X-Patchwork-Id: 5686171 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id A75969F333 for ; Thu, 22 Jan 2015 15:43:02 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id A4AC720222 for ; Thu, 22 Jan 2015 15:43:01 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.9]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id AEAF720221 for ; Thu, 22 Jan 2015 15:43:00 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YEJsf-000388-Ch; Thu, 22 Jan 2015 15:41:13 +0000 Received: from smtp.csie.ntu.edu.tw ([140.112.30.61]) by bombadil.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1YEJrS-0001On-4Z for linux-arm-kernel@lists.infradead.org; Thu, 22 Jan 2015 15:39:59 +0000 Received: from mirror2.csie.ntu.edu.tw (mirror2.csie.ntu.edu.tw [140.112.30.76]) (Authenticated sender: b93043) by smtp.csie.ntu.edu.tw (Postfix) with ESMTPSA id 1563D20306; Thu, 22 Jan 2015 23:39:13 +0800 (CST) Received: by mirror2.csie.ntu.edu.tw (Postfix, from userid 1000) id EA3105F966; Thu, 22 Jan 2015 23:39:12 +0800 (CST) From: Chen-Yu Tsai To: Mark Brown , Lee Jones , Rob Herring , Grant Likely , Maxime Ripard Subject: [PATCH v9 2/5] mfd: AXP20x: Add bindings documentation Date: Thu, 22 Jan 2015 23:39:04 +0800 Message-Id: <1421941147-9682-3-git-send-email-wens@csie.org> X-Mailer: git-send-email 2.1.4 In-Reply-To: <1421941147-9682-1-git-send-email-wens@csie.org> References: <1421941147-9682-1-git-send-email-wens@csie.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20150122_073958_494176_ED82D695 X-CRM114-Status: GOOD ( 10.30 ) X-Spam-Score: -2.3 (--) Cc: Carlo Caione , devicetree@vger.kernel.org, Chen-Yu Tsai , linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP From: Carlo Caione Bindings documentation for the AXP20x driver. In this file also sub-nodes are documented. Signed-off-by: Carlo Caione Acked-by: Maxime Ripard [wens@csie.org: clarify interrupt source for the axp PMIC] [wens@csie.org: explain dcdc-workmode in detail and trim lines to 80 chars] [wens@csie.org: make regulator supplies optional if using unregulated input] [wens@csie.org: use cubieboard2 regulator nodes as example] [wens@csie.org: change dcdc-workmode to dcdc-workmode-pwm boolean property] [wens@csie.org: use clock-frequency for dcdc regulator work frequency] Signed-off-by: Chen-Yu Tsai Acked-by: Lee Jones --- Documentation/devicetree/bindings/mfd/axp20x.txt | 102 +++++++++++++++++++++++ 1 file changed, 102 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/axp20x.txt diff --git a/Documentation/devicetree/bindings/mfd/axp20x.txt b/Documentation/devicetree/bindings/mfd/axp20x.txt new file mode 100644 index 000000000000..c3c80db242c7 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/axp20x.txt @@ -0,0 +1,102 @@ +AXP202/AXP209 device tree bindings + +The axp20x family current members : +axp202 (X-Powers) +axp209 (X-Powers) + +Required properties: +- compatible: "x-powers,axp202" or "x-powers,axp209" +- reg: The I2C slave address for the AXP chip +- interrupt-parent: The parent interrupt controller +- interrupts: SoC NMI / GPIO interrupt connected to the PMIC's IRQ pin +- interrupt-controller: axp20x has its own internal IRQs +- #interrupt-cells: Should be set to 1 +- regulators: A node that houses a sub-node for each regulator. The regulators + are bound using their name as listed here: dcdc2, dcdc3, ldo1, + ldo2, ldo3, ldo4, ldo5. The bindings details of individual + regulator device can be found in: + Documentation/devicetree/bindings/regulator/regulator.txt with + the exception of x-powers,dcdc-freq. Regulators not used should + still be listed for completeness and that the regulator subsystem + properly registers them. + +Optional properties: +- regulator supplies - may be omitted if inputs are unregulated, such as using + the IPSOUT output from the PMIC + - acin-supply: The input supply for LDO1 + - vin2-supply: The input supply for DCDC2 + - vin3-supply: The input supply for DCDC3 + - ldo24in-supply: The input supply for LDO2, LDO4 + - ldo3in-supply: The input supply for LDO3 + - ldo5in-supply: The input supply for LDO5 + +Optional properties for regulators node: +- clock-frequency: defines the work frequency of DC-DC regulators + (range: 750kHz - 1875kHz). Default: 1.5MHz + +Optional properties for DCDC regulators: +- x-powers,dcdc-workmode-pwm: Force the DCDC regulators to run in PWM mode + The DCDC regulators rormally work in a mixed + PWM/PFM mode, using PFM under light loads and + switching to PWM for heavier loads. Forcing + PWM mode trades efficiency under light loads + for lower output noise. This probably makes + sense for HiFi audio related applications that + aren't battery constrained. + +Example: + +axp209: pmic@34 { + compatible = "x-powers,axp209"; + reg = <0x34>; + interrupt-parent = <&nmi_intc>; + interrupts = <0 IRQ_TYPE_LEVEL_LOW>; + interrupt-controller; + #interrupt-cells = <1>; + + regulators { + clock-frequency = <1500000>; + + vdd_cpu: dcdc2 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1450000>; + regulator-name = "vdd-cpu"; + }; + + vdd_int_dll: dcdc3 { + regulator-always-on; + regulator-min-microvolt = <1000000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-int-dll"; + }; + + vdd_rtc: ldo1 { + regulator-always-on; + regulator-min-microvolt = <1200000>; + regulator-max-microvolt = <1400000>; + regulator-name = "vdd-rtc"; + }; + + avcc: ldo2 { + regulator-always-on; + regulator-min-microvolt = <2700000>; + regulator-max-microvolt = <3300000>; + regulator-name = "avcc"; + }; + + ldo3 { + /* unused */ + }; + + csi1_io_2v8: ldo4 { + /* output on extension headers */ + regulator-name = "csi1-io-2v8"; + }; + + ldo5 { + /* unused */ + }; + }; +}; +