From 467eb569c05e67c7e723466fa7c8e46a2046c07a Mon Sep 17 00:00:00 2001 From: Felix Held Date: Wed, 28 Jul 2021 14:08:07 +0200 Subject: soc/amd/common/block/acpimmio: add remote GPIO bank ACPIMMIO region Currently coreboot for the AMD SOCs only supports accessing the up to 4 main GPIO banks of up to 64 GPIOs each. Some AMD SoCs including Cezanne have another GPIO bank in the ACPIMMIO region that can contain up to 48 GPIOs beginning with GPIO 256 which is called the remote GPIO bank. The first 48 DWORDs of that ACPIMMIO bank are the 32 bit wide GPIO registers and beginning at offset 0xc0 it has the corresponding 8 bit wide GPIO MUX registers. BUG=b:194524995 Signed-off-by: Felix Held Change-Id: Ice4e3358de17ac2601621814978cdb70e6f2c926 Reviewed-on: https://review.coreboot.org/c/coreboot/+/56676 Tested-by: build bot (Jenkins) Reviewed-by: Martin Roth --- src/soc/amd/common/block/acpimmio/mmio_util.c | 1 + src/soc/amd/common/block/include/amdblocks/acpimmio.h | 1 + src/soc/amd/common/block/include/amdblocks/acpimmio_map.h | 4 ++++ 3 files changed, 6 insertions(+) (limited to 'src') diff --git a/src/soc/amd/common/block/acpimmio/mmio_util.c b/src/soc/amd/common/block/acpimmio/mmio_util.c index c0b29fa992..2b8304c1ae 100644 --- a/src/soc/amd/common/block/acpimmio/mmio_util.c +++ b/src/soc/amd/common/block/acpimmio/mmio_util.c @@ -34,6 +34,7 @@ DECLARE_ACPIMMIO(acpimmio_asf, ASF); DECLARE_ACPIMMIO(acpimmio_smbus, SMBUS); DECLARE_ACPIMMIO(acpimmio_wdt, WDT); DECLARE_ACPIMMIO(acpimmio_hpet, HPET); +DECLARE_ACPIMMIO(acpimmio_remote_gpio, REMOTE_GPIO); DECLARE_ACPIMMIO(acpimmio_dpvga, DPVGA); DECLARE_ACPIMMIO(acpimmio_xhci_pm, XHCIPM); DECLARE_ACPIMMIO(acpimmio_acdc_tmr, ACDCTMR); diff --git a/src/soc/amd/common/block/include/amdblocks/acpimmio.h b/src/soc/amd/common/block/include/amdblocks/acpimmio.h index c9d709b9a3..ae8673045d 100644 --- a/src/soc/amd/common/block/include/amdblocks/acpimmio.h +++ b/src/soc/amd/common/block/include/amdblocks/acpimmio.h @@ -70,6 +70,7 @@ extern uint8_t *MAYBE_CONST acpimmio_wdt; extern uint8_t *MAYBE_CONST acpimmio_hpet; extern uint8_t *MAYBE_CONST acpimmio_iomux; extern uint8_t *MAYBE_CONST acpimmio_misc; +extern uint8_t *MAYBE_CONST acpimmio_remote_gpio; extern uint8_t *MAYBE_CONST acpimmio_dpvga; extern uint8_t *MAYBE_CONST acpimmio_gpio0; extern uint8_t *MAYBE_CONST acpimmio_xhci_pm; diff --git a/src/soc/amd/common/block/include/amdblocks/acpimmio_map.h b/src/soc/amd/common/block/include/amdblocks/acpimmio_map.h index 7081dbb20d..f96c5cd264 100644 --- a/src/soc/amd/common/block/include/amdblocks/acpimmio_map.h +++ b/src/soc/amd/common/block/include/amdblocks/acpimmio_map.h @@ -62,6 +62,9 @@ * +---------------------------------------------------------------------------+ * |0x1000 Serial debug bus | * +---------------------------------------------------------------------------+ + * |0x1200 remote GPIO configuration registers | + * | * contains both GPIO and MUX registers | + * +---------------------------------------------------------------------------+ * |0x1400 DP-VGA | * +---------------------------------------------------------------------------+ * |0x1500 GPIO configuration registers bank 0 | @@ -117,6 +120,7 @@ #define ACPIMMIO_HPET_BANK 0x0c00 #define ACPIMMIO_IOMUX_BANK 0x0d00 #define ACPIMMIO_MISC_BANK 0x0e00 +#define ACPIMMIO_REMOTE_GPIO_BANK 0x1200 #define ACPIMMIO_DPVGA_BANK 0x1400 #define ACPIMMIO_GPIO0_BANK 0x1500 #define ACPIMMIO_XHCIPM_BANK 0x1c00 -- cgit v1.2.3