summaryrefslogtreecommitdiffstats
path: root/util/ifdtool
diff options
context:
space:
mode:
authorSubrata Banik <subratabanik@google.com>2023-05-24 23:18:49 +0530
committerSubrata Banik <subratabanik@google.com>2023-05-27 04:01:45 +0000
commit9cd85d08590e288d87e8bcd15b5e17faf0aa4ded (patch)
tree4601d75472242c56a7e864eec1ad9d55a0c194b8 /util/ifdtool
parent3ca998131f2b638d9262e6d0a4ff3d7143456d9e (diff)
downloadcoreboot-9cd85d08590e288d87e8bcd15b5e17faf0aa4ded.tar.gz
coreboot-9cd85d08590e288d87e8bcd15b5e17faf0aa4ded.tar.bz2
coreboot-9cd85d08590e288d87e8bcd15b5e17faf0aa4ded.zip
util/ifdtool: Add support for Intel 800 series chipset
This commit adds support for Intel 800 series chipset. The new chipset can be uniquely identified by its SPI speed, eSPI speed, and chipset name. This commit message is clear and concise, and it accurately describes the changes that were made to the code. It also includes the following information: - Specify the correct chipset name. "PCH Revision: 800 series Meteor Lake" - Show the valid eSPI/EC frequency. "Read eSPI/EC Bus Frequency: 20MHz" Signed-off-by: Subrata Banik <subratabanik@google.com> Change-Id: I70619d9e3ed2bcad86f84a0527e3a0ad13acd706 Reviewed-on: https://review.coreboot.org/c/coreboot/+/75433 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com> Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Diffstat (limited to 'util/ifdtool')
-rw-r--r--util/ifdtool/ifdtool.c42
-rw-r--r--util/ifdtool/ifdtool.h8
2 files changed, 45 insertions, 5 deletions
diff --git a/util/ifdtool/ifdtool.c b/util/ifdtool/ifdtool.c
index ada120b0017a..ddbc0fb91b2a 100644
--- a/util/ifdtool/ifdtool.c
+++ b/util/ifdtool/ifdtool.c
@@ -95,6 +95,7 @@ static const char *const ich_chipset_names[] = {
"300 series Cannon Point",
"400 series Ice Point",
"500 series Tiger Point/ 600 series Alder Point",
+ "800 series Meteor Lake",
"C620 series Lewisburg",
"Denverton: C39xx",
NULL
@@ -241,8 +242,9 @@ static enum ich_chipset ifd2_platform_to_chipset(const int pindex)
case PLATFORM_TGL:
case PLATFORM_ADL:
case PLATFORM_IFD2:
- case PLATFORM_MTL:
return CHIPSET_500_600_SERIES_TIGER_ALDER_POINT;
+ case PLATFORM_MTL:
+ return CHIPSET_800_SERIES_METEOR_LAKE;
case PLATFORM_ICL:
return CHIPSET_400_SERIES_ICE_POINT;
case PLATFORM_LBG:
@@ -531,10 +533,14 @@ static void _decode_spi_frequency_500_series(unsigned int freq)
static void decode_spi_frequency(unsigned int freq)
{
- if (chipset == CHIPSET_500_600_SERIES_TIGER_ALDER_POINT)
+ switch (chipset) {
+ case CHIPSET_500_600_SERIES_TIGER_ALDER_POINT:
+ case CHIPSET_800_SERIES_METEOR_LAKE:
_decode_spi_frequency_500_series(freq);
- else
+ break;
+ default:
_decode_spi_frequency(freq);
+ }
}
static void _decode_espi_frequency(unsigned int freq)
@@ -586,10 +592,32 @@ static void _decode_espi_frequency_500_series(unsigned int freq)
}
}
+static void _decode_espi_frequency_800_series(unsigned int freq)
+{
+ switch (freq) {
+ case ESPI_FREQUENCY_800SERIES_20MHZ:
+ printf("20MHz");
+ break;
+ case ESPI_FREQUENCY_800SERIES_25MHZ:
+ printf("25MHz");
+ break;
+ case ESPI_FREQUENCY_800SERIES_33MHZ:
+ printf("33MHz");
+ break;
+ case ESPI_FREQUENCY_800SERIES_50MHZ:
+ printf("50MHz");
+ break;
+ default:
+ printf("unknown<%x>MHz", freq);
+ }
+}
+
static void decode_espi_frequency(unsigned int freq)
{
if (chipset == CHIPSET_500_600_SERIES_TIGER_ALDER_POINT)
_decode_espi_frequency_500_series(freq);
+ else if (chipset == CHIPSET_800_SERIES_METEOR_LAKE)
+ _decode_espi_frequency_800_series(freq);
else
_decode_espi_frequency(freq);
}
@@ -641,7 +669,7 @@ static int is_platform_with_pch(void)
static int is_platform_with_100x_series_pch(void)
{
if (chipset >= CHIPSET_100_200_SERIES_SUNRISE_POINT &&
- chipset <= CHIPSET_500_600_SERIES_TIGER_ALDER_POINT)
+ chipset <= CHIPSET_800_SERIES_METEOR_LAKE)
return 1;
return 0;
@@ -668,6 +696,8 @@ static void dump_fcba(const struct fcba *fcba, const struct fpsba *fpsba)
printf("\n Read eSPI/EC Bus Frequency: ");
if (chipset == CHIPSET_500_600_SERIES_TIGER_ALDER_POINT)
freq = (fpsba->pchstrp[22] & 0x38) >> 3;
+ else if (chipset == CHIPSET_800_SERIES_METEOR_LAKE)
+ freq = (fpsba->pchstrp[65] & 0x38) >> 3;
else
freq = (fcba->flcomp >> 17) & 7;
decode_espi_frequency(freq);
@@ -964,7 +994,8 @@ static void dump_fd(char *image, int size)
printf(" FMSBA: 0x%x\n", ((fdb->flmap2) & 0xff) << 4);
}
- if (chipset == CHIPSET_500_600_SERIES_TIGER_ALDER_POINT) {
+ if (chipset == CHIPSET_500_600_SERIES_TIGER_ALDER_POINT ||
+ chipset == CHIPSET_800_SERIES_METEOR_LAKE) {
printf("FLMAP3: 0x%08x\n", fdb->flmap3);
printf(" Minor Revision ID: 0x%04x\n", (fdb->flmap3 >> 14) & 0x7f);
printf(" Major Revision ID: 0x%04x\n", (fdb->flmap3 >> 21) & 0x7ff);
@@ -1810,6 +1841,7 @@ static void print_usage(const char *name)
" icl - Ice Lake\n"
" ifd2 - IFDv2 Platform\n"
" jsl - Jasper Lake\n"
+ " mtl - Meteor Lake\n"
" sklkbl - Sky Lake/Kaby Lake\n"
" tgl - Tiger Lake\n"
" wbg - Wellsburg\n"
diff --git a/util/ifdtool/ifdtool.h b/util/ifdtool/ifdtool.h
index 5717a0a87a04..219634b21d3a 100644
--- a/util/ifdtool/ifdtool.h
+++ b/util/ifdtool/ifdtool.h
@@ -38,6 +38,7 @@ enum ich_chipset {
CHIPSET_400_SERIES_ICE_POINT, /* 10th gen Core i/o (LP) variants */
CHIPSET_500_600_SERIES_TIGER_ALDER_POINT, /* 11th-12th gen Core i/o (LP)
* variants onwards */
+ CHIPSET_800_SERIES_METEOR_LAKE, /* 14th gen Core i/o (LP) variants onwards */
CHIPSET_C620_SERIES_LEWISBURG,
CHIPSET_DENVERTON,
};
@@ -94,6 +95,13 @@ enum espi_frequency_500_series {
ESPI_FREQUENCY_500SERIES_60MHZ = 4,
};
+enum espi_frequency_800_series {
+ ESPI_FREQUENCY_800SERIES_20MHZ = 0,
+ ESPI_FREQUENCY_800SERIES_25MHZ = 1,
+ ESPI_FREQUENCY_800SERIES_33MHZ = 2,
+ ESPI_FREQUENCY_800SERIES_50MHZ = 4,
+};
+
enum component_density {
COMPONENT_DENSITY_512KB = 0,
COMPONENT_DENSITY_1MB = 1,