From c4a46b7340d0014e2e69dfaa3af55a81fa13877f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20=C5=BBygowski?= Date: Mon, 31 Mar 2025 15:39:31 +0200 Subject: [PATCH] soc/intel/elkhartlake/pmc,gpio: Fix PMC GPE GPIO routes MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Based on the description of PMC GPIO_CONF register from EHL EDS Vol 2 Book 2 rev 2.3 #614109. Some of the groups had incorrect values or even defined non-existent GPIO groups. TEST=Boot Protectli VP2420 to Ubuntu 24.04. Change-Id: I910f3c4c0d31b8d24b83cd2c3a28688b898b5d9f Signed-off-by: Michał Żygowski Reviewed-on: https://review.coreboot.org/c/coreboot/+/87050 Reviewed-by: Matt DeVillier Reviewed-by: Martin L Roth Tested-by: build bot (Jenkins) Reviewed-by: Jérémy Compostella --- src/soc/intel/elkhartlake/gpio.c | 1 - src/soc/intel/elkhartlake/include/soc/gpio_soc_defs.h | 11 +++++------ src/soc/intel/elkhartlake/include/soc/pmc.h | 11 +++++------ 3 files changed, 10 insertions(+), 13 deletions(-) diff --git a/src/soc/intel/elkhartlake/gpio.c b/src/soc/intel/elkhartlake/gpio.c index 1b07bc5d27..795763ed00 100644 --- a/src/soc/intel/elkhartlake/gpio.c +++ b/src/soc/intel/elkhartlake/gpio.c @@ -226,7 +226,6 @@ const struct pmc_to_gpio_route *soc_pmc_gpio_routes(size_t *num) { PMC_GPP_C, GPP_C }, { PMC_GPP_E, GPP_E }, { PMC_GPP_G, GPP_G }, - { PMC_GPP_S, GPP_S } }; *num = ARRAY_SIZE(routes); diff --git a/src/soc/intel/elkhartlake/include/soc/gpio_soc_defs.h b/src/soc/intel/elkhartlake/include/soc/gpio_soc_defs.h index 33fcb6bfb7..0aefe96520 100644 --- a/src/soc/intel/elkhartlake/include/soc/gpio_soc_defs.h +++ b/src/soc/intel/elkhartlake/include/soc/gpio_soc_defs.h @@ -10,19 +10,18 @@ */ #define GPP_B 0x0 #define GPP_T 0x1 -#define GPP_D 0x2 -#define GPP_A 0x3 -#define GPP_R 0x4 +#define GPP_A 0x2 +#define GPP_R 0x3 +#define GPD 0x4 #define GPP_V 0x5 -#define GPD 0x6 -#define GPP_H 0x7 +#define GPP_H 0x6 +#define GPP_D 0x7 #define GPP_U 0x8 #define VGPIO 0x9 #define GPP_F 0xA #define GPP_C 0xB #define GPP_E 0xC #define GPP_G 0xD -#define GPP_S 0xE #define GPIO_NUM_GROUPS 15 #define GPIO_MAX_NUM_PER_GROUP 32 diff --git a/src/soc/intel/elkhartlake/include/soc/pmc.h b/src/soc/intel/elkhartlake/include/soc/pmc.h index 1c8cb1a674..a20d6fef9a 100644 --- a/src/soc/intel/elkhartlake/include/soc/pmc.h +++ b/src/soc/intel/elkhartlake/include/soc/pmc.h @@ -105,19 +105,18 @@ #define PMC_GPP_B 0x0 #define PMC_GPP_T 0x1 -#define PMC_GPP_D 0x2 -#define PMC_GPP_A 0x3 -#define PMC_GPP_R 0x4 +#define PMC_GPP_A 0x2 +#define PMC_GPP_R 0x3 +#define PMC_GPD 0x4 #define PMC_GPP_V 0x5 -#define PMC_GPD 0x6 -#define PMC_GPP_H 0x7 +#define PMC_GPP_H 0x6 +#define PMC_GPP_D 0x7 #define PMC_GPP_U 0x8 #define PMC_VGPIO 0x9 #define PMC_GPP_F 0xA #define PMC_GPP_C 0xB #define PMC_GPP_E 0xC #define PMC_GPP_G 0xD -#define PMC_GPP_S 0xE #define GBLRST_CAUSE0 0x1924 #define GBLRST_CAUSE0_THERMTRIP (1 << 5)