commit | 5a582d3c7a6865eaa0d80f0dc6aeb85b2f72c2a8 | [log] [tgz] |
---|---|---|
author | Faisal Awada <faisal@us.ibm.com> | Fri Nov 15 14:11:44 2024 -0600 |
committer | Faisal Awada <faisal@us.ibm.com> | Wed Nov 20 16:55:37 2024 -0600 |
tree | 03a6f5a0767ca35bd4748c6acbe7f702d164ca22 | |
parent | 23dee383ca3a45889fbb4f7bbae65fe3325c5805 [diff] |
psutils: Partial AEI Updater class The AeiUpdater class within the aeiUpdater namespace, responsible for updating AEI PSU firmware via I2C communication. The code focuses on executing various stages of the firmware update process, ensuring each step performed and validated correctly. The following partial functions of the key component of the class: doUpdate() This method initiates the firmware update process. It checks and sets the ISP (In-System Programming) mode using writeIspKey(), writeIspMode(), and writeIspStatusReset(). writeIspKey() Unlocks the ISP by writing a specific key to the KEY_REGISTER. Handles exceptions for any I2C communication errors and logs the failure. writeIspMode() Sends a command to enter ISP mode and checks the status register. Retries on failure, with a maximum retry limit. Checks the status register to confirm the mode has been set. Logs any I2C errors encountered. writeIspStatusReset() Resets ISP status register, clearing any existing status flags. Verifies the reset by reading the status register, retrying as needed. Logs any I2C errors encountered. Test: Tested the function listed in the class on a system with AEI PSU: - Validated the PSU ISP key was accepted and no error logged. - Validated an error was logged when I used wrong key. - Validated the PSU entered to ISP mode by reading back status register and confirmed the bit is set. - Validated the PSU status reset by reading the back status register and confirmed the bit is set. Change-Id: I1e8e594f088e7d66d8fc5b1723c4bd33b08bd3f8 Signed-off-by: Faisal Awada <faisal@us.ibm.com>
This repository contains applications for configuring and monitoring devices that deliver power to the system.
Actively-maintained applications:
Legacy applications:
To build all applications in this repository:
meson setup build ninja -C build
To clean the repository and remove all build output:
rm -rf build
You can specify meson options to customize the build process. For example, you can specify:
Several applications in this repository require a PSU JSON config to run. The JSON config file provides information for:
There is an example psu.json to describe the necessary configurations.
inventoryPMBusAccessType
defines the pmbus access type, which tells the service which sysfs type to use to read the attributes. The possible values are:
/sys/bus/i2c/devices/3-0069/
/sys/bus/i2c/devices/3-0069/hwmon/hwmonX/
/sys/kernel/debug/pmbus/hwmonX/
/sys/kernel/debug/<driver>.<instance>/
/sys/kernel/debug/pmbus/hwmonX/cffps1/
fruConfigs
defines the mapping between the attribute file and the FRU inventory interface and property. The configuration example below indicates that the service will read part_number
attribute file from a directory specified by the above pmbus access type, and assign to PartNumber
property in xyz.openbmc_project.Inventory.Decorator.Asset
interface.
"fruConfigs": [ { "propertyName": "PartNumber", "fileName": "part_number", "interface": "xyz.openbmc_project.Inventory.Decorator.Asset" } ]
psuDevices
defines the kernel device dir for each PSU in inventory. The configuration example below indicates that powersupply0
's device is located in /sys/bus/i2c/devices/3-0069
.
"psuDevices": { "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0069", }