mb/google/guybrush: Change DDI settings for guybrush variants

Like the variant function to change DXIO settings, add a similar weak
function to modify the DDI settings.

Currently we follow the old way. Later we will find out a better way
to avoid using weak function.

Change-Id: I9898d717bc3025ea1ddc3b0db41325083324ed57
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61140
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Chris Wang <chris.wang@amd.corp-partner.google.com>
This commit is contained in:
Zheng Bao 2022-01-21 10:59:04 +08:00 committed by Felix Held
parent 426ea9670f
commit 0d7eaba0d6
2 changed files with 7 additions and 1 deletions

View File

@ -95,7 +95,7 @@ static fsp_dxio_descriptor guybrush_czn_dxio_descriptors[] = {
};
/* TODO: verify the DDI table, since this is mostly an educated guess right now */
static const fsp_ddi_descriptor guybrush_czn_ddi_descriptors[] = {
static fsp_ddi_descriptor guybrush_czn_ddi_descriptors[] = {
{ /* DDI0 - eDP */
.connector_type = DDI_EDP,
.aux_index = DDI_AUX1,
@ -127,6 +127,10 @@ void __weak variant_update_dxio_descriptors(fsp_dxio_descriptor *dxio_descriptor
{
}
void __weak variant_update_ddi_descriptors(fsp_ddi_descriptor *ddi_descriptors)
{
}
void mainboard_get_dxio_ddi_descriptors(
const fsp_dxio_descriptor **dxio_descs, size_t *dxio_num,
const fsp_ddi_descriptor **ddi_descs, size_t *ddi_num)
@ -143,6 +147,7 @@ void mainboard_get_dxio_ddi_descriptors(
guybrush_czn_dxio_descriptors[WWAN_NVME].gpio_group_id = GPIO_18;
variant_update_dxio_descriptors(guybrush_czn_dxio_descriptors);
variant_update_ddi_descriptors(guybrush_czn_ddi_descriptors);
*dxio_descs = guybrush_czn_dxio_descriptors;
*dxio_num = ARRAY_SIZE(guybrush_czn_dxio_descriptors);

View File

@ -49,6 +49,7 @@ const struct soc_amd_gpio *variant_tpm_gpio_table(size_t *size);
bool variant_has_pcie_wwan(void);
void variant_update_dxio_descriptors(fsp_dxio_descriptor *dxio_descriptors);
void variant_update_ddi_descriptors(fsp_ddi_descriptor *ddi_descriptors);
enum dxio_port_id {
WLAN,