summaryrefslogtreecommitdiff
path: root/meta-quanta
diff options
context:
space:
mode:
authorGeorge Hung <george.hung@quantatw.com>2021-03-08 11:45:06 +0300
committerBrandon Kim <brandonkim@google.com>2021-03-09 01:36:49 +0300
commit027c05505532d5cd7d21c14a9add2e4daa711710 (patch)
tree7628ed145e1430808c52233fe5484ac42c3b27c4 /meta-quanta
parent52a81c2d31e9e3acebfad9969db0efc6bb997389 (diff)
downloadopenbmc-027c05505532d5cd7d21c14a9add2e4daa711710.tar.xz
meta-quanta: gbs: update NVMe SSD and CPU margin temperatures config
1. Change CPU margin from 13C to 15C 2. NVMe SSD margin = WCTemp - 7 (WCTemp = Warning Composite Temperature Threshold) Signed-off-by: George Hung <george.hung@quantatw.com> Change-Id: Id9af01305764132fa537afada073826f3d37125e
Diffstat (limited to 'meta-quanta')
-rw-r--r--meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/config-margin.json98
-rw-r--r--meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/read-margin-temp-wait.sh25
2 files changed, 74 insertions, 49 deletions
diff --git a/meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/config-margin.json b/meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/config-margin.json
index c4bdbdddd..e28c0be0f 100644
--- a/meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/config-margin.json
+++ b/meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/config-margin.json
@@ -11,7 +11,7 @@
"path": "",
"sysLabel": "",
"targetTemp": -1,
- "targetTempOffset": -13000,
+ "targetTempOffset": -15000,
"scalar": 1.0
}
},
@@ -22,11 +22,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme0",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp00,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -37,11 +37,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme1",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp01,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -52,11 +52,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme2",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp02,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -67,11 +67,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme3",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp03,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -82,11 +82,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme4",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp04,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -97,11 +97,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme5",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp05,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -112,11 +112,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme6",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp06,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -127,11 +127,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme7",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp07,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -142,11 +142,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme8",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp08,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -157,11 +157,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme9",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp09,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -172,11 +172,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme10",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp10,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -187,11 +187,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme11",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp11,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -202,11 +202,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme12",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp12,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -217,11 +217,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme13",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp13,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -232,11 +232,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme14",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp14,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
@@ -247,11 +247,11 @@
"path": "/xyz/openbmc_project/sensors/temperature/nvme15",
"parameters": {
"type": "",
- "maxTemp": 77000,
+ "maxTemp": WCTemp15,
"path": "",
"sysLabel": "",
- "targetTemp": 67000,
- "targetTempOffset": 0,
+ "targetTemp": -1,
+ "targetTempOffset": -7000,
"scalar": 1.0
}
},
diff --git a/meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/read-margin-temp-wait.sh b/meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/read-margin-temp-wait.sh
index 2e44479f6..d0cb2f632 100644
--- a/meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/read-margin-temp-wait.sh
+++ b/meta-quanta/meta-gbs/recipes-quanta/fans/read-margin-temp/read-margin-temp-wait.sh
@@ -20,6 +20,31 @@ do
mapper wait $path
done
+nvmePath="/xyz/openbmc_project/sensors/temperature/nvme"
+nvmeInventoryPath="/xyz/openbmc_project/inventory/system/chassis/motherboard/nvme"
+# Get and Set WCTEMP
+for ((i = 0; i < 16; i++)); do
+ name=WCTemp$(printf "%02d" $i)
+ wcTemp=72000
+ presentState=$(busctl get-property \
+ xyz.openbmc_project.Inventory.Manager \
+ ${nvmeInventoryPath}${i} \
+ xyz.openbmc_project.Inventory.Item \
+ Present | awk '{print $2}')
+
+ if [[ $presentState == "true" ]]; then
+ wcTemp=$(
+ busctl get-property xyz.openbmc_project.nvme.manager \
+ ${nvmePath}${i} \
+ xyz.openbmc_project.Sensor.Threshold.Critical \
+ CriticalHigh | awk '{print $2}'
+ )
+ wcTemp=$((wcTemp * 1000))
+ fi
+
+ sed -i "s/$name/${wcTemp}/g" $MARGIN_TABLE_FILE
+done
+
# start read margin temp
/usr/bin/read-margin-temp &