|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | Today | - |
| cold-redundancy/ | H | 04-Sep-2024 | - | 579 | 347 |
| example/ | H | 12-Dec-2022 | - | 35 | 34 |
| org/open_power/Witherspoon/ | H | 07-Mar-2021 | - | 400 | 296 |
| phosphor-power-sequencer/ | H | 09-Aug-2024 | - | 10,332 | 7,294 |
| phosphor-power-supply/ | H | 17-Aug-2024 | - | 6,770 | 4,569 |
| phosphor-regulators/ | H | 09-Aug-2024 | - | 38,857 | 27,330 |
| power-sequencer/ | H | 17-Aug-2024 | - | 2,539 | 1,481 |
| power-supply/ | H | 17-Aug-2024 | - | 2,055 | 1,124 |
| services/ | H | 16-May-2023 | - | 127 | 102 |
| subprojects/ | H | 11-Jul-2024 | - | 91 | 66 |
| test/ | H | 09-Aug-2024 | - | 971 | 554 |
| tools/ | H | 07-Mar-2021 | - | 2,918 | 1,713 |
| .clang-format | H A D | 17-Aug-2024 | 3.7 KiB | 137 | 135 |
| .gitignore | H A D | 10-Apr-2024 | 79 | 7 | 6 |
| .shellcheck | H A D | 19-Apr-2021 | 0 | | |
| LICENSE | H A D | 07-Mar-2021 | 11.1 KiB | 202 | 169 |
| OWNERS | H A D | 11-Jan-2024 | 1.7 KiB | 53 | 48 |
| README.md | H A D | 09-Aug-2024 | 3.2 KiB | 95 | 73 |
| compatible_system_types_finder.cpp | H A D | 17-Aug-2024 | 2.8 KiB | 89 | 60 |
| compatible_system_types_finder.hpp | H A D | 09-Aug-2024 | 4.3 KiB | 128 | 37 |
| dbus_interfaces_finder.cpp | H A D | 17-Aug-2024 | 3.2 KiB | 108 | 74 |
| dbus_interfaces_finder.hpp | H A D | 17-Aug-2024 | 4.8 KiB | 150 | 38 |
| device.hpp | H A D | 11-May-2023 | 1.5 KiB | 82 | 34 |
| device_monitor.hpp | H A D | 13-Sep-2021 | 1.8 KiB | 82 | 41 |
| elog-errors.hpp | H A D | 17-Aug-2024 | 60.8 KiB | 2,395 | 1,936 |
| file_descriptor.hpp | H A D | 11-May-2023 | 2.8 KiB | 135 | 55 |
| format_utils.hpp | H A D | 09-Aug-2024 | 1.6 KiB | 60 | 23 |
| gpio.cpp | H A D | 07-Mar-2021 | 3.2 KiB | 125 | 81 |
| gpio.hpp | H A D | 13-Sep-2021 | 2.1 KiB | 117 | 46 |
| meson.build | H A D | 04-Sep-2024 | 5.7 KiB | 192 | 170 |
| meson.options | H A D | 05-Dec-2023 | 2.1 KiB | 75 | 70 |
| names_values.hpp | H A D | 02-Jun-2023 | 2.2 KiB | 112 | 51 |
| pmbus.cpp | H A D | 17-Aug-2024 | 11.4 KiB | 418 | 321 |
| pmbus.hpp | H A D | 17-Aug-2024 | 12.9 KiB | 429 | 134 |
| temporary_file.cpp | H A D | 17-Aug-2024 | 2.6 KiB | 96 | 49 |
| temporary_file.hpp | H A D | 12-Jan-2024 | 3.1 KiB | 127 | 35 |
| temporary_subdirectory.cpp | H A D | 17-Aug-2024 | 2.3 KiB | 82 | 42 |
| temporary_subdirectory.hpp | H A D | 24-May-2024 | 3.6 KiB | 132 | 36 |
| types.hpp | H A D | 03-May-2023 | 1.7 KiB | 40 | 33 |
| utility.cpp | H A D | 17-Aug-2024 | 6.1 KiB | 222 | 175 |
| utility.hpp | H A D | 05-Jun-2024 | 7.4 KiB | 236 | 86 |
README.md
1# phosphor-power
2
3## Overview
4
5This repository contains applications for configuring and monitoring devices
6that deliver power to the system.
7
8Actively-maintained applications:
9
10- cold-redundancy: Application that makes power supplies work in Cold Redundancy
11 mode and rotates them at intervals.
12- [phosphor-power-sequencer](phosphor-power-sequencer/README.md): JSON-driven
13 application that powers the chassis on/off and monitors the power sequencer
14 device.
15- [phosphor-power-supply](phosphor-power-supply/README.md): Next generation
16 power supply monitoring application.
17- [phosphor-regulators](phosphor-regulators/README.md): JSON-driven application
18 that configures and monitors voltage regulators.
19- tools/power-utils: Power supply utilities.
20
21Legacy applications:
22
23- power-sequencer: Original power sequencer monitoring application.
24- power-supply: Original power supply monitoring application.
25
26## Build
27
28To build all applications in this repository:
29
30```sh
31 meson setup build
32 ninja -C build
33```
34
35To clean the repository and remove all build output:
36
37```sh
38 rm -rf build
39```
40
41You can specify [meson options](meson.options) to customize the build process.
42For example, you can specify:
43
44- Which applications to build and install.
45- Application-specific configuration data, such as power sequencer type.
46- Whether to build tests.
47
48## Power Supply Monitor and Util JSON config
49
50Several applications in this repository require a PSU JSON config to run. The
51JSON config file provides information for:
52
53- Where to access the pmbus attributes
54- Which attribute file in pmbus maps to which property and interface in D-Bus
55- Which kernel device directory is used on which PSU
56
57There is an example [psu.json](example/psu.json) to describe the necessary
58configurations.
59
60- `inventoryPMBusAccessType` defines the pmbus access type, which tells the
61 service which sysfs type to use to read the attributes. The possible values
62 are:
63 - Base: The base dir, e.g. `/sys/bus/i2c/devices/3-0069/`
64 - Hwmon: The hwmon dir, e.g. `/sys/bus/i2c/devices/3-0069/hwmon/hwmonX/`
65 - Debug: The pmbus debug dir, e.g. `/sys/kernel/debug/pmbus/hwmonX/`
66 - DeviceDebug: The device debug dir, e.g.
67 `/sys/kernel/debug/<driver>.<instance>/`
68 - HwmonDeviceDebug: The hwmon device debug dir, e.g.
69 `/sys/kernel/debug/pmbus/hwmonX/cffps1/`
70- `fruConfigs` defines the mapping between the attribute file and the FRU
71 inventory interface and property. The configuration example below indicates
72 that the service will read `part_number` attribute file from a directory
73 specified by the above pmbus access type, and assign to `PartNumber` property
74 in `xyz.openbmc_project.Inventory.Decorator.Asset` interface.
75
76 ```json
77 "fruConfigs": [
78 {
79 "propertyName": "PartNumber",
80 "fileName": "part_number",
81 "interface": "xyz.openbmc_project.Inventory.Decorator.Asset"
82 }
83 ]
84 ```
85
86- `psuDevices` defines the kernel device dir for each PSU in inventory. The
87 configuration example below indicates that `powersupply0`'s device is located
88 in `/sys/bus/i2c/devices/3-0069`.
89
90 ```json
91 "psuDevices": {
92 "/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0069",
93 }
94 ```
95