History log of /openbmc/phosphor-power/pmbus.hpp (Results 1 – 25 of 39)
Revision Date Author Comments
# fb0ccb8e 24-Apr-2024 Shawn McCarney <shawnmm@us.ibm.com>

Promote getPath() to PMBusBase

Promote the getPath() method from the PMBus class to the PMBusBase
parent class. This allows the method to be called from automated tests
using mock subclasses of PMB

Promote getPath() to PMBusBase

Promote the getPath() method from the PMBus class to the PMBusBase
parent class. This allows the method to be called from automated tests
using mock subclasses of PMBusBase.

Change-Id: I01dc6c314294e0de8919f78c79cbdc395020728f
Signed-off-by: Shawn McCarney <shawnmm@us.ibm.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 ...


# 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 ...


# 32453e9b 15-Dec-2021 Brandon Wyman <bjwyman@gmail.com>

psu-ng: Continue reading after readFail

Update the PMBus::read() function to allow for not creating journal
trace and elog, but default to continuing to trace and elog, the
previous behavior.

If we

psu-ng: Continue reading after readFail

Update the PMBus::read() function to allow for not creating journal
trace and elog, but default to continuing to trace and elog, the
previous behavior.

If we reach the limit of read failures that results in a communication
error log, continue to read, but stop logging failures.

If communication restores, we may be able to detect what caused the read
failure, or otherwise detect or clear new faults.

Change-Id: If59b86211ab54c31248ede78f8f117b607298923
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>

show more ...


# 08cac06b 19-Nov-2021 Brandon Wyman <bjwyman@gmail.com>

PMBus: Fix "file" name for STATUS_FANS_1_2

While attempting to look into creating and detecting power supply fan
faults, I noticed that we were attempting to read status0_fans12, but

PMBus: Fix "file" name for STATUS_FANS_1_2

While attempting to look into creating and detecting power supply fan
faults, I noticed that we were attempting to read status0_fans12, but
the actual file name is status0_fan12.

Verified same file name difference/issue on Witherspoon with 5.14.6
kernel.

Tested:
Debug commands on Witherspoon for fan fault.
Note lack of status0_fan12 in verbose journal entry:
MESSAGE=The power supply detected bad fan operation.
TRANSACTION_ID=3237897146
RAW_STATUS=STATUS_WORD=0x400|status0_mfr=0x0|status0_temp=0x0
CALLOUT_INVENTORY_PATH=/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1
SYSLOG_IDENTIFIER=psu-monitor
Bitbake build phosphor-power with change.
Overlay patch same Witherspoon system.
Debug commands for fan fault results in expected journal entry:
MESSAGE=The power supply detected bad fan operation.
TRANSACTION_ID=3549612893
RAW_STATUS=STATUS_WORD=0x400|status0_mfr=0x0|status0_temp=0x0|status0_fan12=0x20
CALLOUT_INVENTORY_PATH=/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1

Change-Id: Iaf2c9f572033b3e33b40fa88ad3a7264cf77db73
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>

show more ...


# 6710ba2c 27-Oct-2021 Brandon Wyman <bjwyman@gmail.com>

psu-ng: Add code to detect VOUT_OV_FAULT

If the output voltage hits an overvoltage condition, the VOUT_OV_FAULT
bit (bit 5 of STATUS_WORD low byte) should turn on. The PMBus spec
ind

psu-ng: Add code to detect VOUT_OV_FAULT

If the output voltage hits an overvoltage condition, the VOUT_OV_FAULT
bit (bit 5 of STATUS_WORD low byte) should turn on. The PMBus spec
indicates that VOUT fault/warning (bit 7 high byte) and VOUT_OV_FAULT
are associated with status in the STATUS_VOUT command response.

Check for VOUT_OV_FAULT after check for VIN_UV_FAULT, create error if
the fault is indicated.

Change-Id: Ia68b4f986393f0ba0184401deb29b4f5d25a2ed0
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>

show more ...


# 85c7bf41 19-Oct-2021 Brandon Wyman <bjwyman@gmail.com>

