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 <ivy.jian@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88338
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Ivy Jian 2025-07-07 09:55:45 +08:00 committed by Matt DeVillier
commit d866e72b3a

View file

@ -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"