From d866e72b3a17be70efbb7778a977550a7a857a12 Mon Sep 17 00:00:00 2001 From: Ivy Jian Date: Mon, 7 Jul 2025 09:55:45 +0800 Subject: [PATCH] mb/google/fatcat/var/kinmen: Set CRFP to use GPIO for status Set the CRFP device to use GPIO for the power status. This causes an ACPI `_STA()` function to be generated that returns the power status of the CRFP device, rather than always returning `0x1`. This `_STA()` function can be used during boot to skip enabling the device (and performing the associated sleep) if the device is already powered on. BUG=b:428793056 TEST=Boot the board and make sure the FPMCU was booted once (e.g. examine FPMCU console logs) TEST=Dump SSDT on kinmen Scope (\_SB.PCI0.SPI0) { Device (CRFP) { ... ... PowerResource (PR00, 0x00, 0x0000) { Method (_STA, 0, Serialized) // _STA: Status { 0x5D = \_SB.PCI0.GTXS /* External reference */ Local0 If (!Local0) { Return (Zero) } 0x27 = \_SB.PCI0.GTXS /* External reference */ Local0 Local0 ^= One If (Local0) { Return (Zero) } Return (One) } Method (_ON, 0, Serialized) // _ON_: Power On { Local0 = _STA () If ((Local0 == One)) { Return (Zero) } \_SB.PCI0.CTXS (0x27) \_SB.PCI0.STXS (0x5D) Sleep (0x03) \_SB.PCI0.STXS (0x27) } Method (_OFF, 0, Serialized) // _OFF: Power Off { \_SB.PCI0.CTXS (0x27) \_SB.PCI0.CTXS (0x5D) } } } } Change-Id: Ia3054c61dfab185d124b3aae8df9e80aa6afc71a Signed-off-by: Ivy Jian Reviewed-on: https://review.coreboot.org/c/coreboot/+/88338 Reviewed-by: Subrata Banik Tested-by: build bot (Jenkins) --- src/mainboard/google/fatcat/variants/kinmen/overridetree.cb | 1 + 1 file changed, 1 insertion(+) diff --git a/src/mainboard/google/fatcat/variants/kinmen/overridetree.cb b/src/mainboard/google/fatcat/variants/kinmen/overridetree.cb index 1944d148a5..ac48600b97 100644 --- a/src/mainboard/google/fatcat/variants/kinmen/overridetree.cb +++ b/src/mainboard/google/fatcat/variants/kinmen/overridetree.cb @@ -269,6 +269,7 @@ chip soc/intel/pantherlake register "irq" = "ACPI_IRQ_WAKE_LEVEL_LOW(GPP_E22_IRQ)" register "wake" = "GPE0_DW2_22" register "has_power_resource" = "true" + register "use_gpio_for_status" = "true" register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_C15)" register "enable_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_HIGH(GPP_E19)" register "enable_delay_ms" = "3"