mb/amd/bilby: Add support for HDMI display
DDI 0/1 ports are shared for DP and HDMI. This implementation adds support for HDMI display when HDMI is set as connector type in ddi descriptors. TEST=verify display over HDMI(0 and 1) in OS. Signed-off-by: Aamir Bohra <aamirbohra@gmail.com> Change-Id: I9697211c556f12d1fc0d49418b227fbe6b342673 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56756 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
This commit is contained in:
parent
9e34060d52
commit
9fe70ed197
|
@ -106,4 +106,36 @@ config EFS_SPI_MICRON_FLAG
|
|||
int
|
||||
default 0
|
||||
|
||||
choice
|
||||
prompt "DDI-0 connector type"
|
||||
default CONNECT_DP_ON_DDI_0
|
||||
|
||||
config CONNECT_HDMI_ON_DDI_0
|
||||
bool "Use HDMI interface"
|
||||
|
||||
config CONNECT_DP_ON_DDI_0
|
||||
bool "Use Displayport interface"
|
||||
endchoice
|
||||
|
||||
config DDI0_CONNECTOR_TYPE
|
||||
int
|
||||
default 0 if CONNECT_DP_ON_DDI_0
|
||||
default 4 if CONNECT_HDMI_ON_DDI_0
|
||||
|
||||
choice
|
||||
prompt "DDI-1 connector type"
|
||||
default CONNECT_DP_ON_DDI_1
|
||||
|
||||
config CONNECT_HDMI_ON_DDI_1
|
||||
bool "Use HDMI interface"
|
||||
|
||||
config CONNECT_DP_ON_DDI_1
|
||||
bool "Use Displayport interface"
|
||||
endchoice
|
||||
|
||||
config DDI1_CONNECTOR_TYPE
|
||||
int
|
||||
default 0 if CONNECT_DP_ON_DDI_1
|
||||
default 4 if CONNECT_HDMI_ON_DDI_1
|
||||
|
||||
endif # BOARD_AMD_BILBY
|
||||
|
|
|
@ -17,8 +17,6 @@ static const struct soc_amd_gpio gpio_set_stage_ram[] = {
|
|||
PAD_GPI(GPIO_11, PULL_UP),
|
||||
/* APU_ALS_INT# */
|
||||
PAD_SCI(GPIO_24, PULL_UP, EDGE_LOW),
|
||||
/* SD card detect */
|
||||
PAD_GPI(GPIO_31, PULL_UP),
|
||||
/* NFC IRQ */
|
||||
PAD_INT(GPIO_69, PULL_UP, EDGE_LOW, STATUS),
|
||||
};
|
||||
|
|
|
@ -5,13 +5,18 @@
|
|||
#include <acpi/acpi.h>
|
||||
#include <amdblocks/amd_pci_util.h>
|
||||
#include <FspsUpd.h>
|
||||
#include <gpio.h>
|
||||
#include <soc/cpu.h>
|
||||
#include <soc/southbridge.h>
|
||||
#include <soc/pci_devs.h>
|
||||
#include <soc/platform_descriptors.h>
|
||||
#include <types.h>
|
||||
#include <commonlib/helpers.h>
|
||||
#include <chip.h>
|
||||
#include "gpio.h"
|
||||
#include "mainboard.h"
|
||||
|
||||
#define MAINBOARD_SHARED_DDI_PORTS 2
|
||||
|
||||
/* TODO: recheck IRQ tables */
|
||||
|
||||
|
@ -79,6 +84,22 @@ static void pirq_setup(void)
|
|||
picr_data_ptr = fch_pic_routing;
|
||||
}
|
||||
|
||||
static void program_display_sel_gpios(void)
|
||||
{
|
||||
int idx, port_type;
|
||||
gpio_t display_sel[MAINBOARD_SHARED_DDI_PORTS] = {GPIO_29, GPIO_31};
|
||||
|
||||
for (idx = 0; idx < MAINBOARD_SHARED_DDI_PORTS; idx++) {
|
||||
port_type = get_ddi_port_conn_type(idx);
|
||||
|
||||
if (port_type == HDMI)
|
||||
gpio_output(display_sel[idx], 0);
|
||||
else if (port_type == DP)
|
||||
gpio_output(display_sel[idx], 1);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
static void mainboard_init(void *chip_info)
|
||||
{
|
||||
struct soc_amd_picasso_config *cfg = config_of_soc();
|
||||
|
@ -88,6 +109,8 @@ static void mainboard_init(void *chip_info)
|
|||
|
||||
mainboard_program_gpios();
|
||||
|
||||
program_display_sel_gpios();
|
||||
|
||||
/* Re-muxing LPCCLK0 can hang the system if LPC is in use. */
|
||||
if (CONFIG(BILBY_LPC))
|
||||
printk(BIOS_INFO, "eMMC not available due to LPC requirement\n");
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
/* SPDX-License-Identifier: GPL-2.0-only */
|
||||
|
||||
int get_ddi_port_conn_type(uint8_t port_num);
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
#include <soc/platform_descriptors.h>
|
||||
#include <types.h>
|
||||
#include "mainboard.h"
|
||||
|
||||
static const fsp_dxio_descriptor pco_dxio_descriptors[] = {
|
||||
{ /* MXM - Entry 0 */
|
||||
|
@ -47,12 +48,12 @@ static const fsp_dxio_descriptor pco_dxio_descriptors[] = {
|
|||
|
||||
static const fsp_ddi_descriptor pco_ddi_descriptors[] = {
|
||||
{ /* DDI0 - DP */
|
||||
.connector_type = DP,
|
||||
.connector_type = CONFIG_DDI0_CONNECTOR_TYPE,
|
||||
.aux_index = AUX1,
|
||||
.hdp_index = HDP1
|
||||
},
|
||||
{ /* DDI1 - DP */
|
||||
.connector_type = DP,
|
||||
.connector_type = CONFIG_DDI1_CONNECTOR_TYPE,
|
||||
.aux_index = AUX2,
|
||||
.hdp_index = HDP2
|
||||
},
|
||||
|
@ -68,6 +69,11 @@ static const fsp_ddi_descriptor pco_ddi_descriptors[] = {
|
|||
}
|
||||
};
|
||||
|
||||
int get_ddi_port_conn_type(uint8_t port_num)
|
||||
{
|
||||
return pco_ddi_descriptors[port_num].connector_type;
|
||||
}
|
||||
|
||||
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)
|
||||
|
|
Loading…
Reference in New Issue