From 4291c82ac0a27a803d3229114c56e5442bd0945c Mon Sep 17 00:00:00 2001 From: Aseda Aboagye Date: Thu, 17 Jun 2021 12:23:40 -0700 Subject: [PATCH] soc/intel/jasperlake: Add offsets for pad locking This commit simply adds the offset for the PADCFGLOCK register for the Intel Jasper Lake platform. This enables pads to be locked. BUG=b:191189275 BRANCH=None TEST=Enable pad locking on lalala by calling `gpio_lock_pad` and verify that the pad configuration is locked and cannot be manipulated from the OS. Signed-off-by: Aseda Aboagye Change-Id: Iccfe536b4a881f081f22bcc258a375caad3ffcb3 Reviewed-on: https://review.coreboot.org/c/coreboot/+/55648 Reviewed-by: Karthik Ramasubramanian Reviewed-by: Furquan Shaikh Tested-by: build bot (Jenkins) --- src/soc/intel/jasperlake/gpio.c | 1 + src/soc/intel/jasperlake/include/soc/gpio_defs.h | 1 + 2 files changed, 2 insertions(+) diff --git a/src/soc/intel/jasperlake/gpio.c b/src/soc/intel/jasperlake/gpio.c index 18405fc01a..391eaae3b5 100644 --- a/src/soc/intel/jasperlake/gpio.c +++ b/src/soc/intel/jasperlake/gpio.c @@ -70,6 +70,7 @@ static const struct pad_community jsl_communities[TOTAL_GPIO_COMM] = { .last_pad = GPIO_COM0_END, .num_gpi_regs = NUM_GPIO_COM0_GPI_REGS, .pad_cfg_base = PAD_CFG_BASE, + .pad_cfg_lock_offset = PAD_CFG_LOCK, .host_own_reg_0 = HOSTSW_OWN_REG_0, .gpi_int_sts_reg_0 = GPI_INT_STS_0, .gpi_int_en_reg_0 = GPI_INT_EN_0, diff --git a/src/soc/intel/jasperlake/include/soc/gpio_defs.h b/src/soc/intel/jasperlake/include/soc/gpio_defs.h index 5b3cc9d781..77fbf2c45c 100644 --- a/src/soc/intel/jasperlake/include/soc/gpio_defs.h +++ b/src/soc/intel/jasperlake/include/soc/gpio_defs.h @@ -255,5 +255,6 @@ #define GPI_SMI_STS_0 0x180 #define GPI_SMI_EN_0 0x1a0 #define PAD_CFG_BASE 0x600 +#define PAD_CFG_LOCK 0x80 #endif