mb/google/fatcat: Introduce variant-specific barrel jack presence check
This commit introduces a weak function `variant_is_barrel_charger_present()` to allow individual Fatcat variants to specify if they support power-on via a barrel jack. The default implementation of this function returns `false`, reflecting the fact that most Chromebook devices within the Fatcat family primarily use USB-C for power. The `baseboard_devtree_update()` function is updated to use this variant-specific check instead of directly calling `google_chromeec_is_barrel_charger_present()` and checking the board model. This allows for more flexibility in handling barrel jack presence across different Fatcat variants. This change enables specific variants that do support barrel jack power to override the weak function and return `true`, allowing the system to behave accordingly (e.g., skipping power optimization when booting with a barrel charger). TEST=Able to build and boot google/fatcat. Change-Id: I613417be5a59790b8a5e6055957a2f518f4c42df Signed-off-by: Subrata Banik <subratabanik@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/87183 Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Pranava Y N <pranavayn@google.com> Reviewed-by: Dinesh Gehlot <digehlot@google.com> Reviewed-by: Kapil Porwal <kapilporwal@google.com> Reviewed-by: Jayvik Desai <jayvik@google.com>
This commit is contained in:
parent
7f6e43851e
commit
479a271cf3
2 changed files with 14 additions and 1 deletions
|
|
@ -50,10 +50,22 @@ const struct cpu_tdp_power_limits power_optimized_limits[] = {
|
|||
},
|
||||
};
|
||||
|
||||
/*
|
||||
* Placeholder to check if variant has support for barrel jack for powering
|
||||
* on the device.
|
||||
*
|
||||
* Most of the chromebook device is powering on with USB-C hence, unless overridden
|
||||
* by some variant, assume barrel jack not present.
|
||||
*/
|
||||
__weak bool variant_is_barrel_charger_present(void)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void baseboard_devtree_update(void)
|
||||
{
|
||||
/* Don't optimize the power limit if booting with barrel attached */
|
||||
if (CONFIG(BOARD_GOOGLE_MODEL_FATCAT) && google_chromeec_is_barrel_charger_present())
|
||||
if (variant_is_barrel_charger_present())
|
||||
return;
|
||||
|
||||
if (!google_chromeec_is_battery_present())
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ int variant_memory_sku(void);
|
|||
bool variant_is_half_populated(void);
|
||||
void variant_update_soc_memory_init_params(FSPM_UPD *memupd);
|
||||
void variant_update_soc_chip_config(struct soc_intel_pantherlake_config *config);
|
||||
bool variant_is_barrel_charger_present(void);
|
||||
|
||||
enum s0ix_entry {
|
||||
S0IX_EXIT,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue