summaryrefslogtreecommitdiff
path: root/src/ec
diff options
context:
space:
mode:
authorSean Rhodes <sean@starlabs.systems>2024-03-18 10:15:21 +0000
committerFelix Held <felix-coreboot@felixheld.de>2024-06-07 18:49:31 +0000
commitd57e57eb22dd9bc413ed75220dfce0929d6ca41f (patch)
treed7a41af36ed607f939d3dff422da817693113f9c /src/ec
parenta273e1da864503864de698be7ddf69bf83b83414 (diff)
ec/starlabs/merlin/*: Fix the size of the battery soc
The battery remaining percentage is a uint16_t, so correct this in the EC memory. This change is non-function, as the EC is little endian. Change-Id: I56a0ae8199a95c9722e9bcb4c0739f4ef1d6ab05 Signed-off-by: Sean Rhodes <sean@starlabs.systems> Reviewed-on: https://review.coreboot.org/c/coreboot/+/81403 Reviewed-by: Matt DeVillier <matt.devillier@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/ec')
-rw-r--r--src/ec/starlabs/merlin/variants/apl/emem.asl3
-rw-r--r--src/ec/starlabs/merlin/variants/glk/emem.asl3
-rw-r--r--src/ec/starlabs/merlin/variants/glkr/emem.asl3
-rw-r--r--src/ec/starlabs/merlin/variants/kbl/emem.asl3
-rw-r--r--src/ec/starlabs/merlin/variants/merlin/emem.asl2
5 files changed, 5 insertions, 9 deletions
diff --git a/src/ec/starlabs/merlin/variants/apl/emem.asl b/src/ec/starlabs/merlin/variants/apl/emem.asl
index af1fb27010..6e88f912de 100644
--- a/src/ec/starlabs/merlin/variants/apl/emem.asl
+++ b/src/ec/starlabs/merlin/variants/apl/emem.asl
@@ -93,8 +93,7 @@ Field (ECF2, ByteAcc, Lock, Preserve)
B1PR, 16, // Battery Present Rate
B1RC, 16, // Battery Remaining Capacity
B1PV, 16, // Battery Present Voltage
- BPRP, 8, // Battery Remaining percentage
- BT1A, 8, // Bt1 ASOC
+ BPRP, 16, // Battery Remaining percentage
BT1T, 16, // Bt1 Temperature
BT1C, 8, // Bt1 Control
diff --git a/src/ec/starlabs/merlin/variants/glk/emem.asl b/src/ec/starlabs/merlin/variants/glk/emem.asl
index d9d80b1921..94e4b3ffd2 100644
--- a/src/ec/starlabs/merlin/variants/glk/emem.asl
+++ b/src/ec/starlabs/merlin/variants/glk/emem.asl
@@ -93,8 +93,7 @@ Field (ECF2, ByteAcc, Lock, Preserve)
B1PR, 16, // Battery Present Rate
B1RC, 16, // Battery Remaining Capacity
B1PV, 16, // Battery Present Voltage
- BPRP, 8, // Battery Remaining percentage
- BT1A, 8, // Bt1 ASOC
+ BPRP, 16, // Battery Remaining percentage
BT1T, 16, // Bt1 Temperature
BT1C, 8, // Bt1 Control
diff --git a/src/ec/starlabs/merlin/variants/glkr/emem.asl b/src/ec/starlabs/merlin/variants/glkr/emem.asl
index 6fa827eea8..b0df4f3087 100644
--- a/src/ec/starlabs/merlin/variants/glkr/emem.asl
+++ b/src/ec/starlabs/merlin/variants/glkr/emem.asl
@@ -65,8 +65,7 @@ Field (ECF2, ByteAcc, Lock, Preserve)
B1PR, 16, // Battery Present Rate
B1RC, 16, // Battery Remaining Capacity
B1PV, 16, // Battery Present Voltage
- BPRP, 8, // Battery Remaining percentage
- BT1A, 8, // Bt1 ASOC
+ BPRP, 16, // Battery Remaining percentage
BT1T, 16, // Bt1 Temperature
BT1C, 8, // Bt1 Control
diff --git a/src/ec/starlabs/merlin/variants/kbl/emem.asl b/src/ec/starlabs/merlin/variants/kbl/emem.asl
index 5532206b55..c475972591 100644
--- a/src/ec/starlabs/merlin/variants/kbl/emem.asl
+++ b/src/ec/starlabs/merlin/variants/kbl/emem.asl
@@ -82,8 +82,7 @@ Field (ECF2, ByteAcc, Lock, Preserve)
B1PR, 16, // Battery Present Rate
B1RC, 16, // Battery Remaining Capacity
B1PV, 16, // Battery Present Voltage
- BPRP, 8, // Battery Remaining percentage
- BT1A, 8, // Bt1 ASOC
+ BPRP, 16, // Battery Remaining percentage
Offset(0x9d),
OPWE, 8, // OPM write to EC flag for UCSI
diff --git a/src/ec/starlabs/merlin/variants/merlin/emem.asl b/src/ec/starlabs/merlin/variants/merlin/emem.asl
index 2a28a4529b..b17a14874a 100644
--- a/src/ec/starlabs/merlin/variants/merlin/emem.asl
+++ b/src/ec/starlabs/merlin/variants/merlin/emem.asl
@@ -48,5 +48,5 @@ Field (ECF2, ByteAcc, Lock, Preserve)
B1PR, 16, // Battery Present Rate
B1RC, 16, // Battery Remaining Capacity
B1PV, 16, // Battery Present Voltage
- BPRP, 8, // Battery Remaining percentage
+ BPRP, 16, // Battery Remaining percentage
}