psu-ng: Detect CML fault

If the STATUS_WORD has the CML (Communication, Memory, Logic) fault bit
on, bit 1 in lower byte of STATUS_WORD, then read STATUS_CML, and treat
the fault as

psu-ng: Detect CML fault

If the STATUS_WORD has the CML (Communication, Memory, Logic) fault bit
on, bit 1 in lower byte of STATUS_WORD, then read STATUS_CML, and treat
the fault as another variety of a communication fault/error.

Change-Id: Iba368683734777874ba54ec845cbc94b00010b68
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>

show more ...


# 4175ffb7 02-Aug-2021 Adriana Kobylak <anoo@us.ibm.com>

psu-ng: Read and validate input voltage

Read the input voltage reported by pmbus for each PSU. Determine the
actual voltage based on predefined thresholds. Then validate the actual
v

psu-ng: Read and validate input voltage

Read the input voltage reported by pmbus for each PSU. Determine the
actual voltage based on predefined thresholds. Then validate the actual
voltage is supported for the PSU model.

Tested:
Verified in Rainier 2U that the 2 present PSUs had a pmbus
voltage value of 208000 mV, which is then translated to a 220V PSU, and
that value is validated against the supported configuration.
Verified the additional data strings by printing them with debug
statements:
Aug 05 18:50:15 p10bmc phosphor-psu-monitor[3615]: ACTUAL_VOLTAGE: 208.000000
Aug 05 18:50:15 p10bmc phosphor-psu-monitor[3615]: CALLOUT_INVENTORY_PATH:
/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0
Aug 05 18:50:15 p10bmc phosphor-psu-monitor[3615]: EXPECTED_VOLTAGE: 220

Change-Id: Ic8c3b567c8265e90bce420f98ac6f1e131ff713b
Signed-off-by: Adriana Kobylak <anoo@us.ibm.com>

show more ...


# 9564e945 10-Nov-2020 Brandon Wyman <bjwyman@gmail.com>

psu-ng: Updates to allow PSU missing on startup

If the power supply is missing when the application starts up, the
created PMBus interface will log an INFO message about being unable to

psu-ng: Updates to allow PSU missing on startup

If the power supply is missing when the application starts up, the
created PMBus interface will log an INFO message about being unable to
read any of the sysfs files. Allow that informational message to occur,
but in the inventoryChange() interface, when the power supply goes
present, be sure to call the findHwmonDir() function to update the
directory/file changes that may occur when the device driver binds.

Tested:
Use simulator to verify no changes when both present and chassison.
Use simulator to mark 2nd PSU missing, restart application, mark 2nd
PSU as present and verify no PSU communication problems.
Use simulator to mark 1st PSU missing, restart application, mark 1st
PSU present and verify no PSU communication problems.
Use simulator to chassison with PSU missing, then change PSU
present, verify no errors.
Use simulator to chassison with PSUs present, mark PSU missing, then
PSU present, verify no errors.

Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: Iba1c8296167519e7285eb680ab067bfb6046b4c7

show more ...


# 4176d6be 07-Oct-2020 Brandon Wyman <bjwyman@gmail.com>

psu-ng: Create error for communication fault

Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: I3f147063759559bf2486e78d9873c6d464381ddd


# 1d7a7df8 26-Mar-2020 Brandon Wyman <bjwyman@gmail.com>

psu-ng: Updates to get VPD data to inventory

Add in code to retrieve the VPD data and populate that data to the D-Bus
inventory properties.

Use the PMBus utilities to retrieve t

psu-ng: Updates to get VPD data to inventory

Add in code to retrieve the VPD data and populate that data to the D-Bus
inventory properties.

Use the PMBus utilities to retrieve the model (CCIN for IBM power
supplies), part number, serial number, and firmware version information
from the sysfs "files" provided via the device driver.

Only build in IBM VPD data collection and reporting if meson ran with
-Dibm-vpd=true.

Tested:
Copied SDK build of phospor-psu-monitor with -Dibm-vpd=true to
Rainier hardware system, verified inventory properties updated/added.

Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: I61688b154ead570e9d9390342596bf7d840f4dce

