xref: /openbmc/phosphor-power/phosphor-regulators/docs/README.md (revision 8b38b177315d40f1f9bc1e4d0784d45ea17cbd5c)
180689db1SShawn McCarney# phosphor-regulators
280689db1SShawn McCarney
380689db1SShawn McCarney## Overview
480689db1SShawn McCarney
580689db1SShawn McCarneyThe `phosphor-regulators` application configures and monitors voltage
680689db1SShawn McCarneyregulators. The application is controlled by a JSON configuration file.
780689db1SShawn McCarney
880689db1SShawn McCarneyThe application does not control how voltage regulators are enabled or how to
980689db1SShawn McCarneymonitor their Power Good (pgood) status. Those operations are typically
1080689db1SShawn McCarneyperformed by power sequencer hardware and the
1180689db1SShawn McCarney[`phosphor-power-sequencer`](../../phosphor-power-sequencer/docs/README.md)
1280689db1SShawn McCarneyapplication.
1380689db1SShawn McCarney
14*8b38b177SShawn McCarney**Note:** Many changes have been made to this documentation to define
15*8b38b177SShawn McCarneyenhancements to the multiple chassis support. These enhancements are not yet
16*8b38b177SShawn McCarneyimplemented in this application. The enhancements are also dependent on the
17*8b38b177SShawn McCarneyplanned new `phosphor-chassis-power` application. This disclaimer will be
18*8b38b177SShawn McCarneyremoved when this support is fully implemented.
19*8b38b177SShawn McCarney
2080689db1SShawn McCarney## Application
2180689db1SShawn McCarney
2280689db1SShawn McCarney`phosphor-regulators` is a single-threaded C++ executable. It is a 'daemon'
2380689db1SShawn McCarneyprocess that runs continually. The application is launched by systemd when the
24*8b38b177SShawn McCarneyBMC reaches the Ready state and before the system is powered on.
2580689db1SShawn McCarney
2680689db1SShawn McCarneyThe application is driven by a system-specific JSON configuration file. The JSON
2780689db1SShawn McCarneyfile is found and parsed at runtime. The parsing process creates a collection of
2880689db1SShawn McCarneyC++ objects. These objects implement the regulator configuration and monitoring
2980689db1SShawn McCarneybehavior that was specified in the JSON file.
3080689db1SShawn McCarney
3180689db1SShawn McCarneySee [Internal Design](internal_design.md) for more information.
3280689db1SShawn McCarney
3380689db1SShawn McCarney## Configuring voltage regulators
3480689db1SShawn McCarney
3580689db1SShawn McCarney`phosphor-regulators` can modify the configuration of voltage regulators, such
3680689db1SShawn McCarneyas modifying the output voltage or overcurrent limits.
3780689db1SShawn McCarney
3880689db1SShawn McCarneySee [Regulator Configuration](configuration.md) for more information.
3980689db1SShawn McCarney
4080689db1SShawn McCarney## Monitoring voltage regulators
4180689db1SShawn McCarney
4280689db1SShawn McCarney`phosphor-regulators` supports two types of regulator monitoring:
4380689db1SShawn McCarney
4480689db1SShawn McCarney- Sensor monitoring
4580689db1SShawn McCarney  - Reading sensor values such as voltage output and temperature
4680689db1SShawn McCarney- Phase fault monitoring
4780689db1SShawn McCarney  - Checking if a redundant regulator phase has failed
4880689db1SShawn McCarney
4980689db1SShawn McCarneySee [Regulator Monitoring](monitoring.md) for more information.
5080689db1SShawn McCarney
5180689db1SShawn McCarney## JSON configuration file
5280689db1SShawn McCarney
5380689db1SShawn McCarneyThe JSON configuration file defines the following:
5480689db1SShawn McCarney
5580689db1SShawn McCarney- Voltage regulators in the system.
5680689db1SShawn McCarney- Operations to perform on those regulators, such as configuration or sensor
5780689db1SShawn McCarney  monitoring.
5880689db1SShawn McCarney
5980689db1SShawn McCarneyConfiguration files are stored in the [`config_files`](../config_files)
6080689db1SShawn McCarneydirectory.
6180689db1SShawn McCarney
6280689db1SShawn McCarneySee the [configuration file documentation](docs/config_file/README.md) for
6380689db1SShawn McCarneyinformation on the file format, validation tool, and installation directories.
6480689db1SShawn McCarney
65*8b38b177SShawn McCarney## Multiple chassis systems
66*8b38b177SShawn McCarney
67*8b38b177SShawn McCarneyA BMC-based system can contain one or more chassis. A chassis is typically a
68*8b38b177SShawn McCarneyphysical enclosure that contains system components such as CPUs, fans, power
69*8b38b177SShawn McCarneysupplies, and PCIe cards.
70*8b38b177SShawn McCarney
71*8b38b177SShawn McCarneySee [Multiple Chassis](multiple_chassis.md) for more information.
72*8b38b177SShawn McCarney
7380689db1SShawn McCarney## Testing
7480689db1SShawn McCarney
7580689db1SShawn McCarneyAutomated test cases exist for most of the code in this application. See
7680689db1SShawn McCarney[Testing](testing.md) for more information.
77