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,31 @@
{
"inventoryPMBusAccessType": "HwmonDeviceDebug",
"fruConfigs": [
{
"propertyName": "PartNumber",
"fileName": "part_number",
"interface": "xyz.openbmc_project.Inventory.Decorator.Asset"
},
{
"propertyName": "SerialNumber",
"fileName": "serial_number",
"interface": "xyz.openbmc_project.Inventory.Decorator.Asset"
},
{
"propertyName": "Model",
"fileName": "ccin",
"interface": "xyz.openbmc_project.Inventory.Decorator.Asset"
},
{
"propertyName": "Version",
"fileName": "fw_version",
"interface": "xyz.openbmc_project.Software.Version"
}
],
"psuDevices": {
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0068",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1" : "/sys/bus/i2c/devices/3-0069",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply2" : "/sys/bus/i2c/devices/3-006a",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply3" : "/sys/bus/i2c/devices/3-006b"
}
}
@@ -0,0 +1,6 @@
DEVPATH=/sys/bus/i2c/devices/3-0068
INSTANCE=0
INVENTORY=/system/chassis/motherboard/powersupply0
NUM_HISTORY_RECORDS=120
SYNC_GPIO_PATH=/dev/gpiochip0
SYNC_GPIO_NUM=105
@@ -0,0 +1,6 @@
DEVPATH=/sys/bus/i2c/devices/3-0069
INSTANCE=1
INVENTORY=/system/chassis/motherboard/powersupply1
NUM_HISTORY_RECORDS=120
SYNC_GPIO_PATH=/dev/gpiochip0
SYNC_GPIO_NUM=105
@@ -0,0 +1,29 @@
{
"inventoryPMBusAccessType": "HwmonDeviceDebug",
"fruConfigs": [
{
"propertyName": "PartNumber",
"fileName": "part_number",
"interface": "xyz.openbmc_project.Inventory.Decorator.Asset"
},
{
"propertyName": "SerialNumber",
"fileName": "serial_number",
"interface": "xyz.openbmc_project.Inventory.Decorator.Asset"
},
{
"propertyName": "Model",
"fileName": "ccin",
"interface": "xyz.openbmc_project.Inventory.Decorator.Asset"
},
{
"propertyName": "Version",
"fileName": "fw_version",
"interface": "xyz.openbmc_project.Software.Version"
}
],
"psuDevices": {
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0068",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1" : "/sys/bus/i2c/devices/3-0069"
}
}
@@ -0,0 +1,6 @@
DEVPATH=/sys/bus/i2c/devices/3-0069
INSTANCE=0
INVENTORY=/system/chassis/motherboard/powersupply0
NUM_HISTORY_RECORDS=120
SYNC_GPIO_PATH=/dev/gpiochip0
SYNC_GPIO_NUM=38
@@ -0,0 +1,6 @@
DEVPATH=/sys/bus/i2c/devices/3-0068
INSTANCE=1
INVENTORY=/system/chassis/motherboard/powersupply1
NUM_HISTORY_RECORDS=120
SYNC_GPIO_PATH=/dev/gpiochip0
SYNC_GPIO_NUM=38
@@ -0,0 +1,6 @@
DEVPATH=/sys/bus/i2c/devices/3-0069
INSTANCE=0
INVENTORY=/system/chassis/motherboard/powersupply0
NUM_HISTORY_RECORDS=120
SYNC_GPIO_PATH=/dev/gpiochip0
SYNC_GPIO_NUM=105
@@ -0,0 +1,6 @@
DEVPATH=/sys/bus/i2c/devices/3-0068
INSTANCE=1
INVENTORY=/system/chassis/motherboard/powersupply1
NUM_HISTORY_RECORDS=120
SYNC_GPIO_PATH=/dev/gpiochip0
SYNC_GPIO_NUM=105
@@ -0,0 +1,12 @@
[Unit]
Description=Power Sequencer Power-on Monitor
Wants=obmc-power-start@0.service
After=obmc-power-start@0.service
Wants=power-workarounds@0.service
After=power-workarounds@0.service
Conflicts=obmc-chassis-poweroff@0.target
ConditionPathExists=!/run/openbmc/chassis@0-on
[Service]
Type=oneshot
ExecStart=/usr/bin/pseq-monitor -a pgood-monitor -i 5000
@@ -0,0 +1,29 @@
{
"inventoryPMBusAccessType": "HwmonDeviceDebug",
"fruConfigs": [
{
"propertyName": "PartNumber",
"fileName": "part_number",
"interface": "xyz.openbmc_project.Inventory.Decorator.Asset"
},
{
"propertyName": "SerialNumber",
"fileName": "serial_number",
"interface": "xyz.openbmc_project.Inventory.Decorator.Asset"
},
{
"propertyName": "Model",
"fileName": "ccin",
"interface": "xyz.openbmc_project.Inventory.Decorator.Asset"
},
{
"propertyName": "Version",
"fileName": "fw_version",
"interface": "xyz.openbmc_project.Software.Version"
}
],
"psuDevices": {
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply0" : "/sys/bus/i2c/devices/3-0069",
"/xyz/openbmc_project/inventory/system/chassis/motherboard/powersupply1" : "/sys/bus/i2c/devices/3-0068"
}
}
@@ -0,0 +1,23 @@
FILESEXTRAPATHS:prepend := "${THISDIR}/${PN}:"
inherit obmc-phosphor-systemd
SRC_URI:append:df-openpower = " file://psu.json"
EXTRA_OEMESON:append:ibm-ac-server = " -Ducd90160-yaml=${STAGING_DIR_HOST}${datadir}/power-sequencer/ucd90160.yaml"
EXTRA_OEMESON:append:p10bmc = " -Dibm-vpd=true"
DEPENDS:append:ibm-ac-server = " power-sequencer"
DEPENDS:append:p10bmc = " power-sequencer"
PACKAGECONFIG:append:ibm-ac-server = " monitor"
PACKAGECONFIG:append:swift = " monitor"
PACKAGECONFIG:append:p10bmc = " monitor-ng"
do_install:append:df-openpower(){
install -D ${WORKDIR}/psu.json ${D}${datadir}/phosphor-power/psu.json
}
FILES:${PN}:append:df-openpower = " ${datadir}/phosphor-power/psu.json"
PSU_MONITOR_ENV_FMT = "obmc/power-supply-monitor/power-supply-monitor-{0}.conf"
SYSTEMD_ENVIRONMENT_FILE:${PN}-monitor:append:ibm-ac-server = " ${@compose_list(d, 'PSU_MONITOR_ENV_FMT', 'OBMC_POWER_SUPPLY_INSTANCES')}"
@@ -0,0 +1,19 @@
SUMMARY = "Power sequencer data definition"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit allarch
SRC_URI:append:ibm-ac-server = " file://ucd90160.yaml"
FILES:${PN}:append:ibm-ac-server = " ${datadir}/power-sequencer/ucd90160.yaml"
S = "${WORKDIR}"
do_install:append:ibm-ac-server() {
DEST=${D}${datadir}/power-sequencer
install -D ucd90160.yaml ${DEST}/ucd90160.yaml
}
@@ -0,0 +1,180 @@
- Device:
index: 0
# Linux sysfs path for this power sequencer (0xC8 8-bit address)
path: /sys/bus/i2c/devices/i2c-8/8-0064
RailNames:
- "12.0V"
- "3.3V"
- "1.8V"
- "1.1V"
- "0.8V_SW"
- "5.0V"
- "VDN0"
- "VDN1"
- "AVDD"
- "VIO0"
- "VIO1"
- "VDD0"
- "VDD1"
- "VCS0"
- "VCS1"
GPIConfigs:
- name: PGOOD_5P0V
gpi: 1
pinID: 8
poll: false
analysis: none
- name: MEM_GOOD0
gpi: 2
pinID: 9
poll: false
analysis: memGOOD0
- name: MEM_GOOD1
gpi: 3
pinID: 10
poll: false
analysis: memGOOD1
- name: GPU_PGOOD
gpi: 4
pinID: 14
poll: false
analysis: gpuPGOOD # Extra GPIOAnalysis to run if faulted
- name: GPU_TH_OVERT
gpi: 5
pinID: 17
poll: false
analysis: gpuOverTemp # Extra GPIOAnalysis to run if faulted
- name: SOFTWARE_PGOOD
gpi: 6
pinID: 11
poll: false
analysis: none
GPIOAnalysis:
- type: gpuPGOOD
# The PCA9xxx chip device path and address (0xC0 8-bit = 0x60 7-bit)
path: /sys/bus/i2c/devices/i2c-8/8-0060
gpio_value: low # What GPIO value indicates a fault/problem?
error_function: gpuPGOODError # Extra analysis function to call for this type
option_flags: none
GPIODefinitions:
- GPIODefinition: GPU Card 0
gpio: 8 # GPIO pin/register to check for fault
# Call out path for fault
callout: /system/chassis/motherboard/gv100card0
- GPIODefinition: GPU Card 1
gpio: 9
callout: /system/chassis/motherboard/gv100card1
- GPIODefinition: GPU Card 2
gpio: 10
callout: /system/chassis/motherboard/gv100card2
- GPIODefinition: GPU Card 3
gpio: 11
callout: /system/chassis/motherboard/gv100card3
- type: gpuOverTemp
# The PCA9xxx chip device path and address (0xC0 8-bit = 0x60 7-bit)
path: /sys/bus/i2c/devices/i2c-8/8-0060
gpio_value: low # What GPIO value indicates a fault/problem?
error_function: gpuOverTempError # Extra analysis function to call for this type
option_flags: shutdownOnFault
GPIODefinitions:
- GPIODefinition: GPU Card 0 Overtemperature
gpio: 2 # GPIO pin/register to check for fault
# Call out path for fault
callout: /system/chassis/motherboard/gv100card0
- GPIODefinition: GPU Card 1 Overtemperature
gpio: 3
callout: /system/chassis/motherboard/gv100card1
- GPIODefinition: GPU Card 2 Overtemperature
gpio: 4
callout: /system/chassis/motherboard/gv100card2
- GPIODefinition: GPU Card 3 Overtemperature
gpio: 5
callout: /system/chassis/motherboard/gv100card3
- type: memGOOD0
# The PCA9xxx chip device path and address (0xE8 8-bit = 0x74 7-bit)
path: /sys/bus/i2c/devices/i2c-9/9-0074
gpio_value: low # What GPIO value indicates a fault/problem?
error_function: memGoodError # Extra analysis function to call for this type
option_flags: none
GPIODefinitions:
- GPIODefinition: CPU 0 OMI0A PGOOD
gpio: 0 # GPIO pin/register to check for fault
# Call out path for fault
callout: /system/chassis/motherboard/dimm4
- GPIODefinition: CPU 0 OMI0B PGOOD
gpio: 1
callout: /system/chassis/motherboard/dimm3
- GPIODefinition: CPU 0 OMI0C PGOOD
gpio: 2
callout: /system/chassis/motherboard/dimm2
- GPIODefinition: CPU 0 OMI1A PGOOD
gpio: 3
callout: /system/chassis/motherboard/dimm5
- GPIODefinition: CPU 0 OMI1B PGOOD
gpio: 4
callout: /system/chassis/motherboard/dimm10
- GPIODefinition: CPU 0 OMI1C PGOOD
gpio: 5
callout: /system/chassis/motherboard/dimm8
- GPIODefinition: CPU 0 OMI2A PGOOD
gpio: 6
callout: /system/chassis/motherboard/dimm11
- GPIODefinition: CPU 0 OMI2B PGOOD
gpio: 7
callout: /system/chassis/motherboard/dimm9
- GPIODefinition: CPU 0 OMI3A PGOOD
gpio: 8
callout: /system/chassis/motherboard/dimm0
- GPIODefinition: CPU 0 OMI3B PGOOD
gpio: 9
callout: /system/chassis/motherboard/dimm1
- GPIODefinition: CPU 0 OMI3C PGOOD
gpio: 10
callout: /system/chassis/motherboard/dimm7
- GPIODefinition: CPU 0 OMI4A PGOOD
gpio: 11
callout: /system/chassis/motherboard/dimm6
- type: memGOOD1
# The PCA9xxx chip device path and address (0xE8 8-bit = 0x74 7-bit)
path: /sys/bus/i2c/devices/i2c-10/10-0074
gpio_value: low # What GPIO value indicates a fault/problem?
error_function: memGoodError # Extra analysis function to call for this type
option_flags: none
GPIODefinitions:
- GPIODefinition: CPU 1 OMI0A PGOOD
gpio: 0 # GPIO pin/register to check for fault
# Call out path for fault
callout: /system/chassis/motherboard/dimm16
- GPIODefinition: CPU 1 OMI0B PGOOD
gpio: 1
callout: /system/chassis/motherboard/dimm15
- GPIODefinition: CPU 1 OMI0C PGOOD
gpio: 2
callout: /system/chassis/motherboard/dimm14
- GPIODefinition: CPU 1 OMI1A PGOOD
gpio: 3
callout: /system/chassis/motherboard/dimm17
- GPIODefinition: CPU 1 OMI1B PGOOD
gpio: 4
callout: /system/chassis/motherboard/dimm22
- GPIODefinition: CPU 1 OMI1C PGOOD
gpio: 5
callout: /system/chassis/motherboard/dimm20
- GPIODefinition: CPU 1 OMI2A PGOOD
gpio: 6
callout: /system/chassis/motherboard/dimm23
- GPIODefinition: CPU 1 OMI2B PGOOD
gpio: 7
callout: /system/chassis/motherboard/dimm21
- GPIODefinition: CPU 1 OMI3A PGOOD
gpio: 8
callout: /system/chassis/motherboard/dimm12
- GPIODefinition: CPU 1 OMI3B PGOOD
gpio: 9
callout: /system/chassis/motherboard/dimm13
- GPIODefinition: CPU 1 OMI3C PGOOD
gpio: 10
callout: /system/chassis/motherboard/dimm19
- GPIODefinition: CPU 1 OMI4A PGOOD
gpio: 11
callout: /system/chassis/motherboard/dimm18
@@ -0,0 +1,103 @@
- Device:
index: 0
# Linux sysfs path for this power sequencer (0xC8 8-bit address)
path: /sys/bus/i2c/devices/i2c-11/11-0064
RailNames:
- "5.0VCS"
- "12.0V"
- "3.3V"
- "1.8V"
- "1.1V"
- "1.0V"
- "0.9V"
- "VDN-A"
- "VDN-B"
- "AVDD"
- "VIO-A"
- "VIO-B"
- "VDD-A"
- "VDD-B"
- "VCS-A"
- "VCS-B"
GPIConfigs:
- name: PGOOD_5P0V
gpi: 1
pinID: 8
poll: false
analysis: none
- name: MEM_GOOD0
gpi: 2
pinID: 9
poll: false
analysis: none
- name: MEM_GOOD1
gpi: 3
pinID: 10
poll: false
analysis: none
- name: GPU_PGOOD
gpi: 4
pinID: 14
poll: false
analysis: gpuPGOOD
- name: GPU_TH_OVERT
gpi: 5
pinID: 17
poll: true
analysis: gpuOverTemp
- name: SOFTWARE_PGOOD
gpi: 6
pinID: 11
poll: false
analysis: none
GPIOAnalysis:
- type: gpuPGOOD
path: /sys/bus/i2c/devices/i2c-11/11-0060
gpio_value: low
error_function: gpuPGOODError
option_flags: none
GPIODefinitions:
- GPIODefinition: GPU Card 0
gpio: 8
callout: /system/chassis/motherboard/gv100card0
- GPIODefinition: GPU Card 1
gpio: 9
callout: /system/chassis/motherboard/gv100card1
- GPIODefinition: GPU Card 2
gpio: 10
callout: /system/chassis/motherboard/gv100card2
- GPIODefinition: GPU Card 3
gpio: 11
callout: /system/chassis/motherboard/gv100card3
- GPIODefinition: GPU Card 4
gpio: 12
callout: /system/chassis/motherboard/gv100card4
- GPIODefinition: GPU Card 5
gpio: 13
callout: /system/chassis/motherboard/gv100card5
- type: gpuOverTemp # Extra analysis function to call for this type
# The PCA9xxx chip device path and address (0xC0 8-bit = 0x60 7-bit)
path: /sys/bus/i2c/devices/i2c-11/11-0060
gpio_value: low # What GPIO value indicates a fault/problem?
error_function: gpuOverTempError
option_flags: shutdownOnFault
GPIODefinitions:
- GPIODefinition: GPU Card 0 Overtemperature
gpio: 2 # GPIO pin/register to check for fault
# Call out path for fault
callout: /system/chassis/motherboard/gv100card0
- GPIODefinition: GPU Card 1 Overtemperature
gpio: 3
callout: /system/chassis/motherboard/gv100card1
- GPIODefinition: GPU Card 2 Overtemperature
gpio: 4
callout: /system/chassis/motherboard/gv100card2
- GPIODefinition: GPU Card 3 Overtemperature
gpio: 5
callout: /system/chassis/motherboard/gv100card3
- GPIODefinition: GPU Card 4 Overtemperature
gpio: 6
callout: /system/chassis/motherboard/gv100card4
- GPIODefinition: GPU Card 5 Overtemperature
gpio: 7
callout: /system/chassis/motherboard/gv100card5
@@ -0,0 +1,18 @@
SUMMARY = "Copy error yaml files to known path for elog parsing"
PR = "r1"
PV = "1.0+git${SRCPV}"
inherit phosphor-dbus-yaml
inherit native
require recipes-phosphor/power/phosphor-power.inc
S = "${WORKDIR}/git"
do_install:append() {
SRC=${S}/org/open_power/Witherspoon
DEST=${D}${yaml_dir}/org/open_power/Witherspoon
install -d ${DEST}
install ${SRC}/Fault.errors.yaml ${DEST}
install ${SRC}/Fault.metadata.yaml ${DEST}
}
@@ -0,0 +1,16 @@
SUMMARY = "Power Supply Sync"
DESCRIPTION = "Synchronizes the power supplies' INPUT_HISTORY data"
PR = "r1"
LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/Apache-2.0;md5=89aea4e17d99a7cacdbeed46a0096b10"
inherit obmc-phosphor-systemd
RDEPENDS:${PN} += "phosphor-gpio-monitor-monitor"
SYNC_SERVICE = "power-supply-sync.service"
TGTFMT = "obmc-chassis-poweron@0.target"
SYNC_FMT = "../${SYNC_SERVICE}:${TGTFMT}.wants/${SYNC_SERVICE}"
SYSTEMD_SERVICE:${PN} += "${SYNC_SERVICE}"
SYSTEMD_LINK:${PN} += "${SYNC_FMT}"
@@ -0,0 +1,13 @@
[Unit]
Description=Power Supply Input History SYNC
Wants=obmc-power-start-pre@0.target
After=obmc-power-start-pre@0.target
Wants=obmc-chassis-poweron@0.target
Before=obmc-chassis-poweron@0.target
ConditionPathExists=!/run/openbmc/chassis@0-on
[Service]
ExecStart=/usr/bin/phosphor-gpio-util --gpio=105 --path=/dev/gpiochip0 --delay=5 --action=low_high
[Install]
#RequiredBy=obmc-chassis-poweron@0.target