diff options
author | Zev Weiss <zev@bewilderbeest.net> | 2021-09-04 03:05:06 +0300 |
---|---|---|
committer | Patrick Williams <patrick@stwcx.xyz> | 2021-10-22 19:32:32 +0300 |
commit | 2b0681962d86d8431d7ebaee59ed49ddd10498cd (patch) | |
tree | decacf2ba8960aea44cbf6afb2a35747119a5d12 /meta-asrock/meta-e3c246d4i | |
parent | 2ded481fe4b8b5a841b3f2440c683498c5e2bcae (diff) | |
download | openbmc-2b0681962d86d8431d7ebaee59ed49ddd10498cd.tar.xz |
e3c246d4i: enable x86-power-control
The config has a slight hack regarding the SioPowerGood/PowerOk signals
(as explained in a comment in the file). The O_PWROK GPIO line perhaps
"should" be the SioPowerGood signal, but we also don't have
SioOnControl, so power-control disables its SIO support anyway, and
using O_PWROK as PowerOk seems to work alright.
Signed-off-by: Zev Weiss <zev@bewilderbeest.net>
Change-Id: Ie3ef974e7edc172c82f63cb0129d90d098b15906
Diffstat (limited to 'meta-asrock/meta-e3c246d4i')
3 files changed, 106 insertions, 0 deletions
diff --git a/meta-asrock/meta-e3c246d4i/conf/machine/e3c246d4i.conf b/meta-asrock/meta-e3c246d4i/conf/machine/e3c246d4i.conf index ad67ece3f..38fb811ff 100644 --- a/meta-asrock/meta-e3c246d4i/conf/machine/e3c246d4i.conf +++ b/meta-asrock/meta-e3c246d4i/conf/machine/e3c246d4i.conf @@ -10,3 +10,6 @@ require conf/machine/include/obmc-bsp-common.inc PREFERRED_PROVIDER_virtual/obmc-flash-mgmt = "packagegroup-asrock-apps" PREFERRED_PROVIDER_virtual/obmc-system-mgmt = "packagegroup-asrock-apps" + +VIRTUAL-RUNTIME_obmc-host-state-manager = "x86-power-control" +VIRTUAL-RUNTIME_obmc-chassis-state-manager = "x86-power-control" diff --git a/meta-asrock/meta-e3c246d4i/recipes-x86/chassis/x86-power-control/power-config-host0.json b/meta-asrock/meta-e3c246d4i/recipes-x86/chassis/x86-power-control/power-config-host0.json new file mode 100644 index 000000000..e46faca11 --- /dev/null +++ b/meta-asrock/meta-e3c246d4i/recipes-x86/chassis/x86-power-control/power-config-host0.json @@ -0,0 +1,93 @@ +{ + "gpio_configs": [ + { + "Name" : "IdButton", + "LineName" : "", + "Type" : "GPIO", + "Polarity": "ActiveLow" + }, + { + "Name" : "NMIButton", + "LineName" : "NMI_BTN_N", + "Type" : "GPIO", + "Polarity": "ActiveLow" + }, + { + "Name" : "NMIOut", + "LineName" : "BMC_NMI", + "Type" : "GPIO", + "Polarity": "ActiveHigh" + }, + { + "Name" : "PostComplete", + "LineName" : "FM_BIOS_POST_CMPLT_N", + "Type" : "GPIO", + "Polarity": "ActiveLow" + }, + { + "Name" : "PowerButton", + "LineName" : "BMC_PSIN", + "Type" : "GPIO", + "Polarity": "ActiveLow" + }, + { + "Name" : "PowerOk", + /* + * The e3c246d4i doesn't have a PS_PWROK signal as far as + * I can tell. It does have an O_PWROK line that's driven + * by the SuperIO chip, which may "actually" be + * SioPowerGood, but it seems to work for this, so...? + */ + "LineName" : "O_PWROK", + "Type" : "GPIO", + "Polarity": "ActiveHigh" + }, + { + "Name" : "PowerOut", + "LineName" : "BMC_PSOUT", + "Type" : "GPIO", + "Polarity": "ActiveLow" + }, + { + "Name" : "ResetButton", + "LineName" : "BMC_RESETCON", + "Type" : "GPIO", + "Polarity": "ActiveLow" + }, + { + "Name" : "ResetOut", + "LineName" : "RESETCON", + "Type" : "GPIO", + "Polarity": "ActiveLow" + }, + { + "Name" : "SioOnControl", + "LineName" : "", + "Type" : "GPIO", + "Polarity": "ActiveLow" + }, + { + "Name" : "SioPowerGood", + "LineName" : "", + "Type" : "GPIO", + "Polarity": "ActiveHigh" + }, + { + "Name" : "SIOS5", + "LineName" : "SLP_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 + } +} diff --git a/meta-asrock/meta-e3c246d4i/recipes-x86/chassis/x86-power-control_%.bbappend b/meta-asrock/meta-e3c246d4i/recipes-x86/chassis/x86-power-control_%.bbappend new file mode 100644 index 000000000..f54fe0695 --- /dev/null +++ b/meta-asrock/meta-e3c246d4i/recipes-x86/chassis/x86-power-control_%.bbappend @@ -0,0 +1,10 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:" + +SRC_URI += " \ + file://power-config-host0.json \ + " + +do_install:append() { + install -d ${D}/${datadir}/${PN} + install -m 0644 ${WORKDIR}/power-config-host0.json ${D}/${datadir}/${PN} +} |