From 86fd0cbdb20bcbf9f8f0fffb577f6fc79e301eaa Mon Sep 17 00:00:00 2001 From: Subhajeet Muhuri Date: Fri, 12 Feb 2021 14:45:50 +0800 Subject: [PATCH] sdm660-common: Commonize thermal-engine-config from device (2/1) --- configs/thermal/thermal-engine-map.conf | 4 + configs/thermal/thermal-engine-normal.conf | 302 ++++++++++++++++++++ configs/thermal/thermal-engine-video.conf | 310 +++++++++++++++++++++ configs/thermal/thermal-engine.conf | 2 + sdm660.mk | 7 + 5 files changed, 625 insertions(+) create mode 100644 configs/thermal/thermal-engine-map.conf create mode 100644 configs/thermal/thermal-engine-normal.conf create mode 100644 configs/thermal/thermal-engine-video.conf create mode 100644 configs/thermal/thermal-engine.conf diff --git a/configs/thermal/thermal-engine-map.conf b/configs/thermal/thermal-engine-map.conf new file mode 100644 index 00000000..ef7ed31c --- /dev/null +++ b/configs/thermal/thermal-engine-map.conf @@ -0,0 +1,4 @@ +[0:thermal-engine-normal.conf] +[1:thermal-engine-high.conf] +[10:thermal-engine-nolimits.conf] +[12:thermal-engine-video.conf] diff --git a/configs/thermal/thermal-engine-normal.conf b/configs/thermal/thermal-engine-normal.conf new file mode 100644 index 00000000..582abd37 --- /dev/null +++ b/configs/thermal/thermal-engine-normal.conf @@ -0,0 +1,302 @@ +# SENSOR : ALIAS +# tsens_tz_sensor8 : gpu +# tsens_tz_sensor6 : cpu7 +# tsens_tz_sensor5 : cpu6 +# tsens_tz_sensor4 : cpu5 +# tsens_tz_sensor3 : cpu4 +# tsens_tz_sensor1 : cpu0-cpu1-cpu2-cpu3 + +#debug +#Conf file: vendor/etc/thermal-engine-normal.conf + +[VIRTUAL-CLUSTER1] +algo_type virtual +trip_sensor tsens_tz_sensor3 +set_point 60000 +set_point_clr 50000 +sensors tsens_tz_sensor3 tsens_tz_sensor4 tsens_tz_sensor5 tsens_tz_sensor6 tsens_tz_sensor7 tsens_tz_sensor12 +weights +sampling 10 +math 2 + +[VIRTUAL-CLUSTER0] +algo_type virtual +trip_sensor tsens_tz_sensor1 +set_point 60000 +set_point_clr 50000 +sensors tsens_tz_sensor1 tsens_tz_sensor2 +weights +sampling 10 +math 2 + +[SS-XO-THERM-GOLD] +algo_type ss +sampling 2000 +sensor xo_therm +device cluster1 +set_point 46000 +set_point_clr 42000 +time_constant 0 +device_max_limit 14016000 + +[SS-XO-THERM-SILVER] +algo_type ss +sampling 2000 +sensor xo_therm +device cluster0 +set_point 44000 +set_point_clr 40000 +time_constant 0 +device_max_limit 902400 + +[SS-QUIET-THERM-GOLD2] +algo_type ss +sampling 2000 +sensor tsens_tz_sensor5 +device cluster1 +set_point 62000 +set_point_clr 57000 +time_constant 0 +device_max_limit 1401600 + +[SS-QUIET-THERM-SILVER2] +algo_type ss +sampling 2000 +sensor tsens_tz_sensor5 +device cluster0 +set_point 60000 +set_point_clr 55000 +time_constant 0 +device_max_limit 902400 + +[SS-QUIET-THERM-SILVER] +algo_type ss +sampling 2000 +sensor quiet_therm +device cluster0 +set_point 41000 +set_point_clr 38000 +time_constant 0 +device_max_limit 1536000 + +[SS-QUIET-THERM-GOLD] +algo_type ss +sampling 2000 +sensor quiet_therm +device cluster1 +set_point 40000 +set_point_clr 37000 +time_constant 0 +device_max_limit 1747200 + +[SS-GPU] +algo_type ss +sampling 10 +sensor gpu +device gpu +set_point 95000 +set_point_clr 65000 +time_constant 0 + +[SPEAKER-CAL] +sampling 30000 30000 10 1800000 +sensor pm660_tz +sensors tsens_tz_sensor8 tsens_tz_sensor9 tsens_tz_sensor10 tsens_tz_sensor11 tsens_tz_sensor13 +temp_range 6000 10000 2000 +max_temp 45000 +offset -4000 + +[BATTERY_CHARGING_CTL] +algo_type monitor +sampling 10000 +sensor quiet_therm +thresholds 36000 37000 39000 40000 +thresholds_clr 35000 36000 37000 38000 +actions battery battery battery battery +action_info 1 2 4 5 + +[LCD_MANAGEMENT] +algo_type monitor +sampling 1000 +sensor xo_therm +thresholds 45000 47000 +thresholds_clr 43000 45000 +actions lcd lcd +action_info 216 204 + +[CPU7_HOTPLUG_MONITOR] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor5 +thresholds 62000 +thresholds_clr 57000 +actions hotplug_7 +action_info 1 + +[CPU3_HOTPLUG_MONITOR] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor5 +thresholds 60000 +thresholds_clr 55000 +actions hotplug_3 +action_info 1 + +[CPU5_HOTPLUG_MONITOR] +algo_type monitor +sampling 1000 +sensor quiet_therm +thresholds 40000 +thresholds_clr 37000 +actions hotplug_5 +action_info 1 + +[CPU2_HOTPLUG_MONITOR] +algo_type monitor +sampling 1000 +sensor quiet_therm +thresholds 41000 +thresholds_clr 38000 +actions hotplug_2 +action_info 1 + +[VDD_RSTR_MONITOR-TSENS13] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor13 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS12] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor12 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS11] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor11 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS10] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor10 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS9] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor9 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS8] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor8 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS7] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor7 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS6] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor6 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS5] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor5 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS4] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor4 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS3] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor3 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS2] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor2 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS1] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor1 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS0] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor0 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + diff --git a/configs/thermal/thermal-engine-video.conf b/configs/thermal/thermal-engine-video.conf new file mode 100644 index 00000000..b8cde1f9 --- /dev/null +++ b/configs/thermal/thermal-engine-video.conf @@ -0,0 +1,310 @@ +# SENSOR : ALIAS +# tsens_tz_sensor8 : gpu +# tsens_tz_sensor6 : cpu7 +# tsens_tz_sensor5 : cpu6 +# tsens_tz_sensor4 : cpu5 +# tsens_tz_sensor3 : cpu4 +# tsens_tz_sensor1 : cpu0-cpu1-cpu2-cpu3 + +#debug +#Conf file: vendor/etc/thermal-engine-video.conf + +[VIRTUAL-CLUSTER1] +algo_type virtual +trip_sensor tsens_tz_sensor3 +set_point 60000 +set_point_clr 50000 +sensors tsens_tz_sensor3 tsens_tz_sensor4 tsens_tz_sensor5 tsens_tz_sensor6 tsens_tz_sensor7 tsens_tz_sensor12 +weights +sampling 10 +math 2 + +[VIRTUAL-CLUSTER0] +algo_type virtual +trip_sensor tsens_tz_sensor1 +set_point 60000 +set_point_clr 50000 +sensors tsens_tz_sensor1 tsens_tz_sensor2 +weights +sampling 10 +math 2 + +[SS-XO-THERM-GOLD] +algo_type ss +sampling 2000 +sensor xo_therm +device cluster1 +set_point 47000 +set_point_clr 43000 +time_constant 0 +device_max_limit 14016000 + +[SS-XO-THERM-SILVER] +algo_type ss +sampling 2000 +sensor xo_therm +device cluster0 +set_point 45000 +set_point_clr 41000 +time_constant 0 +device_max_limit 902400 + +[SS-QUIET-THERM-GOLD2] +algo_type ss +sampling 2000 +sensor tsens_tz_sensor5 +device cluster1 +set_point 62000 +set_point_clr 57000 +time_constant 0 +device_max_limit 1401600 + +[SS-QUIET-THERM-SILVER2] +algo_type ss +sampling 2000 +sensor tsens_tz_sensor5 +device cluster0 +set_point 60000 +set_point_clr 55000 +time_constant 0 +device_max_limit 902400 + +[SS-QUIET-THERM-SILVER] +algo_type ss +sampling 2000 +sensor quiet_therm +device cluster0 +set_point 41000 +set_point_clr 38000 +time_constant 0 +device_max_limit 1536000 + +[SS-QUIET-THERM-GOLD] +algo_type ss +sampling 2000 +sensor quiet_therm +device cluster1 +set_point 40000 +set_point_clr 37000 +time_constant 0 +device_max_limit 1747200 + +[SS-GPU] +algo_type ss +sampling 10 +sensor gpu +device gpu +set_point 95000 +set_point_clr 65000 +time_constant 0 + +[SPEAKER-CAL] +sampling 30000 30000 10 1800000 +sensor pm660_tz +sensors tsens_tz_sensor8 tsens_tz_sensor9 tsens_tz_sensor10 tsens_tz_sensor11 tsens_tz_sensor13 +temp_range 6000 10000 2000 +max_temp 45000 +offset -4000 + +[BATTERY_CHARGING_CTL] +algo_type monitor +sampling 10000 +sensor quiet_therm +thresholds 36000 37000 39000 40000 +thresholds_clr 35000 36000 37000 38000 +actions battery battery battery battery +action_info 1 2 4 5 + +[LCD_MANAGEMENT] +algo_type monitor +sampling 1000 +sensor xo_therm +thresholds 45000 47000 +thresholds_clr 43000 45000 +actions lcd lcd +action_info 216 204 + +[CPU_HOTPLUG_MONITOR] +algo_type monitor +sampling 1000 +sensor quiet_therm +thresholds 47000 +thresholds_clr 45000 +actions hotplug_1+hotplug_2+hotplug_3+hotplug_4+hotplug_5+hotplug_6+hotplug_7 +action_info 1+1+1+1+1+1+1 + +[CPU7_HOTPLUG_MONITOR] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor5 +thresholds 62000 +thresholds_clr 57000 +actions hotplug_7 +action_info 1 + +[CPU3_HOTPLUG_MONITOR] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor5 +thresholds 60000 +thresholds_clr 55000 +actions hotplug_3 +action_info 1 + +[CPU5_HOTPLUG_MONITOR] +algo_type monitor +sampling 1000 +sensor quiet_therm +thresholds 40000 +thresholds_clr 37000 +actions hotplug_5 +action_info 1 + +[CPU2_HOTPLUG_MONITOR] +algo_type monitor +sampling 1000 +sensor quiet_therm +thresholds 41000 +thresholds_clr 38000 +actions hotplug_2 +action_info 1 + +[VDD_RSTR_MONITOR-TSENS13] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor13 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS12] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor12 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS11] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor11 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS10] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor10 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS9] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor9 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS8] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor8 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS7] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor7 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS6] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor6 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS5] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor5 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS4] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor4 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS3] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor3 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS2] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor2 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS1] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor1 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending + +[VDD_RSTR_MONITOR-TSENS0] +algo_type monitor +sampling 1000 +sensor tsens_tz_sensor0 +thresholds 5000 +thresholds_clr 10000 +actions vdd_restriction +action_info 1 +descending diff --git a/configs/thermal/thermal-engine.conf b/configs/thermal/thermal-engine.conf new file mode 100644 index 00000000..33fc8214 --- /dev/null +++ b/configs/thermal/thermal-engine.conf @@ -0,0 +1,2 @@ +# File empty by default. +# Replace contents of this file with custom configuration. diff --git a/sdm660.mk b/sdm660.mk index 1bfdd11f..2f20769c 100644 --- a/sdm660.mk +++ b/sdm660.mk @@ -541,6 +541,13 @@ PRODUCT_PACKAGES += \ PRODUCT_PACKAGES += \ ThermalController +# Thermal Conf +PRODUCT_COPY_FILES += \ + $(COMMON_PATH)/configs/thermal/thermal-engine.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine.conf \ + $(COMMON_PATH)/configs/thermal/thermal-engine-map.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-map.conf \ + $(COMMON_PATH)/configs/thermal/thermal-engine-normal.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-normal.conf \ + $(COMMON_PATH)/configs/thermal/thermal-engine-video.conf:$(TARGET_COPY_OUT_VENDOR)/etc/thermal-engine-video.conf + # USB PRODUCT_PACKAGES += \ android.hardware.usb@1.0-service.xiaomi_sdm660