thermal: update USBC throttling policy

Bug: 265951418
Test: verified by emul_temp
Test: Run astress for 2 hr and no crash and false positive triggered
Change-Id: I7c3d0f63ecd614343a47cf60498b9472ae846faf
diff --git a/thermal_info_config_charge_tangorpro.json b/thermal_info_config_charge_tangorpro.json
index 8710c78..35d4cb2 100644
--- a/thermal_info_config_charge_tangorpro.json
+++ b/thermal_info_config_charge_tangorpro.json
@@ -36,8 +36,11 @@
         {
             "Name":"usb_pwr_therm",
             "Type":"UNKNOWN",
+            "HotThreshold":["NAN", "37.0", "NAN", "NAN", "NAN", "NAN", "NAN"],
             "TempPath":"/dev/thermal/tz-by-name/usb_pwr_therm/tz_temp",
-            "Multiplier":0.001
+            "Multiplier":0.001,
+            "PollingDelay":300000,
+            "PassiveDelay":7000
         },
         {
             "Name":"usb_pwr_therm2",
@@ -66,12 +69,76 @@
                     "LimitInfo": [0, 1, 2, 3, 4, 5, 5]
                 }
             ]
+        },
+        {
+            "Name":"USB-MINUS-USB2",
+            "Type":"UNKNOWN",
+            "Hidden":true,
+            "VirtualSensor":true,
+            "Formula":"WEIGHTED_AVG",
+            "Combination":["usb_pwr_therm", "usb_pwr_therm2"],
+            "Coefficient":["1.0", "-1.0"],
+            "Multiplier":0.001
+        },
+        {
+            "Name":"NEUTRAL-MINUS-USB2",
+            "Type":"UNKNOWN",
+            "Hidden":true,
+            "VirtualSensor":true,
+            "Formula":"WEIGHTED_AVG",
+            "Combination":["neutral_therm", "usb_pwr_therm2"],
+            "Coefficient":["1.0", "-1.0"],
+            "Multiplier":0.001
+        },
+        {
+            "Name":"VIRTUAL-USBC-THROTTLING-LOW-SOC",
+            "Type":"UNKNOWN",
+            "Hidden":true,
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "Combination":["usb_pwr_therm", "USB-MINUS-USB2"],
+            "Coefficient":["38000", "5500"],
+            "Multiplier":1
+        },
+        {
+            "Name":"VIRTUAL-USBC-THROTTLING-HIGH-SOC",
+            "Type":"UNKNOWN",
+            "Hidden":true,
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "Combination":["usb_pwr_therm", "USB-MINUS-USB2", "NEUTRAL-MINUS-USB2"],
+            "Coefficient":["38000", "1000", "10000"],
+            "Multiplier":1
+        },
+        {
+            "Name":"VIRTUAL-USB-THROTTLING",
+            "Type":"USB_PORT",
+            "Hidden":true,
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "TriggerSensor": "usb_pwr_therm",
+            "Combination":["VIRTUAL-USBC-THROTTLING-LOW-SOC", "VIRTUAL-USBC-THROTTLING-HIGH-SOC"],
+            "Coefficient":["2.0", "3.0"],
+            "HotThreshold":["NAN", "NAN", "NAN", "NAN", "1.0", "NAN", "NAN"],
+            "BindedCdevInfo": [
+                {
+                    "CdevRequest": "usbc-port",
+                    "LimitInfo": [0, 0, 0, 0, 1, 1, 1]
+                }
+            ],
+            "Multiplier":1,
+            "PollingDelay":300000,
+            "PassiveDelay":7000
         }
     ],
     "CoolingDevices":[
         {
             "Name":"fcc",
             "Type":"BATTERY"
+        },
+        {
+            "Name":"usbc-port",
+            "Type":"BATTERY"
         }
     ]
 }
