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>
This commit is contained in:
parent
c17330c1dd
commit
282d715133
|
@ -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)
|
||||
|
|
|
@ -14,3 +14,13 @@ config SOC_AMD_COMMON_BLOCK_I23C_PAD_CTRL
|
|||
help
|
||||
Select this option to add FCH I2C/I3C pad configuration functions to
|
||||
the build.
|
||||
|
||||
config SOC_AMD_COMMON_BLOCK_I2C3_TPM_SHARED_WITH_PSP
|
||||
bool
|
||||
depends on !SOC_AMD_PICASSO && !SOC_AMD_STONEYRIDGE
|
||||
default n
|
||||
help
|
||||
Enable PSP I2C arbitration if there is I2C3 controller with TPM device
|
||||
connected, which is shared between x86 and PSP. This is necessary to
|
||||
ensure proper communication with I2C peripherals connected to such
|
||||
bus.
|
||||
|
|
Loading…
Reference in New Issue