summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNaveen Moses <naveen.mosess@hcl.com>2022-07-19 22:06:02 +0300
committerNaveen Moses <naveen.mosess@hcl.com>2022-10-04 18:37:43 +0300
commit1ede6c115a9faa77f420355ad080d221f3facd16 (patch)
treedcddfd1b7412c4078481dbca89ad21d434cf9e4b
parentb7590f68b6e3865b8ccbf005361569179c7ae0dd (diff)
downloadopenbmc-1ede6c115a9faa77f420355ad080d221f3facd16.tar.xz
meta-facebook : Add phosphor-buttons gpio config YV2
This change adds phosphor-buttons gpio configs for the following : 1. Power button 2. Reset button 3. Host selector 4. Debug host selector button 5. serial uart mux To keep the install method common for copying gpio_defs.json file in supported platforms the install method is moved to obmc-phosphor-buttons_git.bb file. Signed-off-by: Naveen Moses <naveen.mosess@hcl.com> Change-Id: I91a106fdc5ac9aa83eec63cbd41a9615b380c37d
-rw-r--r--meta-facebook/recipes-phosphor/phosphor-buttons/obmc-phosphor-buttons/yosemitev2/gpio_defs.json120
-rw-r--r--meta-facebook/recipes-phosphor/phosphor-buttons/obmc-phosphor-buttons_%.bbappend3
-rw-r--r--meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb8
3 files changed, 131 insertions, 0 deletions
diff --git a/meta-facebook/recipes-phosphor/phosphor-buttons/obmc-phosphor-buttons/yosemitev2/gpio_defs.json b/meta-facebook/recipes-phosphor/phosphor-buttons/obmc-phosphor-buttons/yosemitev2/gpio_defs.json
new file mode 100644
index 0000000000..8e82aba101
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/phosphor-buttons/obmc-phosphor-buttons/yosemitev2/gpio_defs.json
@@ -0,0 +1,120 @@
+{
+ "gpio_definitions": [
+ {
+ "name": "POWER_BUTTON",
+ "pin": "D0",
+ "direction": "both"
+ },
+ {
+ "name": "RESET_BUTTON",
+ "pin": "AB0",
+ "direction": "both"
+ },
+ {
+ "name": "DEBUG_SELECTOR_BUTTON",
+ "pin": "O3",
+ "direction": "both"
+ },
+ {
+ "name" : "HOST_SELECTOR",
+
+ "group_gpio_config" : [
+ {
+ "name" : "host_select_0",
+ "pin": "AA4",
+ "direction": "both",
+ "polarity" : "active_high"
+
+ },
+ {
+ "name" : "host_select_1",
+ "pin": "AA5",
+ "direction": "both",
+ "polarity" : "active_high"
+
+ },
+ {
+ "name" : "host_select_2",
+ "pin": "AA6",
+ "direction": "both",
+ "polarity" : "active_high"
+
+ },
+ {
+ "name" : "host_select_3",
+ "pin": "AA7",
+ "direction": "both",
+ "polarity" : "active_high"
+
+ }
+ ],
+ "max_position" : 4,
+ "host_selector_map" : {
+ "6" : 0,
+ "7": 1,
+ "8": 2,
+ "9": 3,
+ "10": 4,
+ "11": 0,
+ "12": 1,
+ "13": 2,
+ "14" : 3,
+ "15" : 4
+ }
+
+ },
+ {
+ "name" : "SERIAL_UART_MUX",
+
+ "group_gpio_config" : [
+ {
+ "name" : "serial_uart_sel_0",
+ "pin": "E0",
+ "direction": "out",
+ "polarity" : "active_high"
+ },
+ {
+ "name" : "serial_uart_sel_1",
+ "pin": "E1",
+ "direction": "out",
+ "polarity" : "active_high"
+ },
+ {
+ "name" : "serial_uart_sel_2",
+ "pin": "E2",
+ "direction": "out",
+ "polarity" : "active_high"
+ },
+ {
+ "name" : "serial_uart_sel_3",
+ "pin": "E3",
+ "direction": "out",
+ "polarity" : "active_high"
+ },
+ {
+ "name" : "serial_uart_rx",
+ "pin": "E4",
+ "direction": "out",
+ "polarity" : "active_high"
+ },
+ {
+ "name" : "debug_card_present",
+ "pin": "R3",
+ "direction": "both",
+ "polarity" : "active_high"
+
+ }
+
+ ],
+ "serial_uart_mux_map" : {
+ "0" : 4,
+ "1": 0,
+ "2": 1,
+ "3": 2,
+ "4": 3
+ }
+
+ }
+
+ ]
+}
diff --git a/meta-facebook/recipes-phosphor/phosphor-buttons/obmc-phosphor-buttons_%.bbappend b/meta-facebook/recipes-phosphor/phosphor-buttons/obmc-phosphor-buttons_%.bbappend
new file mode 100644
index 0000000000..8e32c2dacc
--- /dev/null
+++ b/meta-facebook/recipes-phosphor/phosphor-buttons/obmc-phosphor-buttons_%.bbappend
@@ -0,0 +1,3 @@
+FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
+
+SRC_URI:append:yosemitev2 = " file://gpio_defs.json" \ No newline at end of file
diff --git a/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb b/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb
index e5f72ac842..464139e990 100644
--- a/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb
+++ b/meta-phosphor/recipes-phosphor/chassis/obmc-phosphor-buttons_git.bb
@@ -32,3 +32,11 @@ ALLOW_EMPTY:${PN} = "1"
BUTTON_PACKAGES = "${PN}-signals ${PN}-handler"
PACKAGE_BEFORE_PN += "${BUTTON_PACKAGES}"
+
+do_install:append() {
+ if [ -e "${WORKDIR}/gpio_defs.json" ]; then
+ install -m 0755 -d ${D}/etc/default/obmc/gpio
+ install -m 0644 -D ${WORKDIR}/gpio_defs.json \
+ ${D}/etc/default/obmc/gpio
+ fi
+} \ No newline at end of file