summaryrefslogtreecommitdiffstats
path: root/src/soc/intel/tigerlake/gpio.c
diff options
context:
space:
mode:
authorRavi Sarawadi <ravishankar.sarawadi@intel.com>2019-12-17 00:07:33 -0800
committerPatrick Georgi <pgeorgi@google.com>2020-01-22 15:42:44 +0000
commit9d678f2e56ece95bd9289ad05ec8670d6329ff16 (patch)
tree202fa3bd775b55a216c5819c7254225070e10007 /src/soc/intel/tigerlake/gpio.c
parent26136092c01b8d29fde68058597b74923c21a41f (diff)
downloadcoreboot-9d678f2e56ece95bd9289ad05ec8670d6329ff16.tar.gz
coreboot-9d678f2e56ece95bd9289ad05ec8670d6329ff16.tar.bz2
coreboot-9d678f2e56ece95bd9289ad05ec8670d6329ff16.zip
soc/intel/tigerlake: Update GPIO config
GPIOs are divided into different communities. Each community consists of one or more GPIO groups. We need to configure the groups from coreboot so that they are mapped properly. GPIO communities should be properly configured in GPIO_CFG and MISCCFG registers. GPP_* defines in gpio_soc_defs.h are configured in GPIO_CFG register while the PMC_GPP_* in pmc.h are used to configure the MISCCFG registers. BUG=b:144680462 BRANCH=none TEST=Build and boot tigerlake rvp board. Verified that after setting the gpe from devicetree the GPP_EN register for that community gets updated setting that specific bit. From the iotools i checked that GPE_EN register for that community is updated with that specific bit set to 1. Signed-off-by: Ravi Sarawadi <ravishankar.sarawadi@intel.com> Change-Id: I585100375feee39b5a9105bdf6d9f5ca3a5bb2fa Reviewed-on: https://review.coreboot.org/c/coreboot/+/37427 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Diffstat (limited to 'src/soc/intel/tigerlake/gpio.c')
-rw-r--r--src/soc/intel/tigerlake/gpio.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/soc/intel/tigerlake/gpio.c b/src/soc/intel/tigerlake/gpio.c
index 4a5880b82497..18b90702c15a 100644
--- a/src/soc/intel/tigerlake/gpio.c
+++ b/src/soc/intel/tigerlake/gpio.c
@@ -1,7 +1,7 @@
/*
* This file is part of the coreboot project.
*
- * Copyright (C) 2019 Intel Corp.
+ * Copyright (C) 2020 Intel Corp.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -194,18 +194,18 @@ const struct pad_community *soc_gpio_get_community(size_t *num_communities)
const struct pmc_to_gpio_route *soc_pmc_gpio_routes(size_t *num)
{
static const struct pmc_to_gpio_route routes[] = {
- { PMC_GPP_G, GPP_G },
{ PMC_GPP_B, GPP_B },
+ { PMC_GPP_T, GPP_T },
{ PMC_GPP_A, GPP_A },
+ { PMC_GPP_R, GPP_R },
+ { PMC_GPD, GPD },
+ { PMC_GPP_S, GPP_S },
{ PMC_GPP_H, GPP_H },
{ PMC_GPP_D, GPP_D },
+ { PMC_GPP_U, GPP_U },
{ PMC_GPP_F, GPP_F },
- { PMC_GPD, GPD },
{ PMC_GPP_C, GPP_C },
{ PMC_GPP_E, GPP_E },
- { PMC_GPP_R, GPP_R },
- { PMC_GPP_S, GPP_S }
-
};
*num = ARRAY_SIZE(routes);
return routes;