All of lore.kernel.org
 help / color / mirror / Atom feed
From: Lucas Stach <l.stach@pengutronix.de>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	Mark Rutland <Mark.Rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	linaro-kernel@lists.linaro.org, swarren@nvidia.com,
	Ian Campbell <ian.campbell@citrix.com>,
	Pawel Moll <pawel.moll@arm.com>,
	linux-pm@vger.kernel.org, patches@linaro.org,
	linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org,
	rjw@sisk.pl, Rob Herring <rob.herring@calxeda.com>,
	mturquette@linaro.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/6] ARM: Tegra: Add CPU's OPPs for using cpufreq-cpu0 driver
Date: Thu, 08 Aug 2013 15:58:38 +0200	[thread overview]
Message-ID: <1375970318.4276.52.camel@weser.hi.pengutronix.de> (raw)
In-Reply-To: <52029811.9080704@wwwdotorg.org>

Am Mittwoch, den 07.08.2013, 12:55 -0600 schrieb Stephen Warren:
> On 08/07/2013 12:06 PM, Viresh Kumar wrote:
> > On 7 August 2013 23:12, Stephen Warren <swarren@wwwdotorg.org> wrote:
> >> On 08/07/2013 08:46 AM, Viresh Kumar wrote:
> >>> cpufreq-cpu0 driver needs OPPs to be present in DT which can be probed by it to
> >>> get frequency table. This patch adds OPPs and clock-latency to tegra cpu0 node
> >>> for multiple SoCs.
> >>>
> >>> Voltage levels aren't used until now for tegra and so a flat value which would
> >>> eventually be ignored is used to represent voltage.
> >>
> >> This patch is problematic w.r.t. DT being an ABI.
> > 
> > :(
> > 
> >> We can certainly add new optional properties to a DT binding that enable
> >> new features. However, a new version of a binding can't require new
> >> properties to exist that didn't before, since that means that old DTs
> >> won't work with new kernels that require the new properties.
> > 
> > To be honest I didn't get it completely. You meant operating-points
> > wasn't present before? Its here:
> > 
> > Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
> > Documentation/devicetree/bindings/power/opp.txt
> > 
> > Or you meant, Tegra never required voltage levels and we are getting
> > them in here.
> 
> The current Tegra *.dts files do not contain this property. The current
> Tegra *.dts files must continue to work without modification in future
> kernels.
> 
> >> As such, I believe we do need some Tegra-specific piece of code that
> >> defines these OPP tables in the kernel, so that the operating-points
> >> property is not needed.
> > 
> > Generic cpufreq driver depends on OPP library and so somebody has
> > to provide them. Now you can do it by calling opp_add() for each OPP
> > you have or otherwise.
> 
> Sure. That's what the Tegra-specific cpufreq driver should do. It should
> be the top-level cpufreq driver. If parts of the code can be implemented
> by library functions or a core parameterizable driver, then presumably
> the Tegra driver would simply exist to provide those parameters and/or
> callback functions to the generic driver.
> 
> > Btw, you must have some specific voltage level for each freq, we can
> > get them here..
> 
> Yes, I'm sure we do, but I have no idea what they are:-( It may even be
> board-specific or SoC-SKU-specific. I think we should defer this aspect
> for now.

>From what I learned those voltage levels are dependent on both the
Speedo and the process ID of the specific Tegra processor. So you really
get a two dimensional mapping table instead of a single OPP.
Also you can not scale the CPU voltage on it's own, but have to make
sure the core voltage isn't too far away from. Then core voltage also
depends on the operating states of engines like GR2D or even display.

Regards,
Lucas
-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


WARNING: multiple messages have this Message-ID (diff)
From: l.stach@pengutronix.de (Lucas Stach)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 2/6] ARM: Tegra: Add CPU's OPPs for using cpufreq-cpu0 driver
Date: Thu, 08 Aug 2013 15:58:38 +0200	[thread overview]
Message-ID: <1375970318.4276.52.camel@weser.hi.pengutronix.de> (raw)
In-Reply-To: <52029811.9080704@wwwdotorg.org>