diff --git a/thermal_info_config_tangorpro.json b/thermal_info_config_tangorpro.json
index 87a401a..9531f46 100644
--- a/thermal_info_config_tangorpro.json
+++ b/thermal_info_config_tangorpro.json
@@ -41,8 +41,11 @@
         {
             "Name":"usb_pwr_therm",
             "Type":"UNKNOWN",
+            "HotThreshold":["NAN", "37.0", "NAN", "NAN", "NAN", "NAN", "NAN"],
             "TempPath":"/dev/thermal/tz-by-name/usb_pwr_therm/tz_temp",
-            "Multiplier":0.001
+            "Multiplier":0.001,
+            "PollingDelay":300000,
+            "PassiveDelay":7000
         },
         {
             "Name":"usb_pwr_therm2",
@@ -213,6 +216,100 @@
             ]
         },
         {
+            "Name":"USB-MINUS-USB2",
+            "Type":"UNKNOWN",
+            "Hidden":true,
+            "VirtualSensor":true,
+            "Formula":"WEIGHTED_AVG",
+            "Combination":["usb_pwr_therm", "usb_pwr_therm2"],
+            "Coefficient":["1.0", "-1.0"],
+            "Multiplier":0.001
+        },
+        {
+            "Name":"NEUTRAL-MINUS-USB2",
+            "Type":"UNKNOWN",
+            "Hidden":true,
+            "VirtualSensor":true,
+            "Formula":"WEIGHTED_AVG",
+            "Combination":["neutral_therm", "usb_pwr_therm2"],
+            "Coefficient":["1.0", "-1.0"],
+            "Multiplier":0.001
+        },
+        {
+            "Name":"VIRTUAL-USBC-THROTTLING-LOW-SOC",
+            "Type":"UNKNOWN",
+            "Hidden":true,
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "Combination":["usb_pwr_therm", "USB-MINUS-USB2"],
+            "Coefficient":["38000", "5500"],
+            "Multiplier":1
+        },
+        {
+            "Name":"VIRTUAL-USBC-UI-LOW-SOC",
+            "Type":"UNKNOWN",
+            "Hidden":true,
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "Combination":["usb_pwr_therm", "USB-MINUS-USB2"],
+            "Coefficient":["38000", "6000"],
+            "Multiplier":1
+        },
+        {
+            "Name":"VIRTUAL-USBC-THROTTLING-HIGH-SOC",
+            "Type":"UNKNOWN",
+            "Hidden":true,
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "Combination":["usb_pwr_therm", "USB-MINUS-USB2", "NEUTRAL-MINUS-USB2"],
+            "Coefficient":["38000", "1000", "10000"],
+            "Multiplier":1
+        },
+        {
+            "Name":"VIRTUAL-USBC-UI-HIGH-SOC",
+            "Type":"UNKNOWN",
+            "Hidden":true,
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "Combination":["usb_pwr_therm", "USB-MINUS-USB2", "NEUTRAL-MINUS-USB2"],
+            "Coefficient":["38000", "1500", "10000"],
+            "Multiplier":1
+        },
+        {
+            "Name":"VIRTUAL-USB-THROTTLING",
+            "Type":"USB_PORT",
+            "Hidden":true,
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "TriggerSensor": "usb_pwr_therm",
+            "Combination":["VIRTUAL-USBC-THROTTLING-LOW-SOC", "VIRTUAL-USBC-THROTTLING-HIGH-SOC"],
+            "Coefficient":["2.0", "3.0"],
+            "HotThreshold":["NAN", "NAN", "NAN", "NAN", "1.0", "NAN", "NAN"],
+            "BindedCdevInfo": [
+                {
+                    "CdevRequest": "usbc-port",
+                    "LimitInfo": [0, 0, 0, 0, 1, 1, 1]
+                }
+            ],
+            "Multiplier":1,
+            "PollingDelay":300000,
+            "PassiveDelay":7000
+        },
+        {
+            "Name":"VIRTUAL-USB-UI",
+            "Type":"USB_PORT",
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "TriggerSensor": "usb_pwr_therm",
+            "Combination":["VIRTUAL-USBC-UI-LOW-SOC", "VIRTUAL-USBC-UI-HIGH-SOC"],
+            "Coefficient":["2.0", "3.0"],
+            "HotThreshold":["NAN", "NAN", "NAN", "NAN", "NAN", "1.0", "NAN"],
+            "Multiplier":1,
+            "SendCallback":true,
+            "PollingDelay":300000,
+            "PassiveDelay":7000
+        },
+        {
             "Name":"cellular-emergency",
             "Type":"POWER_AMPLIFIER",
             "VirtualSensor":true,
@@ -617,6 +714,10 @@
         {
             "Name":"fcc",
             "Type":"BATTERY"
+        },
+        {
+            "Name":"usbc-port",
+            "Type":"BATTERY"
         }
     ],
     "PowerRails":[