xref: /openbmc/phosphor-power/phosphor-power-sequencer/docs/config_file/README.md (revision d1312fca296a458b0bb7e7d44c650285ee01bec6)
1# phosphor-power-sequencer Configuration File
2
3## Table of Contents
4
5- [Overview](#overview)
6- [Data Format](#data-format)
7- [Name](#name)
8- [Contents](#contents)
9- [Installation](#installation)
10
11## Overview
12
13The `phosphor-power-sequencer` application is controlled by a configuration file
14(config file). The config file contains information about the chassis, power
15sequencer devices, GPIOs, and voltage rails within the system.
16
17This information is used to power the system on/off, detect
18[pgood faults](../pgood_faults.md), and identify the voltage rail that caused a
19pgood fault.
20
21The config file is optional. If no file is found, the application will do the
22following:
23
24- Assume this is a single chassis system.
25- Assume the standard [GPIO names](../named_gpios.md) are used to power the
26  system on/off and detect pgood faults.
27- Log a general error if a pgood fault occurs. No specific voltage rail will be
28  identified.
29
30## Data Format
31
32The config file is a text file in the
33[JSON (JavaScript Object Notation)](https://www.json.org/) data format.
34
35## Name
36
37The config file name is based on the system type that it supports.
38
39A config file is normally system-specific. Each system type usually has a
40different set of chassis, power sequencer devices, GPIOs, and voltage rails.
41
42The system type is obtained from a D-Bus Chassis object created by the
43[Entity Manager](https://github.com/openbmc/entity-manager) application. The
44object must implement the `xyz.openbmc_project.Inventory.Decorator.Compatible`
45interface.
46
47The `Names` property of this interface contains a list of one or more compatible
48system types. The types are ordered from most specific to least specific.
49
50Example:
51
52- `com.acme.Hardware.Chassis.Model.MegaServer4CPU`
53- `com.acme.Hardware.Chassis.Model.MegaServer`
54- `com.acme.Hardware.Chassis.Model.Server`
55
56The `phosphor-power-sequencer` application searches for a config file name that
57matches one of these compatible system types. It searches from most specific to
58least specific. The first config file found, if any, will be used.
59
60For each compatible system type, the application will look for two config file
61names:
62
63- The complete compatible system type plus a '.json' suffix
64- The last node of the compatible system type plus a '.json' suffix
65
66Example:
67
68- `com.acme.Hardware.Chassis.Model.MegaServer4CPU.json`
69- `MegaServer4CPU.json`
70
71## Contents
72
73The config file contains a single JSON [config_file](config_file.md) object at
74the root level. That object contains arrays of other JSON objects.
75
76### Comments
77
78The JSON data format does not support comments. However, some of the JSON
79objects in the config file provide an optional "comments" property. The value of
80this property is an array of strings. Use this property to annotate the config
81file. The "comments" properties are ignored when the config file is read by the
82`phosphor-power-sequencer` application.
83
84Examples:
85
86```json
87"comments": ["Chassis 2: Standard hardware layout"],
88```
89
90```json
91"comments": ["The first of two UCD90320 power sequencers in the chassis.",
92             "Controls/monitors rails 0-15."]
93```
94
95### Hexadecimal Values
96
97The JSON number data type does not support the hexadecimal format. For this
98reason, properties with hexadecimal values use the string data type.
99
100Example:
101
102```json
103"address": "0x70"
104```
105
106## Installation
107
108The config file is installed in the `/usr/share/phosphor-power-sequencer`
109directory on the BMC.
110