From 6ca55cecf8aa2d3f93f552fe55e261c0c30688ab Mon Sep 17 00:00:00 2001 From: Keita Espinoza Date: Mon, 24 Jul 2017 05:03:01 +0000 Subject: shinano: Rework qcom.power init - Boot phone in interactive mode instead of performance - Add TWRP config Squashed with: shinano-common: init: Add back init.recovery * Add back init.recovery to copy file with the real name instead of copy/rename at the same operation. * Import init.qcom.power from init.recovery to allow mitigation on recovery. * Create bootdevice symlink as lot of zip use it. Rework qcom.power init change ID: Change-Id: I647c09e430bc3904ff526ed662191e7d3b833e0b --- rootdir/init.recovery.qcom.rc | 73 +++++++++++++++++++++++++++++++++++++++++++ shinano.mk | 2 +- 2 files changed, 74 insertions(+), 1 deletion(-) create mode 100644 rootdir/init.recovery.qcom.rc diff --git a/rootdir/init.recovery.qcom.rc b/rootdir/init.recovery.qcom.rc new file mode 100644 index 0000000..998c647 --- /dev/null +++ b/rootdir/init.recovery.qcom.rc @@ -0,0 +1,73 @@ +on init + write /sys/class/android_usb/android0/idVendor 0fce + write /sys/class/android_usb/android0/idProduct 6182 + symlink /dev/block/platform/msm_sdcc.1 /dev/block/bootdevice + +on boot + # Allow core adjustements + write /sys/module/msm_thermal/core_control/enabled 0 + write /sys/devices/system/cpu/cpu1/online 1 + write /sys/devices/system/cpu/cpu2/online 1 + write /sys/devices/system/cpu/cpu3/online 1 + + write /sys/module/lpm_levels/system/cpu0/pc/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu0/wfi/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu0/retention/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu0/standalone_pc/suspend_enabled 1 + + write /sys/module/lpm_levels/system/cpu1/pc/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu1/wfi/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu1/retention/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu1/standalone_pc/suspend_enabled 1 + + write /sys/module/lpm_levels/system/cpu2/pc/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu2/wfi/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu2/retention/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu2/standalone_pc/suspend_enabled 1 + + write /sys/module/lpm_levels/system/cpu3/pc/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu3/wfi/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu3/retention/suspend_enabled 1 + write /sys/module/lpm_levels/system/cpu3/standalone_pc/suspend_enabled 1 + + write /sys/module/lpm_levels/system/cpu0/pc/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu0/wfi/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu0/retention/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu0/standalone_pc/idle_enabled 1 + + write /sys/module/lpm_levels/system/cpu1/pc/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu1/wfi/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu1/retention/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu1/standalone_pc/idle_enabled 1 + + write /sys/module/lpm_levels/system/cpu2/pc/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu2/wfi/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu2/retention/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu2/standalone_pc/idle_enabled 1 + + write /sys/module/lpm_levels/system/cpu3/pc/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu3/wfi/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu3/retention/idle_enabled 1 + write /sys/module/lpm_levels/system/cpu3/standalone_pc/idle_enabled 1 + + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor "ondemand" + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_governor "ondemand" + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_governor "ondemand" + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_governor "ondemand" + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq 1500000 + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq 1500000 + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu2/cpufreq/scaling_max_freq 1500000 + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_min_freq 300000 + write /sys/devices/system/cpu/cpu3/cpufreq/scaling_max_freq 1500000 + + # Restore core auto control with new settings + write /sys/module/msm_thermal/core_control/enabled 1 + write /sys/class/devfreq/qcom,cpubw.40/governor "cpubw_hwmon" + write /sys/class/kgsl/kgsl-3d0/devfreq/governor msm-adreno-tz + write /dev/cpuctl/cpu.notify_on_migrate 1 + + +service qseecomd /sbin/qseecomd diff --git a/shinano.mk b/shinano.mk index e900fb2..da2eda9 100644 --- a/shinano.mk +++ b/shinano.mk @@ -50,7 +50,7 @@ PRODUCT_COPY_FILES += \ # Recovery Init PRODUCT_COPY_FILES += \ - $(COMMON_PATH)/rootdir/init.qcom.power.rc:root/init.recovery.qcom.rc + $(COMMON_PATH)/rootdir/init.recovery.qcom.rc:root/init.recovery.qcom.rc # Camera PRODUCT_COPY_FILES += \ -- cgit v1.2.3