facebook: minvera: add GPIODeviceDetect support
Add GPIODeviceDetect EM config for cable cartridges, BCB (Blade Control
Board) cables between Middle BCB & Top BCB and Middle BCB & Bottom BCB.
The related PR to drop these from phosphor-gpio-presence -
https://gerrit.openbmc.org/c/openbmc/openbmc/+/81001
Tested:
```
└─ /xyz
└─ /xyz/openbmc_project
└─ /xyz/openbmc_project/GPIODeviceDetected
├─ /xyz/openbmc_project/GPIODeviceDetected/BCBCableBottom
├─ /xyz/openbmc_project/GPIODeviceDetected/BCBCableTop
├─ /xyz/openbmc_project/GPIODeviceDetected/CableCartridgeBottom
└─ /xyz/openbmc_project/GPIODeviceDetected/CableCartridgeTop
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Inventory.Source.DevicePresence interface - - -
.Name property s "BCBCableBottom" emits-change writable
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.Inventory.Source.DevicePresence interface - - -
.Name property s "CableCartridgeBottom" emits-change writable
│ ├─ /xyz/openbmc_project/inventory/system/board/BCBCableBottom
│ ├─ /xyz/openbmc_project/inventory/system/board/BCBCableTop
│ ├─ /xyz/openbmc_project/inventory/system/board/CableCartridgeBottom
│ ├─ /xyz/openbmc_project/inventory/system/board/CableCartridgeTop
NAME TYPE SIGNATURE RESULT/VALUE FLAGS
org.freedesktop.DBus.Introspectable interface - - -
.Introspect method - s -
org.freedesktop.DBus.Peer interface - - -
.GetMachineId method - s -
.Ping method - - -
org.freedesktop.DBus.Properties interface - - -
.Get method ss v -
.GetAll method s a{sv} -
.Set method ssv - -
.PropertiesChanged signal sa{sv}as - -
xyz.openbmc_project.AddObject interface - - -
.AddObject method a{sv} - -
xyz.openbmc_project.Inventory.Item.Board interface - - -
.Name property s "BCBCableBottom" emits-change
.Probe property as 3 "xyz.openbmc_project.Inventory.Source… emits-change
.Type property s "Board" emits-change
Redfish Output:
{
"@odata.id": "/redfish/v1/Chassis",
"@odata.type": "#ChassisCollection.ChassisCollection",
"Members": [
{
"@odata.id": "/redfish/v1/Chassis/BCBCableBottom"
},
{
"@odata.id": "/redfish/v1/Chassis/BCBCableTop"
},
...
{
"@odata.id": "/redfish/v1/Chassis/CableCartridgeBottom"
},
{
"@odata.id": "/redfish/v1/Chassis/CableCartridgeTop"
},
}
```
Change-Id: I10a3347436b41e73ab8c7346f7b7f743e5049e3c
Signed-off-by: Jagpal Singh Gill <paligill@gmail.com>
diff --git a/configurations/meson.build b/configurations/meson.build
index 6a3ffd7..98c6e46 100644
--- a/configurations/meson.build
+++ b/configurations/meson.build
@@ -94,6 +94,7 @@
'meta/minerva_cmm.json',
'meta/minerva_cmm_bsm.json',
'meta/minerva_cmm_hsc_infineon.json',
+ 'meta/minerva_cmm_misc_boards.json',
'meta/minerva_cmm_scm.json',
'meta/minerva_fanboard_adc_silergy.json',
'meta/minerva_fanboard_adc_ti.json',
diff --git a/configurations/meta/minerva_cmm_misc_boards.json b/configurations/meta/minerva_cmm_misc_boards.json
new file mode 100644
index 0000000..77e87b4
--- /dev/null
+++ b/configurations/meta/minerva_cmm_misc_boards.json
@@ -0,0 +1,10 @@
+{
+ "Exposes": [],
+ "Name": "$Name",
+ "Probe": [
+ "xyz.openbmc_project.Inventory.Source.DevicePresence({'Name': 'CableCartridge*'})",
+ "OR",
+ "xyz.openbmc_project.Inventory.Source.DevicePresence({'Name': 'BCBCable*'})"
+ ],
+ "Type": "Board"
+}
diff --git a/configurations/meta/minerva_cmm_scm.json b/configurations/meta/minerva_cmm_scm.json
index e447d00..21e27ca 100644
--- a/configurations/meta/minerva_cmm_scm.json
+++ b/configurations/meta/minerva_cmm_scm.json
@@ -179,6 +179,46 @@
"Type": "BMC"
},
{
+ "Name": "BCBCableBottom",
+ "PresencePinNames": [
+ "TOP_BCB_CABLE_PRSNT_N"
+ ],
+ "PresencePinValues": [
+ 0
+ ],
+ "Type": "GPIODeviceDetect"
+ },
+ {
+ "Name": "BCBCableTop",
+ "PresencePinNames": [
+ "BOT_BCB_CABLE_PRSNT_N"
+ ],
+ "PresencePinValues": [
+ 0
+ ],
+ "Type": "GPIODeviceDetect"
+ },
+ {
+ "Name": "CableCartridgeBottom",
+ "PresencePinNames": [
+ "CMM_CABLE_CARTRIDGE_PRSNT_BOT_N"
+ ],
+ "PresencePinValues": [
+ 0
+ ],
+ "Type": "GPIODeviceDetect"
+ },
+ {
+ "Name": "CableCartridgeTop",
+ "PresencePinNames": [
+ "CMM_CABLE_CARTRIDGE_PRSNT_TOP_N"
+ ],
+ "PresencePinValues": [
+ 0
+ ],
+ "Type": "GPIODeviceDetect"
+ },
+ {
"Level": "Critical",
"Name": "ComputeBlade1",
"PinName": "LEAK_DETECT_MTIA_BLADE1_N",