1# chassis_template 2 3## Description 4 5Chassis templates are used to avoid duplicate data. 6 7In a multiple chassis system, two or more of the [chassis](chassis.md) may have 8the same hardware design. The corresponding chassis objects in the config file 9would be almost identical with a few minor property value differences. 10 11A chassis template defines the power sequencers, GPIOs, and voltage rails in a 12chassis. One or more property values in the template contain variables, such as 13`${chassis_number}`, to support chassis-specific values. 14 15Multiple chassis can use the template rather than duplicating the information. 16The individual chassis specify values for the template variables, such as 17setting `${chassis_number}` to "1" or "2". 18 19### Template Variables 20 21Variables are specified in property values of a chassis template. This includes 22the properties of contained sub-objects like 23[power_sequencers](power_sequencer.md) or [rails](rail.md). 24 25The syntax to specify a variable is `${variable_name}`. 26 27Variable names can only contain letters (A-Z, a-z), numbers (0-9), and 28underscores (\_). 29 30Variables can be specified as the entire property value or as part of the 31property value: 32 33```json 34"number": "${chassis_number}", 35"power_good_gpio_name": "power-chassis${chassis_number}-good", 36``` 37 38Variables are supported for the property types string, number, and boolean. 39 40Variables must be specified within a string value (surrounded by double quotes). 41If the property type is number or boolean, the string will be converted to the 42required type. 43 44## Properties 45 46| Name | Required | Type | Description | 47| :--------------- | :------: | :---------------------------------------------- | :------------------------------------------------------------------------------------------------------------ | 48| comments | no | array of strings | One or more comment lines describing this chassis template. | 49| id | yes | string | Unique ID for this chassis template. Can only contain letters (A-Z, a-z), numbers (0-9), and underscore (\_). | 50| number | yes | number | Chassis number within the system. Chassis numbers start at 1 because chassis 0 represents the entire system. | 51| inventory_path | yes | string | D-Bus inventory path of the chassis, such as "/xyz/openbmc_project/inventory/system/chassis". | 52| power_sequencers | yes | array of [power_sequencers](power_sequencer.md) | One or more power sequencer devices within the chassis. | 53 54## Example 55 56```json 57{ 58 "id": "standard_chassis_template", 59 "number": "${chassis_number}", 60 "inventory_path": "/xyz/openbmc_project/inventory/system/chassis${chassis_number}", 61 "power_sequencers": [ 62 { 63 "type": "UCD90320", 64 "i2c_interface": { "bus": "${sequencer_bus_number}", "address": "0x11" }, 65 "power_control_gpio_name": "power-chassis${chassis_number}-control", 66 "power_good_gpio_name": "power-chassis${chassis_number}-good", 67 "rails": [ 68 { 69 "name": "VDD_CPU0", 70 "page": 11, 71 "check_status_vout": true 72 }, 73 { 74 "name": "VCS_CPU1", 75 "presence": "/xyz/openbmc_project/inventory/system/chassis${chassis_number}/motherboard/cpu1", 76 "gpio": { "line": 60 } 77 } 78 ] 79 } 80 ] 81} 82``` 83