diff --git a/conf/init.pantah.rc b/conf/init.pantah.rc index 7c64e7e..1abbf21 100644 --- a/conf/init.pantah.rc +++ b/conf/init.pantah.rc @@ -63,19 +63,6 @@ on post-fs-data chown system system /mnt/vendor/persist/sensors/registry/vd6282_spectral_fac_cal.reg chmod 600 /mnt/vendor/persist/sensors/registry/vd6282_spectral_fac_cal.reg -# Create thermal symlink in off charging mode -on charger - # Wait for insmod_sh to finish all common modules - wait_for_prop vendor.common.modules.ready 1 - - # Wait for insmod_sh to finish all device specific modules - wait_for_prop vendor.device.modules.ready 1 - - mkdir /dev/thermal 0750 system system - mkdir /dev/thermal/tz-by-name 0750 system system - mkdir /dev/thermal/cdev-by-name 0750 system system - restart vendor.thermal.symlinks - service wpa_supplicant /vendor/bin/hw/wpa_supplicant \ -O/data/vendor/wifi/wpa/sockets -puse_p2p_group_interface=1p2p_device=1 \ -m/vendor/etc/wifi/p2p_supplicant.conf \ diff --git a/device-cheetah.mk b/device-cheetah.mk index 2d6ca6b..84af1e1 100644 --- a/device-cheetah.mk +++ b/device-cheetah.mk @@ -130,6 +130,7 @@ DEVICE_MANIFEST_FILE += \ # Thermal Config PRODUCT_COPY_FILES += \ device/google/pantah/thermal_info_config_cheetah.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ + device/google/pantah/thermal_info_config_charge_cheetah.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json \ device/google/pantah/thermal_info_config_proto.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_proto.json # Power HAL config diff --git a/device-panther.mk b/device-panther.mk index bc380f2..37c438d 100644 --- a/device-panther.mk +++ b/device-panther.mk @@ -113,6 +113,7 @@ DEVICE_MANIFEST_FILE += \ # Thermal Config PRODUCT_COPY_FILES += \ device/google/pantah/thermal_info_config_panther.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config.json \ + device/google/pantah/thermal_info_config_charge_panther.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_charge.json \ device/google/pantah/thermal_info_config_proto.json:$(TARGET_COPY_OUT_VENDOR)/etc/thermal_info_config_proto.json # Power HAL config diff --git a/thermal_info_config_charge_cheetah.json b/thermal_info_config_charge_cheetah.json new file mode 100644 index 0000000..95724da --- /dev/null +++ b/thermal_info_config_charge_cheetah.json @@ -0,0 +1,194 @@ +{ + "Sensors":[ + { + "Name":"neutral_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/neutral_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"qi_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/qi_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"quiet_therm", + "Type":"UNKNOWN", + "HotThreshold":["NAN", 32.2, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], + "TempPath":"/dev/thermal/tz-by-name/quiet_therm/tz_temp", + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"usb_pwr_therm", + "Type":"UNKNOWN", + "HotThreshold":["NAN", 35.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "TempPath":"/dev/thermal/tz-by-name/usb_pwr_therm/tz_temp", + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"usb_pwr_therm2", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/usb_pwr_therm2/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"VIRTUAL-SKIN-CHARGE", + "Type":"UNKNOWN", + "VirtualSensor":true, + "TriggerSensor":"quiet_therm", + "Formula":"WEIGHTED_AVG", + "Combination":["qi_therm","quiet_therm"], + "Coefficient":[0.35, 0.65], + "Offset":-650, + "HotThreshold":["NAN", 39.0, 41.0, 43.0, 45.0, 47.0, 55.0], + "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9], + "Multiplier":0.001, + "PollingDelay":300000, + "PassiveDelay":7000, + "PIDInfo": { + "K_Po":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", 5, "NAN", "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", 0, "NAN", "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", 3600, "NAN", "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", 300, "NAN", "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", 6000, "NAN", "NAN", "NAN", "NAN"], + "I_Cutoff":["NAN", "NAN", 2, "NAN", "NAN", "NAN", "NAN"] + }, + "ExcludedPowerInfo": [ + { + "PowerRail": "PARTIAL_SYSTEM_POWER", + "PowerWeight": [0.5, 0.5, 0.8, 1.0, 1.0, 1.0, 1.0] + } + ], + "BindedCdevInfo": [ + { + "CdevRequest": "chg_mdis", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "CdevCeiling": [0, 4, 7, 8, 9, 9, 9], + "LimitInfo": [0, 0, 0, 0, 0, 9, 9] + } + ] + }, + { + "Name":"USB-MINUS-USB2", + "Type":"UNKNOWN", + "VirtualSensor":true, + "TriggerSensor": "usb_pwr_therm", + "Formula":"WEIGHTED_AVG", + "Combination":["usb_pwr_therm", "usb_pwr_therm2"], + "Coefficient":[1.0, -1.0], + "HotThreshold":["NAN", "2.0", "NAN", "NAN", "NAN", "NAN", "NAN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 0, 0, 0] + } + ], + "Multiplier":0.001, + "PollingDelay":0, + "PassiveDelay":7000 + }, + { + "Name":"USB-MINUS-NEUTRAL", + "Type":"UNKNOWN", + "VirtualSensor":true, + "TriggerSensor": "usb_pwr_therm", + "Formula":"WEIGHTED_AVG", + "Combination":["usb_pwr_therm", "neutral_therm"], + "Coefficient":[1.0, -1.0], + "HotThreshold":["NAN", "4.5", "NAN", "NAN", "NAN", "NAN", "NAN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 0, 0, 0] + } + ], + "Multiplier":0.001, + "PollingDelay":0, + "PassiveDelay":7000 + }, + { + "Name":"VIRTUAL-USB-THROTTLING", + "Type":"USB_PORT", + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "TriggerSensor": "usb_pwr_therm", + "Combination":["usb_pwr_therm", "USB-MINUS-USB2", "USB-MINUS-NEUTRAL"], + "Coefficient":[42000, 2500, 5000], + "HotThreshold":["NAN", "NAN", "NAN", "NAN", "3.0", "NAN", "NAN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier":1, + "PollingDelay":60000, + "PassiveDelay":7000 + } + ], + "CoolingDevices":[ + { + "Name":"chg_mdis", + "Type":"BATTERY" + }, + { + "Name":"usbc-port", + "Type":"BATTERY" + } + ], + "PowerRails":[ + { + "Name":"PPVAR_VSYS_PWR_DISP" + }, + { + "Name":"VSYS_PWR_MODEM" + }, + { + "Name":"S2M_VDD_CPUCL2", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + + }, + { + "Name":"S3M_VDD_CPUCL1", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"S4M_VDD_CPUCL0", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"S5M_VDD_INT" + }, + { + "Name":"S1M_VDD_MIF" + }, + { + "Name":"S2S_VDD_G3D", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"PARTIAL_SYSTEM_POWER", + "VirtualRails":true, + "Formula":"WEIGHTED_AVG", + "Combination":["VSYS_PWR_MODEM", "S2M_VDD_CPUCL2", "S3M_VDD_CPUCL1", "S4M_VDD_CPUCL0", "S5M_VDD_INT", "S1M_VDD_MIF", "S2S_VDD_G3D"], + "Coefficient":[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], + "PowerSampleDelay":7000, + "PowerSampleCount":5 + } + ] +} diff --git a/thermal_info_config_charge_panther.json b/thermal_info_config_charge_panther.json new file mode 100644 index 0000000..b4be800 --- /dev/null +++ b/thermal_info_config_charge_panther.json @@ -0,0 +1,194 @@ +{ + "Sensors":[ + { + "Name":"neutral_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/neutral_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"qi_therm", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/qi_therm/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"usb_pwr_therm", + "Type":"UNKNOWN", + "HotThreshold":["NAN", 35.0, "NAN", "NAN", "NAN", "NAN", "NAN"], + "TempPath":"/dev/thermal/tz-by-name/usb_pwr_therm/tz_temp", + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"usb_pwr_therm2", + "Type":"UNKNOWN", + "TempPath":"/dev/thermal/tz-by-name/usb_pwr_therm2/tz_temp", + "Multiplier":0.001 + }, + { + "Name":"quiet_therm", + "Type":"UNKNOWN", + "HotThreshold":["NAN", 32.9, "NAN", "NAN", "NAN", "NAN", "NAN"], + "HotHysteresis":[0.0, 0.9, 0.0, 0.0, 0.0, 0.0, 0.0], + "TempPath":"/dev/thermal/tz-by-name/quiet_therm/tz_temp", + "Multiplier":0.001, + "PollingDelay":60000, + "PassiveDelay":7000 + }, + { + "Name":"VIRTUAL-SKIN-CHARGE", + "Type":"UNKNOWN", + "VirtualSensor":true, + "TriggerSensor":"quiet_therm", + "Formula":"WEIGHTED_AVG", + "Combination":["qi_therm", "quiet_therm"], + "Coefficient":[0.282, 0.718], + "Offset":-448, + "HotThreshold":["NAN", 39.0, 41.0, 43.0, 45.0, 47.0, 55.0], + "HotHysteresis":[0.0, 1.9, 1.9, 1.9, 1.9, 1.9, 1.9], + "Multiplier":0.001, + "PollingDelay":300000, + "PassiveDelay":7000, + "PIDInfo": { + "K_Po":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "K_Pu":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "K_I":["NAN", "NAN", 5, "NAN", "NAN", "NAN", "NAN"], + "K_D":["NAN", "NAN", 0, "NAN", "NAN", "NAN", "NAN"], + "I_Max":["NAN", "NAN", 800, "NAN", "NAN", "NAN", "NAN"], + "S_Power":["NAN", "NAN", 3600, "NAN", "NAN", "NAN", "NAN"], + "MinAllocPower":["NAN", "NAN", 300, "NAN", "NAN", "NAN", "NAN"], + "MaxAllocPower":["NAN", "NAN", 6000, "NAN", "NAN", "NAN", "NAN"], + "I_Cutoff":["NAN", "NAN", 2, "NAN", "NAN", "NAN", "NAN"] + }, + "ExcludedPowerInfo": [ + { + "PowerRail": "POWER_FOR_CHARGING_THROTTLING", + "PowerWeight": [0.5, 0.5, 0.8, 1.0, 1.0, 1.0, 1.0] + } + ], + "BindedCdevInfo": [ + { + "CdevRequest": "chg_mdis", + "CdevWeightForPID": [1, 1, 1, 1, 1, 1, 1], + "MaxReleaseStep": 1, + "MaxThrottleStep": 1, + "CdevCeiling": [0, 4, 7, 8, 9, 9, 9], + "LimitInfo": [0, 0, 0, 0, 0, 9, 9] + } + ] + }, + { + "Name":"USB-MINUS-USB2", + "Type":"UNKNOWN", + "VirtualSensor":true, + "TriggerSensor": "usb_pwr_therm", + "Formula":"WEIGHTED_AVG", + "Combination":["usb_pwr_therm", "usb_pwr_therm2"], + "Coefficient":[1.0, -1.0], + "HotThreshold":["NAN", "1.0", "NAN", "NAN", "NAN", "NAN", "NAN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 0, 0, 0] + } + ], + "Multiplier":0.001, + "PollingDelay":0, + "PassiveDelay":7000 + }, + { + "Name":"USB-MINUS-NEUTRAL", + "Type":"UNKNOWN", + "VirtualSensor":true, + "TriggerSensor": "usb_pwr_therm", + "Formula":"WEIGHTED_AVG", + "Combination":["usb_pwr_therm", "neutral_therm"], + "Coefficient":[1.0, -1.0], + "HotThreshold":["NAN", "2.5", "NAN", "NAN", "NAN", "NAN", "NAN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 0, 0, 0] + } + ], + "Multiplier":0.001, + "PollingDelay":0, + "PassiveDelay":7000 + }, + { + "Name":"VIRTUAL-USB-THROTTLING", + "Type":"USB_PORT", + "VirtualSensor":true, + "Formula":"COUNT_THRESHOLD", + "TriggerSensor": "usb_pwr_therm", + "Combination":["usb_pwr_therm", "USB-MINUS-USB2", "USB-MINUS-NEUTRAL"], + "Coefficient":[40000, 1500, 3000], + "HotThreshold":["NAN", "NAN", "NAN", "NAN", "3.0", "NAN", "NAN"], + "BindedCdevInfo": [ + { + "CdevRequest": "usbc-port", + "LimitInfo": [0, 0, 0, 0, 1, 1, 1] + } + ], + "Multiplier":1, + "PollingDelay":60000, + "PassiveDelay":7000 + } + ], + "CoolingDevices":[ + { + "Name":"chg_mdis", + "Type":"BATTERY" + }, + { + "Name":"usbc-port", + "Type":"BATTERY" + } + ], + "PowerRails":[ + { + "Name":"PPVAR_VSYS_PWR_DISP" + }, + { + "Name":"VSYS_PWR_MODEM" + }, + { + "Name":"S2M_VDD_CPUCL2", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + + }, + { + "Name":"S3M_VDD_CPUCL1", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"S4M_VDD_CPUCL0", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"S5M_VDD_INT" + }, + { + "Name":"S1M_VDD_MIF" + }, + { + "Name":"S2S_VDD_G3D", + "PowerSampleDelay":7000, + "PowerSampleCount":1 + }, + { + "Name":"POWER_FOR_CHARGING_THROTTLING", + "VirtualRails":true, + "Formula":"WEIGHTED_AVG", + "Combination":["VSYS_PWR_MODEM", "S2M_VDD_CPUCL2", "S3M_VDD_CPUCL1", "S4M_VDD_CPUCL0", "S5M_VDD_INT", "S1M_VDD_MIF", "S2S_VDD_G3D"], + "Coefficient":[1.0, 1.0, 1.0, 1.0, 1.0, 1.0, 1.0], + "PowerSampleDelay":7000, + "PowerSampleCount":5 + } + ] +}