summaryrefslogtreecommitdiff
path: root/meta-quanta/meta-gbs/recipes-phosphor/gpio
diff options
context:
space:
mode:
Diffstat (limited to 'meta-quanta/meta-gbs/recipes-phosphor/gpio')
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-0.conf6
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-1.conf6
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-2.conf6
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-3.conf6
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-4.conf6
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-5.conf6
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-6.conf6
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-7.conf6
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-8.conf6
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-9.conf6
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service.replace14
-rw-r--r--meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend32
12 files changed, 106 insertions, 0 deletions
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-0.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-0.conf
new file mode 100644
index 000000000..e26c8f50e
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-0.conf
@@ -0,0 +1,6 @@
+#The gpio 70 is a real gpio, which is used to
+#store the sas cable 0 present signal
+INVENTORY=/system/chassis/cable/ss_cab0_prsnt
+DEVPATH=/dev/input/event0
+KEY=70
+NAME=ss_cab0_prsnt
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-1.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-1.conf
new file mode 100644
index 000000000..e6a18ee6c
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-1.conf
@@ -0,0 +1,6 @@
+#The gpio 71 is a real gpio, which is used to
+#store the sas cable 1 present signal
+INVENTORY=/system/chassis/cable/ss_cab1_prsnt
+DEVPATH=/dev/input/event0
+KEY=71
+NAME=ss_cab1_prsnt
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-2.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-2.conf
new file mode 100644
index 000000000..490f97f49
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-2.conf
@@ -0,0 +1,6 @@
+#The gpio 72 is a real gpio, which is used to
+#store the sas cable 2 present signal
+INVENTORY=/system/chassis/cable/ss_cab2_prsnt
+DEVPATH=/dev/input/event0
+KEY=72
+NAME=ss_cab2_prsnt
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-3.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-3.conf
new file mode 100644
index 000000000..f3579ab97
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-3.conf
@@ -0,0 +1,6 @@
+#The gpio 73 is a real gpio, which is used to
+#store the sas cable 3 present signal
+INVENTORY=/system/chassis/cable/ss_cab3_prsnt
+DEVPATH=/dev/input/event0
+KEY=73
+NAME=ss_cab3_prsnt
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-4.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-4.conf
new file mode 100644
index 000000000..be6ed95af
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-4.conf
@@ -0,0 +1,6 @@
+#The gpio 57 is a real gpio, which is used to
+#store the HSBP cable present signal
+INVENTORY=/system/chassis/cable/hsbp_cab_prsnt
+DEVPATH=/dev/input/event0
+KEY=57
+NAME=hsbp_cab_prsnt
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-5.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-5.conf
new file mode 100644
index 000000000..223ef4a7c
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-5.conf
@@ -0,0 +1,6 @@
+#The gpio 58 is a real gpio, which is used to
+#store the fan board cable present signal
+INVENTORY=/system/chassis/cable/fanbd_cab_prsnt
+DEVPATH=/dev/input/event0
+KEY=58
+NAME=fanbd_cab_prsnt
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-6.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-6.conf
new file mode 100644
index 000000000..c32fb3c97
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-6.conf
@@ -0,0 +1,6 @@
+#The gpio 69 is a real gpio, which is used to
+#store the HSBP 12V standby cable present signal
+INVENTORY=/system/chassis/cable/bp12v_cab_prsnt
+DEVPATH=/dev/input/event0
+KEY=69
+NAME=bp12v_cab_prsnt
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-7.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-7.conf
new file mode 100644
index 000000000..1cc7da265
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-7.conf
@@ -0,0 +1,6 @@
+#The gpio 5 is a real gpio, which is used to
+#store the SATA0 present signal
+INVENTORY=/system/chassis/entity/sata0_prsnt
+DEVPATH=/dev/input/event0
+KEY=5
+NAME=sata0_prsnt
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-8.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-8.conf
new file mode 100644
index 000000000..38c72e11e
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-8.conf
@@ -0,0 +1,6 @@
+#The gpio 120 is a real gpio, which is used to
+#store the PE0 present signal
+INVENTORY=/system/chassis/entity/pe_slot0_prsnt
+DEVPATH=/dev/input/event0
+KEY=120
+NAME=pe_slot0_prsnt
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-9.conf b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-9.conf
new file mode 100644
index 000000000..007229d44
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/obmc/gpio/gpios-9.conf
@@ -0,0 +1,6 @@
+#The gpio 121 is a real gpio, which is used to
+#store the PE1 present signal
+INVENTORY=/system/chassis/entity/pe_slot1_prsnt
+DEVPATH=/dev/input/event0
+KEY=121
+NAME=pe_slot1_prsnt
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service.replace b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service.replace
new file mode 100644
index 000000000..15341cbfb
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor/phosphor-gpio-presence@.service.replace
@@ -0,0 +1,14 @@
+[Unit]
+Description=Phosphor GPIO %I Presence
+Wants=mapper-wait@-xyz-openbmc_project-inventory.service
+After=mapper-wait@-xyz-openbmc_project-inventory.service
+ConditionPathExists=/etc/default/obmc/gpio/gpios-%i.conf
+StartLimitBurst=10
+
+[Service]
+Restart=on-failure
+EnvironmentFile=/etc/default/obmc/gpio/gpios-%i.conf
+ExecStart=/usr/bin/phosphor-gpio-presence --path=${DEVPATH} --inventory=${INVENTORY} --key=${KEY} --name=${NAME} --drivers=${DRIVERS} --extra-ifaces=${EXTRA_IFACES}
+
+[Install]
+RequiredBy=multi-user.target
diff --git a/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
new file mode 100644
index 000000000..d45636609
--- /dev/null
+++ b/meta-quanta/meta-gbs/recipes-phosphor/gpio/phosphor-gpio-monitor_%.bbappend
@@ -0,0 +1,32 @@
+inherit obmc-phosphor-systemd
+
+FILESEXTRAPATHS_prepend_gbs := "${THISDIR}/${PN}:"
+
+SRC_URI_append_gbs = " file://phosphor-gpio-presence@.service.replace"
+
+TMPL_PRESENT = "phosphor-gpio-presence@.service"
+INSTFMT_PRESENT = "phosphor-gpio-presence@{0}.service"
+PRESENT_TGT = "multi-user.target"
+FMT_PRESENT = "../${TMPL_PRESENT}:${PRESENT_TGT}.requires/${INSTFMT_PRESENT}"
+SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-0.conf"
+SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-1.conf"
+SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-2.conf"
+SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-3.conf"
+SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-4.conf"
+SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-5.conf"
+SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-6.conf"
+SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-7.conf"
+SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-8.conf"
+SYSTEMD_ENVIRONMENT_FILE_${PN}_append_gbs +="obmc/gpio/gpios-9.conf"
+GBS_OBMC_PRESENT_INSTANCES = "0 1 2 3 4 5 6 7 8 9"
+
+SYSTEMD_LINK_${PN}-presence_append_gbs = " ${@compose_list(d, 'FMT_PRESENT', 'GBS_OBMC_PRESENT_INSTANCES')}"
+
+GBS_PRESENT_ENV_FMT = "obmc/gpio/gpios-{0}.conf"
+
+SYSTEMD_ENVIRONMENT_FILE_${PN}-presence_gbs = " ${@compose_list(d, 'GBS_PRESENT_ENV_FMT', 'GBS_OBMC_PRESENT_INSTANCES')}"
+
+do_install_append_gbs() {
+ install -d ${D}${systemd_system_unitdir}
+ install -m 0644 ${WORKDIR}/phosphor-gpio-presence@.service.replace ${D}${systemd_system_unitdir}/phosphor-gpio-presence@.service
+}