Am Mittwoch, den 07.08.2013, 12:55 -0600 schrieb Stephen Warren:
> On 08/07/2013 12:06 PM, Viresh Kumar wrote:
> > On 7 August 2013 23:12, Stephen Warren <swarren@wwwdotorg.org> wrote:
> >> On 08/07/2013 08:46 AM, Viresh Kumar wrote:
> >>> cpufreq-cpu0 driver needs OPPs to be present in DT which can be probed by it to
> >>> get frequency table. This patch adds OPPs and clock-latency to tegra cpu0 node
> >>> for multiple SoCs.
> >>>
> >>> Voltage levels aren't used until now for tegra and so a flat value which would
> >>> eventually be ignored is used to represent voltage.
> >>
> >> This patch is problematic w.r.t. DT being an ABI.
> > 
> > :(
> > 
> >> We can certainly add new optional properties to a DT binding that enable
> >> new features. However, a new version of a binding can't require new
> >> properties to exist that didn't before, since that means that old DTs
> >> won't work with new kernels that require the new properties.
> > 
> > To be honest I didn't get it completely. You meant operating-points
> > wasn't present before? Its here:
> > 
> > Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
> > Documentation/devicetree/bindings/power/opp.txt
> > 
> > Or you meant, Tegra never required voltage levels and we are getting
> > them in here.
> 
> The current Tegra *.dts files do not contain this property. The current
> Tegra *.dts files must continue to work without modification in future
> kernels.
> 
> >> As such, I believe we do need some Tegra-specific piece of code that
> >> defines these OPP tables in the kernel, so that the operating-points
> >> property is not needed.
> > 
> > Generic cpufreq driver depends on OPP library and so somebody has
> > to provide them. Now you can do it by calling opp_add() for each OPP
> > you have or otherwise.
> 
> Sure. That's what the Tegra-specific cpufreq driver should do. It should
> be the top-level cpufreq driver. If parts of the code can be implemented
> by library functions or a core parameterizable driver, then presumably
> the Tegra driver would simply exist to provide those parameters and/or
> callback functions to the generic driver.
> 
> > Btw, you must have some specific voltage level for each freq, we can
> > get them here..
> 
> Yes, I'm sure we do, but I have no idea what they are:-( It may even be
> board-specific or SoC-SKU-specific. I think we should defer this aspect
> for now.

>From what I learned those voltage levels are dependent on both the
Speedo and the process ID of the specific Tegra processor. So you really
get a two dimensional mapping table instead of a single OPP.
Also you can not scale the CPU voltage on it's own, but have to make
sure the core voltage isn't too far away from. Then core voltage also
depends on the operating states of engines like GR2D or even display.

Regards,
Lucas
-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

WARNING: multiple messages have this Message-ID (diff)
From: Lucas Stach <l.stach@pengutronix.de>
To: Stephen Warren <swarren@wwwdotorg.org>
Cc: Viresh Kumar <viresh.kumar@linaro.org>,
	Mark Rutland <Mark.Rutland@arm.com>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	linaro-kernel@lists.linaro.org, swarren@nvidia.com,
	Ian Campbell <ian.campbell@citrix.com>,
	Pawel Moll <pawel.moll@arm.com>,
	linux-pm@vger.kernel.org, patches@linaro.org,
	linux-kernel@vger.kernel.org, cpufreq@vger.kernel.org,
	rjw@sisk.pl, Rob Herring <rob.herring@calxeda.com>,
	mturquette@linaro.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 2/6] ARM: Tegra: Add CPU's OPPs for using cpufreq-cpu0 driver
Date: Thu, 08 Aug 2013 15:58:38 +0200	[thread overview]
Message-ID: <1375970318.4276.52.camel@weser.hi.pengutronix.de> (raw)
In-Reply-To: <52029811.9080704@wwwdotorg.org>

