1# configuration
2
3## Description
4
5Configuration changes that should be applied to a device or regulator rail.
6These changes usually override hardware default settings.
7
8The most common configuration change is setting the output voltage for a
9regulator rail. Other examples include modifying pgood thresholds and
10overcurrent settings.
11
12The configuration changes are applied during the boot before regulators are
13enabled.
14
15The configuration changes are applied by executing one or more actions. The
16actions can be specified in two ways:
17
18- Use the "rule_id" property to specify a standard rule to run.
19- Use the "actions" property to specify an array of actions that are unique to
20  this device.
21
22## Properties
23
24| Name     |      Required       | Type                          | Description                                                                                                                     |
25| :------- | :-----------------: | :---------------------------- | :------------------------------------------------------------------------------------------------------------------------------ |
26| comments |         no          | array of strings              | One or more comment lines describing the configuration changes.                                                                 |
27| volts    |         no          | number                        | Output voltage expressed as a decimal number. Applied using the [pmbus_write_vout_command](pmbus_write_vout_command.md) action. |
28| rule_id  | see [notes](#notes) | string                        | Unique ID of the [rule](rule.md) to execute.                                                                                    |
29| actions  | see [notes](#notes) | array of [actions](action.md) | One or more actions to execute.                                                                                                 |
30
31### Notes
32
33- You must specify either "rule_id" or "actions".
34
35## Examples
36
37```json
38{
39  "comments": ["Set rail to 1.25V using standard rule"],
40  "volts": 1.25,
41  "rule_id": "set_voltage_rule"
42}
43```
44
45```json
46{
47  "comments": [
48    "If version register 0x75 contains 1, device is downlevel",
49    "and registers 0x31/0x34 need to be updated."
50  ],
51  "actions": [
52    {
53      "if": {
54        "condition": {
55          "i2c_compare_byte": { "register": "0x75", "value": "0x01" }
56        },
57        "then": [
58          { "i2c_write_byte": { "register": "0x31", "value": "0xDB" } },
59          { "i2c_write_byte": { "register": "0x34", "value": "0x1B" } }
60        ]
61      }
62    }
63  ]
64}
65```
66