mb/google/dedede: Add a variant callback to update devicetree config

This callback is required to update the devicetree config at run-time
after probing the firmware config.

BUG=b:186380807
BRANCH=dedede
TEST=Build and boot to OS in metaknight.

Change-Id: I857211bfc4beb36ab225f3786c1707336a34aae9
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/52887
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Evan Green <evgreen@chromium.org>
Reviewed-by: Raymond Wong <wongraymond@google.com>
This commit is contained in:
David Wu 2021-05-04 20:59:28 +08:00 committed by Patrick Georgi
parent a5c829d4e1
commit a83d8ab0f8
2 changed files with 10 additions and 0 deletions

View File

@ -40,10 +40,17 @@ static void mainboard_init(void *chip_info)
gpio_configure_pads_with_override(base_pads, base_num,
override_pads, override_num);
variant_devtree_update();
if (CONFIG(BOARD_GOOGLE_BASEBOARD_DEDEDE_CR50))
mainboard_update_soc_chip_config();
}
void __weak variant_devtree_update(void)
{
/* Override dev tree settings per board */
}
static void mainboard_dev_init(struct device *dev)
{
mainboard_ec_init();

View File

@ -39,4 +39,7 @@ bool variant_mem_is_half_populated(void);
/* Allow each variants to customize SMI sleep flow. */
void variant_smi_sleep(u8 slp_typ);
/* Modify devictree settings during ramstage. */
void variant_devtree_update(void);
#endif /*__BASEBOARD_VARIANTS_H__ */