blob: 458f234b672751512ec88a0a0ff2e8f8f7cad7d3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
|
From 9923811a2880ad4a8289af666b63adfd1807b5bd Mon Sep 17 00:00:00 2001
From: Jayaprakash Mutyala <mutyalax.jayaprakash@intel.com>
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 <mutyalax.jayaprakash@intel.com>
---
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
|