mb/google/bluey: Enable PD negotiation when battery is missing

Update the qclib_mainboard_override hook to enable Power Delivery
negotiation if no battery is detected, even in normal boot mode.
This allows the system to negotiate higher power levels when
running solely on AC power.

BUG=b:457566143
TEST=Verify different boot modes on Google/Quenbi.

Change-Id: If1660e4c50575eb4b6d5af606c35accdb4c67982
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90539
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
This commit is contained in:
Kapil Porwal 2025-12-17 12:28:34 +05:30 committed by Subrata Banik
commit cfb0d8a144

View file

@ -55,7 +55,10 @@ static enum boot_mode_t set_boot_mode(void)
int qclib_mainboard_override(struct qclib_cb_if_table *table)
{
if (set_boot_mode() != LB_BOOT_MODE_NORMAL)
if (!CONFIG(EC_GOOGLE_CHROMEEC))
return 0;
if ((set_boot_mode() != LB_BOOT_MODE_NORMAL) || !google_chromeec_is_battery_present())
table->global_attributes |= QCLIB_GA_ENABLE_PD_NEGOTIATION;
else
table->global_attributes &= ~QCLIB_GA_ENABLE_PD_NEGOTIATION;