Am Mittwoch, den 07.08.2013, 12:55 -0600 schrieb Stephen Warren:
> On 08/07/2013 12:06 PM, Viresh Kumar wrote:
> > On 7 August 2013 23:12, Stephen Warren <swarren@wwwdotorg.org> wrote:
> >> On 08/07/2013 08:46 AM, Viresh Kumar wrote:
> >>> cpufreq-cpu0 driver needs OPPs to be present in DT which can be probed by it to
> >>> get frequency table. This patch adds OPPs and clock-latency to tegra cpu0 node
> >>> for multiple SoCs.
> >>>
> >>> Voltage levels aren't used until now for tegra and so a flat value which would
> >>> eventually be ignored is used to represent voltage.
> >>
> >> This patch is problematic w.r.t. DT being an ABI.
> > 
> > :(
> > 
> >> We can certainly add new optional properties to a DT binding that enable
> >> new features. However, a new version of a binding can't require new
> >> properties to exist that didn't before, since that means that old DTs
> >> won't work with new kernels that require the new properties.
> > 
> > To be honest I didn't get it completely. You meant operating-points
> > wasn't present before? Its here:
> > 
> > Documentation/devicetree/bindings/cpufreq/cpufreq-cpu0.txt
> > Documentation/devicetree/bindings/power/opp.txt
> > 
> > Or you meant, Tegra never required voltage levels and we are getting
> > them in here.
> 
> The current Tegra *.dts files do not contain this property. The current
> Tegra *.dts files must continue to work without modification in future
> kernels.
> 
> >> As such, I believe we do need some Tegra-specific piece of code that
> >> defines these OPP tables in the kernel, so that the operating-points
> >> property is not needed.
> > 
> > Generic cpufreq driver depends on OPP library and so somebody has
> > to provide them. Now you can do it by calling opp_add() for each OPP
> > you have or otherwise.
> 
> Sure. That's what the Tegra-specific cpufreq driver should do. It should
> be the top-level cpufreq driver. If parts of the code can be implemented
> by library functions or a core parameterizable driver, then presumably
> the Tegra driver would simply exist to provide those parameters and/or
> callback functions to the generic driver.
> 
> > Btw, you must have some specific voltage level for each freq, we can
> > get them here..
> 
> Yes, I'm sure we do, but I have no idea what they are:-( It may even be
> board-specific or SoC-SKU-specific. I think we should defer this aspect
> for now.

From what I learned those voltage levels are dependent on both the
Speedo and the process ID of the specific Tegra processor. So you really
get a two dimensional mapping table instead of a single OPP.
Also you can not scale the CPU voltage on it's own, but have to make
sure the core voltage isn't too far away from. Then core voltage also
depends on the operating states of engines like GR2D or even display.

Regards,
Lucas
-- 
Pengutronix e.K.                           | Lucas Stach                 |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-5076 |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |


  parent reply	other threads:[~2013-08-08 14:01 UTC|newest]

Thread overview: 75+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-07 14:46 [PATCH 0/6] Tegra: Use cpufreq-cpu0 driver Viresh Kumar
2013-08-07 14:46 ` Viresh Kumar
2013-08-07 14:46 ` [PATCH 1/6] clk: Tegra: Add CPU0 clock driver Viresh Kumar
2013-08-07 14:46   ` Viresh Kumar
2013-08-07 16:44   ` Mike Turquette
2013-08-07 16:44     ` Mike Turquette
2013-08-07 16:44     ` Mike Turquette
2013-08-07 17:38   ` Stephen Warren
2013-08-07 17:38     ` Stephen Warren
2013-08-07 17:45     ` Viresh Kumar
2013-08-07 17:45       ` Viresh Kumar
2013-08-07 17:48       ` Stephen Warren
2013-08-07 17:48         ` Stephen Warren
2013-08-07 17:54         ` Viresh Kumar
2013-08-07 17:54           ` Viresh Kumar
2013-08-07 18:50           ` Stephen Warren
2013-08-07 18:50             ` Stephen Warren
2013-08-08  2:42             ` Viresh Kumar
2013-08-08  2:42               ` Viresh Kumar
2013-08-08 18:50               ` Stephen Warren
2013-08-08 18:50                 ` Stephen Warren
2013-08-09  3:19                 ` Viresh Kumar
2013-08-09  3:19                   ` Viresh Kumar
2013-08-07 14:46 ` [PATCH 2/6] ARM: Tegra: Add CPU's OPPs for using cpufreq-cpu0 driver Viresh Kumar
2013-08-07 14:46   ` Viresh Kumar
2013-08-07 17:42   ` Stephen Warren
2013-08-07 17:42     ` Stephen Warren
2013-08-07 18:06     ` Viresh Kumar
2013-08-07 18:06       ` Viresh Kumar
2013-08-07 18:55       ` Stephen Warren
2013-08-07 18:55         ` Stephen Warren
2013-08-08  2:57         ` Viresh Kumar
2013-08-08  2:57           ` Viresh Kumar
2013-08-08 18:55           ` Stephen Warren
2013-08-08 18:55             ` Stephen Warren
2013-08-08 13:58         ` Lucas Stach [this message]
2013-08-08 13:58           ` Lucas Stach
2013-08-08 13:58           ` Lucas Stach
2013-08-08 14:11           ` Viresh Kumar
2013-08-08 14:11             ` Viresh Kumar
2013-08-08 14:22             ` Lucas Stach
2013-08-08 14:22               ` Lucas Stach
2013-08-08 14:37               ` Viresh Kumar
2013-08-08 14:37                 ` Viresh Kumar
2013-08-08 15:52                 ` Nishanth Menon
2013-08-08 15:52                   ` Nishanth Menon
2013-08-08 15:52                   ` Nishanth Menon
2013-08-07 14:46 ` [PATCH 3/6] ARM: Tegra: Enable OPP library Viresh Kumar
2013-08-07 14:46   ` Viresh Kumar
2013-08-07 17:43   ` Stephen Warren
2013-08-07 17:43     ` Stephen Warren
2013-08-07 18:08     ` Viresh Kumar
2013-08-07 18:08       ` Viresh Kumar
2013-08-07 14:46 ` [PATCH 4/6] ARM: Tegra: defconfig: select cpufreq-cpu0 driver Viresh Kumar
2013-08-07 14:46   ` Viresh Kumar
2013-08-07 14:46 ` [PATCH 5/6] ARM: Tegra: start using " Viresh Kumar
2013-08-07 14:46   ` Viresh Kumar
2013-08-07 17:46   ` Stephen Warren
2013-08-07 17:46     ` Stephen Warren
2013-08-07 17:49     ` Viresh Kumar
2013-08-07 17:49       ` Viresh Kumar
2013-08-07 17:53       ` Stephen Warren
2013-08-07 17:53         ` Stephen Warren
2013-08-07 17:59         ` Viresh Kumar
2013-08-07 17:59           ` Viresh Kumar
2013-08-07 18:51           ` Stephen Warren
2013-08-07 18:51             ` Stephen Warren
2013-08-08  2:48             ` Viresh Kumar
2013-08-08  2:48               ` Viresh Kumar
2013-08-07 14:46 ` [PATCH 6/6] cpufreq: Tegra: Remove tegra-cpufreq driver Viresh Kumar
2013-08-07 14:46   ` Viresh Kumar
2013-08-08  8:31 ` [PATCH 0/6] Tegra: Use cpufreq-cpu0 driver Richard Zhao
2013-08-08  8:31   ` Richard Zhao
2013-08-08  8:33   ` Viresh Kumar
2013-08-08  8:33     ` Viresh Kumar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1375970318.4276.52.camel@weser.hi.pengutronix.de \
    --to=l.stach@pengutronix.de \
    --cc=Mark.Rutland@arm.com \
    --cc=cpufreq@vger.kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=ian.campbell@citrix.com \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pm@vger.kernel.org \
    --cc=mturquette@linaro.org \
    --cc=patches@linaro.org \
    --cc=pawel.moll@arm.com \
    --cc=rjw@sisk.pl \
    --cc=rob.herring@calxeda.com \
    --cc=swarren@nvidia.com \
    --cc=swarren@wwwdotorg.org \
    --cc=viresh.kumar@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.