[Nexus 4 Original Android Development] Franklin Bernard:
Hi,

I use this script based on a script posted in this thread.

I tested Using PerfMon App. All fine per the script.

For CPU 2 and CPU-3 i tested the max freq but not min(guess both CPUs never uses min freq).So my conclusion is we can set individual Max/Min freqs for individual CPUS

#!/system/bin/sh

#CPU0
chmod 755 /sys/devices/system/cpu/cpu0/cpufreq/*
echo "interactive" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
echo "1350000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
echo "304000" > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq

#CPU1
chmod 755 /sys/devices/system/cpu/cpu1/cpufreq/*
echo "interactive" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor
echo "1350000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
echo "304000" > /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq

#CPU2
chmod 755 /sys/devices/system/cpu/cpu2/cpufreq/*
echo "performance" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor
echo "1674000" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq
echo "304000" > /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq

#CPU3
chmod 755 /sys/devices/system/cpu/cpu3/cpufreq/*
echo "performance" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor
echo "1674000" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq
echo "304000" > /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq

#CPU_Governor_Control
chmod 755 /sys/devices/system/cpu/cpufreq/interactive/*
echo 10000 > /sys/devices/system/cpu/cpufreq/interactive/above_hispeed_delay
echo 0 > /sys/devices/system/cpu/cpufreq/interactive/boost
echo 200000 > /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
echo 70 > /sys/devices/system/cpu/cpufreq/interactive/go_hispeed_load
echo 100000 > /sys/devices/system/cpu/cpufreq/interactive/boostpulse_duration
echo 810000 > /sys/devices/system/cpu/cpufreq/interactive/hispeed_freq
echo 80000 > /sys/devices/system/cpu/cpufreq/interactive/min_sample_time
echo 70 > /sys/devices/system/cpu/cpufreq/interactive/target_loads
echo 20000 > /sys/devices/system/cpu/cpufreq/interactive/timer_rate
echo 80000 > /sys/devices/system/cpu/cpufreq/interactive/timer_slack

#Temp_control
chmod 755 /sys/module/msm_thermal/parameters/*
echo 75 > /sys/module/msm_thermal/parameters/throttle_temp
echo 8 > /sys/module/msm_thermal/parameters/min_freq_index
echo N > /sys/module/msm_thermal/parameters/thermal_debug

#auto_hotplug
chmod 755 /sys/module/auto_hotplug/parameters/*
echo N > /sys/module/auto_hotplug/parameters/debug
echo 115 > /sys/module/auto_hotplug/parameters/disable_load_threshold
echo 250 > /sys/module/auto_hotplug/parameters/enable_load_threshold
echo 500 > /sys/module/auto_hotplug/parameters/enable_all_load_threshold
echo 10 > /sys/module/auto_hotplug/parameters/min_sampling_rate
echo 10 > /sys/module/auto_hotplug/parameters/sampling_periods
echo 4 > /sys/module/auto_hotplug/parameters/max_online_cpus
echo 1 > /sys/module/auto_hotplug/parameters/min_online_cpus
echo 4 >/sys/module/auto_hotplug/parameters/max_online_cpus

#Voltage_control_fast_binned
#!600000 600000 600000 600000 600000 600000 637500 862500 887500 937500 960000 975000 977500 987500 1042500 1050000 1075000
chmod 755 /sys/devices/system/cpu/cpufreq/vdd_table/*
echo "304000 600000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "486000 600000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "594000 600000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "702000 600000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "810000 600000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "918000 600000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "1026000 637500" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "1134000 862500" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "1242000 887500" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "1296000 937500" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "1350000 960000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "1404000 975000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "1458000 977500" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "1512000 987500" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "1566000 1042500" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "1620000 1050000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels
echo "1674000 1075000" > /sys/devices/system/cpu/cpufreq/vdd_table/vdd_levels