From 0251f7da803287b86d1614ea382d89d509d1be46 Mon Sep 17 00:00:00 2001 From: Shon Date: Thu, 12 Sep 2024 13:34:37 +0800 Subject: mb/google/brask/var/bujia: Fix PSYS voltage setting It return 0 when google_chromeec_command() on success, so get_input_power_voltage() should return adaptor voltage instead of psys_config default value. BUG=b:329037849 BRANCH=firmware-brya-14505.B TEST= cbmem -c | grep -i PsysPmax Change-Id: I848c92752b7a7b53f47c6296aad0bdda20e9b0bd Signed-off-by: Shon Reviewed-on: https://review.coreboot.org/c/coreboot/+/84333 Reviewed-by: Derek Huang Reviewed-by: Eric Lai Tested-by: build bot (Jenkins) --- src/mainboard/google/brya/variants/bujia/ramstage.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mainboard/google/brya/variants/bujia/ramstage.c b/src/mainboard/google/brya/variants/bujia/ramstage.c index 1aaa54b590..51f5ecfaaf 100644 --- a/src/mainboard/google/brya/variants/bujia/ramstage.c +++ b/src/mainboard/google/brya/variants/bujia/ramstage.c @@ -70,9 +70,9 @@ static int32_t get_input_power_voltage(void) .cmd_data_out = &info, }; if (!google_chromeec_command(&cmd)) - return psys_config.bj_volts_mv; + return info.adc_value; - return info.adc_value; + return psys_config.bj_volts_mv; } void variant_devtree_update(void) -- cgit v1.2.3