bytedance: g220a: Add VR related virtual sensors
Add below virtual sensors based on VR sensors:
P0_DIMM_VR_Pwr = CPU0_DIMM_VR_0_Input_Power + CPU0_DIMM_VR_1_Input_Power
P1_DIMM_VR_Pwr = CPU1_DIMM_VR_0_Output_Voltage + CPU1_DIMM_VR_1_Output_Voltage
CPU0_VR_Pwr = CPU0_VR_0_Input_Power + CPU0_VR_1_Input_Power + CPU0_VR_2_Input_Power
CPU1_VR_Pwr = CPU1_VR_0_Input_Power + CPU1_VR_1_Input_Power + CPU1_VR_2_Input_Power
CPU0_VR_Temp = max(CPU0_VR_0_Temperature, CPU0_VR_1_Temperature, CPU0_VR_2_Temperature)
CPU1_VR_Temp = max(CPU1_VR_0_Temperature , CPU1_VR_1_Temperature, CPU1_VR_2_Temperature)
P0_DIMM_VR_Temp = max(CPU0_DIMM_VR_0_Temperature, CPU0_DIMM_VR_1_Temperature)
P1_DIMM_VR_Temp = max(CPU1_DIMM_VR_0_Temperature, CPU1_DIMM_VR_1_Temperature)
Tested: Verify the above sensors appear on DBus and the values are
expected.
Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I9412e7da1a147b64cb43a5f9981042623cfb6423
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json b/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json
index 0aacc03..6610184 100644
--- a/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/sensors/phosphor-virtual-sensor/virtual_sensor_config.json
@@ -28,5 +28,297 @@
]
},
"Expression": "T0 + T1"
+ },
+ {
+ "Desc":
+ {
+ "Name": "P0_DIMM_VR_Pwr",
+ "SensorType": "power"
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "T0",
+ "Desc":
+ {
+ "Name": "CPU0_DIMM_VR_0_Input_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "T1",
+ "Desc":
+ {
+ "Name": "CPU0_DIMM_VR_1_Input_Power",
+ "SensorType": "power"
+ }
+ }
+ ]
+ },
+ "Expression": "T0 + T1"
+ },
+ {
+ "Desc":
+ {
+ "Name": "P1_DIMM_VR_Pwr",
+ "SensorType": "power"
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "T0",
+ "Desc":
+ {
+ "Name": "CPU1_DIMM_VR_0_Input_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "T1",
+ "Desc":
+ {
+ "Name": "CPU1_DIMM_VR_1_Input_Power",
+ "SensorType": "power"
+ }
+ }
+ ]
+ },
+ "Expression": "T0 + T1"
+ },
+ {
+ "Desc":
+ {
+ "Name": "CPU0_VR_Pwr",
+ "SensorType": "power"
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "T0",
+ "Desc":
+ {
+ "Name": "CPU0_VR_0_Input_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "T1",
+ "Desc":
+ {
+ "Name": "CPU0_VR_1_Input_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "T2",
+ "Desc":
+ {
+ "Name": "CPU0_VR_2_Input_Power",
+ "SensorType": "power"
+ }
+ }
+ ]
+ },
+ "Expression": "T0 + T1 + T2"
+ },
+ {
+ "Desc":
+ {
+ "Name": "CPU1_VR_Pwr",
+ "SensorType": "power"
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "T0",
+ "Desc":
+ {
+ "Name": "CPU1_VR_0_Input_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "T1",
+ "Desc":
+ {
+ "Name": "CPU1_VR_1_Input_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "T2",
+ "Desc":
+ {
+ "Name": "CPU1_VR_2_Input_Power",
+ "SensorType": "power"
+ }
+ }
+ ]
+ },
+ "Expression": "T0 + T1 + T2"
+ },
+ {
+ "Desc":
+ {
+ "Name": "P0_DIMM_VR_Temp",
+ "SensorType": "temperature"
+ },
+ "Threshold" :
+ {
+ "CriticalHigh": 125,
+ "WarningHigh": 105
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "T0",
+ "Desc":
+ {
+ "Name": "CPU0_DIMM_VR_0_Temperature",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "T1",
+ "Desc":
+ {
+ "Name": "CPU0_DIMM_VR_1_Temperature",
+ "SensorType": "temperature"
+ }
+ }
+ ]
+ },
+ "Expression": "max(T0, T1)"
+ },
+ {
+ "Desc":
+ {
+ "Name": "P1_DIMM_VR_Temp",
+ "SensorType": "temperature"
+ },
+ "Threshold" :
+ {
+ "CriticalHigh": 125,
+ "WarningHigh": 105
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "T0",
+ "Desc":
+ {
+ "Name": "CPU1_DIMM_VR_0_Temperature",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "T1",
+ "Desc":
+ {
+ "Name": "CPU1_DIMM_VR_1_Temperature",
+ "SensorType": "temperature"
+ }
+ }
+ ]
+ },
+ "Expression": "max(T0, T1)"
+ },
+ {
+ "Desc":
+ {
+ "Name": "CPU0_VR_Temp",
+ "SensorType": "temperature"
+ },
+ "Threshold" :
+ {
+ "CriticalHigh": 125,
+ "WarningHigh": 105
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "T0",
+ "Desc":
+ {
+ "Name": "CPU0_VR_0_Temperature",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "T1",
+ "Desc":
+ {
+ "Name": "CPU0_VR_1_Temperature",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "T2",
+ "Desc":
+ {
+ "Name": "CPU0_VR_2_Temperature",
+ "SensorType": "temperature"
+ }
+ }
+ ]
+ },
+ "Expression": "max(T0, T1, T2)"
+ },
+ {
+ "Desc":
+ {
+ "Name": "CPU1_VR_Temp",
+ "SensorType": "temperature"
+ },
+ "Threshold" :
+ {
+ "CriticalHigh": 125,
+ "WarningHigh": 105
+ },
+ "Params":
+ {
+ "DbusParam":
+ [
+ {
+ "ParamName": "T0",
+ "Desc":
+ {
+ "Name": "CPU1_VR_0_Temperature",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "T1",
+ "Desc":
+ {
+ "Name": "CPU1_VR_1_Temperature",
+ "SensorType": "temperature"
+ }
+ },
+ {
+ "ParamName": "T2",
+ "Desc":
+ {
+ "Name": "CPU1_VR_2_Temperature",
+ "SensorType": "temperature"
+ }
+ }
+ ]
+ },
+ "Expression": "max(T0, T1, T2)"
}
]