meta-bletchley: enable obmc-phosphor-buttons feature

Enable obmc-phosphor-buttons and add gpio_defs.json to support the
feature of debug card button.

Signed-off-by: Potin Lai <potin.lai@quantatw.com>
Change-Id: I673db3587232bfc57dabc5fa157ae9945cb25974
diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/chassis/obmc-phosphor-buttons/gpio_defs.json b/meta-facebook/meta-bletchley/recipes-phosphor/chassis/obmc-phosphor-buttons/gpio_defs.json
new file mode 100644
index 0000000..228cb57
--- /dev/null
+++ b/meta-facebook/meta-bletchley/recipes-phosphor/chassis/obmc-phosphor-buttons/gpio_defs.json
@@ -0,0 +1,20 @@
+{
+        "gpio_definitions": [
+            {
+                "name": "POWER_BUTTON",
+                "pin": "M7",
+                "direction": "both"
+            },
+            {
+                "name": "DEBUG_SELECTOR_BUTTON",
+                "pin": "G3",
+                "direction": "both"
+            },
+            {
+                "name": "HOST_SELECTOR",
+                "group_gpio_config" : [],
+                "max_position" : 6,
+                "host_selector_map" : {}
+            }
+        ]
+}
diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/chassis/obmc-phosphor-buttons_%.bbappend b/meta-facebook/meta-bletchley/recipes-phosphor/chassis/obmc-phosphor-buttons_%.bbappend
new file mode 100644
index 0000000..bf19fe7
--- /dev/null
+++ b/meta-facebook/meta-bletchley/recipes-phosphor/chassis/obmc-phosphor-buttons_%.bbappend
@@ -0,0 +1,10 @@
+FILESEXTRAPATHS:append:bletchley := "${THISDIR}/${PN}:"
+
+SRC_URI += "file://gpio_defs.json"
+
+do_install:append:bletchley() {
+        install -d ${D}${sysconfdir}/default/obmc/gpio/
+        install -m 0644 ${WORKDIR}/gpio_defs.json ${D}/${sysconfdir}/default/obmc/gpio/
+}
+
+FILES:${PN}-signals:append = " ${sysconfdir}/default/obmc/gpio/gpio_defs.json"
diff --git a/meta-facebook/meta-bletchley/recipes-phosphor/images/fb-bletchley-phosphor-image.inc b/meta-facebook/meta-bletchley/recipes-phosphor/images/fb-bletchley-phosphor-image.inc
index c359c5b..b32b28f 100644
--- a/meta-facebook/meta-bletchley/recipes-phosphor/images/fb-bletchley-phosphor-image.inc
+++ b/meta-facebook/meta-bletchley/recipes-phosphor/images/fb-bletchley-phosphor-image.inc
@@ -12,4 +12,6 @@
     phosphor-ipmi-ipmb \
     fb-ipmi-oem \
     board-type-checker \
+    obmc-phosphor-buttons-signals \
+    obmc-phosphor-buttons-handler \
 "