show more ...


# 59a35793 04-Jun-2020 Brandon Wyman <bjwyman@gmail.com>

psu-ng: Add code to set ON_OFF_CONFIG

Add code that sends the appropriate ON_OFF_CONFIG mask for the power
supply power on operation.

Tested:
Ran gtest using x86sdk

psu-ng: Add code to set ON_OFF_CONFIG

Add code that sends the appropriate ON_OFF_CONFIG mask for the power
supply power on operation.

Tested:
Ran gtest using x86sdk
Used simulator to change ON_OFF_CONFIG value, restarted service,
verified ON_OFF_CONFIG changed.
Used i2cget on hardware to change ON_OFF_CONFIG, restarted service,
verified ON_OFF_CONFIG changed.

Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: Ifd9d63fcd2e86a62b7358e08958b5e2dbd21db9f

show more ...


# 3f1242f3 28-Jan-2020 Brandon Wyman <bjwyman@gmail.com>

Update analyze function to check STATUS_WORD

The STATUS_WORD PMBus command response will be the start of the power
supply fault analysis. Update the analyze() function to read its value

Update analyze function to check STATUS_WORD

The STATUS_WORD PMBus command response will be the start of the power
supply fault analysis. Update the analyze() function to read its value
and process (select) fault bits.

Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: If7274ad237c0604a56008676ae64804a5fd2854e

show more ...


# 8d195771 27-Jan-2020 Brandon Wyman <bjwyman@gmail.com>

Create PMBusBase class to allow for mocking

Derive the PMBus class from a new PMBusBase class to allow for the use
of Google Mock for unit testing. Create an interface to PMBusBase in th

Create PMBusBase class to allow for mocking

Derive the PMBus class from a new PMBusBase class to allow for the use
of Google Mock for unit testing. Create an interface to PMBusBase in the
phosphor-power-supply code.

Signed-off-by: Brandon Wyman <bjwyman@gmail.com>
Change-Id: I6dd8d8a64bdece0d82478450ec83f1aefcae4c75

show more ...


# e8c9cd64 04-Nov-2019 Lei YU <mine260309@gmail.com>

power-utils: Implement isReadyToUpdate

Check other PSUs' status word and status vout, return false when the
status has input/output fault.

Tested: Verify on Witherspoon that the

power-utils: Implement isReadyToUpdate

Check other PSUs' status word and status vout, return false when the
status has input/output fault.

Tested: Verify on Witherspoon that the update is not started and log
Unable to update PSU when other PSU has input/ouput fault
when the other PSU has input/output error;
And the update continues when the other PSU has no errors.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Ia2a4a23a43c18a417b8a85fbd5339f487984e689

show more ...


# ab093328 09-Oct-2019 Lei YU <mine260309@gmail.com>

Refactor: rename namespace witherspoon to phosphor

This repo now becomes phosphor-power, rename namespace witherspoon to
phosphor to make it generic.

Signed-off-by: Lei YU <mine

Refactor: rename namespace witherspoon to phosphor

This repo now becomes phosphor-power, rename namespace witherspoon to
phosphor to make it generic.

Signed-off-by: Lei YU <mine260309@gmail.com>
Change-Id: Icb9f8a7c33065add99f2bf42ed55745a28fa0424

show more ...


# 9c7897ce 28-Mar-2019 Brandon Wyman <bjwyman@gmail.com>

Cleanup: Use filesystem instead of experimental

The GCC version bump in Yocto 2.6 allows for use of std::filesystem
instead of std::experimental::filesystem.

Change-Id: Ibfd6c28

Cleanup: Use filesystem instead of experimental

The GCC version bump in Yocto 2.6 allows for use of std::filesystem
instead of std::experimental::filesystem.

Change-Id: Ibfd6c285bcbd6695e5cd4e3090ffa214fc861499
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>

show more ...


# f0f02b9a 25-Oct-2018 Matt Spinler <spinler@us.ibm.com>

Start using .clang-format

