xref: /openbmc/phosphor-power/phosphor-power-sequencer/docs/chassis_status.md (revision 27ae70b8219cd292f3d8d9b3d5ff2a9ee18b1f37)
1*27ae70b8SShawn McCarney# Chassis Status
2*27ae70b8SShawn McCarney
3*27ae70b8SShawn McCarney## Overview
4*27ae70b8SShawn McCarney
5*27ae70b8SShawn McCarneyThere are multiple D-Bus interfaces and properties that describe the chassis
6*27ae70b8SShawn McCarneystatus. The `phosphor-power-sequencer` application publishes one of those
7*27ae70b8SShawn McCarneyinterfaces. The other interfaces are published by different applications and are
8*27ae70b8SShawn McCarneyused as input by `phosphor-power-sequencer.`
9*27ae70b8SShawn McCarney
10*27ae70b8SShawn McCarney## state and pgood properties
11*27ae70b8SShawn McCarney
12*27ae70b8SShawn McCarneyThe `state` and `pgood` properties exist on the `org.openbmc.control.Power`
13*27ae70b8SShawn McCarneyD-Bus interface.
14*27ae70b8SShawn McCarney
15*27ae70b8SShawn McCarney`state` has a value of 0 or 1. `state` represents the desired power state for
16*27ae70b8SShawn McCarneythe chassis. 0 means off, and 1 means on. This property is set when the system
17*27ae70b8SShawn McCarneyis being powered [on](powering_on.md) or [off](powering_off.md).
18*27ae70b8SShawn McCarney
19*27ae70b8SShawn McCarney`pgood` has a value of 0 or 1. `pgood` represents the power good (pgood) state
20*27ae70b8SShawn McCarneyof the chassis. 0 means off, and 1 means on. This is the actual, current power
21*27ae70b8SShawn McCarneystate. This property is set based on the chassis power good signal from the
22*27ae70b8SShawn McCarneypower sequencer device.
23*27ae70b8SShawn McCarney
24*27ae70b8SShawn McCarney`phosphor-power-sequencer` publishes the `org.openbmc.control.Power` interface
25*27ae70b8SShawn McCarneyon the following object paths:
26*27ae70b8SShawn McCarney
27*27ae70b8SShawn McCarney- `/org/openbmc/control/power0`: Represents the entire system
28*27ae70b8SShawn McCarney- `/org/openbmc/control/power1`: Represents chassis 1
29*27ae70b8SShawn McCarney- `/org/openbmc/control/power2`: Represents chassis 2
30*27ae70b8SShawn McCarney- ...
31*27ae70b8SShawn McCarney- `/org/openbmc/control/powerN`: Represents chassis N
32*27ae70b8SShawn McCarney
33*27ae70b8SShawn McCarney### Single chassis system
34*27ae70b8SShawn McCarney
35*27ae70b8SShawn McCarneyOn a single chassis system, only the first two object paths are published,
36*27ae70b8SShawn McCarneyrepresenting the entire system and chassis 1. The values of the `state` and
37*27ae70b8SShawn McCarney`pgood` properties are identical for both object paths.
38*27ae70b8SShawn McCarney
39*27ae70b8SShawn McCarneyWhen the system is powered off, the `state` and `pgood` properties for both
40*27ae70b8SShawn McCarneyobject paths are 0.
41*27ae70b8SShawn McCarney
42*27ae70b8SShawn McCarneyWhen the system is being powered on, the `state` property of both object paths
43*27ae70b8SShawn McCarneyis set to 1. When the chassis has successfully powered on, the `pgood` property
44*27ae70b8SShawn McCarneyof both object paths is set to 1.
45*27ae70b8SShawn McCarney
46*27ae70b8SShawn McCarneyWhen the system is being powered off, the `state` property of both object paths
47*27ae70b8SShawn McCarneyis set to 0. When the chassis has successfully powered off, the `pgood` property
48*27ae70b8SShawn McCarneyof both object paths is set to 0.
49*27ae70b8SShawn McCarney
50*27ae70b8SShawn McCarney### Multiple chassis system
51*27ae70b8SShawn McCarney
52*27ae70b8SShawn McCarneyOn a multiple chassis system with N chassis, all of the object paths above are
53*27ae70b8SShawn McCarneypublished. The first object path represents the state of the entire system, and
54*27ae70b8SShawn McCarneythe other object paths represent the state of the individual chassis.
55*27ae70b8SShawn McCarney
56*27ae70b8SShawn McCarneyWhen the system is powered off, the `state` and `pgood` properties for all of
57*27ae70b8SShawn McCarneythe object paths are 0.
58*27ae70b8SShawn McCarney
59*27ae70b8SShawn McCarneyWhen the system is being powered on, the `state` will be changed to 1 for the
60*27ae70b8SShawn McCarneysystem and for all chassis that **can** be powered on. It may not be possible to
61*27ae70b8SShawn McCarneypower on some chassis, such as if they are missing or have no input power. See
62*27ae70b8SShawn McCarney[Powering On](powering_on.md) for more information.
63*27ae70b8SShawn McCarney
64*27ae70b8SShawn McCarneyWhen an individual chassis has successfully powered on, the `pgood` property for
65*27ae70b8SShawn McCarneythat object path will change to 1. When all chassis whose `state` was set to 1
66*27ae70b8SShawn McCarneyhave successfully powered on, the `pgood` property for the system object path
67*27ae70b8SShawn McCarneywill change to 1.
68*27ae70b8SShawn McCarney
69*27ae70b8SShawn McCarneyIf a power good fault occurs in a chassis after the system powered on, the
70*27ae70b8SShawn McCarney`pgood` property for that chassis's object path will change to 0. The `pgood`
71*27ae70b8SShawn McCarneyproperty for the system object path will remain set to 1 for a period of time.
72*27ae70b8SShawn McCarneyEventually the system will be powered off due to the power good fault. See
73*27ae70b8SShawn McCarney[Power Good Faults](pgood_faults.md) for more information.
74*27ae70b8SShawn McCarney
75*27ae70b8SShawn McCarneyWhen the system is being powered off, the `state` will be changed to 0 for the
76*27ae70b8SShawn McCarneysystem and for all chassis that are being powered off.
77*27ae70b8SShawn McCarney
78*27ae70b8SShawn McCarneyWhen an individual chassis has successfully powered off, the `pgood` property
79*27ae70b8SShawn McCarneyfor that object path will change to 0. When all chassis have successfully
80*27ae70b8SShawn McCarneypowered off, the `pgood` property for the system object path will change to 0.
81*27ae70b8SShawn McCarney
82*27ae70b8SShawn McCarney### Initial property values
83*27ae70b8SShawn McCarney
84*27ae70b8SShawn McCarneyWhen `phosphor-power-sequencer` is started, it needs to set initial values for
85*27ae70b8SShawn McCarneythe `state` and `pgood` properties. This occurs when a system first receives
86*27ae70b8SShawn McCarneyinput power or after the BMC is reset.
87*27ae70b8SShawn McCarney
88*27ae70b8SShawn McCarneyThe chassis power good signal is read from the power sequencer device. Both the
89*27ae70b8SShawn McCarney`state` and `pgood` properties are set to the value of the power good signal.
90*27ae70b8SShawn McCarneyFor example, if the chassis power good is true, both `state` and `pgood` are set
91*27ae70b8SShawn McCarneyto the value 1. Thus, `phosphor-power-sequencer` assumes the chassis `state`
92*27ae70b8SShawn McCarneybased on the chassis `pgood`.
93*27ae70b8SShawn McCarney
94*27ae70b8SShawn McCarneyIn a multiple chassis system, it might not be possible to read the chassis power
95*27ae70b8SShawn McCarneygood signal. For example, the chassis might not be present or might have no
96*27ae70b8SShawn McCarneyinput power. See the sections below for information about how the `pgood`
97*27ae70b8SShawn McCarneyproperty will be set.
98*27ae70b8SShawn McCarney
99*27ae70b8SShawn McCarney## Present property
100*27ae70b8SShawn McCarney
101*27ae70b8SShawn McCarneyThe `Present` property exists in the [`xyz.openbmc_project.Inventory.Item`][1]
102*27ae70b8SShawn McCarneyD-Bus interface.
103*27ae70b8SShawn McCarney
104*27ae70b8SShawn McCarneyThis interface is published on the D-Bus inventory path for each chassis.
105*27ae70b8SShawn McCarney`phosphor-power-sequencer` does not publish this interface, but it checks the
106*27ae70b8SShawn McCarney`Present` property on multiple chassis systems.
107*27ae70b8SShawn McCarney
108*27ae70b8SShawn McCarneyThe `Present` property indicates whether a chassis is physically present.
109*27ae70b8SShawn McCarney
110*27ae70b8SShawn McCarneyIf `Present` is set to false for a chassis:
111*27ae70b8SShawn McCarney
112*27ae70b8SShawn McCarney- The chassis power good signal from the power sequencer will **not** be read.
113*27ae70b8SShawn McCarney  Since the chassis is not present, the `pgood` property on the
114*27ae70b8SShawn McCarney  `org.openbmc.control.Power` interface for the chassis will be set to 0.
115*27ae70b8SShawn McCarney- The chassis will **not** be powered on when the system is being powered on.
116*27ae70b8SShawn McCarney  The `state` property on the `org.openbmc.control.Power` interface for the
117*27ae70b8SShawn McCarney  chassis will remain set to 0.
118*27ae70b8SShawn McCarney
119*27ae70b8SShawn McCarney## Available property
120*27ae70b8SShawn McCarney
121*27ae70b8SShawn McCarneyThe `Available` property exists in the
122*27ae70b8SShawn McCarney[`xyz.openbmc_project.State.Decorator.Availability`][2] D-Bus interface.
123*27ae70b8SShawn McCarney
124*27ae70b8SShawn McCarneyThis interface is published on the D-Bus inventory path for each chassis.
125*27ae70b8SShawn McCarney`phosphor-power-sequencer` does not publish this interface, but it checks the
126*27ae70b8SShawn McCarney`Available` property on multiple chassis systems.
127*27ae70b8SShawn McCarney
128*27ae70b8SShawn McCarneyThis interface is optional. If the interface exists and `Available` is set to
129*27ae70b8SShawn McCarneyfalse, it means that communication to the chassis is not possible. For example,
130*27ae70b8SShawn McCarneythe chassis does not have any input power ([blackout](power_loss.md)) or
131*27ae70b8SShawn McCarneycommunication cables to the BMC are disconnected.
132*27ae70b8SShawn McCarney
133*27ae70b8SShawn McCarneyIf `Available` is set to false for a chassis:
134*27ae70b8SShawn McCarney
135*27ae70b8SShawn McCarney- The chassis power good signal from the power sequencer will **not** be read.
136*27ae70b8SShawn McCarney  Since communication to the chassis is not possible, the value of the power
137*27ae70b8SShawn McCarney  good signal is unknown. The following algorithm is used to set the value:
138*27ae70b8SShawn McCarney  - If the chassis is experiencing a blackout, the chassis has no input power
139*27ae70b8SShawn McCarney    and `pgood` will be set to 0.
140*27ae70b8SShawn McCarney  - If all other chassis have a `pgood` value of 0, the `pgood` value will be
141*27ae70b8SShawn McCarney    set to 0 for this chassis.
142*27ae70b8SShawn McCarney  - If at least one other chassis has a `pgood` value of 1, the `pgood` value
143*27ae70b8SShawn McCarney    will be set to 1 for this chassis.
144*27ae70b8SShawn McCarney- The chassis will **not** be powered on when the system is being powered on.
145*27ae70b8SShawn McCarney  The `state` property on the `org.openbmc.control.Power` interface for the
146*27ae70b8SShawn McCarney  chassis will remain set to 0.
147*27ae70b8SShawn McCarney
148*27ae70b8SShawn McCarney## Enabled property
149*27ae70b8SShawn McCarney
150*27ae70b8SShawn McCarneyThe `Enabled` property exists in the [`xyz.openbmc_project.Object.Enable`][3]
151*27ae70b8SShawn McCarneyD-Bus interface.
152*27ae70b8SShawn McCarney
153*27ae70b8SShawn McCarneyThis interface is published on the D-Bus inventory path for each chassis.
154*27ae70b8SShawn McCarney`phosphor-power-sequencer` does not publish this interface, but it checks the
155*27ae70b8SShawn McCarney`Enabled` property on multiple chassis systems.
156*27ae70b8SShawn McCarney
157*27ae70b8SShawn McCarneyThis interface is optional. If the interface exists and `Enabled` is set to
158*27ae70b8SShawn McCarneyfalse, it means that the chassis has been put in hardware isolation (guarded). A
159*27ae70b8SShawn McCarneycritical error has been detected in the chassis, and it will not be used when
160*27ae70b8SShawn McCarneythe system is powered on.
161*27ae70b8SShawn McCarney
162*27ae70b8SShawn McCarneyIf `Enabled` is set to false for a chassis:
163*27ae70b8SShawn McCarney
164*27ae70b8SShawn McCarney- The chassis power good signal from the power sequencer will be read. The
165*27ae70b8SShawn McCarney  `pgood` property on the `org.openbmc.control.Power` interface for the chassis
166*27ae70b8SShawn McCarney  will be set to the value of this signal.
167*27ae70b8SShawn McCarney- The chassis will **not** be powered on when the system is being powered on.
168*27ae70b8SShawn McCarney  The `state` property on the `org.openbmc.control.Power` interface for the
169*27ae70b8SShawn McCarney  chassis will remain set to 0.
170*27ae70b8SShawn McCarney
171*27ae70b8SShawn McCarney## Status property
172*27ae70b8SShawn McCarney
173*27ae70b8SShawn McCarneyThe `Status` property exists in the
174*27ae70b8SShawn McCarney[`xyz.openbmc_project.State.Decorator.PowerSystemInputs`][4] D-Bus interface.
175*27ae70b8SShawn McCarney
176*27ae70b8SShawn McCarney`phosphor-power-sequencer` does not publish this interface, but it checks the
177*27ae70b8SShawn McCarney`Status` property on multiple chassis systems.
178*27ae70b8SShawn McCarney
179*27ae70b8SShawn McCarneyThis interface is optional. If the interface exists and `Status` is set to
180*27ae70b8SShawn McCarney`Fault`, it means that the chassis is experiencing a blackout or brownout. A
181*27ae70b8SShawn McCarney[power loss](power_loss.md) is occurring, such as a power company utility
182*27ae70b8SShawn McCarneyfailure or an unplugged power cord. See the sub-sections below for more
183*27ae70b8SShawn McCarneyinformation.
184*27ae70b8SShawn McCarney
185*27ae70b8SShawn McCarney### Chassis power status
186*27ae70b8SShawn McCarney
187*27ae70b8SShawn McCarneyThe `phosphor-chassis-power` application publishes the
188*27ae70b8SShawn McCarney`xyz.openbmc_project.State.Decorator.PowerSystemInputs` interface on the
189*27ae70b8SShawn McCarneyfollowing object paths:
190*27ae70b8SShawn McCarney
191*27ae70b8SShawn McCarney- `/xyz/openbmc_project/power/chassis/chassis1`
192*27ae70b8SShawn McCarney- `/xyz/openbmc_project/power/chassis/chassis2`
193*27ae70b8SShawn McCarney- ...
194*27ae70b8SShawn McCarney- `/xyz/openbmc_project/power/chassis/chassisN`
195*27ae70b8SShawn McCarney
196*27ae70b8SShawn McCarneyIf `Status` is set to `Fault` for a chassis:
197*27ae70b8SShawn McCarney
198*27ae70b8SShawn McCarney- The chassis is experiencing a blackout.
199*27ae70b8SShawn McCarney- The chassis power good signal from the power sequencer will **not** be read.
200*27ae70b8SShawn McCarney  Since the chassis has no input power, the `pgood` property on the
201*27ae70b8SShawn McCarney  `org.openbmc.control.Power` interface for the chassis will be set to 0.
202*27ae70b8SShawn McCarney- The chassis will **not** be powered on when the system is being powered on.
203*27ae70b8SShawn McCarney  The `state` property on the `org.openbmc.control.Power` interface for the
204*27ae70b8SShawn McCarney  chassis will remain set to 0. An error will be logged indicating that the
205*27ae70b8SShawn McCarney  chassis was not powered on due to an input power problem.
206*27ae70b8SShawn McCarney
207*27ae70b8SShawn McCarney### Power supplies power status
208*27ae70b8SShawn McCarney
209*27ae70b8SShawn McCarneyThe `phosphor-power-supply` application publishes the
210*27ae70b8SShawn McCarney`xyz.openbmc_project.State.Decorator.PowerSystemInputs` interface on the
211*27ae70b8SShawn McCarneyfollowing object paths:
212*27ae70b8SShawn McCarney
213*27ae70b8SShawn McCarney- `/xyz/openbmc_project/power/power_supplies/chassis1/psus`
214*27ae70b8SShawn McCarney- `/xyz/openbmc_project/power/power_supplies/chassis2/psus`
215*27ae70b8SShawn McCarney- ...
216*27ae70b8SShawn McCarney- `/xyz/openbmc_project/power/power_supplies/chassisN/psus`
217*27ae70b8SShawn McCarney
218*27ae70b8SShawn McCarneyIf `Status` is set to `Fault` for the PSUs in a chassis:
219*27ae70b8SShawn McCarney
220*27ae70b8SShawn McCarney- The chassis is experiencing a brownout.
221*27ae70b8SShawn McCarney- The chassis power good signal from the power sequencer will be read. The
222*27ae70b8SShawn McCarney  `pgood` property on the `org.openbmc.control.Power` interface for the chassis
223*27ae70b8SShawn McCarney  will be set to the value of this signal.
224*27ae70b8SShawn McCarney- The chassis will **not** be powered on when the system is being powered on.
225*27ae70b8SShawn McCarney  The `state` property on the `org.openbmc.control.Power` interface for the
226*27ae70b8SShawn McCarney  chassis will remain set to 0. An error will be logged indicating that the
227*27ae70b8SShawn McCarney  chassis was not powered on due to an input power problem.
228*27ae70b8SShawn McCarney
229*27ae70b8SShawn McCarney[1]:
230*27ae70b8SShawn McCarney  https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Inventory/Item.interface.yaml
231*27ae70b8SShawn McCarney[2]:
232*27ae70b8SShawn McCarney  https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/State/Decorator/Availability.interface.yaml
233*27ae70b8SShawn McCarney[3]:
234*27ae70b8SShawn McCarney  https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/Object/Enable.interface.yaml
235*27ae70b8SShawn McCarney[4]:
236*27ae70b8SShawn McCarney  https://github.com/openbmc/phosphor-dbus-interfaces/blob/master/yaml/xyz/openbmc_project/State/Decorator/PowerSystemInputs.interface.yaml
237