Initial commit

This commit is contained in:
Your Name
2026-04-23 17:07:55 +08:00
commit b7e39e063b
16725 changed files with 1625565 additions and 0 deletions
@@ -0,0 +1,6 @@
#The gpio 73 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=73
NAME=ss_cab0_prsnt
@@ -0,0 +1,6 @@
#The gpio 72 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=72
NAME=ss_cab1_prsnt
@@ -0,0 +1,6 @@
#The gpio 146 is a real gpio, which is used to
#store the PWRGD_P12V_ALL_FANS signal
INVENTORY=/system/chassis/entity/fans_efuse_pg
DEVPATH=/dev/input/event0
KEY=146
NAME=fans_efuse_pg
@@ -0,0 +1,6 @@
#The gpio 88 is a real gpio, which is used to
#store the PWRGD_P12V_ALL_SLOTS signal
INVENTORY=/system/chassis/entity/pwrgd_p12v_slots
DEVPATH=/dev/input/event0
KEY=88
NAME=pwrgd_p12v_slots
@@ -0,0 +1,6 @@
#The gpio 71 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=71
NAME=ss_cab2_prsnt
@@ -0,0 +1,6 @@
#The gpio 70 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=70
NAME=ss_cab3_prsnt
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -0,0 +1,34 @@
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"
SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs = " obmc/gpio/gpios-10.conf"
SYSTEMD_ENVIRONMENT_FILE:${PN}:append:gbs = " obmc/gpio/gpios-11.conf"
GBS_OBMC_PRESENT_INSTANCES = "0 1 2 3 4 5 6 7 8 9 10 11"
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
}