1*80689db1SShawn McCarney# phosphor-regulators 2*80689db1SShawn McCarney 3*80689db1SShawn McCarney## Overview 4*80689db1SShawn McCarney 5*80689db1SShawn McCarneyThe `phosphor-regulators` application configures and monitors voltage 6*80689db1SShawn McCarneyregulators. The application is controlled by a JSON configuration file. 7*80689db1SShawn McCarney 8*80689db1SShawn McCarneyThe application does not control how voltage regulators are enabled or how to 9*80689db1SShawn McCarneymonitor their Power Good (pgood) status. Those operations are typically 10*80689db1SShawn McCarneyperformed by power sequencer hardware and the 11*80689db1SShawn McCarney[`phosphor-power-sequencer`](../../phosphor-power-sequencer/docs/README.md) 12*80689db1SShawn McCarneyapplication. 13*80689db1SShawn McCarney 14*80689db1SShawn McCarney## Application 15*80689db1SShawn McCarney 16*80689db1SShawn McCarney`phosphor-regulators` is a single-threaded C++ executable. It is a 'daemon' 17*80689db1SShawn McCarneyprocess that runs continually. The application is launched by systemd when the 18*80689db1SShawn McCarneyBMC reaches the Ready state and before the chassis is powered on. 19*80689db1SShawn McCarney 20*80689db1SShawn McCarneyThe application is driven by a system-specific JSON configuration file. The JSON 21*80689db1SShawn McCarneyfile is found and parsed at runtime. The parsing process creates a collection of 22*80689db1SShawn McCarneyC++ objects. These objects implement the regulator configuration and monitoring 23*80689db1SShawn McCarneybehavior that was specified in the JSON file. 24*80689db1SShawn McCarney 25*80689db1SShawn McCarneySee [Internal Design](internal_design.md) for more information. 26*80689db1SShawn McCarney 27*80689db1SShawn McCarney## Configuring voltage regulators 28*80689db1SShawn McCarney 29*80689db1SShawn McCarney`phosphor-regulators` can modify the configuration of voltage regulators, such 30*80689db1SShawn McCarneyas modifying the output voltage or overcurrent limits. 31*80689db1SShawn McCarney 32*80689db1SShawn McCarneySee [Regulator Configuration](configuration.md) for more information. 33*80689db1SShawn McCarney 34*80689db1SShawn McCarney## Monitoring voltage regulators 35*80689db1SShawn McCarney 36*80689db1SShawn McCarney`phosphor-regulators` supports two types of regulator monitoring: 37*80689db1SShawn McCarney 38*80689db1SShawn McCarney- Sensor monitoring 39*80689db1SShawn McCarney - Reading sensor values such as voltage output and temperature 40*80689db1SShawn McCarney- Phase fault monitoring 41*80689db1SShawn McCarney - Checking if a redundant regulator phase has failed 42*80689db1SShawn McCarney 43*80689db1SShawn McCarneySee [Regulator Monitoring](monitoring.md) for more information. 44*80689db1SShawn McCarney 45*80689db1SShawn McCarney## JSON configuration file 46*80689db1SShawn McCarney 47*80689db1SShawn McCarneyThe JSON configuration file defines the following: 48*80689db1SShawn McCarney 49*80689db1SShawn McCarney- Voltage regulators in the system. 50*80689db1SShawn McCarney- Operations to perform on those regulators, such as configuration or sensor 51*80689db1SShawn McCarney monitoring. 52*80689db1SShawn McCarney 53*80689db1SShawn McCarneyConfiguration files are stored in the [`config_files`](../config_files) 54*80689db1SShawn McCarneydirectory. 55*80689db1SShawn McCarney 56*80689db1SShawn McCarneySee the [configuration file documentation](docs/config_file/README.md) for 57*80689db1SShawn McCarneyinformation on the file format, validation tool, and installation directories. 58*80689db1SShawn McCarney 59*80689db1SShawn McCarney## Testing 60*80689db1SShawn McCarney 61*80689db1SShawn McCarneyAutomated test cases exist for most of the code in this application. See 62*80689db1SShawn McCarney[Testing](testing.md) for more information. 63