meta-quanta: gbs: update thermal config to R01

1. update fine tuned PID parameters
2. update sensors threshold

Signed-off-by: George Hung <george.hung@quantatw.com>
Change-Id: I28f0e925e7f2925b7492bfb95106bd80215adf9e
diff --git a/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/config.json b/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/config.json
index d014380..5a4cd1b 100644
--- a/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/config.json
+++ b/meta-gbs/recipes-phosphor/fans/phosphor-pid-control/config.json
@@ -1,5 +1,5 @@
 {
-    "version" : "R00",
+    "version" : "R01",
     "sensors" : [
         {
             "name": "fan0",
@@ -62,9 +62,9 @@
             "timeout": 0
         },
         {
-            "name": "real_fleeting0",
+            "name": "cputemp",
             "type": "margin",
-            "readPath": "/xyz/openbmc_project/extsensors/margin/real_fleeting0",
+            "readPath": "/xyz/openbmc_project/extsensors/margin/cputemp",
             "writePath": "",
             "min": 0,
             "max": 0,
@@ -72,9 +72,29 @@
             "timeout": 0
         },
         {
-            "name": "real_fleeting1",
+            "name": "zone0_vr",
             "type": "margin",
-            "readPath": "/xyz/openbmc_project/extsensors/margin/real_fleeting1",
+            "readPath": "/xyz/openbmc_project/extsensors/margin/zone0_vr",
+            "writePath": "",
+            "min": 0,
+            "max": 0,
+            "ignoreDbusMinMax": true,
+            "timeout": 0
+        },
+        {
+            "name": "nvme",
+            "type": "margin",
+            "readPath": "/xyz/openbmc_project/extsensors/margin/nvme",
+            "writePath": "",
+            "min": 0,
+            "max": 0,
+            "ignoreDbusMinMax": true,
+            "timeout": 0
+        },
+        {
+            "name": "p12v_fan",
+            "type": "margin",
+            "readPath": "/xyz/openbmc_project/extsensors/margin/p12v_fan",
             "writePath": "",
             "min": 0,
             "max": 0,
@@ -101,7 +121,7 @@
                         "feedFwdGainCoeff": 0.0056,
                         "integralLimit_min": 0.0,
                         "integralLimit_max": 0.0,
-                        "outLim_min": 20.0,
+                        "outLim_min": 10.0,
                         "outLim_max": 100.0,
                         "slewNeg": 0.0,
                         "slewPos": 0.0
@@ -120,26 +140,89 @@
                         "feedFwdGainCoeff": 0.0056,
                         "integralLimit_min": 0.0,
                         "integralLimit_max": 0.0,
-                        "outLim_min": 20.0,
+                        "outLim_min": 10.0,
                         "outLim_max": 100.0,
                         "slewNeg": 0.0,
                         "slewPos": 0.0
                     }
                 },
                 {
-                    "name": "real_fleeting0",
+                    "name": "cputemp",
                     "type": "margin",
-                    "inputs": ["real_fleeting0"],
+                    "inputs": ["cputemp"],
                     "setpoint": 10.0,
                     "pid": {
                         "samplePeriod": 1.0,
-                        "proportionalCoeff": 225.0,
-                        "integralCoeff": 45.0,
+                        "proportionalCoeff": 714.0,
+                        "integralCoeff": 18.0,
                         "feedFwdOffsetCoeff": 0.0,
                         "feedFwdGainCoeff": 0.0,
-                        "integralLimit_min": 2500.0,
+                        "integralLimit_min": 1786.0,
                         "integralLimit_max": 18000.0,
-                        "outLim_min": 2500.0,
+                        "outLim_min": 1786.0,
+                        "outLim_max": 18000.0,
+                        "slewNeg": 0.0,
+                        "slewPos": 0.0,
+                        "positiveHysteresis": 0.0,
+                        "negativeHysteresis": 0.0
+                    }
+                },
+                {
+                    "name": "zone0_vr",
+                    "type": "margin",
+                    "inputs": ["zone0_vr"],
+                    "setpoint": 10.0,
+                    "pid": {
+                        "samplePeriod": 1.0,
+                        "proportionalCoeff": 536.0,
+                        "integralCoeff": 9.0,
+                        "feedFwdOffsetCoeff": 0.0,
+                        "feedFwdGainCoeff": 0.0,
+                        "integralLimit_min": 1786.0,
+                        "integralLimit_max": 18000.0,
+                        "outLim_min": 1786.0,
+                        "outLim_max": 18000.0,
+                        "slewNeg": 0.0,
+                        "slewPos": 0.0,
+                        "positiveHysteresis": 0.0,
+                        "negativeHysteresis": 0.0
+                    }
+                },
+                {
+                    "name": "fleeting0",
+                    "type": "margin",
+                    "inputs": ["fleeting0"],
+                    "setpoint": 10.0,
+                    "pid": {
+                        "samplePeriod": 1.0,
+                        "proportionalCoeff": 536.0,
+                        "integralCoeff": 9.0,
+                        "feedFwdOffsetCoeff": 0.0,
+                        "feedFwdGainCoeff": 0.0,
+                        "integralLimit_min": 1786.0,
+                        "integralLimit_max": 18000.0,
+                        "outLim_min": 1786.0,
+                        "outLim_max": 18000.0,
+                        "slewNeg": 0.0,
+                        "slewPos": 0.0,
+                        "positiveHysteresis": 0.0,
+                        "negativeHysteresis": 0.0
+                    }
+                },
+                {
+                    "name": "fleeting1",
+                    "type": "margin",
+                    "inputs": ["fleeting1"],
+                    "setpoint": 10.0,
+                    "pid": {
+                        "samplePeriod": 1.0,
+                        "proportionalCoeff": 536.0,
+                        "integralCoeff": 18.0,
+                        "feedFwdOffsetCoeff": 0.0,
+                        "feedFwdGainCoeff": 0.0,
+                        "integralLimit_min": 1786.0,
+                        "integralLimit_max": 18000.0,
+                        "outLim_min": 1786.0,
                         "outLim_max": 18000.0,
                         "slewNeg": 0.0,
                         "slewPos": 0.0,
@@ -167,7 +250,7 @@
                         "feedFwdGainCoeff": 0.0056,
                         "integralLimit_min": 0.0,
                         "integralLimit_max": 0.0,
-                        "outLim_min": 20.0,
+                        "outLim_min": 10.0,
                         "outLim_max": 100.0,
                         "slewNeg": 0.0,
                         "slewPos": 0.0
@@ -186,7 +269,7 @@
                         "feedFwdGainCoeff": 0.0056,
                         "integralLimit_min": 0.0,
                         "integralLimit_max": 0.0,
-                        "outLim_min": 20.0,
+                        "outLim_min": 10.0,
                         "outLim_max": 100.0,
                         "slewNeg": 0.0,
                         "slewPos": 0.0
@@ -205,26 +288,47 @@
                         "feedFwdGainCoeff": 0.0056,
                         "integralLimit_min": 0.0,
                         "integralLimit_max": 0.0,
-                        "outLim_min": 20.0,
+                        "outLim_min": 10.0,
                         "outLim_max": 100.0,
                         "slewNeg": 0.0,
                         "slewPos": 0.0
                     }
                 },
                 {
-                    "name": "real_fleeting1",
+                    "name": "nvme",
                     "type": "margin",
-                    "inputs": ["real_fleeting1"],
+                    "inputs": ["nvme"],
                     "setpoint": 10.0,
                     "pid": {
                         "samplePeriod": 1.0,
-                        "proportionalCoeff": 225.0,
-                        "integralCoeff": 45.0,
+                        "proportionalCoeff": 1786.0,
+                        "integralCoeff": 36.0,
                         "feedFwdOffsetCoeff": 0.0,
                         "feedFwdGainCoeff": 0.0,
-                        "integralLimit_min": 2500.0,
+                        "integralLimit_min": 1786.0,
                         "integralLimit_max": 18000.0,
-                        "outLim_min": 2500.0,
+                        "outLim_min": 1786.0,
+                        "outLim_max": 18000.0,
+                        "slewNeg": 0.0,
+                        "slewPos": 0.0,
+                        "positiveHysteresis": 0.0,
+                        "negativeHysteresis": 0.0
+                    }
+                },
+                {
+                    "name": "p12v_fan",
+                    "type": "margin",
+                    "inputs": ["p12v_fan"],
+                    "setpoint": 10.0,
+                    "pid": {
+                        "samplePeriod": 1.0,
+                        "proportionalCoeff": 268.0,
+                        "integralCoeff": 4.0,
+                        "feedFwdOffsetCoeff": 0.0,
+                        "feedFwdGainCoeff": 0.0,
+                        "integralLimit_min": 1786.0,
+                        "integralLimit_max": 18000.0,
+                        "outLim_min": 1786.0,
                         "outLim_max": 18000.0,
                         "slewNeg": 0.0,
                         "slewPos": 0.0,
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@82000/sbtsi@4c.conf b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@82000/sbtsi@4c.conf
index de988aa..6dcada7 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@82000/sbtsi@4c.conf
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@82000/sbtsi@4c.conf
@@ -1,8 +1,8 @@
 LABEL_temp1 = "cputemp"
-CRITHI_temp1 = "85000"
-CRITLO_temp1 = "5000"
-WARNHI_temp1 = "85000"
-WARNLO_temp1 = "5000"
+CRITHI_temp1 = "95000"
+CRITLO_temp1 = "0"
+WARNHI_temp1 = "95000"
+WARNLO_temp1 = "0"
 MINVALUE_temp1 = "-128"
 MAXVALUE_temp1 = "127"
 ASYNC_READ_TIMEOUT_temp1 = "500"
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@85000/i2c-switch@71/i2c@0/max31725@54.conf b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@85000/i2c-switch@71/i2c@0/max31725@54.conf
index b8ba115..839a7c6 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@85000/i2c-switch@71/i2c@0/max31725@54.conf
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@85000/i2c-switch@71/i2c@0/max31725@54.conf
@@ -1,8 +1,8 @@
 LABEL_temp1 = "i2cool_0"
-CRITHI_temp1 = "70000"
-CRITLO_temp1 = "5000"
-WARNHI_temp1 = "70000"
-WARNLO_temp1 = "5000"
+CRITHI_temp1 = "35000"
+CRITLO_temp1 = "0"
+WARNHI_temp1 = "35000"
+WARNLO_temp1 = "0"
 MINVALUE_temp1 = "-128"
 MAXVALUE_temp1 = "127"
 ASYNC_READ_TIMEOUT_temp1 = "500"
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@85000/i2c-switch@71/i2c@1/max31725@55.conf b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@85000/i2c-switch@71/i2c@1/max31725@55.conf
index a798fc9..174c62b 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@85000/i2c-switch@71/i2c@1/max31725@55.conf
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@85000/i2c-switch@71/i2c@1/max31725@55.conf
@@ -1,8 +1,8 @@
 LABEL_temp1 = "i2cool_1"
 CRITHI_temp1 = "70000"
-CRITLO_temp1 = "5000"
+CRITLO_temp1 = "0"
 WARNHI_temp1 = "70000"
-WARNLO_temp1 = "5000"
+WARNLO_temp1 = "0"
 MINVALUE_temp1 = "-128"
 MAXVALUE_temp1 = "127"
 ASYNC_READ_TIMEOUT_temp1 = "500"
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@85000/i2c-switch@71/i2c@2/max31725@5d.conf b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@85000/i2c-switch@71/i2c@2/max31725@5d.conf
index a510438..3fb0cee 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@85000/i2c-switch@71/i2c@2/max31725@5d.conf
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@85000/i2c-switch@71/i2c@2/max31725@5d.conf
@@ -1,8 +1,8 @@
 LABEL_temp1 = "i2cool_2"
 CRITHI_temp1 = "70000"
-CRITLO_temp1 = "5000"
+CRITLO_temp1 = "0"
 WARNHI_temp1 = "70000"
-WARNLO_temp1 = "5000"
+WARNLO_temp1 = "0"
 MINVALUE_temp1 = "-128"
 MAXVALUE_temp1 = "127"
 ASYNC_READ_TIMEOUT_temp1 = "500"
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@0/vrm@60.conf b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@0/vrm@60.conf
index 4f5ac3f..580eeec 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@0/vrm@60.conf
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@0/vrm@60.conf
@@ -38,8 +38,8 @@
 
 LABEL_temp1= "vddcr_cpu"
 WARNLO_temp1= "0"
-WARNHI_temp1= "125000"
-CRITHI_temp1 = "125000"
+WARNHI_temp1= "100000"
+CRITHI_temp1 = "100000"
 CRITLO_temp1 = "0"
 MINVALUE_temp1 = "-128"
 MAXVALUE_temp1 = "127"
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@1/vrm@61.conf b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@1/vrm@61.conf
index de3ba4d..f21c32a 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@1/vrm@61.conf
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@1/vrm@61.conf
@@ -38,8 +38,8 @@
 
 LABEL_temp1= "vddcr_soc"
 WARNLO_temp1= "0"
-WARNHI_temp1= "125000"
-CRITHI_temp1 = "125000"
+WARNHI_temp1= "100000"
+CRITHI_temp1 = "100000"
 CRITLO_temp1 = "0"
 MINVALUE_temp1 = "-128"
 MAXVALUE_temp1 = "127"
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@2/vrm@63.conf b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@2/vrm@63.conf
index 80be07d..9cd9a12 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@2/vrm@63.conf
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@2/vrm@63.conf
@@ -38,8 +38,8 @@
 
 LABEL_temp1= "vddio_efgh"
 WARNLO_temp1= "0"
-WARNHI_temp1= "125000"
-CRITHI_temp1 = "125000"
+WARNHI_temp1= "100000"
+CRITHI_temp1 = "100000"
 CRITLO_temp1 = "0"
 MINVALUE_temp1 = "-128"
 MAXVALUE_temp1 = "127"
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@3/vrm@45.conf b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@3/vrm@45.conf
index 2ae8f21..762af17 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@3/vrm@45.conf
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@89000/i2c-switch@71/i2c@3/vrm@45.conf
@@ -38,8 +38,8 @@
 
 LABEL_temp1= "vddio_abcd"
 WARNLO_temp1= "0"
-WARNHI_temp1= "125000"
-CRITHI_temp1 = "125000"
+WARNHI_temp1= "100000"
+CRITHI_temp1 = "100000"
 CRITLO_temp1 = "0"
 MINVALUE_temp1 = "-128"
 MAXVALUE_temp1 = "127"
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@8c000/max34451@4e.conf b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@8c000/max34451@4e.conf
index 353075a..9a8a803 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@8c000/max34451@4e.conf
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@8c000/max34451@4e.conf
@@ -110,10 +110,10 @@
 PWRONMON_in12 = "ON"
 
 LABEL_temp1 = "powerseq_temp"
-CRITHI_temp1 = "85000"
-CRITLO_temp1 = "5000"
-WARNHI_temp1 = "85000"
-WARNLO_temp1 = "5000"
+CRITHI_temp1 = "99000"
+CRITLO_temp1 = "0"
+WARNHI_temp1 = "99000"
+WARNLO_temp1 = "0"
 MINVALUE_temp1 = "-128"
 MAXVALUE_temp1 = "127"
 ASYNC_READ_TIMEOUT_temp1 = "500"
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@8c000/vrm@5d.conf b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@8c000/vrm@5d.conf
index 0ef7d60..427cdab 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@8c000/vrm@5d.conf
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@8c000/vrm@5d.conf
@@ -42,8 +42,8 @@
 
 LABEL_temp1= "p12v_fan"
 WARNLO_temp1= "0"
-WARNHI_temp1= "125000"
-CRITHI_temp1 = "125000"
+WARNHI_temp1= "114000"
+CRITHI_temp1 = "114000"
 CRITLO_temp1 = "0"
 MINVALUE_temp1 = "-128"
 MAXVALUE_temp1 = "127"
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@8c000/vrm@5e.conf b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@8c000/vrm@5e.conf
index a795a74..c1612d1 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@8c000/vrm@5e.conf
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/i2c@8c000/vrm@5e.conf
@@ -42,8 +42,8 @@
 
 LABEL_temp1= "p12v_mobo"
 WARNLO_temp1= "0"
-WARNHI_temp1= "125000"
-CRITHI_temp1 = "125000"
+WARNHI_temp1= "114000"
+CRITHI_temp1 = "114000"
 CRITLO_temp1 = "0"
 MINVALUE_temp1 = "-128"
 MAXVALUE_temp1 = "127"
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json b/meta-gbs/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json
index 9a114d3..306e74e 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-nvme/nvme_config.json
@@ -163,9 +163,9 @@
     ],
     "threshold": [
         {
-            "criticalHigh": 70,
+            "criticalHigh": 77,
             "criticalLow": 0,
-            "warningHigh": 70,
+            "warningHigh": 77,
             "warningLow": 0,
             "maxValue": 127,
             "minValue": -128
diff --git a/meta-gbs/recipes-phosphor/sensors/phosphor-nvme/nvme_json_rewrite.sh b/meta-gbs/recipes-phosphor/sensors/phosphor-nvme/nvme_json_rewrite.sh
index 27ca98d..91dcb5c 100644
--- a/meta-gbs/recipes-phosphor/sensors/phosphor-nvme/nvme_json_rewrite.sh
+++ b/meta-gbs/recipes-phosphor/sensors/phosphor-nvme/nvme_json_rewrite.sh
@@ -202,9 +202,9 @@
     ],
     "threshold": [
         {
-            "criticalHigh": 70,
+            "criticalHigh": 77,
             "criticalLow": 0,
-            "warningHigh": 70,
+            "warningHigh": 77,
             "warningLow": 0,
             "maxValue": 127,
             "minValue": -128