diff options
author | Felix Held <felix-coreboot@felixheld.de> | 2024-05-17 21:43:56 +0200 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-05-22 15:45:17 +0000 |
commit | 27cb75a075c39d43bcaecc95fe05d492fe2f896f (patch) | |
tree | 7bd23d7d4d8e0e970ffd238943e40481c9bfa593 /src/soc/amd/phoenix | |
parent | abcbd5b998b4a9f5f27c356655f439e817f3bcc5 (diff) |
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>
Diffstat (limited to 'src/soc/amd/phoenix')
-rw-r--r-- | src/soc/amd/phoenix/chip.h | 4 | ||||
-rw-r--r-- | src/soc/amd/phoenix/chip_opensil.h | 32 |
2 files changed, 36 insertions, 0 deletions
diff --git a/src/soc/amd/phoenix/chip.h b/src/soc/amd/phoenix/chip.h index e3cadc24a3..0fccb53824 100644 --- a/src/soc/amd/phoenix/chip.h +++ b/src/soc/amd/phoenix/chip.h @@ -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 }; diff --git a/src/soc/amd/phoenix/chip_opensil.h b/src/soc/amd/phoenix/chip_opensil.h new file mode 100644 index 0000000000..fcaa85c5e3 --- /dev/null +++ b/src/soc/amd/phoenix/chip_opensil.h @@ -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; +}; |