mb/amd/majolica: Add variant to disable HDMI

For one specific type of APU, it doesn't have HDMI. When we detect
this APU, we need to explicitly disable HDMI in DDI settings,
otherwise the system would freeze.

Please refer
 src/mainboard/google/guybrush/variants/dewatt/variant.c

Change-Id: I8d7637467d2f16377d3c3064cdb0934d1658fdf7
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61361
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
Zheng Bao 2022-01-25 11:40:18 +08:00 committed by Felix Held
parent ce7ec14f36
commit b4cdfb5128
1 changed files with 5 additions and 1 deletions

View File

@ -3,6 +3,7 @@
#include <soc/gpio.h> #include <soc/gpio.h>
#include <soc/platform_descriptors.h> #include <soc/platform_descriptors.h>
#include <types.h> #include <types.h>
#include <amdblocks/cpu.h>
static const fsp_dxio_descriptor majolica_czn_dxio_descriptors[] = { static const fsp_dxio_descriptor majolica_czn_dxio_descriptors[] = {
{ /* MXM */ { /* MXM */
@ -92,7 +93,7 @@ static const fsp_dxio_descriptor majolica_czn_dxio_descriptors[] = {
} }
}; };
static const fsp_ddi_descriptor majolica_czn_ddi_descriptors[] = { static fsp_ddi_descriptor majolica_czn_ddi_descriptors[] = {
{ /* DDI0 - DP */ { /* DDI0 - DP */
.connector_type = DDI_DP, .connector_type = DDI_DP,
.aux_index = DDI_AUX1, .aux_index = DDI_AUX1,
@ -124,6 +125,9 @@ void mainboard_get_dxio_ddi_descriptors(
const fsp_dxio_descriptor **dxio_descs, size_t *dxio_num, const fsp_dxio_descriptor **dxio_descs, size_t *dxio_num,
const fsp_ddi_descriptor **ddi_descs, size_t *ddi_num) const fsp_ddi_descriptor **ddi_descs, size_t *ddi_num)
{ {
if ((get_cpu_count() == 4 && get_threads_per_core() == 2) || get_cpu_count() == 2)
majolica_czn_ddi_descriptors[1].connector_type = DDI_UNUSED_TYPE;
*dxio_descs = majolica_czn_dxio_descriptors; *dxio_descs = majolica_czn_dxio_descriptors;
*dxio_num = ARRAY_SIZE(majolica_czn_dxio_descriptors); *dxio_num = ARRAY_SIZE(majolica_czn_dxio_descriptors);
*ddi_descs = majolica_czn_ddi_descriptors; *ddi_descs = majolica_czn_ddi_descriptors;