thermal: Enable usb port overheat protection

Bug: 183573049
Test: Veirfied with emul temp
Change-Id: I6235228b06938e5a33ad64b07bd69f50846a78d4
diff --git a/thermal_info_config_oriole.json b/thermal_info_config_oriole.json
index 395a690..58ac51e 100644
--- a/thermal_info_config_oriole.json
+++ b/thermal_info_config_oriole.json
@@ -91,7 +91,7 @@
             "Multiplier":0.001
         },
         {
-            "Name":"usb_pwr_therm2",
+            "Name":"usb_pwr_therm",
             "Type":"UNKNOWN",
             "HotThreshold":[
                 "NAN",
@@ -106,6 +106,23 @@
             "Multiplier":0.001
         },
         {
+            "Name":"usb_pwr_therm2",
+            "Type":"UNKNOWN",
+            "HotThreshold":[
+                "NAN",
+                "35.0",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN"
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":0.001,
+            "PollingDelay":60000,
+            "PassiveDelay":7000
+        },
+        {
             "Name":"disp_therm",
             "Type":"UNKNOWN",
             "HotThreshold":[
@@ -403,6 +420,123 @@
             "PassiveDelay":7000
         },
         {
+            "Name":"USB2-MINUS-USB",
+            "Type":"UNKNOWN",
+            "VirtualSensor":true,
+            "Formula":"WEIGHTED_AVG",
+            "Combination":[
+                "usb_pwr_therm2",
+                "usb_pwr_therm"
+            ],
+            "Coefficient":[
+                "1.0",
+                "-1.0"
+            ],
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN"
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":0.001
+        },
+        {
+            "Name":"USB2-MINUS-QI",
+            "Type":"UNKNOWN",
+            "VirtualSensor":true,
+            "Formula":"WEIGHTED_AVG",
+            "Combination":[
+                "usb_pwr_therm2",
+                "qi_therm"
+            ],
+            "Coefficient":[
+                "1.0",
+                "-1.0"
+            ],
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN"
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":0.001
+        },
+        {
+            "Name":"VIRTUAL-USB-THROTTLING",
+            "Type":"USB_PORT",
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "TriggerSensor": "usb_pwr_therm2",
+            "Combination":[
+                "usb_pwr_therm2",
+                "USB2-MINUS-USB",
+                "USB2-MINUS-QI"
+            ],
+            "Coefficient":[
+                "35000",
+                "2000",
+                "10000"
+            ],
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "3.0",
+                "NAN",
+                "NAN"
+            ],
+            "BindedCdevInfo": [
+                {
+                    "CdevRequest": "usbc-port",
+                    "LimitInfo": [0, 0, 0, 0, 1, 1, 1]
+                }
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":1,
+            "PollingDelay":60000,
+            "PassiveDelay":7000
+        },
+        {
+            "Name":"VIRTUAL-USB-UI",
+            "Type":"USB_PORT",
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "TriggerSensor": "usb_pwr_therm2",
+            "Combination":[
+                "usb_pwr_therm2",
+                "USB2-MINUS-USB",
+                "USB2-MINUS-QI"
+            ],
+            "Coefficient":[
+                "35000",
+                "3000",
+                "12000"
+            ],
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "3.0",
+                "NAN"
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":1,
+            "Monitor":true,
+            "PollingDelay":60000,
+            "PassiveDelay":7000
+        },
+        {
             "Name":"LITTLE",
             "Type":"CPU",
             "HotThreshold":[
@@ -789,6 +923,10 @@
         {
             "Name":"wlc_fcc",
             "Type":"BATTERY"
+        },
+        {
+            "Name":"usbc-port",
+            "Type":"BATTERY"
         }
     ],
     "PowerRails":[
diff --git a/thermal_info_config_raven.json b/thermal_info_config_raven.json
index bedf2fe..2e05f0f 100644
--- a/thermal_info_config_raven.json
+++ b/thermal_info_config_raven.json
@@ -108,7 +108,7 @@
             "PassiveDelay":7000
         },
         {
-            "Name":"usb_pwr_therm2",
+            "Name":"usb_pwr_therm",
             "Type":"UNKNOWN",
             "HotThreshold":[
                 "NAN",
@@ -123,6 +123,23 @@
             "Multiplier":0.001
         },
         {
+            "Name":"usb_pwr_therm2",
+            "Type":"UNKNOWN",
+            "HotThreshold":[
+                "NAN",
+                "35.0",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN"
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":0.001,
+            "PollingDelay":60000,
+            "PassiveDelay":7000
+        },
+        {
             "Name":"disp_therm",
             "Type":"UNKNOWN",
             "HotThreshold":[
@@ -403,6 +420,123 @@
             "PassiveDelay":7000
         },
         {
+            "Name":"USB2-MINUS-USB",
+            "Type":"UNKNOWN",
+            "VirtualSensor":true,
+            "Formula":"WEIGHTED_AVG",
+            "Combination":[
+                "usb_pwr_therm2",
+                "usb_pwr_therm"
+            ],
+            "Coefficient":[
+                "1.0",
+                "-1.0"
+            ],
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN"
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":0.001
+        },
+        {
+            "Name":"USB2-MINUS-QI",
+            "Type":"UNKNOWN",
+            "VirtualSensor":true,
+            "Formula":"WEIGHTED_AVG",
+            "Combination":[
+                "usb_pwr_therm2",
+                "qi_therm"
+            ],
+            "Coefficient":[
+                "1.0",
+                "-1.0"
+            ],
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN"
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":0.001
+        },
+        {
+            "Name":"VIRTUAL-USB-THROTTLING",
+            "Type":"USB_PORT",
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "TriggerSensor": "usb_pwr_therm2",
+            "Combination":[
+                "usb_pwr_therm2",
+                "USB2-MINUS-USB",
+                "USB2-MINUS-QI"
+            ],
+            "Coefficient":[
+                "35000",
+                "3000",
+                "9000"
+            ],
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "3.0",
+                "NAN",
+                "NAN"
+            ],
+            "BindedCdevInfo": [
+                {
+                    "CdevRequest": "usbc-port",
+                    "LimitInfo": [0, 0, 0, 0, 1, 1, 1]
+                }
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":1,
+            "PollingDelay":60000,
+            "PassiveDelay":7000
+        },
+        {
+            "Name":"VIRTUAL-USB-UI",
+            "Type":"USB_PORT",
+            "VirtualSensor":true,
+            "Formula":"COUNT_THRESHOLD",
+            "TriggerSensor": "usb_pwr_therm2",
+            "Combination":[
+                "usb_pwr_therm2",
+                "USB2-MINUS-USB",
+                "USB2-MINUS-QI"
+            ],
+            "Coefficient":[
+                "35000",
+                "4000",
+                "12000"
+            ],
+            "HotThreshold":[
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "NAN",
+                "3.0",
+                "NAN"
+            ],
+            "VrThreshold":"NAN",
+            "Multiplier":1,
+            "Monitor":true,
+            "PollingDelay":60000,
+            "PassiveDelay":7000
+        },
+        {
             "Name":"LITTLE",
             "Type":"CPU",
             "HotThreshold":[
@@ -793,6 +927,10 @@
         {
             "Name":"wlc_fcc",
             "Type":"BATTERY"
+        },
+        {
+            "Name":"usbc-port",
+            "Type":"BATTERY"
         }
     ],
     "PowerRails":[