soc/amd/phoenix/chip.h: add DDI configuration for openSIL

In the FSP case, the DDI descriptors aren't part of the devicetree and
are instead retrieved in romstage by calling the mainboard's
mainboard_get_dxio_ddi_descriptors function which allows updating the
descriptors during romstage where the devicetree is static. In the
openSIL case, the DDI configuration is first needed in ramstage, so we
can put this info into the devicetree and update it if needed in
ramstage.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3de12ff6af42e38751a3016efa313613677fa87a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82580
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
This commit is contained in:
Felix Held 2024-05-17 21:43:56 +02:00
parent abcbd5b998
commit 27cb75a075
2 changed files with 36 additions and 0 deletions

View File

@ -15,6 +15,8 @@
#include <types.h>
#if CONFIG(PLATFORM_USES_FSP2_0)
#include <vendorcode/amd/fsp/phoenix/FspUsb.h>
#else
#include "chip_opensil.h"
#endif
struct soc_amd_phoenix_config {
@ -108,6 +110,8 @@ struct soc_amd_phoenix_config {
#if CONFIG(PLATFORM_USES_FSP2_0)
uint8_t usb_phy_custom;
struct usb_phy_config usb_phy;
#else
struct ddi_descriptor ddi[DDI_DESCRIPTOR_COUNT];
#endif
};

View File

@ -0,0 +1,32 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <types.h>
#define DDI_DESCRIPTOR_COUNT 5
/* DDI display connector type */
enum ddi_connector_type {
DDI_DP = 0, // DP
DDI_EDP, // eDP
DDI_SINGLE_LINK_DVI, // Single Link DVI-D
DDI_DUAL_LINK_DVI, // Dual Link DVI-D
DDI_HDMI, // HDMI
DDI_DP_TO_VGA, // DP-to-VGA
DDI_DP_TO_LVDS, // DP-to-LVDS
DDI_NUTMEG_DP_TO_VGA, // Hudson-2 NutMeg DP-to-VGA
DDI_SINGLE_LINK_DVI_I, // Single Link DVI-I
DDI_DP_W_TYPEC, // DP with USB type C
DDI_DP_WO_TYPEC, // DP without USB type C
DDI_EDP_TO_LVDS, // eDP-to-LVDS translator chip without AMD SW init
DDI_EDP_TO_LVDS_SW, // eDP-to-LVDS translator which requires AMD SW init
DDI_AUTO_DETECT, // VBIOS auto detect connector type
DDI_UNUSED_TYPE, // UnusedType
DDI_MAX_CONNECTOR_TYPE // Not valid value, used to verify input
};
/* DDI Descriptor: used for configuring display outputs */
struct ddi_descriptor {
uint8_t connector_type; // see ddi_connector_type
uint8_t aux_index;
uint8_t hdp_index;
};