bytedance: g220a: Add power config
Add the power related config to enable power on.
Signed-off-by: John Wang <wangzhiqiang.bj@bytedance.com>
Signed-off-by: Lotus Xu <xuxiaohan@bytedance.com>
Change-Id: I3912fc603cf249bb2a1f48f69b7e14d458a6e0f1
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control/power-config-host0.json b/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control/power-config-host0.json
new file mode 100644
index 0000000..c165644
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control/power-config-host0.json
@@ -0,0 +1,11 @@
+{
+ "gpio_configs": {
+ "NMIButton": "NMI_BUTTON",
+ "NMIOut": "NMI_OUT",
+ "PostComplete": "POST_COMPLETE",
+ "PwrButton": "POWER_BUTTON",
+ "PwrOK": "PS_PWROK",
+ "PwrOut": "POWER_OUT",
+ "RstOut": "RESET_OUT"
+ }
+}
diff --git a/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control_%.bbappend b/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control_%.bbappend
new file mode 100644
index 0000000..6ec2a72
--- /dev/null
+++ b/meta-bytedance/meta-g220a/recipes-phosphor/chassis/x86-power-control_%.bbappend
@@ -0,0 +1,11 @@
+FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
+
+SRC_URI += " file://power-config-host0.json"
+
+do_install_append() {
+ install -d {D}/usr/share/x86-power-control/
+ install -m 0644 ${WORKDIR}/power-config-host0.json ${D}/usr/share/x86-power-control/
+}
+
+EXTRA_OECMAKE = "-DWITH_RESETBUTTON=OFF"
+