summaryrefslogtreecommitdiff
path: root/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor
diff options
context:
space:
mode:
authorDelphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>2023-11-15 10:40:58 +0300
committerPatrick Williams <patrick@stwcx.xyz>2023-11-15 15:36:47 +0300
commit6e311d3c6e79b782f3232504262f5674445493db (patch)
tree1469eaf4b6ba8502768dc605b04af48004017f92 /meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor
parent3b6ab5e19fa73de0c4c83fc5658f12b33293cb45 (diff)
downloadopenbmc-6e311d3c6e79b782f3232504262f5674445493db.tar.xz
yosemite4: Support gpio monitor for server board device probing
If 12v stby power state was off when bmc boot up, server board device driver will not be probed. so add gpio monitor support for server board device probing Tested: devices on server board were probed after 12v on or hot-pluged Change-Id: I9e2a6cee966dd1c64cbff53b368fa6686a8c3924 Signed-off-by: Delphine CC Chiu <Delphine_CC_Chiu@wiwynn.com>
Diffstat (limited to 'meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor')
-rw-r--r--meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/probe-slot-device14
-rw-r--r--meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/probe-slot-device@.service8
-rw-r--r--meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/yosemite4-phosphor-multi-gpio-monitor.json80
3 files changed, 102 insertions, 0 deletions
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/probe-slot-device b/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/probe-slot-device
new file mode 100644
index 0000000000..d83772094e
--- /dev/null
+++ b/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/probe-slot-device
@@ -0,0 +1,14 @@
+#!/bin/bash
+
+HOST_BUS=$(($1 - 1))
+HOST_VIRTUAL_BUS=$(($1 + 15))
+# probe server board cpld I/O expander
+echo $HOST_BUS-0020 > /sys/bus/i2c/drivers/pca953x/bind
+echo $HOST_BUS-0021 > /sys/bus/i2c/drivers/pca953x/bind
+echo $HOST_BUS-0022 > /sys/bus/i2c/drivers/pca953x/bind
+echo $HOST_BUS-0023 > /sys/bus/i2c/drivers/pca953x/bind
+# probe server board I/O expander and eeprom behind i2c-mux
+echo $HOST_VIRTUAL_BUS-0049 > /sys/bus/i2c/drivers/pca953x/bind
+echo $HOST_VIRTUAL_BUS-0050 > /sys/bus/i2c/drivers/at24/bind
+echo $HOST_VIRTUAL_BUS-0051 > /sys/bus/i2c/drivers/at24/bind
+echo $HOST_VIRTUAL_BUS-0054 > /sys/bus/i2c/drivers/at24/bind
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/probe-slot-device@.service b/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/probe-slot-device@.service
new file mode 100644
index 0000000000..0e1d2bbc7d
--- /dev/null
+++ b/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/probe-slot-device@.service
@@ -0,0 +1,8 @@
+[Unit]
+Description=Probe Device For Slot%i
+
+[Service]
+Type=oneshot
+ExecStart=/usr/libexec/phosphor-gpio-monitor/probe-slot-device %i
+SyslogIdentifier=probe-slot-device%i
+
diff --git a/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/yosemite4-phosphor-multi-gpio-monitor.json b/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/yosemite4-phosphor-multi-gpio-monitor.json
index 008eddd3d4..96a06f2ff0 100644
--- a/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/yosemite4-phosphor-multi-gpio-monitor.json
+++ b/meta-facebook/meta-yosemite4/recipes-phosphor/gpio/phosphor-gpio-monitor/yosemite4-phosphor-multi-gpio-monitor.json
@@ -8,5 +8,85 @@
"RISING": ["set-button-sled.service"]
},
"Continue": true
+ },
+ {
+ "Name": "PWROK_STBY_BMC_SLOT1",
+ "ChipId": "0",
+ "GpioNum": 10,
+ "EventMon": "RISING",
+ "Targets": {
+ "RISING": ["probe-slot-device@1.service"]
+ },
+ "Continue": true
+ },
+ {
+ "Name": "PWROK_STBY_BMC_SLOT2",
+ "ChipId": "0",
+ "GpioNum": 11,
+ "EventMon": "RISING",
+ "Targets": {
+ "RISING": ["probe-slot-device@2.service"]
+ },
+ "Continue": true
+ },
+ {
+ "Name": "PWROK_STBY_BMC_SLOT3",
+ "ChipId": "0",
+ "GpioNum": 12,
+ "EventMon": "RISING",
+ "Targets": {
+ "RISING": ["probe-slot-device@3.service"]
+ },
+ "Continue": true
+ },
+ {
+ "Name": "PWROK_STBY_BMC_SLOT4",
+ "ChipId": "0",
+ "GpioNum": 13,
+ "EventMon": "RISING",
+ "Targets": {
+ "RISING": ["probe-slot-device@4.service"]
+ },
+ "Continue": true
+ },
+ {
+ "Name": "PWROK_STBY_BMC_SLOT5",
+ "ChipId": "0",
+ "GpioNum": 190,
+ "EventMon": "RISING",
+ "Targets": {
+ "RISING": ["probe-slot-device@5.service"]
+ },
+ "Continue": true
+ },
+ {
+ "Name": "PWROK_STBY_BMC_SLOT6",
+ "ChipId": "0",
+ "GpioNum": 191,
+ "EventMon": "RISING",
+ "Targets": {
+ "RISING": ["probe-slot-device@6.service"]
+ },
+ "Continue": true
+ },
+ {
+ "Name": "PWROK_STBY_BMC_SLOT7",
+ "ChipId": "0",
+ "GpioNum": 195,
+ "EventMon": "RISING",
+ "Targets": {
+ "RISING": ["probe-slot-device@7.service"]
+ },
+ "Continue": true
+ },
+ {
+ "Name": "PWROK_STBY_BMC_SLOT8",
+ "ChipId": "0",
+ "GpioNum": 202,
+ "EventMon": "RISING",
+ "Targets": {
+ "RISING": ["probe-slot-device@8.service"]
+ },
+ "Continue": true
}
]