README.md
1# phosphor-power-sequencer
2
3## Overview
4
5The `phosphor-power-sequencer` application powers all the chassis in the system
6on and off. It also monitors the power good (pgood) state in each chassis.
7
8**Note:** Many changes have been made to this documentation to define how
9multiple chassis support will work. This support is not yet implemented in this
10application. The support is also dependent on changes to the existing
11`phosphor-chassis-state-manager` application and the planned new
12`phosphor-chassis-power` application. This disclaimer will be removed when this
13support is fully implemented.
14
15## Application
16
17`phosphor-power-sequencer` is a single-threaded C++ executable. It is a daemon
18process that runs continually. It is launched by systemd when the BMC reaches
19the Ready state and before the system is powered on.
20
21`phosphor-power-sequencer` is driven by an optional, system-specific JSON
22configuration file. The config file is found and parsed at runtime. The parsing
23process creates a collection of C++ objects. These objects represent the
24chassis, power sequencer devices, voltage rails, GPIOs, and fault checks to
25perform.
26
27See [Internal Design](internal_design.md) for more information.
28
29## Power sequencer device
30
31A power sequencer device enables (turns on) the voltage rails in the correct
32order and monitors them for pgood faults.
33
34`phosphor-power-sequencer` currently supports the following power sequencer
35device types:
36
37- UCD90160
38- UCD90320
39
40Additional device types can be supported by creating a new sub-class within the
41PowerSequencerDevice class hierarchy. See [Internal Design](internal_design.md)
42for more information.
43
44If the power sequencer device type is not supported, `phosphor-power-sequencer`
45can still power the system on/off and detect chassis pgood faults. However, it
46will not be able to determine which voltage rail caused a pgood fault.
47
48## Powering on the system
49
50`phosphor-power-sequencer` uses the power sequencer device to power on all main
51(non-standby) voltage rails in each chassis.
52
53See [Powering On](powering_on.md) for more information.
54
55## Powering off the system
56
57`phosphor-power-sequencer` uses the power sequencer device to power off all main
58(non-standby) voltage rails in each chassis.
59
60See [Powering Off](powering_off.md) for more information.
61
62## Monitoring chassis pgood
63
64`phosphor-power-sequencer` periodically reads the chassis pgood state from the
65power sequencer device. See
66[Monitoring Chassis Power Good](monitoring_chassis_pgood.md) for more
67information.
68
69## Chassis pgood faults
70
71If the chassis pgood state is false when it should be true, a chassis pgood
72fault has occurred. `phosphor-power-sequencer` uses information from the power
73sequencer device to determine the cause.
74
75See [Power Good Faults](pgood_faults.md) for more information.
76
77## JSON configuration file
78
79`phosphor-power-sequencer` is configured by an optional JSON configuration file.
80The configuration file defines the voltage rails in the system and how they
81should be monitored.
82
83JSON configuration files are system-specific and are stored in the
84[config_files](../config_files/) sub-directory.
85
86[Documentation](config_file/README.md) is available on the configuration file
87format.
88
89If no configuration file is found for the current system,
90`phosphor-power-sequencer` can still power the system on/off and detect chassis
91pgood faults. However, it will not be able to determine which voltage rail
92caused a pgood fault.
93
94## Testing
95
96Automated test cases exist for most of the code in this application. See
97[Testing](testing.md) for more information.
98
99## Related applications
100
101### phosphor-chassis-state-manager
102
103The `phosphor-chassis-state-manager` application exists in the
104phosphor-state-manager repository. It supports user requests to power on and off
105the system hardware. It publishes the [`xyz.openbmc_project.State.Chassis`][1]
106D-Bus interface.
107
108### phosphor-chassis-power
109
110The `phosphor-chassis-power` application exists in the phosphor-power
111repository. It monitors the chassis input power state using GPIOs.
112
113### phosphor-power-supply
114
115The `phosphor-power-supply` application exists in the phosphor-power repository.
116It monitors the power supply devices within each chassis.
117
118[1]:
119 https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/State/Chassis.interface.yaml
120