Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752166AbbGMIKO (ORCPT ); Mon, 13 Jul 2015 04:10:14 -0400 Received: from mailout2.w1.samsung.com ([210.118.77.12]:20901 "EHLO mailout2.w1.samsung.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751671AbbGMIKI (ORCPT ); Mon, 13 Jul 2015 04:10:08 -0400 X-AuditID: cbfec7f4-f79c56d0000012ee-7d-55a3725eb827 Message-id: <55A3725B.2040801@samsung.com> Date: Mon, 13 Jul 2015 17:10:03 +0900 From: Krzysztof Kozlowski User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.7.0 MIME-version: 1.0 To: Vaibhav Hiremath , linux-arm-kernel@lists.infradead.org Cc: devicetree@vger.kernel.org, sameo@linux.intel.com, linux-kernel@vger.kernel.org, robh+dt@kernel.org, lee.jones@linaro.org Subject: Re: [PATCH 5/6] mfd: devicetree: bindings: 88pm800: Add DT property for dual phase enable References: <1436442431-3471-1-git-send-email-vaibhav.hiremath@linaro.org> <1436442431-3471-6-git-send-email-vaibhav.hiremath@linaro.org> <55A0C2CB.6060209@samsung.com> <55A36DBF.5020100@linaro.org> In-reply-to: <55A36DBF.5020100@linaro.org> Content-type: text/plain; charset=windows-1252 Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrALMWRmVeSWpSXmKPExsVy+t/xq7pxRYtDDZZ+EbCYf+Qcq8XrF4YW 978eZbTY9Pgaq8XlXXPYLFr3HmG3ON3NanH96kYWBw6PTas62TzuXNvD5jHvZKDH5iX1Hn1b VjF6fN4kF8AWxWWTkpqTWZZapG+XwJVxbf17toJbEhWTp0xjbGDsFe5i5OSQEDCRWHe+iQnC FpO4cG89WxcjF4eQwFJGiR/fu5hBEkICTxkluv6rgdi8AloSdy//BIuzCKhKvPm2G6yZTcBY YvPyJWwgtqhAhMTbyyeZIOoFJX5MvscCYosIREns2neWHcRmFqiXOLZuFVhcWCBFYtW960wQ i08xSmzvOA6W4ARa1jBhOtBQDqAGPYn7F7UgeuUlNq95yzyBUWAWkhWzEKpmIalawMi8ilE0 tTS5oDgpPddQrzgxt7g0L10vOT93EyMk3L/sYFx8zOoQowAHoxIPb8OWRaFCrIllxZW5hxgl OJiVRHg/nwUK8aYkVlalFuXHF5XmpBYfYpTmYFES5527632IkEB6YklqdmpqQWoRTJaJg1Oq gbHtxZ+7iz49l/W7JHzcdnu8/nQdsZeVe6RM1n4wFWCMv79huljBsvV3b+lu63q0w8qoqoPj y3YX7VlF5jz9k1pi3S/oMrtx76px+xO/+k/rW5vv2c9zZYr0TFqiul+uF15sz9Bqdn6H96HD +pp9lyNmiS3J5pRZc/xDx71nJ3TXis1gX/VpFbsSS3FGoqEWc1FxIgARs/lacwIAAA== Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3308 Lines: 104 On 13.07.2015 16:50, Vaibhav Hiremath wrote: > > > On Saturday 11 July 2015 12:46 PM, Krzysztof Kozlowski wrote: >> W dniu 09.07.2015 o 20:47, Vaibhav Hiremath pisze: >>> 88PM860 family of device supports dual phase mode on BUCK1 supply >>> providing total 6A capacity. >>> Note that by default they operate independently with 3A capacity. >>> >>> This patch adds the devicetree binding to enable this >>> feature. >>> >>> Signed-off-by: Vaibhav Hiremath >>> --- >>> Documentation/devicetree/bindings/mfd/88pm800.txt | 6 ++++++ >>> 1 file changed, 6 insertions(+) >>> >>> diff --git a/Documentation/devicetree/bindings/mfd/88pm800.txt >>> b/Documentation/devicetree/bindings/mfd/88pm800.txt >>> index ae1311c..c756b31 100644 >>> --- a/Documentation/devicetree/bindings/mfd/88pm800.txt >>> +++ b/Documentation/devicetree/bindings/mfd/88pm800.txt >>> @@ -15,6 +15,12 @@ Optional properties : >>> CLK32K3 - for 88pm800 >>> CLK32K2 - for 88pm860 >>> >>> + (Applicable only to PXA910 family): >>> + >>> + - marvell,88pm860-buck1-dualphase-en : If set, enable dual phase >>> on BUCK1, >>> + providing 6A capacity. >>> + Without this both BUCK1A and BUCK1B operates independently with >>> 3A capacity. >>> + >> >> 1. How does this relates to regulator driver? The >> drivers/regulator/88pm800.c defines constraints for regulator which may >> be contradictory. >> >> 2. This looks like a job for regulator driver, not MFD. Then you could >> use standard regulator bindings (setting maximum current to 6A would >> change the regulator to different mode). > > Make sense. and even better. > > I believe you are referring to, > > regulator-min-microamp = <3000000>; > regulator-max-microamp = <6000000>; > > And provide set_current_limit() callback, to set the dualphase. > > Just to clarify more on this, > > The DT property would look something like, > > regulators { > compatible = "marvell,88pm80x-regulator"; > > buck1a: BUCK1A { > regulator-compatible = "buck1"; > regulator-min-microvolt = <600000>; > regulator-max-microvolt = <1800000>; > > regulator-min-microamp = <3000000>; > regulator-max-microamp = <6000000>; > > regulator-boot-on; > regulator-always-on; > }; > > buck1b: BUCK1B { > regulator-compatible = "buck1b"; > regulator-min-microvolt = <600000>; > regulator-max-microvolt = <1800000>; > > regulator-min-microamp = <3000000>; > regulator-max-microamp = <6000000>; > > regulator-boot-on; > regulator-always-on; > }; > }; > > > And for the platforms, where dual phase is not required, > we can either choose not to set these properties or set it to > > > regulator-min-microamp = <3000000>; > regulator-max-microamp = <3000000>; Yes, exactly. I only wonder if regulator core would support properly such bindings - setting current limit for a voltage regulator. I didn't tried this but it should work. Best regards, Krzysztof -- 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/