1# device
2
3## Description
4
5A hardware device within the chassis.
6
7The following devices should be defined in the config file:
8
9- Voltage regulators that require configuration or monitoring.
10- Other devices that are required to configure or monitor regulators. For
11  example, an I/O expander may provide necessary information about a regulator.
12
13## Properties
14
15| Name                  | Required | Type                                              | Description                                                                                                                                                                                                                                                                                                                                    |
16| :-------------------- | :------: | :------------------------------------------------ | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
17| comments              |    no    | array of strings                                  | One or more comment lines describing this device.                                                                                                                                                                                                                                                                                              |
18| id                    |   yes    | string                                            | Unique ID for this device. Can only contain letters (A-Z, a-z), numbers (0-9), and underscore (\_).                                                                                                                                                                                                                                            |
19| is_regulator          |   yes    | boolean (true or false)                           | Indicates whether this device is a voltage regulator (phase controller).                                                                                                                                                                                                                                                                       |
20| fru                   |   yes    | string                                            | Field-Replaceable Unit (FRU) for this device. If the device itself is not a FRU, specify the FRU that contains it. Specify the relative D-Bus inventory path of the FRU. Full inventory paths begin with the root "/xyz/openbmc_project/inventory". Specify the relative path below the root, such as "system/chassis/motherboard/regulator2". |
21| i2c_interface         |   yes    | [i2c_interface](i2c_interface.md)                 | I2C interface to this device.                                                                                                                                                                                                                                                                                                                  |
22| presence_detection    |    no    | [presence_detection](presence_detection.md)       | Specifies how to detect whether this device is present. If this property is not specified, the device is assumed to always be present.                                                                                                                                                                                                         |
23| configuration         |    no    | [configuration](configuration.md)                 | Specifies configuration changes that should be applied to this device. These changes usually override hardware default settings. The configuration changes are applied during the boot before regulators are enabled.                                                                                                                          |
24| phase_fault_detection |    no    | [phase_fault_detection](phase_fault_detection.md) | Specifies how to detect and log redundant phase faults in this voltage regulator. Can only be specified if the "is_regulator" property is true.                                                                                                                                                                                                |
25| rails                 |    no    | array of [rails](rail.md)                         | One or more voltage rails produced by this device. Can only be specified if the "is_regulator" property is true.                                                                                                                                                                                                                               |
26
27## Example
28
29```
30{
31  "comments": [ "IR35221 regulator producing the Vdd rail" ],
32  "id": "vdd_regulator",
33  "is_regulator": true,
34  "fru": "system/chassis/motherboard/regulator2",
35  "i2c_interface": {
36    "bus": 1,
37    "address": "0x70"
38  },
39  "configuration": {
40    "rule_id": "configure_ir35221_rule"
41  },
42  "rails": [
43    {
44      "id": "vdd",
45      ... details omitted ...
46    }
47  ]
48}
49```
50