From patchwork Fri Nov 11 03:11:20 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Viresh Kumar X-Patchwork-Id: 81772 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp1063108qge; Thu, 10 Nov 2016 19:11:30 -0800 (PST) X-Received: by 10.107.58.195 with SMTP id h186mr10690368ioa.117.1478833890914; Thu, 10 Nov 2016 19:11:30 -0800 (PST) Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id hk10si6550752pac.297.2016.11.10.19.11.30; Thu, 10 Nov 2016 19:11:30 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@linaro.org; spf=pass (google.com: best guess record for domain of linux-pm-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-pm-owner@vger.kernel.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S966040AbcKKDL2 (ORCPT + 13 others); Thu, 10 Nov 2016 22:11:28 -0500 Received: from mail-pf0-f175.google.com ([209.85.192.175]:33830 "EHLO mail-pf0-f175.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S965808AbcKKDL1 (ORCPT ); Thu, 10 Nov 2016 22:11:27 -0500 Received: by mail-pf0-f175.google.com with SMTP id n85so3522918pfi.1 for ; Thu, 10 Nov 2016 19:11:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=Estb3cEGxqHiuWNFr4mJhfeY/ZEX+K2CuPOViiVOwg4=; b=AHyzoeHXE0opK6NWGCUNuy7b4isKeJRJtgWkoX2uzu/htxkPNgnSISIvVUO7r/ETj4 FzRA/Q8qYr4TGOrLB/pMnDiOSN1CQjniOB3/Wv7aDhKaQzO9cWJ94zZLpfh3A0jdtmsx 8IG9KC94nVb/crN8hfGq1qoP3XoiU1ZTCJrYw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=Estb3cEGxqHiuWNFr4mJhfeY/ZEX+K2CuPOViiVOwg4=; b=BonjfYtvPrT/jLjFi1a6BSGrC2edzeW+CMEWCp4Y+cKmrpHaKnM+ldMSa1RJDz7aTP fYIvjWDZy5QfjDK/BF+b+27o7M1E2z1xEbmgQJyLj+Uq4mR0xHYs8GZ0OppSybZ0BdYM ssjFNLKebaJPTclyLY9oXUBr7EyNQfdTozcQ+c5hoBy9T4CRut78IP95w1JnCE4RMBEZ 7okDWIE5zxQxQV1CrtjBZcIVmStBkKZCTyI9APG+Y1P5swCaXS/Rwjd2feC+gH8QveIw IsFSgpWKAvbDnbPNfbFCrAiKLX6cJTdIoMkaK8AAaJlyXFDdjSp5uTtKl3stIMaUvb0p c3qw== X-Gm-Message-State: ABUngvfCFPc13/wUneSuLVM8efBT3GeXvFjpeER3ut0e++z/7D3Yr7XZ0R/UHEOed+68o2GD X-Received: by 10.98.34.218 with SMTP id p87mr2128554pfj.97.1478833886086; Thu, 10 Nov 2016 19:11:26 -0800 (PST) Received: from localhost ([122.172.89.192]) by smtp.gmail.com with ESMTPSA id ca5sm10383099pac.36.2016.11.10.19.11.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 10 Nov 2016 19:11:24 -0800 (PST) Date: Fri, 11 Nov 2016 08:41:20 +0530 From: Viresh Kumar To: Stephen Boyd Cc: Mark Brown , Rafael Wysocki , nm@ti.com, Viresh Kumar , linaro-kernel@lists.linaro.org, linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, Vincent Guittot , robh@kernel.org, d-gerlach@ti.com, devicetree@vger.kernel.org Subject: Re: [PATCH V3 1/9] PM / OPP: Reword binding supporting multiple regulators per device Message-ID: <20161111031120.GE11670@vireshk-i7> References: <28119b44689921f3c3cc00be49bff2bb99b32162.1477463128.git.viresh.kumar@linaro.org> <20161109145828.p6vvsd5bygkzjcmh@sirena.org.uk> <20161110040440.GA11670@vireshk-i7> <20161110163659.rk67qrmnrovq2ktf@sirena.org.uk> <20161110180940.GD11670@vireshk-i7> <20161110225126.GK16026@codeaurora.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20161110225126.GK16026@codeaurora.org> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-pm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-pm@vger.kernel.org On 10-11-16, 14:51, Stephen Boyd wrote: > On 11/10, Viresh Kumar wrote: > > On 10-11-16, 16:36, Mark Brown wrote: > > > On Thu, Nov 10, 2016 at 09:34:40AM +0530, Viresh Kumar wrote: > > > > On 09-11-16, 14:58, Mark Brown wrote: > > > > > On Wed, Oct 26, 2016 at 12:02:56PM +0530, Viresh Kumar wrote: > > > > > > > > > + Entries for multiple regulators shall be provided in the same field separated > > > > > > + by angular brackets <>. The OPP binding doesn't provide any provisions to > > > > > > + relate the values to their power supplies or the order in which the supplies > > > > > > + need to be configured. > > > > > > > > I don't understand how this works. If we have an unordered list of > > > > > values to set for regulators how will we make sense of them? > > > > > > > The platform driver is responsible to identify the order and pass it on to the > > > > OPP core. And the platform driver needs to have that hard coded. > > > > > > That *really* should be in the binding. > > > > Okay, how do you suggest doing that? Will a property like supply-names > > in the OPP table be fine? Like this: > > > > @@ -369,13 +378,16 @@ Example 4: Handling multiple regulators > > compatible = "arm,cortex-a7"; > > ... > > > > - cpu-supply = <&cpu_supply0>, <&cpu_supply1>, <&cpu_supply2>; > > + vcc0-supply = <&cpu_supply0>; > > + vcc1-supply = <&cpu_supply1>; > > + vcc2-supply = <&cpu_supply2>; > > operating-points-v2 = <&cpu0_opp_table>; > > }; > > }; > > > > cpu0_opp_table: opp_table0 { > > compatible = "operating-points-v2"; > > + supply-names = "vcc0", "vcc1", "vcc2"; > > opp-shared; > > > > No. The supply names (and also clock names/index) should be left > up to the consumer of the OPP table. We don't want to encode any > sort of details like this between the OPP table and the consumer > of it in DT because then it seriously couples the OPP table to > the consumer device. "The binding" in this case that needs to be > updated is the consumer binding, to indicate that it correlated > foo-supply and bar-supply to index 0 and 1 of the OPP table > voltages. Are you saying that we shall have a property like this then? -- viresh -- To unsubscribe from this list: send the line "unsubscribe linux-pm" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt index ee91cbdd95ee..733946df2fb8 100644 --- a/Documentation/devicetree/bindings/opp/opp.txt +++ b/Documentation/devicetree/bindings/opp/opp.txt @@ -389,7 +389,10 @@ Example 4: Handling multiple regulators compatible = "arm,cortex-a7"; ... - cpu-supply = <&cpu_supply0>, <&cpu_supply1>, <&cpu_supply2>; + vcc0-supply = <&cpu_supply0>; + vcc1-supply = <&cpu_supply1>; + vcc2-supply = <&cpu_supply2>; + opp-supply-names = "vcc0", "vcc1", "vcc2"; operating-points-v2 = <&cpu0_opp_table>; }; };