thermal: seperate thermal config for charging
- Separate thermal config for charger mode and remove the unused thermal throttling. - Move charger pixel-thermal-symlink from common to project folder to prevent the GKI version dependencies from blocking init. Bug: 240897207 Test: usbc overheating protection and charging throttling worked properly in charger. Change-Id: I0ba3dabcc8c0c74e7e9334bc04a6fac875ac6b6c
This commit is contained in:
parent
ef7f2540fb
commit
47fb7d702c
5 changed files with 390 additions and 13 deletions
|
@ -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 \
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
194
thermal_info_config_charge_cheetah.json
Normal file
194
thermal_info_config_charge_cheetah.json
Normal file
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
194
thermal_info_config_charge_panther.json
Normal file
194
thermal_info_config_charge_panther.json
Normal file
|
@ -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
|
||||
}
|
||||
]
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue