How to use CPU Voltage Control interface


All credits for this interface go to gokhanmoral!

initially i was trying another implementation for the krait chips based on Faux123's implementation but it wasnt working propely... so I have ported the VDD interace to my kernel from gokhanmoral's commits!


device will always bootup at stock voltage table...



WARNING!

DO NOT USE TOO HIGH OR TOO LOW VOLTAGES

SLOWLY increase the voltage one notch at a time for a particular frequency and do stability/testing for few hours

once you have verified that you CPU chip can handle that voltage ONLY then "Set at boot"/Use init.d script

if you dont follow above instruction your device might bootloop




You can either use an APP (like Voltage Control) or use an init.d script to do the work...



the interface to control voltages is at:
Code:
Select Code
/sys/devices/system/cpu/cpu0/cpufreq/vdd_levels



to see current voltage table use:
Code:
Select Code
cat /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels

to set voltage for a particular frequency:
Code:
Select Code
echo 1512000 1200 > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
will set 1512Mhz freq voltage at 1200mV


to reduce voltages for ALL frequencies:
Code:
Select Code
echo -25 > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels

to increase voltages for ALL frequencies:
Code:
Select Code
echo +25 > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels



example init.d script to reduce voltages by 75mV for ALL frequencies:
Code:
Select Code
#!/system/bin/sh
echo -75 > /sys/devices/system/cpu/cpu0/cpufreq/vdd_levels
can be saved as /system/etc/init.d/99vdd