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