prettier: re-format
Prettier is enabled in openbmc-build-scripts on Markdown, JSON, and YAML
files to have consistent formatting for these file types. Re-run the
formatter on the whole repository.
Change-Id: I3608bb85305658ae95c705238800fb20d8841774
Signed-off-by: Patrick Williams <patrick@stwcx.xyz>
diff --git a/README.md b/README.md
index b5df2fb..4b56bcb 100644
--- a/README.md
+++ b/README.md
@@ -1,8 +1,9 @@
# X86 power control
This repository contains an OpenBMC compliant implementation of power control
-for x86 servers. It relies on a number of features to do its job. It has
-several intentional design goals.
+for x86 servers. It relies on a number of features to do its job. It has several
+intentional design goals.
+
1. The BMC should maintain the Host state machine internally, and be able to
track state changes.
2. The implementation should either give the requested power control result, or
@@ -11,19 +12,19 @@
soft power on/off/cycle.
This daemon has been successfully used on a variety of server platforms; it
-should be able to support platforms with power control GPIOs similar to those
-in its config file.
+should be able to support platforms with power control GPIOs similar to those in
+its config file.
x86-power-control uses default json file (power-config-host0.json) for GPIO
-configuration. However this can be customized by producing your own
+configuration. However this can be customized by producing your own
power-config-host0.json file.
Definitions can be configured by two type:
1. GPIO
-For the platform having direct GPIO access can use the type GPIO and define
-like below.
+For the platform having direct GPIO access can use the type GPIO and define like
+below.
{
"Name" : "PostComplete",
@@ -46,25 +47,26 @@
},
x86-power-control will monitor the property change from the given DbusName and
-take appropriate action. *define Property as a bool variable.
+take appropriate action. \*define Property as a bool variable.
-Caveats:
-This implementation does not currently implement the common targets that other
-implementations do. There were several attempts to, but all ended in timing
-issues and boot inconsistencies during stress operations.
+Caveats: This implementation does not currently implement the common targets
+that other implementations do. There were several attempts to, but all ended in
+timing issues and boot inconsistencies during stress operations.
## Build Options
#### chassis-system-reset
+
Enable chassis system power reset to allow removing power and restoring back.
#### use-plt-rst
+
The POST Complete GPIO is usually held asserted by BIOS after POST complete and
-de-asserts on reset. This de-assert behavior is currently used to detect warm
+de-asserts on reset. This de-assert behavior is currently used to detect warm
resets.
Some systems are adding support for a PLT_RST eSPI signal that can be used to
-more accurately detect warm resets. When this option is enabled,
+more accurately detect warm resets. When this option is enabled,
x86-power-control will use PLT_RST to detect warm resets instead of POST
Complete.
diff --git a/config/power-config-host0.json b/config/power-config-host0.json
index ed91470..83e1059 100644
--- a/config/power-config-host0.json
+++ b/config/power-config-host0.json
@@ -1,87 +1,87 @@
{
- "gpio_configs":[
- {
- "Name" : "IdButton",
- "LineName" : "ID_BUTTON",
- "Type" : "GPIO",
- "Polarity" : "ActiveLow"
- },
- {
- "Name" : "NMIButton",
- "LineName" : "NMI_BUTTON",
- "Type" : "GPIO",
- "Polarity" : "ActiveLow"
- },
- {
- "Name" : "NMIOut",
- "LineName" : "NMI_OUT",
- "Type" : "GPIO",
- "Polarity" : "ActiveHigh"
- },
- {
- "Name" : "PostComplete",
- "LineName" : "POST_COMPLETE",
- "Type" : "GPIO",
- "Polarity" : "ActiveLow"
- },
- {
- "Name" : "PowerButton",
- "LineName" : "POWER_BUTTON",
- "Type" : "GPIO",
- "Polarity" : "ActiveLow"
- },
- {
- "Name" : "PowerOk",
- "LineName" : "PS_PWROK",
- "Type" : "GPIO",
- "Polarity" : "ActiveHigh"
- },
- {
- "Name" : "PowerOut",
- "LineName" : "POWER_OUT",
- "Type" : "GPIO",
- "Polarity" : "ActiveLow"
- },
- {
- "Name" : "ResetButton",
- "LineName" : "RESET_BUTTON",
- "Type" : "GPIO",
- "Polarity" : "ActiveLow"
- },
- {
- "Name" : "ResetOut",
- "LineName" : "RESET_OUT",
- "Type" : "GPIO",
- "Polarity" : "ActiveLow"
- },
- {
- "Name" : "SioOnControl",
- "LineName" : "SIO_ONCONTROL",
- "Type" : "GPIO",
- "Polarity" : "ActiveLow"
- },
- {
- "Name" : "SioPowerGood",
- "LineName" : "SIO_POWER_GOOD",
- "Type" : "GPIO",
- "Polarity" : "ActiveHigh"
- },
- {
- "Name" : "SIOS5",
- "LineName" : "SIO_S5",
- "Type" : "GPIO",
- "Polarity" : "ActiveLow"
- }
-],
- "timing_configs":{
- "PowerPulseMs": 200,
- "ForceOffPulseMs": 15000,
- "ResetPulseMs": 500,
- "PowerCycleMs": 5000,
- "SioPowerGoodWatchdogMs": 1000,
- "PsPowerOKWatchdogMs": 8000,
- "GracefulPowerOffS": 300,
- "WarmResetCheckMs": 500,
- "PowerOffSaveMs": 7000
+ "gpio_configs": [
+ {
+ "Name": "IdButton",
+ "LineName": "ID_BUTTON",
+ "Type": "GPIO",
+ "Polarity": "ActiveLow"
+ },
+ {
+ "Name": "NMIButton",
+ "LineName": "NMI_BUTTON",
+ "Type": "GPIO",
+ "Polarity": "ActiveLow"
+ },
+ {
+ "Name": "NMIOut",
+ "LineName": "NMI_OUT",
+ "Type": "GPIO",
+ "Polarity": "ActiveHigh"
+ },
+ {
+ "Name": "PostComplete",
+ "LineName": "POST_COMPLETE",
+ "Type": "GPIO",
+ "Polarity": "ActiveLow"
+ },
+ {
+ "Name": "PowerButton",
+ "LineName": "POWER_BUTTON",
+ "Type": "GPIO",
+ "Polarity": "ActiveLow"
+ },
+ {
+ "Name": "PowerOk",
+ "LineName": "PS_PWROK",
+ "Type": "GPIO",
+ "Polarity": "ActiveHigh"
+ },
+ {
+ "Name": "PowerOut",
+ "LineName": "POWER_OUT",
+ "Type": "GPIO",
+ "Polarity": "ActiveLow"
+ },
+ {
+ "Name": "ResetButton",
+ "LineName": "RESET_BUTTON",
+ "Type": "GPIO",
+ "Polarity": "ActiveLow"
+ },
+ {
+ "Name": "ResetOut",
+ "LineName": "RESET_OUT",
+ "Type": "GPIO",
+ "Polarity": "ActiveLow"
+ },
+ {
+ "Name": "SioOnControl",
+ "LineName": "SIO_ONCONTROL",
+ "Type": "GPIO",
+ "Polarity": "ActiveLow"
+ },
+ {
+ "Name": "SioPowerGood",
+ "LineName": "SIO_POWER_GOOD",
+ "Type": "GPIO",
+ "Polarity": "ActiveHigh"
+ },
+ {
+ "Name": "SIOS5",
+ "LineName": "SIO_S5",
+ "Type": "GPIO",
+ "Polarity": "ActiveLow"
+ }
+ ],
+ "timing_configs": {
+ "PowerPulseMs": 200,
+ "ForceOffPulseMs": 15000,
+ "ResetPulseMs": 500,
+ "PowerCycleMs": 5000,
+ "SioPowerGoodWatchdogMs": 1000,
+ "PsPowerOKWatchdogMs": 8000,
+ "GracefulPowerOffS": 300,
+ "WarmResetCheckMs": 500,
+ "PowerOffSaveMs": 7000
}
}