summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPatrick Rudolph <patrick.rudolph@9elements.com>2024-05-06 10:54:31 +0300
committerPatrick Rudolph <patrick.rudolph@9elements.com>2024-07-15 10:50:16 +0300
commit8ce4aaa9d8bb07568a8c2b8a47b514afa0c59835 (patch)
treeeca0c99daf6021ad10bd0b445af2d73518fb0ab8
parent3d2fa850140bb5bb86ed0197f6986af4f1bb554b (diff)
downloadopenbmc-8ce4aaa9d8bb07568a8c2b8a47b514afa0c59835.tar.xz
meta-ibm: sbp1: phosphor-virtual-sensor: Calculate input current for IR3826x
The IR38263/IR38060 cannot measure the input current or input power, thus calculate it from the output power, output current and input voltage using predefined power offset and internal resistance. Tested: Confirmed that new sensors appear in webui and provide sane sensor readings. Change-Id: Ic2e75496da3609c14b11cf3f7eb94654a331d1c9 Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
-rw-r--r--meta-ibm/recipes-phosphor/sensors/phosphor-virtual-sensor/sbp1/virtual_sensor_config.json486
1 files changed, 486 insertions, 0 deletions
diff --git a/meta-ibm/recipes-phosphor/sensors/phosphor-virtual-sensor/sbp1/virtual_sensor_config.json b/meta-ibm/recipes-phosphor/sensors/phosphor-virtual-sensor/sbp1/virtual_sensor_config.json
index 4386501424..3627ee7666 100644
--- a/meta-ibm/recipes-phosphor/sensors/phosphor-virtual-sensor/sbp1/virtual_sensor_config.json
+++ b/meta-ibm/recipes-phosphor/sensors/phosphor-virtual-sensor/sbp1/virtual_sensor_config.json
@@ -437,5 +437,491 @@
]
},
"Expression": "ifNan(P0 / (V0 * 0.9), 0)"
+ },
+ {
+ "Desc": {
+ "Name": "PVCORE_NIC1_Input_Current",
+ "SensorType": "current"
+ },
+ "Associations": [
+ [
+ "chassis",
+ "all_sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ],
+ [
+ "inventory",
+ "sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ]
+ ],
+ "Params": {
+ "DbusParam": [
+ {
+ "ParamName": "P1",
+ "Desc": {
+ "Name": "PVCORE_NIC1_Output_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "P2",
+ "Desc": {
+ "Name": "PVCORE_NIC1_Output_Current",
+ "SensorType": "current"
+ }
+ },
+ {
+ "ParamName": "P3",
+ "Desc": {
+ "Name": "PVCORE_NIC1_Input_Voltage",
+ "SensorType": "voltage"
+ }
+ }
+ ],
+ "ConstParam": [
+ {
+ "ParamName": "O",
+ "Value": 0.35
+ },
+ {
+ "ParamName": "R",
+ "Value": 0.0041
+ }
+ ]
+ },
+ "Expression": "(P3 > 0) ? ((O + P1 + R * P2 * P2) / P3) : 0"
+ },
+ {
+ "Desc": {
+ "Name": "PVCORE_NIC2_Input_Current",
+ "SensorType": "current"
+ },
+ "Associations": [
+ [
+ "chassis",
+ "all_sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ],
+ [
+ "inventory",
+ "sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ]
+ ],
+ "Params": {
+ "DbusParam": [
+ {
+ "ParamName": "P1",
+ "Desc": {
+ "Name": "PVCORE_NIC2_Output_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "P2",
+ "Desc": {
+ "Name": "PVCORE_NIC2_Output_Current",
+ "SensorType": "current"
+ }
+ },
+ {
+ "ParamName": "P3",
+ "Desc": {
+ "Name": "PVCORE_NIC2_Input_Voltage",
+ "SensorType": "voltage"
+ }
+ }
+ ],
+ "ConstParam": [
+ {
+ "ParamName": "O",
+ "Value": 0.35
+ },
+ {
+ "ParamName": "R",
+ "Value": 0.0041
+ }
+ ]
+ },
+ "Expression": "(P3 > 0) ? ((O + P1 + R * P2 * P2) / P3) : 0"
+ },
+ {
+ "Desc": {
+ "Name": "P1V2_NIC_Input_Current",
+ "SensorType": "current"
+ },
+ "Associations": [
+ [
+ "chassis",
+ "all_sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ],
+ [
+ "inventory",
+ "sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ]
+ ],
+ "Params": {
+ "DbusParam": [
+ {
+ "ParamName": "P1",
+ "Desc": {
+ "Name": "P1V2_NIC_Output_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "P2",
+ "Desc": {
+ "Name": "P1V2_NIC_Output_Current",
+ "SensorType": "current"
+ }
+ },
+ {
+ "ParamName": "P3",
+ "Desc": {
+ "Name": "P1V2_NIC_Input_Voltage",
+ "SensorType": "voltage"
+ }
+ }
+ ],
+ "ConstParam": [
+ {
+ "ParamName": "O",
+ "Value": 0.44
+ },
+ {
+ "ParamName": "R",
+ "Value": 0.0045
+ }
+ ]
+ },
+ "Expression": "(P3 > 0) ? ((O + P1 + R * P2 * P2) / P3) : 0"
+ },
+ {
+ "Desc": {
+ "Name": "P1V8_NIC_Input_Current",
+ "SensorType": "current"
+ },
+ "Associations": [
+ [
+ "chassis",
+ "all_sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ],
+ [
+ "inventory",
+ "sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ]
+ ],
+ "Params": {
+ "DbusParam": [
+ {
+ "ParamName": "P1",
+ "Desc": {
+ "Name": "P1V8_NIC_Output_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "P2",
+ "Desc": {
+ "Name": "P1V8_NIC_Output_Current",
+ "SensorType": "current"
+ }
+ },
+ {
+ "ParamName": "P3",
+ "Desc": {
+ "Name": "P1V8_NIC_Input_Voltage",
+ "SensorType": "voltage"
+ }
+ }
+ ],
+ "ConstParam": [
+ {
+ "ParamName": "O",
+ "Value": 0.66
+ },
+ {
+ "ParamName": "R",
+ "Value": 0.00505
+ }
+ ]
+ },
+ "Expression": "(P3 > 0) ? ((O + P1 + R * P2 * P2) / P3) : 0"
+ },
+ {
+ "Desc": {
+ "Name": "P3V3_NIC_Input_Current",
+ "SensorType": "current"
+ },
+ "Associations": [
+ [
+ "chassis",
+ "all_sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ],
+ [
+ "inventory",
+ "sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ]
+ ],
+ "Params": {
+ "DbusParam": [
+ {
+ "ParamName": "P1",
+ "Desc": {
+ "Name": "P3V3_NIC_Output_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "P2",
+ "Desc": {
+ "Name": "P3V3_NIC_Output_Current",
+ "SensorType": "current"
+ }
+ },
+ {
+ "ParamName": "P3",
+ "Desc": {
+ "Name": "P3V3_NIC_Input_Voltage",
+ "SensorType": "voltage"
+ }
+ }
+ ],
+ "ConstParam": [
+ {
+ "ParamName": "O",
+ "Value": 0.90
+ },
+ {
+ "ParamName": "R",
+ "Value": 0.00675
+ }
+ ]
+ },
+ "Expression": "(P3 > 0) ? ((O + P1 + R * P2 * P2) / P3) : 0"
+ },
+ {
+ "Desc": {
+ "Name": "P5V_AUX_Input_Current",
+ "SensorType": "current"
+ },
+ "Associations": [
+ [
+ "chassis",
+ "all_sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ],
+ [
+ "inventory",
+ "sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ]
+ ],
+ "Params": {
+ "DbusParam": [
+ {
+ "ParamName": "P1",
+ "Desc": {
+ "Name": "P5V_AUX_Output_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "P2",
+ "Desc": {
+ "Name": "P5V_AUX_Output_Current",
+ "SensorType": "current"
+ }
+ },
+ {
+ "ParamName": "P3",
+ "Desc": {
+ "Name": "P5V_AUX_Input_Voltage",
+ "SensorType": "voltage"
+ }
+ }
+ ],
+ "ConstParam": [
+ {
+ "ParamName": "O",
+ "Value": 1.25
+ },
+ {
+ "ParamName": "R",
+ "Value": 0.0079
+ }
+ ]
+ },
+ "Expression": "(P3 > 0) ? ((O + P1 + R * P2 * P2) / P3) : 0"
+ },
+ {
+ "Desc": {
+ "Name": "P3V3_AUX_Input_Current",
+ "SensorType": "current"
+ },
+ "Associations": [
+ [
+ "chassis",
+ "all_sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ],
+ [
+ "inventory",
+ "sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ]
+ ],
+ "Params": {
+ "DbusParam": [
+ {
+ "ParamName": "P1",
+ "Desc": {
+ "Name": "P3V3_AUX_Output_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "P2",
+ "Desc": {
+ "Name": "P3V3_AUX_Output_Current",
+ "SensorType": "current"
+ }
+ },
+ {
+ "ParamName": "P3",
+ "Desc": {
+ "Name": "P3V3_AUX_Input_Voltage",
+ "SensorType": "voltage"
+ }
+ }
+ ],
+ "ConstParam": [
+ {
+ "ParamName": "O",
+ "Value": 0.90
+ },
+ {
+ "ParamName": "R",
+ "Value": 0.00675
+ }
+ ]
+ },
+ "Expression": "(P3 > 0) ? ((O + P1 + R * P2 * P2) / P3) : 0"
+ },
+ {
+ "Desc": {
+ "Name": "P1V8_PCH_AUX_Input_Current",
+ "SensorType": "current"
+ },
+ "Associations": [
+ [
+ "chassis",
+ "all_sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ],
+ [
+ "inventory",
+ "sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ]
+ ],
+ "Params": {
+ "DbusParam": [
+ {
+ "ParamName": "P1",
+ "Desc": {
+ "Name": "P1V8_PCH_AUX_Output_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "P2",
+ "Desc": {
+ "Name": "P1V8_PCH_AUX_Output_Current",
+ "SensorType": "current"
+ }
+ },
+ {
+ "ParamName": "P3",
+ "Desc": {
+ "Name": "P1V8_PCH_AUX_Input_Voltage",
+ "SensorType": "voltage"
+ }
+ }
+ ],
+ "ConstParam": [
+ {
+ "ParamName": "O",
+ "Value": 0.40
+ },
+ {
+ "ParamName": "R",
+ "Value": 0.022
+ }
+ ]
+ },
+ "Expression": "(P3 > 0) ? ((O + P1 + R * P2 * P2) / P3) : 0"
+ },
+ {
+ "Desc": {
+ "Name": "P1V05_PCH_AUX_Input_Current",
+ "SensorType": "current"
+ },
+ "Associations": [
+ [
+ "chassis",
+ "all_sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ],
+ [
+ "inventory",
+ "sensors",
+ "/xyz/openbmc_project/inventory/system/board/IBM_SBP1_Baseboard"
+ ]
+ ],
+ "Params": {
+ "DbusParam": [
+ {
+ "ParamName": "P1",
+ "Desc": {
+ "Name": "P1V05_PCH_AUX_Output_Power",
+ "SensorType": "power"
+ }
+ },
+ {
+ "ParamName": "P2",
+ "Desc": {
+ "Name": "P1V05_PCH_AUX_Output_Current",
+ "SensorType": "current"
+ }
+ },
+ {
+ "ParamName": "P3",
+ "Desc": {
+ "Name": "P1V05_PCH_AUX_Input_Voltage",
+ "SensorType": "voltage"
+ }
+ }
+ ],
+ "ConstParam": [
+ {
+ "ParamName": "O",
+ "Value": 0.40
+ },
+ {
+ "ParamName": "R",
+ "Value": 0.0042
+ }
+ ]
+ },
+ "Expression": "(P3 > 0) ? ((O + P1 + R * P2 * P2) / P3) : 0"
}
]