soc/amd/stoneyridge: Add selectable packages

The StoneyPI package supports Family 15h Models 60h-6Fh and 70h-7Fh
in FT4 and FP4 packages.  Add options for the packages.  The existing
convention of SOC_AMD_PRODUCTNAME_PKG will be phased out.

Change-Id: I60232ca099b813640742868db08aa66b32265f3b
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37218
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
diff --git a/src/soc/amd/stoneyridge/Kconfig b/src/soc/amd/stoneyridge/Kconfig
index cbf88df..c753ece 100644
--- a/src/soc/amd/stoneyridge/Kconfig
+++ b/src/soc/amd/stoneyridge/Kconfig
@@ -15,16 +15,19 @@
 
 config SOC_AMD_STONEYRIDGE_FP4
 	bool
+	select AMD_APU_PKG_FP4
 	help
 	  AMD Stoney Ridge FP4 support
 
 config SOC_AMD_STONEYRIDGE_FT4
 	bool
+	select AMD_APU_PKG_FT4
 	help
 	  AMD Stoney Ridge FT4 support
 
 config SOC_AMD_MERLINFALCON
 	bool
+	select AMD_APU_PKG_FP4
 	help
 	  AMD Merlin Falcon FP4 support
 
@@ -77,6 +80,21 @@
 	select SSE2
 	select RTC
 
+config AMD_APU_PKG_FP4
+	bool
+	help
+	  AMD FP4 package
+
+config AMD_APU_PKG_FT4
+	bool
+	help
+	  AMD FT4 package
+
+config AMD_SOC_PACKAGE
+	string
+	default "FP4" if AMD_APU_PKG_FP4
+	default "FT4" if AMD_APU_PKG_FT4
+
 config VBOOT
 	select VBOOT_SEPARATE_VERSTAGE
 	select VBOOT_STARTS_IN_BOOTBLOCK
diff --git a/src/vendorcode/amd/pi/Kconfig b/src/vendorcode/amd/pi/Kconfig
index 08e7cc6..0605563 100644
--- a/src/vendorcode/amd/pi/Kconfig
+++ b/src/vendorcode/amd/pi/Kconfig
@@ -44,10 +44,10 @@
 	string "AGESA PI binary file name"
 	default "3rdparty/blobs/pi/amd/00630F01/FP3/AGESA.bin" if CPU_AMD_PI_00630F01
 	default "3rdparty/blobs/pi/amd/00730F01/FT3b/AGESA.bin" if CPU_AMD_PI_00730F01
-	default "3rdparty/blobs/pi/amd/merlinfalcon/FP4/AGESA_CZ_FP4.bin" if SOC_AMD_MERLINFALCON && HAVE_MERLINFALCON_BINARIES
-	default "3rdparty/blobs/pi/amd/00670F00/FP4/AGESA.bin" if SOC_AMD_MERLINFALCON && !HAVE_MERLINFALCON_BINARIES
-	default "3rdparty/blobs/pi/amd/00670F00/FP4/AGESA.bin" if SOC_AMD_STONEYRIDGE_FP4
-	default "3rdparty/blobs/pi/amd/00670F00/FT4/AGESA.bin" if SOC_AMD_STONEYRIDGE_FT4
+	default "3rdparty/blobs/pi/amd/merlinfalcon/$(CONFIG_AMD_SOC_PACKAGE)/AGESA_CZ_FP4.bin" if SOC_AMD_MERLINFALCON && HAVE_MERLINFALCON_BINARIES
+	default "3rdparty/blobs/pi/amd/00670F00/$(CONFIG_AMD_SOC_PACKAGE)/AGESA.bin" if SOC_AMD_MERLINFALCON && !HAVE_MERLINFALCON_BINARIES
+	default "3rdparty/blobs/pi/amd/00670F00/$(CONFIG_AMD_SOC_PACKAGE)/AGESA.bin" if SOC_AMD_STONEYRIDGE_FP4
+	default "3rdparty/blobs/pi/amd/00670F00/$(CONFIG_AMD_SOC_PACKAGE)/AGESA.bin" if SOC_AMD_STONEYRIDGE_FT4
 	default "3rdparty/blobs/pi/amd/00660F01/FP4/AGESA.bin" if CPU_AMD_PI_00660F01
 	help
 	  Specify the binary file to use for AMD platform initialization.