From 18f97faa411078b95d042d207f5fff32bc8ece1d Mon Sep 17 00:00:00 2001 From: P Dheeraj Srujan Kumar Date: Thu, 31 Mar 2022 02:50:48 +0530 Subject: Update to internal 1-0.91 Signed-off-by: P Dheeraj Srujan Kumar --- .../0001-ADCSensor-Fix-for-P3V3-sensor.patch | 59 ++++++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 meta-openbmc-mods/meta-ast2600/recipes-phosphor/sensors/dbus-sensors/0001-ADCSensor-Fix-for-P3V3-sensor.patch (limited to 'meta-openbmc-mods/meta-ast2600/recipes-phosphor/sensors/dbus-sensors/0001-ADCSensor-Fix-for-P3V3-sensor.patch') diff --git a/meta-openbmc-mods/meta-ast2600/recipes-phosphor/sensors/dbus-sensors/0001-ADCSensor-Fix-for-P3V3-sensor.patch b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/sensors/dbus-sensors/0001-ADCSensor-Fix-for-P3V3-sensor.patch new file mode 100644 index 000000000..458f234b6 --- /dev/null +++ b/meta-openbmc-mods/meta-ast2600/recipes-phosphor/sensors/dbus-sensors/0001-ADCSensor-Fix-for-P3V3-sensor.patch @@ -0,0 +1,59 @@ +From 9923811a2880ad4a8289af666b63adfd1807b5bd Mon Sep 17 00:00:00 2001 +From: Jayaprakash Mutyala +Date: Mon, 22 Nov 2021 22:12:00 +0000 +Subject: [PATCH] ADCSensor: Fix for P3V3 sensor + +Issue: As part of adapting to upstream ADC driver change for all the +platforms of AST2600, ADC scale factor settings in board configurations +is adjusted. +Patch: https://gerrit.openbmc-project.xyz/c/openbmc/openbmc/+/47086 +Due to this change set sensor threshold is not updating for critical +threshold value of P3V3 sensor. + +Fix: Updating pre sensor scaling of "maxVoltageReading" to 2.5 can fix +this issue. + +Tested: +Verified using IPMI set sensor threshold command for P3V3 sensor and for +other sensors as well. +Before fix: +//Get sensor threshold for P3V3 sensor +Command : ipmitool raw 0x04 0x27 0x83 +Response: 1b d6 d0 00 f8 ff 00 +//Set sensor threshold for P3V3 sensor +Command : ipmitool raw 0x04 0x26 0x83 0x10 0x00 0x00 0x00 0x00 0xfd 0x00 +Response: //Success +Command : ipmitool raw 0x04 0x27 0x83 +Response: 1b d8 d1 00 f9 ff 00 + +After fix: +//Get sensor threshold for P3V3 sensor +Command : ipmitool raw 0x04 0x27 0x81 +Response: 1b b2 ad 00 ce d4 00 +//Set sensor threshold for P3V3 sensor +Command : ipmitool raw 0x04 0x26 0x81 0x10 0x00 0x00 0x00 0x00 0xfd 0x00 +Response: //Success +Command : ipmitool raw 0x04 0x27 0x81 +Response: 1b b2 ad 00 ce fd 00 + +Signed-off-by: Jayaprakash Mutyala +--- + src/ADCSensor.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/ADCSensor.cpp b/src/ADCSensor.cpp +index 9758168..2f3c66f 100644 +--- a/src/ADCSensor.cpp ++++ b/src/ADCSensor.cpp +@@ -37,7 +37,7 @@ + static constexpr unsigned int sensorScaleFactor = 1000; + + static constexpr double roundFactor = 10000; // 3 decimal places +-static constexpr double maxVoltageReading = 1.8; // pre sensor scaling ++static constexpr double maxVoltageReading = 2.5; // pre sensor scaling + static constexpr double minVoltageReading = 0; + + ADCSensor::ADCSensor(const std::string& path, +-- +2.17.1 + -- cgit v1.2.3