Enable voltage scaling on AMSv2.

Voltage is reduced when the CPU is unboosted, resulting in a large
reduction in power consumption. In analogy with the AMSv1 voltage
scaling code (currently disabled due to problems with SD cards),
I have defined a config file option to enable/disable it.

Change-Id: Ia89c31ec06dd012354b4d53435e7b5b36243b206
This commit is contained in:
Michael Giacomelli 2016-03-27 22:46:53 +02:00
parent 775b21ebc4
commit 7be692e806
5 changed files with 14 additions and 2 deletions

View file

@ -198,6 +198,9 @@
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
/*define this to enable CPU voltage scaling on AMS devices*/
#define HAVE_ADJUSTABLE_CPU_VOLTAGE
#define BOOTFILE_EXT "sansa"
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"

View file

@ -194,6 +194,9 @@
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
/*define this to enable CPU voltage scaling on AMS devices*/
#define HAVE_ADJUSTABLE_CPU_VOLTAGE
#define BOOTFILE_EXT "sansa"
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"

View file

@ -197,6 +197,9 @@
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
/*define this to enable CPU voltage scaling on AMS devices*/
#define HAVE_ADJUSTABLE_CPU_VOLTAGE
#define BOOTFILE_EXT "sansa"
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"

View file

@ -210,6 +210,9 @@
/* Define this if you have adjustable CPU frequency */
#define HAVE_ADJUSTABLE_CPU_FREQ
/*define this to enable CPU voltage scaling on AMS devices*/
#define HAVE_ADJUSTABLE_CPU_VOLTAGE
#define BOOTFILE_EXT "sansa"
#define BOOTFILE "rockbox." BOOTFILE_EXT
#define BOOTDIR "/.rockbox"

View file

@ -460,7 +460,7 @@ void set_cpu_frequency(long frequency)
{
if(frequency == CPUFREQ_MAX)
{
#if 0
#ifdef HAVE_ADJUSTABLE_CPU_VOLTAGE
/* Set CVDD1 power supply */
ascodec_write_pmu(0x17, 1, 0x80 | 47);
/* dely for voltage rising */
@ -481,7 +481,7 @@ void set_cpu_frequency(long frequency)
cpu_frequency = CPUFREQ_NORMAL;
/* Set CVDD1 power supply */
#if 0
#ifdef HAVE_ADJUSTABLE_CPU_VOLTAGE
#ifdef SANSA_CLIPZIP
ascodec_write_pmu(0x17, 1, 0x80 | 19);
#else