diff options
author | Evgeny Alekseev (IBS Group) <ealekseev@ibs.sila.ru> | 2022-09-29 12:47:00 +0300 |
---|---|---|
committer | Evgeny Alekseev (IBS Group) <ealekseev@ibs.sila.ru> | 2022-09-30 08:21:35 +0300 |
commit | 46c404419f80dd1614828b34c3500182e468f4d4 (patch) | |
tree | 49cb0023bb369e06f50a4209796d4445cd56edfc | |
parent | ca4388ce7620f229a74fed8f514a8587a3d681e2 (diff) | |
download | openbmc-46c404419f80dd1614828b34c3500182e468f4d4.tar.xz |
Add psu1 vout threshold ctrl and loggs on pwronoff
3 files changed, 46 insertions, 8 deletions
diff --git a/meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-monitor-config.bbappend b/meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-monitor-config.bbappend index 4b4e1415b5..36fd272d19 100644 --- a/meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-monitor-config.bbappend +++ b/meta-ibs/meta-common/recipes-phosphor/dbus/phosphor-dbus-monitor-config.bbappend @@ -1,2 +1,2 @@ -PHOSPHOR_DBUS_MONITOR_CONFIGS:append = " snmp-policy" +PHOSPHOR_DBUS_MONITOR_CONFIGS:append = " snmp-policy psu-threshold-policy" diff --git a/meta-ibs/meta-common/recipes-phosphor/dbus/psu-threshold-policy/psu-threshold-policy.yaml b/meta-ibs/meta-common/recipes-phosphor/dbus/psu-threshold-policy/psu-threshold-policy.yaml index 98db0e2f9a..0f2ec0565c 100644 --- a/meta-ibs/meta-common/recipes-phosphor/dbus/psu-threshold-policy/psu-threshold-policy.yaml +++ b/meta-ibs/meta-common/recipes-phosphor/dbus/psu-threshold-policy/psu-threshold-policy.yaml @@ -25,7 +25,18 @@ watch: property paths: chassis state properties: chassis powered - callback: check cooling type + callback: check power + + +- name: check power + description: > + 'check power on/off' + class: callback + callback: group + members: + - check power on + - check power off + - name: check power on description: > @@ -34,7 +45,7 @@ condition: count paths: chassis state properties: chassis powered - callback: enable psu1 vout threshold + callback: enable psu1 and log countop: '>' countbound: 0 op: '==' @@ -47,15 +58,42 @@ condition: count paths: chassis state properties: chassis powered - callback: disable psu1 vout threshold + callback: disable psu1 and log countop: '>' countbound: 0 op: '!=' bound: xyz.openbmc_project.State.Chassis.PowerState.On +- name: disable psu1 and log + description: > + 'check power on/off' + class: callback + callback: group + members: + - create log entry + - disable psu1 vout threshold + +- name: enable psu1 and log + description: > + 'check power on/off' + class: callback + callback: group + members: + - create log entry + - enable psu1 vout threshold + +- name: create log entry + description: > + 'Create a log.' + class: callback + callback: elog + paths: chassis state + properties: chassis powered + error: xyz::openbmc_project::State::Shutdown::Inventory::Error::Fan + - name: enable psu1 vout threshold description: > - 'Enable PSU0 Vout' + 'Enable PSU1 Vout' class: callback callback: method service: xyz.openbmc_project.PSUSensor @@ -70,9 +108,9 @@ - value: true type: boolean -- name: disable psu0 vout threshold +- name: disable psu1 vout threshold description: > - 'Enable PSU0 Vout' + 'Disable PSU1 Vout' class: callback callback: method service: xyz.openbmc_project.PSUSensor diff --git a/meta-ibs/meta-common/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/obmc-init.sh b/meta-ibs/meta-common/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/obmc-init.sh index a11f9b4db6..c26b853a10 100644 --- a/meta-ibs/meta-common/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/obmc-init.sh +++ b/meta-ibs/meta-common/recipes-phosphor/initrdscripts/obmc-phosphor-initfs/obmc-init.sh @@ -448,7 +448,7 @@ then echo setting u-boot env vars fw_setenv eth1addr $mac0 fw_setenv eth0addr $mac1 - fw_setenv ethaddr $mac1 + fw_setenv ethaddr $mac0 fw_setenv env_valid 1 fi |