From 4843ded47c3e72ee112a1ea79f03017f6999c1e1 Mon Sep 17 00:00:00 2001 From: Ritul Guru Date: Mon, 20 Feb 2023 00:45:11 +0530 Subject: soc/amd/phoenix: add VBIOS ID remapping for phoenix Phoenix2 VBIOS PCI DID is 15c8 though the VBIOS image uses a different PCI ID i.e. 0x1205, so we need to implement map_oprom_vendev for the SoC. Change-Id: I7eef5eb41b781f02abb9dd4098e92a8652a431f5 Signed-off-by: Ritul Guru Reviewed-on: https://review.coreboot.org/c/coreboot/+/73122 Tested-by: build bot (Jenkins) Reviewed-by: Felix Held Reviewed-by: Fred Reitberger --- src/soc/amd/phoenix/Makefile.inc | 1 + src/soc/amd/phoenix/graphics.c | 15 +++++++++++++++ src/soc/amd/phoenix/include/soc/cpu.h | 3 +++ 3 files changed, 19 insertions(+) create mode 100644 src/soc/amd/phoenix/graphics.c (limited to 'src/soc') diff --git a/src/soc/amd/phoenix/Makefile.inc b/src/soc/amd/phoenix/Makefile.inc index d5de67b21b..c1513765d3 100644 --- a/src/soc/amd/phoenix/Makefile.inc +++ b/src/soc/amd/phoenix/Makefile.inc @@ -36,6 +36,7 @@ ramstage-y += cpu.c ramstage-y += fch.c ramstage-y += fsp_s_params.c ramstage-y += gpio.c +ramstage-y += graphics.c ramstage-y += i2c.c ramstage-y += mca.c ramstage-y += root_complex.c diff --git a/src/soc/amd/phoenix/graphics.c b/src/soc/amd/phoenix/graphics.c new file mode 100644 index 0000000000..ee07229640 --- /dev/null +++ b/src/soc/amd/phoenix/graphics.c @@ -0,0 +1,15 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ + +#include +#include +#include + +u32 map_oprom_vendev(u32 vendev) +{ + switch (vendev) { + case PHOENIX2_VBIOS_VID_DID: + return PHOENIX2_GPU_VID_DID; + } + + return vendev; +} diff --git a/src/soc/amd/phoenix/include/soc/cpu.h b/src/soc/amd/phoenix/include/soc/cpu.h index 19e7a95529..8afa95c557 100644 --- a/src/soc/amd/phoenix/include/soc/cpu.h +++ b/src/soc/amd/phoenix/include/soc/cpu.h @@ -6,4 +6,7 @@ #define PHOENIX_A0_CPUID CPUID_FROM_FMS(0x19, 0x74, 0) #define PHOENIX2_A0_CPUID CPUID_FROM_FMS(0x19, 0x78, 0) +#define PHOENIX2_VBIOS_VID_DID 0x100215c8 +#define PHOENIX2_GPU_VID_DID 0x10021205 + #endif /* AMD_PHOENIX_CPU_H */ -- cgit v1.2.3