Used the one from docs/style/cpp.

Change-Id: I3bdc2b353bf18a437266b362d8205b8463a9ce2b
Signed-off-by: Matt Spinler <spinler@us.ibm.com>


# cab48342 13-Jun-2018 Gunnar Mills <gmills@us.ibm.com>

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Spelling fixes

Spelling errors found using github.com/lucasdemarchi/codespell
A tool to fix common misspellings.
This tool is licensed under GNU General Public License, version 2.

Change-Id: I8af789c1e0fef9938baced40315b525199636601
Signed-off-by: Gunnar Mills <gmills@us.ibm.com>

show more ...


# fa23e330 18-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add support to read binary PMBus data

PMBus::readBinary() can read a sysfs file that
contains binary data and returns a vector of bytes
representing that data.

Change-Id: I3

Add support to read binary PMBus data

PMBus::readBinary() can read a sysfs file that
contains binary data and returns a vector of bytes
representing that data.

Change-Id: I3c729f502e155b007b9ab22a4eeefec437f150e1
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# fbae7b6c 04-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add readString PMBus function

This function will return the data read as an
std::string.

Change-Id: Idd7afbd9b4c7e602fad3146d941f03366140948b
Signed-off-by: Matt Spinler <sp

Add readString PMBus function

This function will return the data read as an
std::string.

Change-Id: Idd7afbd9b4c7e602fad3146d941f03366140948b
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# 4dc4678e 04-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add PMBus device hwmon debug access type

This can be used to find a file in:
/sys/kernel/debug/pmbus/hwmonX/<device type>

For example: /sys/kernel/debug/pmbus/hwmon3/cffps1

Add PMBus device hwmon debug access type

This can be used to find a file in:
/sys/kernel/debug/pmbus/hwmonX/<device type>

For example: /sys/kernel/debug/pmbus/hwmon3/cffps1

Change-Id: Ifd9ae3a58f9097c89ebf80e3e19a180962968f0f
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# ba05348f 04-Jan-2018 Matt Spinler <spinler@us.ibm.com>

Add function to get PMBus device name

This will be used in the future to find a path
to certain sysfs files.

Change-Id: Ia919b2f954fddf7b97bd1c5025f7c54af942b318
Signed-off-

Add function to get PMBus device name

This will be used in the future to find a path
to certain sysfs files.

Change-Id: Ia919b2f954fddf7b97bd1c5025f7c54af942b318
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# de16d053 13-Dec-2017 Matt Spinler <spinler@us.ibm.com>

Don't log errors for voltage warnings

Some of the bits in the STATUS_VOUT command response
are just warnings, as defined by the PMBUS spec.

Previously the code would create volt

Don't log errors for voltage warnings

Some of the bits in the STATUS_VOUT command response
are just warnings, as defined by the PMBUS spec.

Previously the code would create voltage fault errors
if any bits were on in that response, and this change
is to check for the actual fault (non-warning) bits only
before creating error logs.

Also, the code will throw the response value into the journal
now if any bits are on at all because warnings are still
useful when getting a full picture of fault conditions.

Resolves openbmc/openbmc#2714

Change-Id: I51692ced4ce03bb05d64e7a90f88bd6586897942
Signed-off-by: Matt Spinler <spinler@us.ibm.com>

show more ...


# 3b7b38ba 25-Sep-2017 Brandon Wyman <bjwyman@gmail.com>

Add helper function to see if PMBus file exists

Due to some odd power supply behavior on some systems, certain PMBus
files in sysfs end up missing. Adding in a helper function to avoid

Add helper function to see if PMBus file exists

Due to some odd power supply behavior on some systems, certain PMBus
files in sysfs end up missing. Adding in a helper function to avoid
spurious tracing if an application so chooses to check for existence
before trying to read one of those files. See openbmc/openbmc#2364 issue
opened for this problem with the missing files.

Change-Id: Ib295beb7ff1733da6ecbcd6966b76b918ade7f54
Signed-off-by: Brandon Wyman <bjwyman@gmail.com>

show more ...


12