soc/intel/elkhartlake: Update GPIO communities
commit6e9d8067cab6fdbca64cc168996f2d4b869fd96d
authorTan, Lean Sheng <lean.sheng.tan@intel.com>
Fri, 11 Dec 2020 06:31:00 +0000 (10 22:31 -0800)
committerPatrick Georgi <pgeorgi@google.com>
Mon, 26 Apr 2021 08:32:13 +0000 (26 08:32 +0000)
tree7fae54f99e76e9bda3bddee4790bfe8c77a23e26
parent4874c6dff4beb85ceee8d9567c21bf82fc3c40b4
soc/intel/elkhartlake: Update GPIO communities

GPIOs are divided into different communities. Each community
consists of one or more GPIO groups. We need to configure the
groups in 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.

GPIO communities in coreboot should match with the kernel gpio
communities also. Kernel reads the ASL file from coreboot. This
patch adds the proper community mapping in ASL code to match with
kernel code. In gpio_soc_defs.c file we are indexing the groups
correctly. In gpio.h file we define all the gpio devices as kernel
populates sysfs with separate gpio device for each community. This
patch is created based on Intel EHL PCH Datasheet with Document
number 614109 and Chapter 21.

Also update GPIO COM3 Port ID and 2 GPIO register values
(HOSTSW_OWN_REG_0 & PAD_CFG_BASE) respectively.

Signed-off-by: Lean Sheng Tan <lean.sheng.tan@intel.com>
Change-Id: Ifc609b3d6ab9ea2b807dc0f178ec99f95d2db4cc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48555
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
src/soc/intel/elkhartlake/acpi/gpio.asl
src/soc/intel/elkhartlake/gpio.c
src/soc/intel/elkhartlake/include/soc/gpio.h
src/soc/intel/elkhartlake/include/soc/gpio_defs.h
src/soc/intel/elkhartlake/include/soc/gpio_soc_defs.h
src/soc/intel/elkhartlake/include/soc/pcr_ids.h