diff options
author | Yidi Lin <yidilin@chromium.org> | 2023-10-02 15:54:33 +0800 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2023-10-04 09:38:37 +0000 |
commit | da630738277ad5548d36eec864169c6d7de1056e (patch) | |
tree | 8a90d4a18cc269724ad6de45fff90e0ecb0b1a33 /src/mainboard/google/geralt | |
parent | ab6f016a43cf7d2667f5648dad72ca3d0df03d58 (diff) |
mb/google/geralt: Update voltage mapping tables for RAM ID and LCMD ID
The tolerance of ADC voltage table is too small. Update the table values
accordring to the suggestion from the hardware team. The patch is
prepared for the derived projects. There is no actual issue now.
BRANCH=none
BUG=b:301908091
TEST=check firmware screen
Change-Id: I3bde30b6bbe79c81e276f23f4110715c3278d42c
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78209
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Diffstat (limited to 'src/mainboard/google/geralt')
-rw-r--r-- | src/mainboard/google/geralt/boardid.c | 50 |
1 files changed, 23 insertions, 27 deletions
diff --git a/src/mainboard/google/geralt/boardid.c b/src/mainboard/google/geralt/boardid.c index 3a08c6d5cb..4c53a810c4 100644 --- a/src/mainboard/google/geralt/boardid.c +++ b/src/mainboard/google/geralt/boardid.c @@ -9,7 +9,7 @@ /* board_id is provided by ec/google/chromeec/ec_boardid.c */ -#define ADC_LEVELS 12 +#define ADC_LEVELS 8 enum { /* RAM IDs */ @@ -20,38 +20,34 @@ enum { PANEL_ID_LOW_CHANNEL = 5, }; -static const unsigned int ram_voltages[ADC_LEVELS] = { +static const unsigned int ram_voltages[] = { /* ID : Voltage (unit: uV) */ - [0] = 74300, - [1] = 211700, - [2] = 318800, - [3] = 428600, - [4] = 541700, - [5] = 665800, - [6] = 781400, - [7] = 900000, - [8] = 1023100, - [9] = 1137000, - [10] = 1240000, - [11] = 1342600, + [0] = 74296, + [1] = 211673, + [2] = 365055, + [3] = 524272, + [4] = 706302, + [5] = 899119, + [6] = 1108941, + [7] = 1342616, }; -static const unsigned int panel_voltages[ADC_LEVELS] = { +_Static_assert(ARRAY_SIZE(ram_voltages) == ADC_LEVELS, "Wrong array size of ram_voltages"); + +static const unsigned int panel_voltages[] = { /* ID : Voltage (unit: uV) */ - [0] = 0, - [1] = 283000, - [2] = 394000, - [3] = 503000, - [4] = 608000, - [5] = 712000, - [6] = 823000, - [7] = 937000, - [8] = 1046000, - [9] = 1155000, - [10] = 1277000, - [11] = 1434000, + [0] = 0, + [1] = 282774, + [2] = 472379, + [3] = 652542, + [4] = 830258, + [5] = 1011767, + [6] = 1209862, + [7] = 1427880, }; +_Static_assert(ARRAY_SIZE(panel_voltages) == ADC_LEVELS, "Wrong array size of panel_voltages"); + static const unsigned int *adc_voltages[] = { [RAM_ID_LOW_CHANNEL] = ram_voltages, [RAM_ID_HIGH_CHANNEL] = ram_voltages, |