summaryrefslogtreecommitdiffstats
path: root/src/soc/amd/cezanne
diff options
context:
space:
mode:
authorJan Dabros <jsd@semihalf.com>2022-02-04 10:40:37 +0100
committerFelix Held <felix-coreboot@felixheld.de>2022-02-17 23:14:02 +0000
commit282d715133ace7cf6bbf16e1ecb918c339340223 (patch)
tree13064f37b1c694d172bc83e9b95847d48c5f9c45 /src/soc/amd/cezanne
parentc17330c1dddbf8deb512d8d1eb13264b2936b77c (diff)
downloadcoreboot-282d715133ace7cf6bbf16e1ecb918c339340223.tar.gz
coreboot-282d715133ace7cf6bbf16e1ecb918c339340223.tar.bz2
coreboot-282d715133ace7cf6bbf16e1ecb918c339340223.zip
soc/amd/common/block/i2c: Add support for shared TPM_I2C controller
There are platforms equipped with AMD SoC where I2C3 controller connected to TPM device is shared between X86 and PSP. In order to handle this, PSP acts as an I2C-arbitrator, where x86 (kernel) sends acquire and release requests to be accepted by PSP. An example of implementation within Linux kernel is available [1]. There is a need to introduce new ACPI_ID ("AMDI0019") so that dedicated driver on OS side can bind to it and handle this special setup. Since PSP takes care of I2C controller power management, we need to remove PowerResource object from DSDT. BUG=b:204508404 BRANCH=guybrush [1]: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=78d5e9e299e31bc2deaaa94a45bf8ea024f27e8c Signed-off-by: Jan Dabros <jsd@semihalf.com> Change-Id: Iccfc09d8c580d7ab2acb69d26b9c293cf625fb34 Reviewed-on: https://review.coreboot.org/c/coreboot/+/61863 Reviewed-by: Raul Rangel <rrangel@chromium.org> Reviewed-by: Karthik Ramasubramanian <kramasub@google.com> Reviewed-by: Felix Held <felix-coreboot@felixheld.de> Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/soc/amd/cezanne')
-rw-r--r--src/soc/amd/cezanne/acpi/mmio.asl7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/soc/amd/cezanne/acpi/mmio.asl b/src/soc/amd/cezanne/acpi/mmio.asl
index 9e587b75f190..fa43db00b72f 100644
--- a/src/soc/amd/cezanne/acpi/mmio.asl
+++ b/src/soc/amd/cezanne/acpi/mmio.asl
@@ -232,7 +232,11 @@ Device (I2C2) {
Device (I2C3)
{
+#if CONFIG(SOC_AMD_COMMON_BLOCK_I2C3_TPM_SHARED_WITH_PSP)
+ Name (_HID, "AMDI0019")
+#else
Name (_HID, "AMDI0010")
+#endif
Name (_UID, 0x3)
Method (_CRS, 0) {
Local0 = ResourceTemplate() {
@@ -263,7 +267,10 @@ Device (I2C3)
Return (0x0F)
}
+/* If this device is shared with PSP, then PSP takes care of power management */
+#if !CONFIG(SOC_AMD_COMMON_BLOCK_I2C3_TPM_SHARED_WITH_PSP)
AOAC_DEVICE(FCH_AOAC_DEV_I2C3, 0)
+#endif
}
Device (MISC)