aboutsummaryrefslogtreecommitdiff
path: root/src/soc/intel/cannonlake/gpio_cnp_h.c
diff options
context:
space:
mode:
authorDuncan Laurie <dlaurie@google.com>2018-12-10 11:27:47 -0800
committerDuncan Laurie <dlaurie@chromium.org>2018-12-14 18:30:46 +0000
commit64c9f1584c63403207ee85b1d54ca594ae1fbedf (patch)
tree0d8e1cdccc7837dc85fae9aa4dc7af7cba0bff1c /src/soc/intel/cannonlake/gpio_cnp_h.c
parent6217e9beff16d805ca833e79a2931bcdb3d02a44 (diff)
soc/intel/cannonlake: Add GPIO group pad base for ACPI
The GPIO drivers in Windows and Linux for the Cannonlake CPU have a sparse GPIO map and do not allocate pins contiguously. Each GPIO group is allocated as 32 pads regardless of whether the hardware actually has that many in the group. It appears this originated with a bug in Windows/UEFI and was carried over to Linux in order to work with existing firmware: https://lore.kernel.org/patchwork/patch/855244/ In order to support using ACPI GPIOs it is necessary for coreboot to be compatible with this implementation. The GPIO groups that are usable by the OS are declared with a pad base which is then used to compute the number for ACPI GPIOs. BUG=b:120686247 TEST=tested with write protect GPIO on sarien board. Before this change the ACPI pin number was 220 which did not correspond to the pin number in Linux. After this change the ACPI number is 303, which maps to the correct GPIO in Linux. Now the GPIO value reported by the kernel changes when the WP pin is toggled in hardware. Change-Id: I4f1a9e118d7e48f2445ccbb62a12a22e9a832c51 Signed-off-by: Duncan Laurie <dlaurie@google.com> Reviewed-on: https://review.coreboot.org/c/30133 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Diffstat (limited to 'src/soc/intel/cannonlake/gpio_cnp_h.c')
0 files changed, 0 insertions, 0 deletions