summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPotin Lai <potin.lai@quantatw.com>2022-09-16 11:55:50 +0300
committerPatrick Williams <patrick@stwcx.xyz>2022-10-24 20:47:05 +0300
commit613d6bebc30e1c0181effab20a16b2155f22073a (patch)
tree17a77ec23f8c8d9a468c7a2ac45f89fe671ba672
parentec88c48ae63a116796b5010c0bd8cd941232ef88 (diff)
downloadopenbmc-613d6bebc30e1c0181effab20a16b2155f22073a.tar.xz
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
-rw-r--r--meta-facebook/meta-bletchley/recipes-phosphor/chassis/obmc-phosphor-buttons/gpio_defs.json20
-rw-r--r--meta-facebook/meta-bletchley/recipes-phosphor/chassis/obmc-phosphor-buttons_%.bbappend10
-rw-r--r--meta-facebook/meta-bletchley/recipes-phosphor/images/fb-bletchley-phosphor-image.inc2
3 files changed, 32 insertions, 0 deletions
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 0000000000..228cb57701
--- /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 0000000000..bf19fe715f
--- /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 c359c5b553..b32b28f199 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 @@ OBMC_IMAGE_EXTRA_INSTALL:append = " \
phosphor-ipmi-ipmb \
fb-ipmi-oem \
board-type-checker \
+ obmc-phosphor-buttons-signals \
+ obmc-phosphor-buttons-handler \
"