meta-quanta: s6q: Add x86-power-ctrl config files

These config files contains the gpio configuartion which will be used by
the x86 power control.

Tested: Tested and verified in S6Q.

Change-Id: I3e2684b2d7b0e6f3c6eb874569d5c82f6b733e02
Signed-off-by: P.K.Lee <p.k.lee@quantatw.com>
diff --git a/meta-quanta/meta-s6q/conf/machine/s6q.conf b/meta-quanta/meta-s6q/conf/machine/s6q.conf
index f9a39e4..d32ac7a 100644
--- a/meta-quanta/meta-s6q/conf/machine/s6q.conf
+++ b/meta-quanta/meta-s6q/conf/machine/s6q.conf
@@ -10,7 +10,7 @@
 
 FLASH_SIZE = "65536"
 
-OBMC_MACHINE_FEATURES += "\
+MACHINE_FEATURES += "\
         obmc-bmc-state-mgmt \
         obmc-chassis-state-mgmt \
         obmc-host-ipmi \
diff --git a/meta-quanta/meta-s6q/recipes-x86/chassis/x86-power-control/power-config-host0.json b/meta-quanta/meta-s6q/recipes-x86/chassis/x86-power-control/power-config-host0.json
new file mode 100644
index 0000000..ef182d2
--- /dev/null
+++ b/meta-quanta/meta-s6q/recipes-x86/chassis/x86-power-control/power-config-host0.json
@@ -0,0 +1,63 @@
+{
+  "gpio_configs":[
+    {
+        "Name" : "IdButton",
+        "LineName" : "FP_ID_BTN_SCM_N",
+        "Type" : "GPIO",
+        "Polarity" : "ActiveLow"
+    },
+    {
+        "Name" : "PostComplete",
+        "LineName" : "FM_BIOS_POST_CMPLT_BMC_N",
+        "Type" : "GPIO",
+        "Polarity" : "ActiveLow"
+    },
+    {
+        "Name" : "PowerButton",
+        "LineName" : "SYS_BMC_PWRBTN_R_N",
+        "Type" : "GPIO",
+        "Polarity" : "ActiveLow"
+    },
+    {
+        "Name" : "PowerOk",
+        "LineName" : "PWRGD_PS_PWROK_PLD_R",
+        "Type" : "GPIO",
+        "Polarity" : "ActiveHigh"
+    },
+    {
+        "Name" : "PowerOut",
+        "LineName" : "SYS_PWRBTN_N",
+        "Type" : "GPIO",
+        "Polarity" : "ActiveLow"
+    },
+    {
+        "Name" : "ResetButton",
+        "LineName" : "FP_RST_BTN_N",
+        "Type" : "GPIO",
+        "Polarity" : "ActiveLow"
+    },
+    {
+        "Name" : "ResetOut",
+        "LineName" : "FM_BMC_RSTBTN_OUT_N",
+        "Type" : "GPIO",
+        "Polarity" : "ActiveLow"
+    },
+    {
+        "Name" : "NMIOut",
+        "LineName" : "IRQ_BMC_PCH_NMI_R",
+        "Type" : "GPIO",
+        "Polarity" : "ActiveLow"
+    }
+],
+  "timing_configs":{
+      "PowerPulseMs": 200,
+      "ForceOffPulseMs": 15000,
+      "ResetPulseMs": 5500,
+      "PowerCycleMs": 10000,
+      "SioPowerGoodWatchdogMs": 1000,
+      "PsPowerOKWatchdogMs": 8000,
+      "GracefulPowerOffS": 300,
+      "WarmResetCheckMs": 500,
+      "PowerOffSaveMs": 7000
+    }
+}
diff --git a/meta-quanta/meta-s6q/recipes-x86/chassis/x86-power-control_%.bbappend b/meta-quanta/meta-s6q/recipes-x86/chassis/x86-power-control_%.bbappend
new file mode 100755
index 0000000..95cb307
--- /dev/null
+++ b/meta-quanta/meta-s6q/recipes-x86/chassis/x86-power-control_%.bbappend
@@ -0,0 +1,7 @@
+FILESEXTRAPATHS:prepend:s6q := "${THISDIR}/${PN}:"
+SRC_URI:append:s6q = " file://power-config-host0.json"
+
+do_install:append:s6q() {
+    install -m 0755 -d ${D}/${datadir}/${BPN}
+    install -m 0644 ${WORKDIR}/power-config-host0.json ${D}${datadir}/${BPN}
+}