#
6869acb3 |
| 03-Nov-2021 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Disable Communication, Logic, and Memory (CML) fault
Turn off CML fault logging as some of the power supplies don't support all PMBus commands that could be sent from device driver or applic
psu-ng: Disable Communication, Logic, and Memory (CML) fault
Turn off CML fault logging as some of the power supplies don't support all PMBus commands that could be sent from device driver or application. The PSU sets the CML fault bit on when it receives unsupported PMBus command.
Testing: - Tested the change on simulation by setting the CML status bit on and verified no error log reported. - Tested the change on BMC System as follow and verified no error log reported * Powered on the chassis * i2cget -f -y 3 0x68 0x6c w # causes information error log for tracing purpose.
Change-Id: Ie1b52e5350a29f65bd517ad11293c6dc522ac83e Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Signed-off-by: Faisal Awada <faisal@us.ibm.com>
show more ...
|
#
b7131a12 |
| 26-Oct-2023 |
Faisal Awada <faisal@us.ibm.com> |
psu-ng: Fixed PSU monitor app to bind/unbind device driver appropriately.
Modified bindOrUnbind function: Bind the device driver when the PSU present and i2cbus-i2caddr does not exist.
psu-ng: Fixed PSU monitor app to bind/unbind device driver appropriately.
Modified bindOrUnbind function: Bind the device driver when the PSU present and i2cbus-i2caddr does not exist. Unbind the device driver when i2cbus-i2caddr exists and the PSU not present.
bindOrUnbind does not do anything when: * PSU device driver bind exist and the device present * PSU device driver bind does not exist and device not present
Added new function populateDriverName: Search for device driver name in all PSUs, then assign the device driver name to all PSUs including missing PSUs.
Testing: Verified in the following test, there is no bind/unbind error log. 1 - Removed 1 PSU and powered on the BMC with 3 PSUs 2 - Use step 1, after power on plugged in the 4th PSU and verified /sys/bus/i2c/drivers/-ibm-cffps/3-006b exist 3 - Removed 2 PSUs and powered on the BMC with 2 PSUs. 4 - Use step 3, after power on plugged in the missing PSUs, verified bind/Unbind /sys/bus/i2c/drivers/-ibm-cffps/3-006x for appropriate PSU. 5 - Powered on system with 4 PSUs then removed 2 PSUs. Verified unbind done for appropriate PSU.
Change-Id: I325fc0dbb16f9c3b582b739e8440a74e34aae753 Signed-off-by: Faisal Awada <faisal@us.ibm.com>
show more ...
|
#
67f71b9e |
| 30-Aug-2023 |
Matt Spinler <spinler@us.ibm.com> |
psu-ng: Remove previous input history code
As mentioned in a previous commit, the org.open_power D-Bus interfaces that host the 30 second maximum and average input power values are no longer necessa
psu-ng: Remove previous input history code
As mentioned in a previous commit, the org.open_power D-Bus interfaces that host the 30 second maximum and average input power values are no longer necessary, and have been replaced by a single peak input power sensor object.
Remove all of the code that dealt with them.
For now, the code remains that toggles the GPIO to sync up the input history values between the power supplies on boots and plugs. As the input history is used to populate the new peak sensor, its values across power supplies will then be using the same time intervals.
Change-Id: Ide5b40e67bf3938606a75bcc0291bc57232ce8bc Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
592bd27c |
| 30-Aug-2023 |
Matt Spinler <spinler@us.ibm.com> |
psu-ng: Add peak input power sensor for some PSs
Some models of the ibm-cffps power supplies support an 'input history' command that reports 30 second maximum and average input power values. The cod
psu-ng: Add peak input power sensor for some PSs
Some models of the ibm-cffps power supplies support an 'input history' command that reports 30 second maximum and average input power values. The code was currently putting those on an 'org.open_power' D-Bus interface so that the history of those values could be captured in a single D-Bus call.
Now that there is a real telemetry feature in Redfish that can capture the history of a single sensor value, we can drop the custom D-Bus interface and just use the normal Sensor.Value interface that contains the most recent maximum value from the input history command, The sensor name will be 'psX_input_power_peak' where X is the PS instance number.
The average input power telemetry will now just be obtained from the psX_input_power sensor provided by phosphor-hwmon so an equivalent sensor to the peak isn't needed here.
This commit will add support for putting the new sensor on D-Bus, and a future one will remove the previous input history support.
Like sensors in other daemons, it will be set to not available when a PS is removed, and not functional when it has an access problem. There will be associations to the parent chassis and to the power supply so it will show up in Redfish output with the other sensors.
This commit did remove one of the input history testcases, as trying to get the right sequence of EXPECT_CALLs would get tricky when both the old and new are running together.
Tested: - New sensor shows up when PS is present and supports it. - All interfaces on the object path are correct. - Sensor value matches what org.open_power Max property had. - Works correctly when: - PS is missing on startup - PS is removed - Previously present PS is replaced.
Change-Id: Id9c33aa753c9af32880a0cc874b39c113222568f Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
d6760265 |
| 30-Aug-2023 |
Matt Spinler <spinler@us.ibm.com> |
psu-ng: Group all private PS class attributes
Private functions and attributes have gotten interleaved over the years, so go back to putting all the attributes at the bottom.
Change-Id: Id98128b7c3
psu-ng: Group all private PS class attributes
Private functions and attributes have gotten interleaved over the years, so go back to putting all the attributes at the bottom.
Change-Id: Id98128b7c393035108b7720ea6772c568e0d8c0c Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
9582d9cc |
| 11-Jul-2023 |
Faisal Awada <faisal@us.ibm.com> |
psu-ng: Add ACBEL PSU pmbus supported commands.
Update PSU monitor to use the following pmbus commands supported by ACBEL PSU DD:
- To clear STATUS_INPUT use curr1_crit_alarm instead of in1_cri
psu-ng: Add ACBEL PSU pmbus supported commands.
Update PSU monitor to use the following pmbus commands supported by ACBEL PSU DD:
- To clear STATUS_INPUT use curr1_crit_alarm instead of in1_crit_alarm fault. - Update ACBEL PSU firmware version to be read from /sys/kernel/debug/pmbus/hwmonX instead from /sys/kernel/debug/pmbus/hwmonX/3-005a/ and update the ACBEL FW version size to 6 bytes. - On/off config not supported on ACBEL PSU.
Testing: * Unplugged power cord from the ACBEL PSU, and verified an error reported on the system. * Set IIN_OC_FAULT_LIMIT fault and verified curr1_crit_alarm clears the STATUS_INPUT. * Verified the code reading the ACBEL FW revision correctly. * Verified in1_input clears all faults on ACBEL PSU. * Tested modified the code on IBMCFFPS and verified the ACBEL PSU modification did not change the behavior on IBMCFFPS.
Change-Id: I5fef87043adb5d677723eb8a20b0aedc4574b7fd Signed-off-by: Faisal Awada <faisal@us.ibm.com>
show more ...
|
#
aded7a0d |
| 10-May-2023 |
faisal <faisal@gfwa601.aus.stglabs.ibm.com> |
psu-ng: Retrieve PSU VPD keyword from D-Bus.
Extract PSU VPD keyword from D-Bus and assign associated string value to VPD string.
Change-Id: Iaf8112df7e388e6fd4363798c92d76f0a67e3b69 Signed-off-by:
psu-ng: Retrieve PSU VPD keyword from D-Bus.
Extract PSU VPD keyword from D-Bus and assign associated string value to VPD string.
Change-Id: Iaf8112df7e388e6fd4363798c92d76f0a67e3b69 Signed-off-by: Faisal Awada <faisal@us.ibm.com>
show more ...
|
#
48781aef |
| 10-May-2023 |
Patrick Williams <patrick@stwcx.xyz> |
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest
clang-format: copy latest and re-format
clang-format-16 has some backwards incompatible changes that require additional settings for best compatibility and re-running the formatter. Copy the latest .clang-format from the docs repository and reformat the repository.
Change-Id: If66f68c96df4baf8dc07abf8729a3cb7657e932d Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
show more ...
|
#
b66ae50a |
| 01-Apr-2023 |
Faisal Awada <faisal@us.ibm.com> |
psu-ng: Dynamically assign the device driver name
Replaced hardcoded device driver name with a method to build the device driver name dynamically and assign it to a private data member.
The dynamic
psu-ng: Dynamically assign the device driver name
Replaced hardcoded device driver name with a method to build the device driver name dynamically and assign it to a private data member.
The dynamically built device driver name used during bind/unbind.
Tested the changes in simulation and actual system, compared journalctl entries of phosphor-psu-monitor with modified phosphor-psu-monitor. The following test were conducted and verified same journal output: - Verified driver name assigned correcty to PSU - Good Machine Path - Removed Power Supply - Inserted Power Supply - Missing Power Supply
Change-Id: Ic376d4ff058e9a2df1887468932faaa28d998960 Signed-off-by: Faisal Awada <faisal@us.ibm.com>
show more ...
|
#
b40f04c2 |
| 20-Mar-2023 |
Matt Spinler <spinler@us.ibm.com> |
psu-ng: Change paths of SN/PN/FN files
The cffps2 power supply device driver started showing these fields under new names in a different directory. Eventually, the ones in the original location wil
psu-ng: Change paths of SN/PN/FN files
The cffps2 power supply device driver started showing these fields under new names in a different directory. Eventually, the ones in the original location will be removed.
Old path: /sys/kernel/debug/pmbux/hwmonX/cffps2 New path: /sys/kernel/debug/pmbux/hwmonX
Old name New Name ------------------------- fru mfr_model part_number mfr_revision header mfr_location serial_number mfr_serial
Tested: Compared the results of introspecting the PS inventory before and after the changes as the application puts these 4 fields into the inventory.
Change-Id: I0614396c28c08df22d57f88f8be1920d63a10132 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
a068f424 |
| 10-Mar-2023 |
Matt Spinler <spinler@us.ibm.com> |
psu-ng: Put input voltage rating on D-Bus
IBM systems must tell the BIOS (called hostboot) the power supply input voltage rating during a boot, where the rating is 110 or 220. This is done via PLDM
psu-ng: Put input voltage rating on D-Bus
IBM systems must tell the BIOS (called hostboot) the power supply input voltage rating during a boot, where the rating is 110 or 220. This is done via PLDM BIOS attributes where the attribute is backed by a D-Bus property.
This commit adds support for that by putting the input voltage rating of each PS on D-Bus using the Value property of the xyz.openbmc_project.Sensor.Value interface. The path is like /xyz/openbmc_project/sensors/voltage/ps0_input_voltage_rating.
$ busctl get-property xyz.openbmc_project.Power.PSUMonitor \ /xyz/openbmc_project/sensors/voltage/ps0_input_voltage_rating \ xyz.openbmc_project.Sensor.Value Value d 220
$ busctl get-property xyz.openbmc_project.Power.PSUMonitor \ /xyz/openbmc_project/sensors/voltage/ps0_input_voltage_rating \ xyz.openbmc_project.Sensor.Value Unit s "xyz.openbmc_project.Sensor.Value.Unit.Volts"
These D-Bus objects won't have any associations, unlike normal sensors, so they will not show up in any Redfish output as a sensor.
The interface is only created for present power supplies, and is only updated when the application starts up and when the boot starts.
If a power supply is hot added or removed after that, the D-Bus property doesn't need to be updated as hostboot has already consumed it.
Change-Id: I277516e8d86f1ba1a75b75fe76c67f192d911f88 Signed-off-by: Matt Spinler <spinler@us.ibm.com>
show more ...
|
#
9464c429 |
| 27-Feb-2023 |
George Liu <liuxiwei@inspur.com> |
Fix PSU status when BMC is in standby
Without this patch: Plug in the power supplies in any order, the power supply that is plugged in first will report a `PSU_KILL_Fault` in standby, but the proble
Fix PSU status when BMC is in standby
Without this patch: Plug in the power supplies in any order, the power supply that is plugged in first will report a `PSU_KILL_Fault` in standby, but the problem will be restored after the host is powered on.
With this patch: Regardless of whether it is in standby or host powered on, this problem disappears and it works fine.
Signed-off-by: George Liu <liuxiwei@inspur.com> Change-Id: I18e0e26a4922dd710e042048625da1cc8b08dd3c
show more ...
|
#
4ab86564 |
| 18-Nov-2022 |
Jim Wright <jlwright@us.ibm.com> |
psu-ng: Change detection of brownout errors
Brownout errors can occur such that the power supplies are able to recover but the chassis power good is lost and the system powers down. In these cases t
psu-ng: Change detection of brownout errors
Brownout errors can occur such that the power supplies are able to recover but the chassis power good is lost and the system powers down. In these cases the power supply application should continue to process the brownout condition so that the brownout error is logged and the auto power restart happens correctly. Use the power state and the chassis pgood properties from the power control service to allow this to happen.
The power supply driver or device may not latch the AC fault. Set an expiring indication that the AC fault occurred.
A power supply may not indicate the loss of AC and may only indicate the loss of power good. As long as at least one power supply indicates the AC loss, tolerate the pgood failure indications.
The net of the changes is that a brownout error will be issued when the chassis power good is lost, and all present power supplies indicate an AC failure or a power good failure, and at least one power supply indicates an AC failure.
Signed-off-by: Jim Wright <jlwright@us.ibm.com> Change-Id: I5a11746a036d0a66b11c76ec12784b8870fa306f
show more ...
|
#
1530024a |
| 17-Nov-2022 |
Jim Wright <jlwright@us.ibm.com> |
psu-ng: Fix Doxygen comments
Some comments intended to be Doxygen do not start with a double asterisk. Fix them.
Signed-off-by: Jim Wright <jlwright@us.ibm.com> Change-Id: I78ead797c4131ff850643ad0
psu-ng: Fix Doxygen comments
Some comments intended to be Doxygen do not start with a double asterisk. Fix them.
Signed-off-by: Jim Wright <jlwright@us.ibm.com> Change-Id: I78ead797c4131ff850643ad0c82660b231e9bbf8
show more ...
|
#
056935ca |
| 24-Jun-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Use regex to replace invalid VPD data
Passing non-ASCII/unprintable VPD character data to D-Bus or other applications can lead to crashes or other unexpected behavior.
Change-Id: I9a70f4505
psu-ng: Use regex to replace invalid VPD data
Passing non-ASCII/unprintable VPD character data to D-Bus or other applications can lead to crashes or other unexpected behavior.
Change-Id: I9a70f4505d330652e36143395ff92902a203fa44 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
#
8393f467 |
| 28-Jun-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Refactor reading VPD values to helper
Create a readVPDValue() helper function. Replace the repetitive try/catch, read size check, resize code with a call to that common helper.
Change-Id: I
psu-ng: Refactor reading VPD values to helper
Create a readVPDValue() helper function. Replace the repetitive try/catch, read size check, resize code with a call to that common helper.
Change-Id: Ia4ceec5fa4422c3c56ff4ab3ea369c193916a388 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
#
7354ce62 |
| 22-Jul-2022 |
Patrick Williams <patrick@stwcx.xyz> |
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are
sdbusplus: use shorter type aliases
The sdbusplus headers provide shortened aliases for many types. Switch to using them to provide better code clarity and shorter lines. Possible replacements are for: * bus_t * exception_t * manager_t * match_t * message_t * object_t * slot_t
Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Change-Id: Ief05bd757cffb1453e058a719ee4b060861752e7
show more ...
|
#
6d469fd4 |
| 15-Jun-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: PGOOD_DEGLITCH_LIMIT of five
Turns out that the (IBM) power supplies take up to around 3 seconds to get the PGOOD# bit in STATUS_WORD set to the good (0) state after the input power is withi
psu-ng: PGOOD_DEGLITCH_LIMIT of five
Turns out that the (IBM) power supplies take up to around 3 seconds to get the PGOOD# bit in STATUS_WORD set to the good (0) state after the input power is within range. Adjust the de-glitch value to avoid logging PGOOD errors for the power supplies, as they mostly ride through the momentary drops in the input power.
Use PGOOD_DEGLITCH_LIMIT instead of DEGLITCH_LIMIT for the pgoodFault.
Tested: Rainier 2S4U 1. Drop outlet power for 0.5 seconds, verify no 110015F1. 2. Drop outlet power for 1 second, verify no 110015F1. 3. Drop outlet power for 1.5 seconds, verify no 110015F1. Rainier 2S2U 1. Drop outlet power for 1 second, verify no 110015F1. 2. Drop outlet power for 5 seconds, verify 110015F0 (VIN_UV) IS logged. 3. Drop outlet power for 1.5 seconds, verify no 110015F1. Everest (powersupply0 unplugged, powersupply3 missing) 1. Drop outlet power for 0.5 seconds, verify no 110015F1. 2. Drop outlet power for 1 second, verify no 110015F1. 3. Drop outlet power for 1.5 seconds, verify no 110015F1. 4. Drop outlet power for 3 seconds, verify 110015F0 IS logged. 5. Drop all outlet power for 5 seconds, verify 110000AC.
Change-Id: I6ba12209e6c84548fec036101ca02d857ed900f6 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
#
ae35ac5d |
| 23-May-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Disable INPUT_HISTORY for 1400W IBM PSU
If the device driver is ibm-cpffps, read the MFR_POUT_MAX value (max_power_out). Only enable INPUT_HISTORY data collection if it is not the 1400W IBM
psu-ng: Disable INPUT_HISTORY for 1400W IBM PSU
If the device driver is ibm-cpffps, read the MFR_POUT_MAX value (max_power_out). Only enable INPUT_HISTORY data collection if it is not the 1400W IBM power supply (MSB/LSB results in 30725 for 1400). The 1400W IBM power supply appears to cause problems on the bus when an INPUT_HISTORY PMBus command read occurs.
Tested: Simulated Rainier 2S4U Fake 2nd and 3rd PSUs to return 1400W value Verify 1st and 4th collecting INPUT_HISTORY Verify 2nd and 3rd PSUs not getting INPUT_HISTORY collected ----- Verify real Rainier 2S4U with 1600W working as expected.
Change-Id: Ia37cea9b0273ac5926e4bc581a2ea8a4079afa23 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
#
ba6d9604 |
| 02-May-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: faultLogged to false in clearFaultFlags
Allows for detecting and logging error for new faults.
Tested: Rainier 2S4U. Power on. Remove input power from powersupply0. 110015F0
psu-ng: faultLogged to false in clearFaultFlags
Allows for detecting and logging error for new faults.
Tested: Rainier 2S4U. Power on. Remove input power from powersupply0. 110015F0 logged. Apply power to powersupply0. Delete 110015F0. Turn off SAI LED. Remove input power from powersupply0. Verify another 110015F0 logged. Apply power to powersuply0. Delete 110015F0. Turn off SAI LED.
Change-Id: I7a8995b4185f5e1eeeecf373f6e68d2bfe3dc170 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
#
18a24d92 |
| 19-Apr-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: INPUT_HISTORY syncHistory
Add in the function that syncs the power supply input history data between all the installed power supplies.
Use the GPIO line name instead of gpiochip and number.
psu-ng: INPUT_HISTORY syncHistory
Add in the function that syncs the power supply input history data between all the installed power supplies.
Use the GPIO line name instead of gpiochip and number. Use libgpiod via helper utility. Create a toggleLowHigh() to use for synchronizing the input history.
Add in indicator and helper functions to indicate a syncHistory is needed if a power supply goes from missing to present.
Trace when syncHistory is called. This should be infrequent enough that I do not think it would be a problem.
Initial testing on Rainier 2S2U did not need a lengthy delay between lowering and raising the power-ffs-sync-history GPIO, but testing on Rainier 2S4u required a longer delay.
Depends-On: Ib1ac2456f7f715360d089dfa4b6b379b516439ab
Change-Id: I022806155139d70fb4a42cc27eb9f279f6a3aedc Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
#
c3324424 |
| 24-Mar-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Power supply class updates for input history
Update the meson files to include the record_manager with the phosphor-psu-monitor application.
Since we do not want to blindly enable input his
psu-ng: Power supply class updates for input history
Update the meson files to include the record_manager with the phosphor-psu-monitor application.
Since we do not want to blindly enable input history for all power supplies, base the enablement of the feature off of the driver name. Change the PowerSupply class to require the driver name be passed in, and pass that down via the PSUManager during the configuration determination.
Add a server manager to the PSUManager to handle the INPUT HISTORY data that will be under /org/open_power/sensors.
The INPUT_HISTORY command is handled via a sysfs file in binary format, so add in a readBinary() base function to allow for mock testing.
Change-Id: Iea163892d5482e6f2dacacfbfa746f605af52ed5 Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
show more ...
|
#
3225a45c |
| 18-Mar-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Add a clearVinUVFault function
Create a clearVinUVFault() function specifically for clearing the VIN_UV and unit is off fault bits.
Use this function when see a vinUVFault with good voltage
psu-ng: Add a clearVinUVFault function
Create a clearVinUVFault() function specifically for clearing the VIN_UV and unit is off fault bits.
Use this function when see a vinUVFault with good voltage read back from READ_VIN. This should clear the latched fault if the fault is no longer active. If the fault is still active, the next read will show the fault again.
Also call clearVinUVFault() from the clearFaults() function.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: Ic26029fe64e3cd3e232c615b223cafb774bf77f9
show more ...
|
#
4fc191f0 |
| 10-Mar-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Clear faults if VIN_UV and READ_VIN good
If we see that we have set the VIN_UV fault indicator, but the READ_VIN value is returning a non-zero voltage for input, attempt to clear the faults.
psu-ng: Clear faults if VIN_UV and READ_VIN good
If we see that we have set the VIN_UV fault indicator, but the READ_VIN value is returning a non-zero voltage for input, attempt to clear the faults. This could be a latched input voltage under-voltage condition that has now cleared.
Save off actualVoltage in PowerSupply member variable. This allows for comparing the previous actual voltage with the new reading, to trace out the actual voltage instead of the calculated 0/110/220 voltage.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: Ibf1642a081ccf4d4a9c4202ce2536799806af017
show more ...
|
#
321a615b |
| 18-Mar-2022 |
Brandon Wyman <bjwyman@gmail.com> |
psu-ng: Create a shortName and use for tracing
Given the full inventory path, find and store off the short part of the name (powersupply0) for use in various tracing messages.
Signed-off-by: Brando
psu-ng: Create a shortName and use for tracing
Given the full inventory path, find and store off the short part of the name (powersupply0) for use in various tracing messages.
Signed-off-by: Brandon Wyman <bjwyman@gmail.com> Change-Id: I59906e9f5eabdae16b4d67dcf8e6d4146f7d0fe8
show more ...
|