From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752034AbdIANBk (ORCPT ); Fri, 1 Sep 2017 09:01:40 -0400 Received: from mail-pg0-f66.google.com ([74.125.83.66]:37031 "EHLO mail-pg0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751778AbdIANBi (ORCPT ); Fri, 1 Sep 2017 09:01:38 -0400 X-Google-Smtp-Source: ADKCNb4gBM+YJd9+vinQQfF2slKVWmTb3MA8n2Qy1NpIg7nhPQ8x+Wx5rQI7UF9vSBwL9J5MQcNc1A== Date: Fri, 1 Sep 2017 21:01:32 +0800 From: Dong Aisheng To: Rob Herring Cc: Dong Aisheng , linux-pm@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, sboyd@codeaurora.org, vireshk@kernel.org, nm@ti.com, rjw@rjwysocki.net, shawnguo@kernel.org, Anson.Huang@nxp.com, ping.bai@nxp.com, Frank Rowand , devicetree@vger.kernel.org Subject: Re: [PATCH 2/7] dt-bindings: PM / OPP: add clocks per OPP node support Message-ID: <20170901130132.GA22788@b29396-OptiPlex-7040> References: <1503504610-12880-1-git-send-email-aisheng.dong@nxp.com> <1503504610-12880-3-git-send-email-aisheng.dong@nxp.com> <20170831173920.4emtr5vkgvjcx6ac@rob-hp-laptop> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20170831173920.4emtr5vkgvjcx6ac@rob-hp-laptop> User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, Aug 31, 2017 at 12:39:20PM -0500, Rob Herring wrote: > On Thu, Aug 24, 2017 at 12:10:05AM +0800, Dong Aisheng wrote: > > It's used for platforms where different OPPs may use different clocks. > > With this extended binding, user could specify the correct clock for each > > OPP node. > > > > Cc: Viresh Kumar > > Cc: Nishanth Menon > > Cc: Stephen Boyd > > Cc: "Rafael J. Wysocki" > > Cc: Rob Herring > > Cc: Frank Rowand > > Cc: devicetree@vger.kernel.org > > Signed-off-by: Dong Aisheng > > --- > > Documentation/devicetree/bindings/opp/opp.txt | 52 +++++++++++++++++++++++++++ > > 1 file changed, 52 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt > > index e36d261..40a4340 100644 > > --- a/Documentation/devicetree/bindings/opp/opp.txt > > +++ b/Documentation/devicetree/bindings/opp/opp.txt > > @@ -152,6 +152,11 @@ Optional properties: > > hierarchy can be contained in multiple 32 bit values. i.e. in the > > above example, Z1 & Z2 refer to the version hierarchy Z. > > > > +- clocks: Clock phandle and specifier used for this opp. > > + > > +- clock-names: clock names for this opp. The valid clock names are platform > > + specific. > > You don't need -names if there's only 1 clock. Got it, will remove -name. > But then how long until > we have a list of any random clocks some how associated with an OPP. > Not sure whether it will really happen in the future. Even it happens, as we usually only need the device parent clock, then probably better to handle the left complicated things in clock driver or OPP device driver. > I think this should really be solved within the clock framework. What > you really need is "set my parent clock to the source that can provide X > Hz". Could the assigned-clocks property work here (in the OPP nodes > rather than the cpu nodes)? > I'm not quite sure i got your point. assigned-clocks seems a bit like function the same as clocks property here, both are used to specifying the device parent clock which provide X hz. Or are you suggesting using assigned-clocks/assigned-clocks-rates instread of clocks/opp-hz? Would you please clarify a bit more? > > + > > - status: Marks the node enabled/disabled. > > > > Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together. > > @@ -528,3 +533,50 @@ Example 6: opp-microvolt-, opp-microamp-: > > }; > > }; > > }; > > + > > +Example 7: Single core ARM cortex A7, switch separate clocks for each OPP: > > Can't you add this to an existing example? We don't need to enumerate > every possible option. Okay, Will merge it. Thanks Regards Dong Aisheng > > Rob From mboxrd@z Thu Jan 1 00:00:00 1970 From: dongas86@gmail.com (Dong Aisheng) Date: Fri, 1 Sep 2017 21:01:32 +0800 Subject: [PATCH 2/7] dt-bindings: PM / OPP: add clocks per OPP node support In-Reply-To: <20170831173920.4emtr5vkgvjcx6ac@rob-hp-laptop> References: <1503504610-12880-1-git-send-email-aisheng.dong@nxp.com> <1503504610-12880-3-git-send-email-aisheng.dong@nxp.com> <20170831173920.4emtr5vkgvjcx6ac@rob-hp-laptop> Message-ID: <20170901130132.GA22788@b29396-OptiPlex-7040> To: linux-arm-kernel@lists.infradead.org List-Id: linux-arm-kernel.lists.infradead.org On Thu, Aug 31, 2017 at 12:39:20PM -0500, Rob Herring wrote: > On Thu, Aug 24, 2017 at 12:10:05AM +0800, Dong Aisheng wrote: > > It's used for platforms where different OPPs may use different clocks. > > With this extended binding, user could specify the correct clock for each > > OPP node. > > > > Cc: Viresh Kumar > > Cc: Nishanth Menon > > Cc: Stephen Boyd > > Cc: "Rafael J. Wysocki" > > Cc: Rob Herring > > Cc: Frank Rowand > > Cc: devicetree at vger.kernel.org > > Signed-off-by: Dong Aisheng > > --- > > Documentation/devicetree/bindings/opp/opp.txt | 52 +++++++++++++++++++++++++++ > > 1 file changed, 52 insertions(+) > > > > diff --git a/Documentation/devicetree/bindings/opp/opp.txt b/Documentation/devicetree/bindings/opp/opp.txt > > index e36d261..40a4340 100644 > > --- a/Documentation/devicetree/bindings/opp/opp.txt > > +++ b/Documentation/devicetree/bindings/opp/opp.txt > > @@ -152,6 +152,11 @@ Optional properties: > > hierarchy can be contained in multiple 32 bit values. i.e. in the > > above example, Z1 & Z2 refer to the version hierarchy Z. > > > > +- clocks: Clock phandle and specifier used for this opp. > > + > > +- clock-names: clock names for this opp. The valid clock names are platform > > + specific. > > You don't need -names if there's only 1 clock. Got it, will remove -name. > But then how long until > we have a list of any random clocks some how associated with an OPP. > Not sure whether it will really happen in the future. Even it happens, as we usually only need the device parent clock, then probably better to handle the left complicated things in clock driver or OPP device driver. > I think this should really be solved within the clock framework. What > you really need is "set my parent clock to the source that can provide X > Hz". Could the assigned-clocks property work here (in the OPP nodes > rather than the cpu nodes)? > I'm not quite sure i got your point. assigned-clocks seems a bit like function the same as clocks property here, both are used to specifying the device parent clock which provide X hz. Or are you suggesting using assigned-clocks/assigned-clocks-rates instread of clocks/opp-hz? Would you please clarify a bit more? > > + > > - status: Marks the node enabled/disabled. > > > > Example 1: Single cluster Dual-core ARM cortex A9, switch DVFS states together. > > @@ -528,3 +533,50 @@ Example 6: opp-microvolt-, opp-microamp-: > > }; > > }; > > }; > > + > > +Example 7: Single core ARM cortex A7, switch separate clocks for each OPP: > > Can't you add this to an existing example? We don't need to enumerate > every possible option. Okay, Will merge it. Thanks Regards Dong Aisheng > > Rob