1{
2    "comments": [
3        "phosphor-regulators configuration file for IBM Bonnell systems"
4    ],
5
6    "rules": [
7        {
8            "comments": ["Rule to set PMBus PAGE to 0"],
9            "id": "set_page0_rule",
10            "actions": [
11                { "i2c_write_byte": { "register": "0x00", "value": "0x00" } }
12            ]
13        },
14
15        {
16            "comments": ["Rule to set PMBus PAGE to 1"],
17            "id": "set_page1_rule",
18            "actions": [
19                { "i2c_write_byte": { "register": "0x00", "value": "0x01" } }
20            ]
21        },
22
23        {
24            "comments": ["Rule to set output voltage of a PMBus regulator"],
25            "id": "set_voltage_rule",
26            "actions": [
27                {
28                    "comments": [
29                        "Write volts value to VOUT_COMMAND in linear format.",
30                        "Get volts value from configuration.  Get exponent",
31                        "from VOUT_MODE.  Verify write was successful."
32                    ],
33                    "pmbus_write_vout_command": {
34                        "format": "linear",
35                        "is_verified": true
36                    }
37                }
38            ]
39        },
40
41        {
42            "comments": [
43                "Rule to set output voltage of PAGE 0 of a PMBus regulator"
44            ],
45            "id": "set_voltage_page0_rule",
46            "actions": [
47                { "run_rule": "set_page0_rule" },
48                { "run_rule": "set_voltage_rule" }
49            ]
50        },
51
52        {
53            "comments": [
54                "Rule to set output voltage of PAGE 1 of a PMBus regulator"
55            ],
56            "id": "set_voltage_page1_rule",
57            "actions": [
58                { "run_rule": "set_page1_rule" },
59                { "run_rule": "set_voltage_rule" }
60            ]
61        },
62
63        {
64            "comments": [
65                "Rule to set output voltage of a PMBus regulator using",
66                "PMBus OPERATION and VOUT_COMMAND"
67            ],
68            "id": "set_operation_and_voltage_rule",
69            "actions": [
70                {
71                    "comments": [
72                        "Set PMBus OPERATION to 0x80 indicating output voltage",
73                        "is set by the PMBus VOUT_COMMAND"
74                    ],
75                    "i2c_write_byte": { "register": "0x01", "value": "0x80" }
76                },
77
78                {
79                    "comments": [
80                        "Set the output voltage using the PMBus VOUT_COMMAND"
81                    ],
82                    "run_rule": "set_voltage_rule"
83                },
84
85                {
86                    "comments": [
87                        "Set PMBus OPERATION to 0xB0 indicating output voltage",
88                        "will now be set by AVSBus (AVS_VOUT_COMMAND).",
89                        "Hardware settings cause the VOUT_COMMAND value to be",
90                        "the initial voltage value for AVSBus."
91                    ],
92                    "i2c_write_byte": { "register": "0x01", "value": "0xB0" }
93                }
94            ]
95        }
96    ],
97
98    "chassis": [
99        {
100            "comments": ["Chassis (drawer) 1", "Note: Devices not defined yet"],
101            "number": 1,
102            "inventory_path": "system/chassis"
103        }
104    ]
105}
106