meta-ampere: mtjade: handle UID button via phosphor-buttons
Replace Ampere implementation for UID button by the use of
phosphor-button.
Tested:
1. By default, the UID LED status is OFF.
- Press UID button and check if the UID LED is ON
- Press UID button again and check if the UID LED is OFF
2. Turn on the UID LED via ipmi command
$ ipmitool chassis identify
3. Turn Lit/Blinking/Off UID LED via Redfish:
$ curl -X PATCH --user root:0penBmc -H "Content-Type: application/json"
-H "If-Match: *" --insecure https://<bmc_ip>/redfish/v1/Systems/system
-d '{"IndicatorLED": "Lit|Blinking|Off"}'
--> check if the UID LED is ON, blinking or OFF, respectively
Signed-off-by: HuyLe <hule@amperecomputing.com>
Change-Id: I912e26be827167a201dad5d81be6728101405521
diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/ampere-gpio-handling.bb b/meta-ampere/meta-jade/recipes-phosphor/gpio/ampere-gpio-handling.bb
index 62b25b1..2889517 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/gpio/ampere-gpio-handling.bb
+++ b/meta-ampere/meta-jade/recipes-phosphor/gpio/ampere-gpio-handling.bb
@@ -28,7 +28,6 @@
SYSTEMD_ENVIRONMENT_FILE:${PN} +=" \
obmc/gpio/reboot_ack \
obmc/gpio/shutdown_ack \
- obmc/gpio/id_button \
obmc/gpio/S0_scp_auth_failure \
obmc/gpio/S0_overtemp \
obmc/gpio/S0_hightemp_start \
@@ -57,7 +56,6 @@
ampere_fault_led_start@.service \
ampere_fault_led_stop@.service \
psu_hotswap_reset@.service \
- id-button-pressed.service \
ampere_scp_failover.service \
"
SYSTEMD_LINK:${PN} += "${@compose_list(d, 'FMT', 'AMPERE_MONITOR_INSTANCES')}"
diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/ampere-gpio-handling/id-button-pressed.service b/meta-ampere/meta-jade/recipes-phosphor/gpio/ampere-gpio-handling/id-button-pressed.service
deleted file mode 100644
index f633fc3..0000000
--- a/meta-ampere/meta-jade/recipes-phosphor/gpio/ampere-gpio-handling/id-button-pressed.service
+++ /dev/null
@@ -1,10 +0,0 @@
-[Unit]
-Description=ID Button Pressed Service
-Wants=mapper-wait@-xyz-openbmc_project-led-groups.service
-After=mapper-wait@-xyz-openbmc_project-led-groups.service
-StartLimitIntervalSec=0
-
-[Service]
-Type=oneshot
-ExecStart=/usr/bin/env toggle_identify_led.sh
-SyslogIdentifier=id-button
diff --git a/meta-ampere/meta-jade/recipes-phosphor/gpio/ampere-gpio-handling/obmc/gpio/id_button b/meta-ampere/meta-jade/recipes-phosphor/gpio/ampere-gpio-handling/obmc/gpio/id_button
deleted file mode 100644
index 70e2b58..0000000
--- a/meta-ampere/meta-jade/recipes-phosphor/gpio/ampere-gpio-handling/obmc/gpio/id_button
+++ /dev/null
@@ -1,5 +0,0 @@
-DEVPATH=/dev/input/by-path/platform-gpio-keys-event
-KEY=133
-POLARITY=1
-TARGET=id-button-pressed.service
-EXTRA_ARGS=--continue
diff --git a/meta-ampere/meta-jade/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json b/meta-ampere/meta-jade/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json
index 0b6ad45..009defd 100644
--- a/meta-ampere/meta-jade/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json
+++ b/meta-ampere/meta-jade/recipes-phosphor/skeleton/obmc-libobmc-intf/gpio_defs.json
@@ -49,6 +49,11 @@
"name": "RESET_BUTTON",
"pin": "R5",
"direction": "both"
+ },
+ {
+ "name": "ID_BTN",
+ "pin": "Q5",
+ "direction": "both"
}
]
}