* Colibri PXA320 Power management question @ 2010-08-12 10:02 Yuri Ludkevich 2010-08-14 6:53 ` [Openpxa-users] " Marek Vasut 2010-09-02 14:22 ` Mark Brown 0 siblings, 2 replies; 15+ messages in thread From: Yuri Ludkevich @ 2010-08-12 10:02 UTC (permalink / raw) To: linux-arm-kernel Hi there :) I have a question about power management of Colibri PXA320 module: I found that bits PVE and FVE in PVCR register are disabled, so at frequency change voltage will not change. If I turn on PVE and FVE with pxaregs tool - voltage changes just fine. Where are suitable place in the kernel for PVCR initialization? -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20100812/2d01eea3/attachment-0001.html> ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Openpxa-users] Colibri PXA320 Power management question 2010-08-12 10:02 Colibri PXA320 Power management question Yuri Ludkevich @ 2010-08-14 6:53 ` Marek Vasut 2010-08-15 2:06 ` Eric Miao 2010-09-02 14:22 ` Mark Brown 1 sibling, 1 reply; 15+ messages in thread From: Marek Vasut @ 2010-08-14 6:53 UTC (permalink / raw) To: linux-arm-kernel Dne ?t 12. srpna 2010 12:02:17 Yuri Ludkevich napsal(a): > Hi there :) > > I have a question about power management of Colibri PXA320 module: > I found that bits PVE and FVE in PVCR register are disabled, > so at frequency change voltage will not change. > > If I turn on PVE and FVE with pxaregs tool - voltage changes just fine. > Where are suitable place in the kernel for PVCR initialization? I believe kernel should handle all that. Eric CCed. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Openpxa-users] Colibri PXA320 Power management question 2010-08-14 6:53 ` [Openpxa-users] " Marek Vasut @ 2010-08-15 2:06 ` Eric Miao 2010-08-15 9:13 ` Igor Grinberg 0 siblings, 1 reply; 15+ messages in thread From: Eric Miao @ 2010-08-15 2:06 UTC (permalink / raw) To: linux-arm-kernel On Sat, Aug 14, 2010 at 2:53 PM, Marek Vasut <marek.vasut@gmail.com> wrote: > Dne ?t 12. srpna 2010 12:02:17 Yuri Ludkevich napsal(a): >> Hi there :) >> >> I have a question about power management of Colibri PXA320 module: >> I found that bits PVE and FVE in PVCR register are disabled, >> so at frequency change voltage will not change. >> >> If I turn on PVE and FVE with pxaregs tool - voltage changes just fine. >> Where are suitable place in the kernel for PVCR initialization? > > I believe kernel should handle all that. Eric CCed. > Yep. Some of the design doesn't use the built-in power I2C at all, they use some non-standard I2C power management IC. So this should be handled in kernel indeed. The currently problem is that we don't yet have a clean framework, some platforms are writing directly to these registers to configure, which should be avoided. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Openpxa-users] Colibri PXA320 Power management question 2010-08-15 2:06 ` Eric Miao @ 2010-08-15 9:13 ` Igor Grinberg 2010-08-15 9:16 ` Eric Miao 0 siblings, 1 reply; 15+ messages in thread From: Igor Grinberg @ 2010-08-15 9:13 UTC (permalink / raw) To: linux-arm-kernel On 08/15/10 05:06, Eric Miao wrote: > On Sat, Aug 14, 2010 at 2:53 PM, Marek Vasut <marek.vasut@gmail.com> wrote: > >> Dne ?t 12. srpna 2010 12:02:17 Yuri Ludkevich napsal(a): >> >>> Hi there :) >>> >>> I have a question about power management of Colibri PXA320 module: >>> I found that bits PVE and FVE in PVCR register are disabled, >>> so at frequency change voltage will not change. >>> >>> If I turn on PVE and FVE with pxaregs tool - voltage changes just fine. >>> Where are suitable place in the kernel for PVCR initialization? >>> >> I believe kernel should handle all that. Eric CCed. >> >> > Yep. Some of the design doesn't use the built-in power I2C at all, > they use some non-standard I2C power management IC. So this > should be handled in kernel indeed. The currently problem is that > we don't yet have a clean framework, some platforms are writing > directly to these registers to configure, which should be avoided. > If I recall correctly, the pxa3xx built-in power I2C control is designed for use with 100% compatible PMIC chip and if for some reason the hardware has another PMIC, which is not 100% compatible, then the built-in control can do more harm then good. I think we need a good and configurable DVFS driver to take care of all the power management stuff. > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > -- Regards, Igor. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Openpxa-users] Colibri PXA320 Power management question 2010-08-15 9:13 ` Igor Grinberg @ 2010-08-15 9:16 ` Eric Miao 0 siblings, 0 replies; 15+ messages in thread From: Eric Miao @ 2010-08-15 9:16 UTC (permalink / raw) To: linux-arm-kernel On Sun, Aug 15, 2010 at 5:13 PM, Igor Grinberg <grinberg@compulab.co.il> wrote: > On 08/15/10 05:06, Eric Miao wrote: >> On Sat, Aug 14, 2010 at 2:53 PM, Marek Vasut <marek.vasut@gmail.com> wrote: >> >>> Dne ?t 12. srpna 2010 12:02:17 Yuri Ludkevich napsal(a): >>> >>>> Hi there :) >>>> >>>> I have a question about power management of Colibri PXA320 module: >>>> I found that bits PVE and FVE in PVCR register are disabled, >>>> so at frequency change voltage will not change. >>>> >>>> If I turn on PVE and FVE with pxaregs tool - voltage changes just fine. >>>> Where are suitable place in the kernel for PVCR initialization? >>>> >>> I believe kernel should handle all that. Eric CCed. >>> >>> >> Yep. Some of the design doesn't use the built-in power I2C at all, >> they use some non-standard I2C power management IC. So this >> should be handled in kernel indeed. The currently problem is that >> we don't yet have a clean framework, some platforms are writing >> directly to these registers to configure, which should be avoided. >> > > If I recall correctly, the pxa3xx built-in power I2C control is designed > for use with 100% compatible PMIC chip and if for some reason > the hardware has another PMIC, which is not 100% compatible, > then the built-in control can do more harm then good. Indeed. With some of those incompatible I2C power management ICs, some are controlling the Power I2C manually with the bits turned off in PVCR. > > I think we need a good and configurable DVFS driver to take care > of all the power management stuff. > Yes. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Colibri PXA320 Power management question 2010-08-12 10:02 Colibri PXA320 Power management question Yuri Ludkevich 2010-08-14 6:53 ` [Openpxa-users] " Marek Vasut @ 2010-09-02 14:22 ` Mark Brown 2010-09-02 14:41 ` Mike Rapoport 1 sibling, 1 reply; 15+ messages in thread From: Mark Brown @ 2010-09-02 14:22 UTC (permalink / raw) To: linux-arm-kernel On Thu, Aug 12, 2010 at 02:02:17PM +0400, Yuri Ludkevich wrote: > I have a question about power management of Colibri PXA320 module: > I found that bits PVE and FVE in PVCR register are disabled, > so at frequency change voltage will not change. > If I turn on PVE and FVE with pxaregs tool - voltage changes just fine. > Where are suitable place in the kernel for PVCR initialization? The expectation in Linux is that voltage scaling will be done in software using cpufreq rather than autonomously by the CPU. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Colibri PXA320 Power management question 2010-09-02 14:22 ` Mark Brown @ 2010-09-02 14:41 ` Mike Rapoport 2010-09-02 15:27 ` Mark Brown 0 siblings, 1 reply; 15+ messages in thread From: Mike Rapoport @ 2010-09-02 14:41 UTC (permalink / raw) To: linux-arm-kernel Mark Brown wrote: > On Thu, Aug 12, 2010 at 02:02:17PM +0400, Yuri Ludkevich wrote: > >> I have a question about power management of Colibri PXA320 module: >> I found that bits PVE and FVE in PVCR register are disabled, >> so at frequency change voltage will not change. > >> If I turn on PVE and FVE with pxaregs tool - voltage changes just fine. >> Where are suitable place in the kernel for PVCR initialization? > > The expectation in Linux is that voltage scaling will be done in > software using cpufreq rather than autonomously by the CPU. PXA3xx has ability to automatically control certain regulators (almost) without software intervention. Setting the bits Yuri is talking about should enable CPU initiated i2c transactions upon frequency scaling events. > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel -- Sincerely yours, Mike. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Colibri PXA320 Power management question 2010-09-02 14:41 ` Mike Rapoport @ 2010-09-02 15:27 ` Mark Brown 2010-09-02 15:43 ` Mike Rapoport 0 siblings, 1 reply; 15+ messages in thread From: Mark Brown @ 2010-09-02 15:27 UTC (permalink / raw) To: linux-arm-kernel On Thu, Sep 02, 2010 at 05:41:57PM +0300, Mike Rapoport wrote: > Mark Brown wrote: > >The expectation in Linux is that voltage scaling will be done in > >software using cpufreq rather than autonomously by the CPU. > PXA3xx has ability to automatically control certain regulators > (almost) without software intervention. Setting the bits Yuri is > talking about should enable CPU initiated i2c transactions upon > frequency scaling events. Yes, exactly - what I'm saying is that Linux is set up to use cpufreq rather than rely on the built in stuff. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Colibri PXA320 Power management question 2010-09-02 15:27 ` Mark Brown @ 2010-09-02 15:43 ` Mike Rapoport 2010-09-04 2:31 ` [Openpxa-users] " Marek Vasut 2010-09-06 10:13 ` Mark Brown 0 siblings, 2 replies; 15+ messages in thread From: Mike Rapoport @ 2010-09-02 15:43 UTC (permalink / raw) To: linux-arm-kernel Mark Brown wrote: > On Thu, Sep 02, 2010 at 05:41:57PM +0300, Mike Rapoport wrote: >> Mark Brown wrote: > >>> The expectation in Linux is that voltage scaling will be done in >>> software using cpufreq rather than autonomously by the CPU. > >> PXA3xx has ability to automatically control certain regulators >> (almost) without software intervention. Setting the bits Yuri is >> talking about should enable CPU initiated i2c transactions upon >> frequency scaling events. > > Yes, exactly - what I'm saying is that Linux is set up to use cpufreq > rather than rely on the built in stuff. There's no contradiction here. The PXA3XX cpufreq implementation could trigger automatic voltage scaling. -- Sincerely yours, Mike. ^ permalink raw reply [flat|nested] 15+ messages in thread
* [Openpxa-users] Colibri PXA320 Power management question 2010-09-02 15:43 ` Mike Rapoport @ 2010-09-04 2:31 ` Marek Vasut 2010-09-06 10:13 ` Mark Brown 1 sibling, 0 replies; 15+ messages in thread From: Marek Vasut @ 2010-09-04 2:31 UTC (permalink / raw) To: linux-arm-kernel Dne ?t 2. z??? 2010 17:43:02 Mike Rapoport napsal(a): > Mark Brown wrote: > > On Thu, Sep 02, 2010 at 05:41:57PM +0300, Mike Rapoport wrote: > >> Mark Brown wrote: > >>> The expectation in Linux is that voltage scaling will be done in > >>> software using cpufreq rather than autonomously by the CPU. > >> > >> PXA3xx has ability to automatically control certain regulators > >> (almost) without software intervention. Setting the bits Yuri is > >> talking about should enable CPU initiated i2c transactions upon > >> frequency scaling events. > > > > Yes, exactly - what I'm saying is that Linux is set up to use cpufreq > > rather than rely on the built in stuff. > > There's no contradiction here. The PXA3XX cpufreq implementation could > trigger automatic voltage scaling. Considering the CPU and the regulator are compatible and you wont fry the CPU. In that case, you use cpufreq indeed. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Colibri PXA320 Power management question 2010-09-02 15:43 ` Mike Rapoport 2010-09-04 2:31 ` [Openpxa-users] " Marek Vasut @ 2010-09-06 10:13 ` Mark Brown 2010-09-06 11:06 ` Mike Rapoport 2010-09-06 11:09 ` Eric Miao 1 sibling, 2 replies; 15+ messages in thread From: Mark Brown @ 2010-09-06 10:13 UTC (permalink / raw) To: linux-arm-kernel On Thu, Sep 02, 2010 at 06:43:02PM +0300, Mike Rapoport wrote: > Mark Brown wrote: > >Yes, exactly - what I'm saying is that Linux is set up to use cpufreq > >rather than rely on the built in stuff. > There's no contradiction here. The PXA3XX cpufreq implementation > could trigger automatic voltage scaling. That'd be slightly entertaining, though, since IIRC the hardware implementation isn't really set up for being constrained - it doesn't expect to be cooperating with software governors. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Colibri PXA320 Power management question 2010-09-06 10:13 ` Mark Brown @ 2010-09-06 11:06 ` Mike Rapoport 2010-09-06 11:09 ` Eric Miao 1 sibling, 0 replies; 15+ messages in thread From: Mike Rapoport @ 2010-09-06 11:06 UTC (permalink / raw) To: linux-arm-kernel Mark Brown wrote: > On Thu, Sep 02, 2010 at 06:43:02PM +0300, Mike Rapoport wrote: >> Mark Brown wrote: > >>> Yes, exactly - what I'm saying is that Linux is set up to use cpufreq >>> rather than rely on the built in stuff. > >> There's no contradiction here. The PXA3XX cpufreq implementation >> could trigger automatic voltage scaling. > > That'd be slightly entertaining, though, since IIRC the hardware > implementation isn't really set up for being constrained - it doesn't > expect to be cooperating with software governors. As far as I remember, PXA3xx power I2C can be setup to automatically send I2C command sequence to PMIC upon certain events, such as frequency change, power state transition and probably something else. You can enable this behavior and then when cpufreq decides to change frequency the voltage should be scaled appropriately. No idea, though, if anybody made it work. Maybe Eric had tried it when he was with Marvell :) -- Sincerely yours, Mike. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Colibri PXA320 Power management question 2010-09-06 10:13 ` Mark Brown 2010-09-06 11:06 ` Mike Rapoport @ 2010-09-06 11:09 ` Eric Miao 2010-09-06 11:30 ` Mark Brown 1 sibling, 1 reply; 15+ messages in thread From: Eric Miao @ 2010-09-06 11:09 UTC (permalink / raw) To: linux-arm-kernel On Mon, Sep 6, 2010 at 6:13 PM, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote: > On Thu, Sep 02, 2010 at 06:43:02PM +0300, Mike Rapoport wrote: >> Mark Brown wrote: > >> >Yes, exactly - what I'm saying is that Linux is set up to use cpufreq >> >rather than rely on the built in stuff. > >> There's no contradiction here. The PXA3XX cpufreq implementation >> could trigger automatic voltage scaling. > > That'd be slightly entertaining, though, since IIRC the hardware > implementation isn't really set up for being constrained - it doesn't > expect to be cooperating with software governors. > It doesn't need to. There is actually an internal command table, and not really sure about the mapping scheme though, but when software then has only to care about the frequencies, and voltages will be adjusted accordingly. In the other hand, such hardcoded mechanism won't work very well with incompatible power management ICs, so if there is such a platform, we do need a way to fall back to using regulators. > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > ^ permalink raw reply [flat|nested] 15+ messages in thread
* Colibri PXA320 Power management question 2010-09-06 11:09 ` Eric Miao @ 2010-09-06 11:30 ` Mark Brown 2010-09-06 11:42 ` Haojian Zhuang 0 siblings, 1 reply; 15+ messages in thread From: Mark Brown @ 2010-09-06 11:30 UTC (permalink / raw) To: linux-arm-kernel On Mon, Sep 06, 2010 at 07:09:44PM +0800, Eric Miao wrote: > On Mon, Sep 6, 2010 at 6:13 PM, Mark Brown > > That'd be slightly entertaining, though, since IIRC the hardware > > implementation isn't really set up for being constrained - it doesn't > > expect to be cooperating with software governors. > It doesn't need to. There is actually an internal command table, and > not really sure about the mapping scheme though, but when software > then has only to care about the frequencies, and voltages will be > adjusted accordingly. Ah, I'm misremembering the PXA implementation for the i.MX one - the i.MX version of this feature had a governor rather than just doing a lookup from the frequency to a voltage. ^ permalink raw reply [flat|nested] 15+ messages in thread
* Colibri PXA320 Power management question 2010-09-06 11:30 ` Mark Brown @ 2010-09-06 11:42 ` Haojian Zhuang 0 siblings, 0 replies; 15+ messages in thread From: Haojian Zhuang @ 2010-09-06 11:42 UTC (permalink / raw) To: linux-arm-kernel On Mon, Sep 6, 2010 at 7:30 PM, Mark Brown <broonie@opensource.wolfsonmicro.com> wrote: > On Mon, Sep 06, 2010 at 07:09:44PM +0800, Eric Miao wrote: >> On Mon, Sep 6, 2010 at 6:13 PM, Mark Brown > >> > That'd be slightly entertaining, though, since IIRC the hardware >> > implementation isn't really set up for being constrained - it doesn't >> > expect to be cooperating with software governors. > >> It doesn't need to. There is actually an internal command table, and >> not really sure about the mapping scheme though, but when software >> then has only to care about the frequencies, and voltages will be >> adjusted accordingly. > > Ah, I'm misremembering the PXA implementation for the i.MX one - the > i.MX version of this feature had a governor rather than just doing a > lookup from the frequency to a voltage. > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel at lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel > I think that the key isn't scaling voltage. We can enable both auto-scaling (hardware) and software-scaling voltage in cpufreq driver. The key point is that device may occur fails while scaling frequency in device working mode. I remember that cpufreq doesn't care about this behavior. ^ permalink raw reply [flat|nested] 15+ messages in thread
end of thread, other threads:[~2010-09-06 11:42 UTC | newest] Thread overview: 15+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2010-08-12 10:02 Colibri PXA320 Power management question Yuri Ludkevich 2010-08-14 6:53 ` [Openpxa-users] " Marek Vasut 2010-08-15 2:06 ` Eric Miao 2010-08-15 9:13 ` Igor Grinberg 2010-08-15 9:16 ` Eric Miao 2010-09-02 14:22 ` Mark Brown 2010-09-02 14:41 ` Mike Rapoport 2010-09-02 15:27 ` Mark Brown 2010-09-02 15:43 ` Mike Rapoport 2010-09-04 2:31 ` [Openpxa-users] " Marek Vasut 2010-09-06 10:13 ` Mark Brown 2010-09-06 11:06 ` Mike Rapoport 2010-09-06 11:09 ` Eric Miao 2010-09-06 11:30 ` Mark Brown 2010-09-06 11:42 ` Haojian Zhuang
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).