| commit | 9ed0f38e1d59564106c6020b854416ece6753776 | [log] [tgz] |
|---|---|---|
| author | Faisal Awada <faisal@us.ibm.com> | Thu Aug 14 13:21:46 2025 -0500 |
| committer | Faisal Awada <faisal@us.ibm.com> | Fri Sep 12 13:37:56 2025 -0500 |
| tree | 82bf596960f284c3d378febaf13da74600d8de8b | |
| parent | 39d15218186f15e08acaca7257c6a5e8e4090df8 [diff] |
chassis-psu: New Functions for MultiChassis App
Implemented several functions for monitoring power supplies in
multi-chassis systems. Added a new main function, made minor
modification to the PowerSupply class, and added several functions to
the Chassis and ChassisManager classes.
The following is a summary of each object class new addition or modified
functions:
ChassisManager:
- initChassisPowerMonitoring(): Loops through all the chassis in the
system and initializes power monitoring process for each chassis's
PSUs.
Chassis:
- initPowerMonitoring(): Subscribe to D-Bus power change and initialize
power monitoring.
- supportedConfigurationInterfaceAdded(): Handle addition of supported
configuration and update missing PSUs.
- psuInterfaceAdded(): Handle addition of PSUs on D-Bus.
- validatePsuConfigAndInterfacesProcessed(): Validate the PSU
configuration and reset validation timer if power is on, supported
configs and have PSUs.
- analyzeBrownout(): Analyze PSUs for a brownout failure and log error.
- syncHistory(): Toggles the GPIO to sync power supply input history
readings.
- setInputVoltageRating(): Inform each PSUs to set its PSU input.
- createError(): Create OpenBMC error.
- hasRequiredPSUs(): TODO
- updateMissingPSUs(): Update PSU inventory.
- getSupportedConfiguration(): Retrieve supported configuration from
D-BUS and matches chassis ID with the current chassis id to update
chassis configuration.
- saveChassisName(): Save chassis short name in the class.
- powerStateChanged(): Handle for power state property changes.
- attemptToCreatePowerConfigGPIO(): Attempt to create GPIO
PowerSupply:
- PowerSupply(): Added additional class constructors. The constructors
have the same parameters as the original, except that the new
constructor include an extra parameter chassis short name.
- The PowerSupply class functions implementation remains the same as
the original, except for minor change in
PowerSupply::setupInputPowerPeakSensor(), where the sensorPath was
modified to include chassis name.
Test in simulation:
- Verified supported configuration added, where it polpulates
supported properties and updates PSUs changes.
- Validated some of the brownout functionality using fault injection.
- Validated the PowerSupply class sets the appropriate input voltage
for the target chassis PSUs.
- Verified that the chassis name is included in the PSU power input
peak sensors on D-bus.
Change-Id: I75a1ab1dd004767f072e35f3ce2c83ff281eb1ca
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", }