meta-inspur: fp5280g2: Update the power-supply label name
- In the BmcWeb repo, according to the `LABEL` in the power-supply
configuration, get the `unit` value of the power type
(PowerInputWatts & PowerOutputWatts).
link: https://github.com/openbmc/bmcweb/blob/master/redfish-core/lib/sensors.hpp#L912
- Since the `LABEL` naming of the previous configuration file was
wrong, it needs to be updated and conforms to the `LABEL` naming
convention.
- Also, sync update association.json to ensure that the correct
sensor value can be obtained.
Tested:
- Built image-bmc successfully on fp5280g2 machine.
- Obtain the correct `PowerInputWatts` & `PowerOutputWatts` by
viewing the BmcWeb log.
- Obtain `redfish/v1/Chassis/chassis/Power` by the Redfish command:
... ...
"PowerSupplies": [
{
"@odata.id": "/redfish/v1/Chassis/chassis/Power#/PowerSupplies/0",
"EfficiencyPercent": 90,
"IndicatorLED": "Off",
"Manufacturer": "",
"MemberId": "powersupply0",
"Model": "PS-2801-12L",
"Name": "powersupply0",
"PartNumber": "",
"PowerInputWatts": 13.9375,
"PowerOutputWatts": 5.5,
"SerialNumber": "6K12A0117473YX",
"Status": {
"Health": "OK",
"State": "Enabled"
}
}
]
... ...
Signed-off-by: George Liu <liuxiwei@inspur.com>
Change-Id: Ie88a629c97ab8ad3136a49f71b810b930a820ab2
diff --git a/meta-inspur/meta-fp5280g2/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json b/meta-inspur/meta-fp5280g2/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json
index bb90d15..0f3ffa3 100644
--- a/meta-inspur/meta-fp5280g2/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json
+++ b/meta-inspur/meta-fp5280g2/recipes-phosphor/inventory/phosphor-inventory-manager/associations.json
@@ -11,10 +11,12 @@
},
"paths":
[
- "/xyz/openbmc_project/sensors/power/psu0_pin",
- "/xyz/openbmc_project/sensors/power/psu0_pout",
- "/xyz/openbmc_project/sensors/voltage/psu0_vin",
- "/xyz/openbmc_project/sensors/voltage/psu0_vout",
+ "/xyz/openbmc_project/sensors/power/ps0_input_power",
+ "/xyz/openbmc_project/sensors/power/ps0_output_power",
+ "/xyz/openbmc_project/sensors/voltage/ps0_input_voltage",
+ "/xyz/openbmc_project/sensors/voltage/ps0_output_voltage",
+ "/xyz/openbmc_project/sensors/current/ps0_input_current",
+ "/xyz/openbmc_project/sensors/current/ps0_output_current",
"/xyz/openbmc_project/sensors/temperature/psu_inlet",
"/xyz/openbmc_project/sensors/voltage/P12V",
"/xyz/openbmc_project/sensors/voltage/P3V3"
@@ -56,10 +58,12 @@
},
"paths":
[
- "/xyz/openbmc_project/sensors/power/psu1_pin",
- "/xyz/openbmc_project/sensors/power/psu1_pout",
- "/xyz/openbmc_project/sensors/voltage/psu1_vin",
- "/xyz/openbmc_project/sensors/voltage/psu1_vout",
+ "/xyz/openbmc_project/sensors/power/ps1_input_power",
+ "/xyz/openbmc_project/sensors/power/ps1_output_power",
+ "/xyz/openbmc_project/sensors/voltage/ps1_input_voltage",
+ "/xyz/openbmc_project/sensors/voltage/ps1_output_voltage",
+ "/xyz/openbmc_project/sensors/current/ps1_input_current",
+ "/xyz/openbmc_project/sensors/current/ps1_output_current",
"/xyz/openbmc_project/sensors/temperature/psu_inlet",
"/xyz/openbmc_project/sensors/voltage/P12V",
"/xyz/openbmc_project/sensors/voltage/P3V3"
@@ -1903,14 +1907,18 @@
"/xyz/openbmc_project/sensors/voltage/PVDN_CPU1",
"/xyz/openbmc_project/sensors/voltage/PVIO_CPU0",
"/xyz/openbmc_project/sensors/voltage/PVIO_CPU1",
- "/xyz/openbmc_project/sensors/power/psu0_pin",
- "/xyz/openbmc_project/sensors/power/psu0_pout",
- "/xyz/openbmc_project/sensors/power/psu1_pin",
- "/xyz/openbmc_project/sensors/power/psu1_pout",
- "/xyz/openbmc_project/sensors/voltage/psu0_vin",
- "/xyz/openbmc_project/sensors/voltage/psu0_vout",
- "/xyz/openbmc_project/sensors/voltage/psu1_vin",
- "/xyz/openbmc_project/sensors/voltage/psu1_vout",
+ "/xyz/openbmc_project/sensors/power/ps0_input_power",
+ "/xyz/openbmc_project/sensors/power/ps0_output_power",
+ "/xyz/openbmc_project/sensors/power/ps1_input_power",
+ "/xyz/openbmc_project/sensors/power/ps1_output_power",
+ "/xyz/openbmc_project/sensors/voltage/ps0_input_voltage",
+ "/xyz/openbmc_project/sensors/voltage/ps0_output_voltage",
+ "/xyz/openbmc_project/sensors/voltage/ps1_input_voltage",
+ "/xyz/openbmc_project/sensors/voltage/ps1_output_voltage",
+ "/xyz/openbmc_project/sensors/current/ps0_input_current",
+ "/xyz/openbmc_project/sensors/current/ps0_output_current",
+ "/xyz/openbmc_project/sensors/current/ps1_input_current",
+ "/xyz/openbmc_project/sensors/current/ps1_output_current",
"/xyz/openbmc_project/sensors/temperature/psu_inlet"
]
}
diff --git a/meta-inspur/meta-fp5280g2/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@400/power-supply@58.conf b/meta-inspur/meta-fp5280g2/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@400/power-supply@58.conf
index 362b4b0..437d4b5 100644
--- a/meta-inspur/meta-fp5280g2/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@400/power-supply@58.conf
+++ b/meta-inspur/meta-fp5280g2/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@400/power-supply@58.conf
@@ -1,4 +1,6 @@
-LABEL_in1 = "psu0_vin"
-LABEL_in2 = "psu0_vout"
-LABEL_power1 = "psu0_pin"
-LABEL_power2 = "psu0_pout"
+LABEL_in1 = "ps0_input_voltage"
+LABEL_in2 = "ps0_output_voltage"
+LABEL_curr1 = "ps0_input_current"
+LABEL_curr2 = "ps0_output_current"
+LABEL_power1 = "ps0_input_power"
+LABEL_power2 = "ps0_output_power"
diff --git a/meta-inspur/meta-fp5280g2/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@400/power-supply@59.conf b/meta-inspur/meta-fp5280g2/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@400/power-supply@59.conf
index 8ffe441..7d4333c 100644
--- a/meta-inspur/meta-fp5280g2/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@400/power-supply@59.conf
+++ b/meta-inspur/meta-fp5280g2/recipes-phosphor/sensors/phosphor-hwmon/obmc/hwmon/ahb/apb/bus@1e78a000/i2c-bus@400/power-supply@59.conf
@@ -1,4 +1,6 @@
-LABEL_in1 = "psu1_vin"
-LABEL_in2 = "psu1_vout"
-LABEL_power1 = "psu1_pin"
-LABEL_power2 = "psu1_pout"
+LABEL_in1 = "ps1_input_voltage"
+LABEL_in2 = "ps1_output_voltage"
+LABEL_curr1 = "ps1_input_current"
+LABEL_curr2 = "ps1_output_current"
+LABEL_power1 = "ps1_input_power"
+LABEL_power2 = "ps1_output_power"