Commit graph

3,086 commits

Author SHA1 Message Date
Yang Wu
8f1c54685a drivers/mipi: Fix pixel clock and enable C-PHY for TM_TL121BVMS07_00C
Commit ddf5987c1e ("drivers/mipi: Add support for
TM_TL121BVMS07_00C panel") (CB:89216) added support for the
TM_TL121BVMS07_00C panel, but the screen was not functional.

Decrease the pixel clock from 4,400,560 Hz to 264,355 Hz to match the
actual panel timing specification. Also, the panel uses C-PHY interface,
so enable the `PANEL_FLAG_CPHY` flag accordingly.

Datasheet: Preliminary+specification+TL121BVMS07+-00+V01+20250721.pdf

BUG=b:428854543
TEST=build and check firmware screen.
BRANCH=skywalker

Change-Id: I88fa5215d7596926aa95a58ae91dd6ade793388b
Signed-off-by: Yang Wu <wuyang5@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89568
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-10-28 04:11:34 +00:00
Cliff Huang
1af54d9784 drivers/intel/touch: Change I2C speed type to i2c_speed enum
Change the I2C connection speed type from uint32_t to the i2c_speed
enum type for better type safety and code consistency. While the
i2c_speed enum values correspond to actual speed values in Hz, using the
enum provides clearer intent and prevents invalid speed values.
Additionally, add logic to use standard I2C speed (100 kHz) when no
recommended or required speed is specified in the device tree, SoC
configuration, or device settings.

BUG=none
TEST=Boot Fatcat board to OS and verify correct I2C speed assignments in
'DSPD' Name object under THC device from SSDT. Confirm touch devices
operate at expected speeds.

Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Change-Id: Ie01693544bebf9f748d16606fc13f39fe4069b03
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89649
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Kyoung Il Kim <kyoung.il.kim@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2025-10-24 21:34:48 +00:00
Elyes Haouas
b87a9795de tree: Use boolean for s3resume
Change-Id: I3e23134f879fcaf817cf62b641e9b59563eb643b
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86331
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-10-23 13:34:15 +00:00
Cliff Huang
fce489e9e5 drivers/intel/touch: Check SoC I2C speed function exists before calling
This change adds a null pointer check to ensure that the SoC-specific
function to retrieve I2C bus speed is properly mapped before attempting
to call it. Without this check, systems may crash during boot when the
function pointer is not initialized. The issue occurs when the
touchscreen or touchpad is configured to use THC-I2C via CBI fw_config,
but the underlying SoC doesn't provide the required I2C speed function
implementation.

BUG=none
TEST=Boot Fatcat board to OS with CBI fw_config selecting touchscreen or
touchpad using THC-I2C. Verify no crash occurs during boot and touch
devices function properly.

Change-Id: Ib982f4435aa506f2b9203f81140366addc6559f3
Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89628
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2025-10-18 21:52:11 +00:00
Maciej Strozek
78e7dcb152 drivers/soundwire/cs42l43: Add optional properties for controlling jack and accessory detect
CS42L43 contains a range of optional properties which control the
behaviour of jack and accessory detect, and are added here.

These properties are documented in the Linux kernel source code, in the
file:
linux/Documentation/devicetree/bindings/sound/cirrus,cs42l43.yaml
which contains names, descriptions, valid and default values.

Being optional, these properties will be ignored if not specified.

Change-Id: I53fbed81df9157022384d5879c9d9ed351641ab5
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89231
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-10-18 18:31:16 +00:00
Maciej Strozek
f1c973bbff drivers/soundwire/cs42l43: Support Cirrus Logic CS42L43 codec
CS42L43 is a PC Codec with headphone and class D speaker drivers.

The driver was written based on the datasheet for CS42L43 part and
generates the audio SSDT information.

CS42L43 supports DisCo Version v2.1, but coreboot currently only
supports DisCo v1.0, so ACPI is only generated based on DisCo v1.0.

CS42L43 also supports the SDCA v1.0 Specification (from DisCo v2.1)
is also not currently supported by coreboot, therefore SDCA ACPI
properties are also not generated.

This is currently only tested using QEMU using example configuration:

chip drivers/soundwire/cs42l43
	# SoundWire Link 0 ID 1
	register "desc" = ""CODEC""
	register "sub" = ""1337""
	device generic 0.1 on end
end

Which produces the ACPI:

Device (SW01)
{
    Name (_ADR, 0x00003101FA424301)  // _ADR: Address
    Name (_DDN, "CODEC")  // _DDN: DOS Device Name
    Name (_SUB, "1337")  // _SUB: Subsystem ID
    Method (_STA, 0, NotSerialized)  // _STA: Status
    {
        Return (0x0F)
    }

    Name (_DSD, Package (0x04)  // _DSD: Device-Specific Data
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x0F)
        {
            Package (0x02)
            {
                "mipi-sdw-sw-interface-revision",
                0x00010000
            },

            Package (0x02)
            {
                "mipi-sdw-wake-up-unavailable",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-test-mode-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-clock-stop-mode1-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-simplified-clockstopprepare-sm-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-clockstopprepare-timeout",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-clockstopprepare-hard-reset-behavior",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-slave-channelprepare-timeout",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-highPHY-capable",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-paging-supported",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-bank-delay-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-port15-read-behavior",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-master-count",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-source-port-list",
                0x06
            },

            Package (0x02)
            {
                "mipi-sdw-sink-port-list",
                0x60
            }
        },

        ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b") /* Hierarchical Data Extension */,
        Package (0x06)
        {
            Package (0x02)
            {
                "mipi-sdw-port-bra-mode-0",
                "BRA0"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-0-subproperties",
                "DP0"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-2-source-subproperties",
                "SRC2"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-5-sink-subproperties",
                "SNK5"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-1-sink-subproperties",
                "SNK1"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-6-source-subproperties",
                "SRC6"
            }
        }
    })
    Name (BRA0, Package (0x02)
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x04)
        {
            Package (0x02)
            {
                "mipi-sdw-bra-mode-min-bus-frequency",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-bra-mode-max-bus-frequency",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-bra-mode-max-data-per-frame",
                0x01D6
            },

            Package (0x02)
            {
                "mipi-sdw-bra-mode-min-us-between-transactions",
                Zero
            }
        }
    })
    Name (DP0, Package (0x04)
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x07)
        {
            Package (0x02)
            {
                "mipi-sdw-port-wordlength-configs",
                Package (0x03)
                {
                    0x08,
                    0x10,
                    0x18
                }
            },

            Package (0x02)
            {
                "mipi-sdw-bra-flow-controlled",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-bra-imp-def-response-supported",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-bra-role-supported",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-simplified-channel-prepare-sm",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-imp-def-dp0-interrupts-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-imp-def-bpt-supported",
                Zero
            }
        },

        ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b") /* Hierarchical Data Extension */,
        Package (0x01)
        {
            Package (0x02)
            {
                "mipi-sdw-port-bra-mode-0",
                "BRA0"
            }
        }
    })
    Name (SRC2, Package (0x02)
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x0C)
        {
            Package (0x02)
            {
                "mipi-sdw-data-port-type",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-max-grouping-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-imp-def-dpn-interrupts-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-modes-supported",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-max-async-buffer",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-block-packing-mode",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-port-encoding-type",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-port-wordlength-configs",
                Package (0x03)
                {
                    0x08,
                    0x10,
                    0x18
                }
            },

            Package (0x02)
            {
                "mipi-sdw-simplified-channelprepare-sm",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-port-channelprepare-timeout",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-channel-number-list",
                Package (0x02)
                {
                    Zero,
                    One
                }
            },

            Package (0x02)
            {
                "mipi-sdw-channel-combination-list",
                Package (0x03)
                {
                    0x03,
                    0x02,
                    One
                }
            }
        }
    })
    Name (SNK5, Package (0x02)
    {
        [... Same as SRC2 ...]
    })
    Name (SNK1, Package (0x02)
    {
        [... Same as SRC2 except:]

	Package (0x02)
	{
	    "mipi-sdw-channel-number-list",
	    Package (0x04)
	    {
	        Zero,
	        One,
	        0x02,
	        0x03
	    }
	},

	Package (0x02)
	{
	    "mipi-sdw-channel-combination-list",
	    Package (0x04)
	    {
	        One,
	        0x03,
	        0x07,
	        0x0F
	    }
	}

        [ Same as SRC2 ...]

        }
    })
    Name (SRC6, Package (0x02)
    {
        [... Same as SRC2 ...]
    })
}

Change-Id: I38f40d29945b22f9c308ea4b7ed6157ccadb3c7c
Signed-off-by: Maciej Strozek <mstrozek@opensource.cirrus.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89230
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-10-18 18:31:09 +00:00
Sergii Dmytruk
85d7a1c85f drivers/ipmi: add Block Transfer (BT) interface
Unlike already implemented Keyboard Controller Style (KCS) interface
Block Transfer interface is not byte-oriented and implies that device is
capable of buffering a command before processing it.  Another difference
is that polling can be replaced with interrupts, though this isn't used
by this implementation.

More details can be found in "Intelligent Platform Management Interface
Specification", v2.0, Rev. 1.1:
https://www.intel.com/content/dam/www/public/us/en/documents/specification-updates/ipmi-intelligent-platform-mgt-interface-spec-2nd-gen-v2-0-spec-update.pdf

This was initially tested on Talos II (OpenPower platform) by Raptor
Computing Systems.  Later versions were tested using QEMU and ipmi_sim
from OpenIPMI project as well as QEMU's builtin BMC simulator.

Change-Id: Idb67972d1c38bbae04c7b4de3405350c229a05b9
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67057
Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-10-16 12:16:43 +00:00
Jeremy Compostella
19feafc018 drivers/intel/fsp2_0/ppi/mp_service_ppi: Support CPU_V2_EXTENDED_TOPOLOGY
Complies with the Multi-Processor (MP) service as defined by the
EFI_MP_SERVICES_PROTOCOL.GetProcessorInfo() in the Platform
Initialization Specification 1.7. If bit 24 (CPU_V2_EXTENDED_TOPOLOGY)
is set in ProcessorId, GetProcessorInfo() must populate the
EFI_CPU_PHYSICAL_LOCATION2 data structure.

TEST=FSP using PI 1.7 GetProcessorInfo() is able to retrieve the
     information instead of receiving an EFI_NOT_FOUND error.

Change-Id: If4d473901c8de02b3d6cef44f5481a1864f14d65
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89462
Reviewed-by: Zhixing Ma <zhixing.ma@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
2025-10-15 14:03:59 +00:00
Cliff Huang
f1708cf21a drivers/intel/touch: Enhance Intel touch driver for new devices
Enhancements have been made to the Intel touch driver, including support
for Google touchscreen devices, ELAN9006 and ELAN6918. The update
also includes device-specific configuration changes for both I2C and SPI
interfaces.

Key improvements include:
- Google Touchscreen support integration for ELAN9006 (SPI) and ELAN6918
  (I2C).
- Specification of recommended connection speeds for supported devices.
- Removal of an unnecessary 100ms delay in the SPI _RST method.
- Addition of a function to map the System on Chip's (SoC) I2C speed
  frequency.
- Improved device-specific connection speed settings for both I2C and
  SPI interfaces.

These changes aim to improve the driver’s compatibility and efficiency
when interacting with the newly supported devices.

BUG=none

TEST=Test the updated driver on devices using ELAN9006 and ELAN6918 to
verify improved responsiveness and correct device initialization.
Confirm that connection speeds are set as recommended and check the
absence of the previously unnecessary delay in SPI operations from the
SSDT.

Change-Id: Ie35de90ece44101aea008d13d19e12873cdc09bf
Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89180
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2025-10-13 17:09:52 +00:00
Subrata Banik
23419df34c drivers/intel/fsp2_0: Implement API to retrieve DIMM info
This patch extracts the implementation responsible for retrieving DIMM
information from the FSP HOBs and centralizes it within the common FSP
driver code.

This ensures that each SoC layer does not duplicate the logic for
parsing memory-related data. The primary goal is to rely on the
common FSP driver code for retrieving memory information.

The only SoC-specific implementation that remains is limited to
handling dependencies related to FSP UPD or header differences across
SoC generations.

TEST=Able to build and boot google/kinmen. Verify the memory related
information is proper as part of the SMBIOS table.

Change-Id: Ic3741a248bb1fe9420c784d51fbf459a30f8c42f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89494
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-10-13 02:09:29 +00:00
Ziang Wang
ba3f529681 drivers/emulation/qemu: Adjust fw_cfg driver for Arm and RISCV
According to QEMU docs/specs/fw_cfg.rst, the selector and data register
offsets of Arm & RISCV should be 0x8 and 0x0. Besides, the selector
register should be in big-endian when using MMIO access.

TEST=build and run successfully on QEMU rvvirt machine. Using command
"qemu-system-riscv64 -machine virt -bios build/coreboot.rom -nographic
-drive if=pflash,file=./build/coreboot.rom,format=raw".

Change-Id: I1c4d40a4dbcac4067a7c69ba916e6ff0a21cdcb6
Signed-off-by: Dong Wei <weidong.wd@bytedance.com>
Signed-off-by: Ziang Wang <wangziang.ok@bytedance.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89339
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2025-09-28 18:16:57 +00:00
Stefan Binding
a5252bd5b9 drivers/soundwire/cs35l56: Support Cirrus Logic CS35L56 Smart Amplifier Family
Add support for Class-D Smart Amplifiers: CS35L56, CS35L57 and CS35L63.

CS35L56 and CS35L57 are 18.5 V Class D Smart Amplifiers with Multi-Cell
Battery Boost.

CS35L63 is a PC Smart Amplifier with Speaker Protection and Audio
Enhancement Algorithms.

The driver was written based on the Datasheets for these parts and
generates the audio SSDT information for the amplifiers. Since all
three parts are part of the same family they all have similar SoundWire
settings.

The user can configure which part, SSID and Speaker ID is generated in
ACPI, as well as define each amplifier's Soundwire Unique ID and Link
ID.

These parts support DisCo Version v2.1, but coreboot currently only
supports DisCo v1.0, so ACPI is only generated based on DisCo v1.0.

These parts also support the SDCA v1.0 Specification (from DisCo v2.1)
is also not currently supported by coreboot, therefore SDCA ACPI
properties are also not generated.

This is currently only tested using QEMU using example configuration:

chip drivers/soundwire/cs35l56
	# SoundWire Link 2 ID 3
	register "desc" = ""Left Speaker Amp""
	register "part_id" = "MIPI_DEV_ID_CIRRUS_CS35L56"
	register "sub" = ""12345678""
	device generic 2.3 on end
end

Which produces the ACPI:

Device (SW23)
{
    Name (_ADR, 0x00023301FA355601)  // _ADR: Address
    Name (_DDN, "Left Speaker Amp")  // _DDN: DOS Device Name
    Name (_SUB, "12345678")  // _SUB: Subsystem ID
    Method (_STA, 0, NotSerialized)  // _STA: Status
    {
        Return (0x0F)
    }

    Name (_DSD, Package (0x04)  // _DSD: Device-Specific Data
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x0F)
        {
            Package (0x02)
            {
                "mipi-sdw-sw-interface-revision",
                0x00010000
            },

            [...]

            Package (0x02)
            {
                "mipi-sdw-source-port-list",
                0x18
            },

            Package (0x02)
            {
                "mipi-sdw-sink-port-list",
                0x06
            }
        },

        ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b") /* Hierarchical Data Extension */,
        Package (0x06)
        {
            Package (0x02)
            {
                "mipi-sdw-port-bra-mode-0",
                "BRA0"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-0-subproperties",
                "DP0"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-1-sink-subproperties",
                "SNK1"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-2-sink-subproperties",
                "SNK2"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-3-source-subproperties",
                "SRC3"
            },

            Package (0x02)
            {
                "mipi-sdw-dp-4-source-subproperties",
                "SRC4"
            }
        }
    })
    Name (BRA0, Package (0x02)
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x04)
        {
            Package (0x02)
            {
                "mipi-sdw-bra-mode-min-bus-frequency",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-bra-mode-max-bus-frequency",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-bra-mode-max-data-per-frame",
                0x01D6
            },

            Package (0x02)
            {
                "mipi-sdw-bra-mode-min-us-between-transactions",
                Zero
            }
        }
    })
    Name (DP0, Package (0x04)
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x07)
        {
            Package (0x02)
            {
                "mipi-sdw-port-wordlength-configs",
                Package (0x03)
                {
                    0x08,
                    0x10,
                    0x18
                }
            },

            [...]
        },

        ToUUID ("dbb8e3e6-5886-4ba6-8795-1319f52a966b") /* Hierarchical Data Extension */,
        Package (0x01)
        {
            Package (0x02)
            {
                "mipi-sdw-port-bra-mode-0",
                "BRA0"
            }
        }
    })
    Name (SNK1, Package (0x02)
    {
        ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301") /* Device Properties for _DSD */,
        Package (0x0C)
        {
            Package (0x02)
            {
                "mipi-sdw-data-port-type",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-max-grouping-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-imp-def-dpn-interrupts-supported",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-modes-supported",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-max-async-buffer",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-block-packing-mode",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-port-encoding-type",
                One
            },

            Package (0x02)
            {
                "mipi-sdw-port-wordlength-configs",
                Package (0x03)
                {
                    0x08,
                    0x10,
                    0x18
                }
            },

            Package (0x02)
            {
                "mipi-sdw-simplified-channelprepare-sm",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-port-channelprepare-timeout",
                Zero
            },

            Package (0x02)
            {
                "mipi-sdw-channel-number-list",
                Package (0x02)
                {
                    Zero,
                    One
                }
            },

            Package (0x02)
            {
                "mipi-sdw-channel-combination-list",
                Package (0x01)
                {
                    0x03
                }
            }
        }
    })
    Name (SNK2, Package (0x02)
    {
        [... same as SNK1 ...]
    })
    Name (SRC3, Package (0x02)
    {
        [... same as SNK1 ...]
    })
    Name (SRC4, Package (0x02)
    {
        [... same as SNK1 ...]
    })
}

Change-Id: Ie04020f008862051f26e0101828b5944d212e706
Signed-off-by: Stefan Binding <sbinding@opensource.cirrus.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89131
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-09-26 19:03:27 +00:00
Yang Wu
ddf5987c1e drivers/mipi: Add support for TM_TL121BVMS07_00C panel
Add TM panel TM_TL121BVMS07_00C serializable data to CBFS.
Datasheet: Preliminary+specification+TL121BVMS07+-00+V01+20250721.pdf

The developer/recovery screen is not functional yet as the vendor is
still debugging it. This change is proposed to enable firmware build.

[INFO ]  CBFS: Found 'panel-TM_TL121BVMS07_00C' @0x81f80 size 0x77
in mcache @0xfffdd540


BUG=b:428854543
TEST=build and check the CBFS include the panel
BRANCH=skywalker

Change-Id: I50e56aef1576722b7f2fb811c5d9df2a5697edae
Signed-off-by: Yang Wu <wuyang5@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89216
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-09-19 07:07:04 +00:00
Jeremy Compostella
84ec1493a3 drivers/wifi/generic: Fix typo in header guard comment
The header guard comment in the chip.h file was incorrect, using
_GENERIC_WIFI_H_ instead of the correct _WIFI_GENERIC_H_. This
commit corrects the typo to ensure consistency.

Change-Id: I00a93e811608ddf449065bc92441648f7332fc4b
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89055
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
2025-09-10 21:38:51 +00:00
Subrata Banik
5f0225a7b5 drivers/intel/fsp2_0: Refactor for earlier graphics memory WC MTRR
Moves the MTRR setup for graphics memory (GMADR) from the
`soc_load_logo_by_coreboot()` function to `do_silicon_init()`. This
refactors the logic into a new helper function,
`soc_mark_gfx_memory()`, which acquires a temporary Write-Combine
(WC) MTRR.

The MTRR is now configured earlier in the silicon initialization
process, making the setup and cleanup independent of the
`soc_load_logo_by_coreboot()` function itself.

This improves FSP-S performance and ensures the MTRR is correctly
managed within the silicon initialization flow which was earlier
missed when platform selects `USE_COREBOOT_FOR_BMP_RENDERING` aka
rendering the BMP logo using coreboot driver and not using FSP driver
logic.

The cleanup of the MTRR is also moved to `do_silicon_init()` to pair
with the earlier setup.

TEST=Successfully boot to OS on google/fatcat using coreboot for logo
rendering.

w/o this patch

```
    963:returning from FspMultiPhaseSiInit    1,164,839 (123,244)
```

w/ this patch

```
    963:returning from FspMultiPhaseSiInit    1,143,974 (115,443)
```

Change-Id: I5da3178c622f5fd6cb3d7f3f574e59f9ed5a5b3d
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88982
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-08-29 04:33:07 +00:00
Elyes Haouas
ecbca16bf4 tree: Replace union {0} initializers with {} for C23 compliance
This change addresses GCC-15 behavior where {0} union initializers only
clear the first member, leaving padding bits uninitialized. The new {}
initializer ensures full union clearing as required by C23.

Change-Id: I1d9b063d8bdd3d2f0b0f67e6c20eb484ff6a5cc5
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88732
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-08-11 16:40:34 +00:00
Julius Werner
8f09629fb1 spi_flash: Fix initialization of flags field in lb_spi_flash
Commit 8dec5fcaf8 ("drivers/spi: Add 4-byte address mode flag to
lb_spi_flash") split the existing 32-bit `erase_cmd` field into multiple
fields. The new `flags` field thus created is used to pass information
about whether the flash is in 4-byte address mode.

Unfortunately, we forgot to initialize the new fields in the case that
the flash is not in 4-byte address mode. This means it can have any
arbitrary value, including values where the new flag bit is accidentally
set (causing flash access errors in the payload).

This patch fixes the problem and tries to prevent further issues with
field changes in the future by explicitly zeroing the entire coreboot
table structure before starting to fill in the values.

Change-Id: I3ad9812fc76ae2989dcf4a294034c4e31456c74e
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88700
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2025-08-09 01:36:39 +00:00
Subrata Banik
2c8d157ea4 {drivers, soc/qualcomm/common}: Add configurable delay for UART bitbang
This commit introduces a new Kconfig option, UART_BITBANG_TX_DELAY_MS,
to make the UART TX pin stabilization delay configurable.

A default 5ms (CONFIG_UART_BITBANG_TX_DELAY_MS) delay is added in
uart_init() after the TX pin is set high. This addresses an issue
where the initial character sent by the UART could be corrupted due
to the pin not being stable. The delay ensures the line state is
properly established before data transmission begins.

This was found to resolve early boot console corruption on some boards.
The issue is likely a race condition where the first character starts
transmitting before the GPIO output is fully stabilized.

TEST=Able to build and boot google/zombie w/o any junk characters in
AP firmware log.

w/o this patch:

```
�ɍ���щ�����х�ѥ��b����ٕ��Jrrrjjm              UuI5�ፕ�ѥ���������ͥ��х�����jm             UuI5���ѥ���ፕ�ѥ��m��jm           UuI5����ѕ�ѕፕ�ѥ��m��[DEBUG]  NCC Frequency bumped to 1.363(GHz)
```

w/ this patch:

```
[NOTE ]  coreboot-25.06-78-gfe786406960e-dirty Fri Aug 01 17:12:22 UTC 2025 aarch64 bootblock starting (log level: 8)...
[DEBUG]  ARM64: Exception handlers installed.
[DEBUG]  ARM64: Testing exception
[DEBUG]  ARM64: Done test exception
[DEBUG]  Silver Frequency bumped to 1.5168(GHz)
[DEBUG]  L3 Frequency bumped to 1.1904(GHz)
```

Change-Id: I33c9ea65aa42d23acf3b89f977d4985569c144e8
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88633
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-08-04 16:26:29 +00:00
Ian Feng
227d434e2d drivers/soundwire/alc711: Support clock stop flag from devicetree
Allow overriding the default value (true) via devicetree configuration.
If disable_clkstop_sm_support is set in the devicetree,
the corresponding field in alc711_slave is set to false.

BUG=b:417133565, b:420516709
TEST=Verified build and boot with ALC721 and ALC722.
Headphone path switches successfully via audio jack event.
Confirmed SSDT dump at PCI0.HDAS.SNDW.
Package (0x02)
{
    "mipi-sdw-simplified-clockstopprepare-sm-supported",
    Zero
},

Change-Id: If958cd0c2136e4dd3f60cb9203d9394913d3f66e
Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88586
Reviewed-by: Mac Chiang <mac.chiang@intel.com>
Reviewed-by: Simon Yang <simon1.yang@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-08-02 16:47:53 +00:00
Patrick Rudolph
84899e6fb7 sb/intel: Convert set_gpio to gpio_set
Drop the custom function to set the value of a single GPIO and
use the generic function prototype defined in include/gpio.h instead.

Migrate all users of the old function to the new function.

Allows to share more code between older x86 Intel boards and newer
x86 Intel boards since they now use a common header.

Change-Id: I8c83b3436818275958cd8eb8b1c0d7b235e0344c
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88504
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-25 17:05:54 +00:00
Patrick Rudolph
69364fc9e0 sb/intel: Convert get_gpio() to gpio_get()
Drop the custom function to set the value of a single GPIO and
use the generic function prototype defined in include/gpio.h instead.

Migrate all users of the old function to the new function.

Allows to share more code between older x86 Intel boards and newer
x86 Intel boards since they now use a common header.

Change-Id: I714eaf2115a455d327e6b2313dafd0e293bee8a7
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88506
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2025-07-25 17:05:12 +00:00
Patrick Rudolph
6a20caea01 drivers/lenovo/hybrid_graphics: Add missing header
Include the missing header stdbool.h

Fixes compilation error
hybrid_graphics.h:6:28: error: unknown type name 'bool'
while refactoring some code.

Change-Id: I96f7255049cd9e24d74838a173e920a00636b09e
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88546
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-25 17:04:22 +00:00
Kapil Porwal
9a8ba5b39a {lib, drivers/intel}: Move BMP rendering logic out of SoC code
This patch refactors the BMP rendering logic, moving it from
drivers/intel/fsp2_0 to src/lib. This centralizes the code
responsible for rendering BMP images to the framebuffer.

Key changes:
- Move BMP rendering functions (e.g., calculate_logo_coordinates,
  copy_logo_to_framebuffer) and their dependencies to
  src/lib/render_bmp.c and src/lib/render_bmp.h.
- Decouple BMP definitions from UEFI headers by introducing new
  coreboot-specific structures for BMP images and BLT pixels.
- Consolidate bootsplash-related declarations into bootsplash.h,
  including new `fw_splash_vertical_alignment`,
  `fw_splash_horizontal_alignment`, and `struct logo_config`.
- Update `soc_load_logo_by_coreboot` to use the new common
  `load_and_render_logo_to_framebuffer` function and `struct
  logo_config` for rendering.
- Relocate `release_logo` to `src/lib/render_bmp.c` for better
  module structure.
- Update `src/lib/Makefile.mk` to include the new render_bmp.c.

This refactoring improves code organization and reusability, making
BMP rendering accessible without tight coupling to Intel-specific
driver code.

BUG=b:427387842
TEST=Verify firmware splash screen on google/fatcat.

Change-Id: I0e20ea7e44b4b3ccdb2d4aa9b6aa10ed3447ccfc
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88361
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-23 17:11:10 +00:00
Paul Menzel
19d7104d85 drivers/intel/touch: Use recommended short multi-line comment style
The current style is not part of the coding style [1]. The comment has
five lines, so it’s unclear if the short or long multi-line comment
style should be used. Use the short one, to keep it concise.

[1]: Documentation/contributing/coding_style.md

Change-Id: I500340fd02a54c69db4ca5d753fcb690fae1c520
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88491
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-21 13:44:30 +00:00
Alper Nebi Yasak
5171098814 drivers/qemu/bochs: Allow building for non-x86 architectures
The Bochs display driver uses port I/O functions to initialize the VGA
device, so it could only have been built on x86 architectures so far,
but its supported devices can be used just fine on others on the QEMU
side as long as the emulated platform supports PCI. A previous commit
adds port I/O functions for more including ARM* and RISC-V, which should
enable this driver to be successfully built and used on these as well.

Allow the Bochs display driver to be built for non-x86 QEMU boards by
changing the Kconfig dependencies. Make VGA text framebuffer support
depend on x86, because it isn't usable at the standard 0xB8000 address
on other architectures. Add a dependency on PCI since this is a PCI
device and vexpress-a9 (qemu-armv7) doesn't have the (emulated) hardware
for PCI.

Change-Id: I7f72d7ea13e54ecf89d067394c02b572c5f92d24
Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/80376
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-07-17 20:39:48 +00:00
Victor Shih
79bd154b49 drivers/genesyslogic/gl9763e: Mask replay timer timeout of AER
Due to a flaw in the hardware design, the GL9763e replay timer
frequently times out when ASPM is enabled. As a result, the warning
messages will often appear in the system log when the system accesses
the GL9763e PCI config. Therefore, the replay timer timeout must be
masked.

BUG=b:428025481

Sample output on screen:
PCIe Bus Error: severity=Corrected, type=Data Link Layer
device [17a0:e763] error status/mask=00001000/00002000
 [12] Timeout

Change-Id: I6f921f40f169d7811b7bd51145023b549e8aee1c
Signed-off-by: Victor Shih <victorshihgli@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88291
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-17 17:42:41 +00:00
Martin Roth
1219981177 drivers/emu/qemu: Add a comment about fw_cfg assumptions
This documents that if the fw_cfg table was improperly configured by
QEMU, the fw_cfg_smbios_init() function would leak memory. We could
add a check to verify that this doesn't happen, but honestly that seems
like overkill. This just documents the issue in case this code is
copied for use elsewhere.

BUG=CIDs 1405799, 1405791, 1405792, 1405796, 1405797
Signed-off-by: Martin Roth <gaumless@gmail.com>

Change-Id: I4f253194dae52897633ab5d96bb8c2964b8365d0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88332
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-07-08 16:18:17 +00:00
Ivy Jian
4367daae20 drivers/spi: Add option to generate proper PowerResource _STA
The _STA method of drivers/spi PowerResource currently always
returns true. To allow generating _STA that returns the device's actual
power state, this CL adds a new boolean option `use_gpio_for_status` to
the `drivers_spi_acpi_config` struct, and propagates the value to
`acpi_power_res_params` to reuse the feature implemented for acpi/device
in [1].

[1] https://review.coreboot.org/c/coreboot/+/55027

BUG=b:428793056
TEST=Dump SSDT on kinmen with use_gpio_for_status=true

    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: I9591957f2db66081ffe447f91afd6655835d8feb
Signed-off-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88337
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-07-08 16:17:53 +00:00
Jeremy Soller
da49da6c82 soc/intel: Add Arrow Lake-S/HX IDs
Change-Id: I7a0a56cf80f053b4bb0c8acb9038c1e46dca5d2e
Ref: Intel Arrow Lake-S/HX EDS, Volume 1 (#729037, rev 2.01)
Ref: Intel 800 Series Chipset Family PCH EDS, Volume 1 (#728144, rev 1.52)
Signed-off-by: Jeremy Soller <jeremy@system76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87454
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-07-03 16:57:15 +00:00
Patrick Rudolph
984c64295b drivers/crb/tpm: Add new method to retrieve base address
In order to support runtime evaluation of the TPM base address
introduce and use a new method for CRB TPMs.

Change-Id: I29c81d82947eb2603472a515f9ada598e4f8e6ea
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88249
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <inforichland@gmail.com>
2025-07-02 16:15:09 +00:00
Elyes Haouas
9be383b855 drivers/lenovo/hybrid_graphics/chip: Use boolean when appropriate
Change-Id: I1f456765eb60b8ad1e680255b50abad5dea8252c
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86610
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2025-07-01 15:08:02 +00:00
Elyes Haouas
ae282fe502 drivers/generic/bayhub: Use boolean for power_saving
Change-Id: I7cc89989296b48e20b41e6ff06570a9d30bfc114
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86607
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2025-07-01 15:07:44 +00:00
Subrata Banik
8dec5fcaf8 drivers/spi: Add 4-byte address mode flag to lb_spi_flash
Adds a new flags field to the lb_spi_flash coreboot table to indicate
if the SPI flash is operating in 4-byte address mode.

This allows payloads to query the current address mode directly from the
coreboot table, preventing redundant checks or re-enforcement of the
mode. The flag is set based on the
CONFIG_SPI_FLASH_FORCE_4_BYTE_ADDR_MODE configuration.

Important: `erase_cmd` was reduced from uint32_t to uint8_t.
Only the least significant byte was ever relevant, so this change
ensures accurate type representation, maintains backward compatibility
with existing coreboot table structures, and frees up space.

BUG=b:417900125
TEST=Able to build google/bluey.

Change-Id: I406536432b2a0c7f4108e5b33d5a20c272d917b0
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88181
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2025-06-28 02:40:41 +00:00
Subrata Banik
a01c368a8a drivers/spi: Refactor 4-byte addressing mode handling in SPI flash
This commit refactors the logic for entering and exiting 4-byte
addressing mode in the SPI flash driver.

Changes include:
 - Renaming SPI_FLASH_EXIT_4BYTE_STAGE to SPI_FIRST_STAGE to better
   reflect its broader applicability to initial boot stages.
 - Applying SPI_FIRST_STAGE to both the force 4-byte address mode
   and exit 4-byte address mode configurations, ensuring these
   operations are only attempted during the appropriate early boot
   phases.
 - Renaming CMD_FORCE_4BYTE_ADDR_MODE to CMD_ENTER_4BYTE_ADDR_MODE for
   consistency and clearer semantics, as 0xb7 is typically used to enter
   this mode.

BUG=b:417900125
TEST=Able to build google/bluey.

Change-Id: I79e2c7bbd222fd0d76072860bdf3feba7e7d587d
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88203
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2025-06-28 02:40:36 +00:00
Subrata Banik
97f92d5c69 drivers/intel: Add support for configurable footer logo bottom margin
Introduces logo_bottom_margin to soc_intel_common_config to allow
adjusting the vertical (or horizontal, based on orientation) offset of
the footer logo from the screen edge. This provides flexibility for
OEM branding placement.

BUG=b:423591644
TEST=Able to show OEM splash screen on google/fatcat.

Change-Id: Ie3942d9eee07091286118ac488d1cc85ecc96c4c
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88163
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-06-25 00:05:07 +00:00
Subrata Banik
5568bee055 drivers/spi: Support forced 4-byte address mode via 0xB7 command
Many high-capacity SPI flashes (e.g., >16MB) default to 3-byte
addressing and require a specific command to enter 4-byte address mode.

This commit introduces support for sending the
CMD_FORCE_4BYTE_ADDR_MODE (0xB7) command during flash probing. When
Kconfig option `SPI_FLASH_FORCE_4_BYTE_ADDR_MODE` is enabled, this
ensures the flash chip is immediately switched to 4-byte addressing
after power-on.

This addresses issues with flashes like GigaDevice (GD25LQ128D) and
Winbond (W25Q256JWxx) that mandate this command for proper 4-byte
addressing. The new command definition is in `spi_flash_internal.h`.

BUG=b:417900125
TEST=Able to build google/bluey.

Change-Id: I935a0e1d6214d73c8ea487418adc93f016790432
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88156
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-06-24 06:03:18 +00:00
Jeremy Compostella
efa24540b0 drivers/wifi/generic: Implement Bluetooth PRR DSM functions
This commit introduces Bluetooth Device-Specific Methods (DSM)
"7266172c-220b-4b29-814f-75e4dd26b5fd" functions 5, 6 and 7, enabling
access to the Power Resource for Reset (PRR) mode, status and reset
delay. It meets the DSM requirements listed in Intel Document number
559910. The Power Resource Advanced Configuration and Power
Interface (ACPI) code was adapted from Panther Lake (PTL) Firmware
Support Package (FSP) revision 3144.01 (IntelBtDsmFunc5.asl,
IntelBtDsmFunc6.asl and IntelBtDsmFunc7.asl).

TEST=The following sequence of acpidbg commands was used to verify
     functions 5, 6 and 7 behavior on a Fatcat device.
     acpidbg -b "evaluate \_SB.PCI0.CNVB._DSM \
           (2c 17 66 72 0b 22 29 4b 81 4f 75 e4 dd 26 b5 fd) \
           0 6 0" # Get PRR mode and status: [0x0 0x0]
     acpidbg -b "evaluate \_SB.PCI0.CNVB._DSM \
           (2c 17 66 72 0b 22 29 4b 81 4f 75 e4 dd 26 b5 fd) \
           0 5 (01 00 01 00)" # Set PRR mode (type) to 0x1
     acpidbg -b "evaluate \_SB.PCI0.CNVB._DSM \
           (2c 17 66 72 0b 22 29 4b 81 4f 75 e4 dd 26 b5 fd) \
           0 6 0" # Get PRR mode and status: [0x1 0x0]
     acpidbg -b 'evaluate \_SB.PCI0.CNVB.BTDL' # 0x32
     acpidbg -b "evaluate \_SB.PCI0.CNVB._DSM \
           (2c 17 66 72 0b 22 29 4b 81 4f 75 e4 dd 26 b5 fd) \
           0 7 60"
     acpidbg -b 'evaluate \_SB.PCI0.CNVB.BTDL' # 0x3C

Change-Id: I3b0a77f3c2b7bec5dcb909a1266c7d5f4d5a8d1e
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88115
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.corp-partner.google.com>
2025-06-23 16:21:20 +00:00
Jeremy Compostella
d92b6163e7 drivers/wifi/generic: Implement Wi-Fi PRR DSM functions
This commit introduces Power Resource for Reset (PRR) Device-Specific
Methods (DSM) "7266172c-220b-4b29-814f-75e4dd26b5fd" functions 2 and 5,
enabling access to the Power Resource Reset mode, status and delay. It
meets the DSM requirements listed in Intel Document number 559910. The
Power Resource Advanced Configuration and Power Interface (ACPI) code
was adapted from Panther Lake (PTL) Firmware Support Package (FSP)
revision 3144.01 (IntelWifiDsmFunc2.asl and IntelWifiDsmFunc5.dsl).

TEST=The following sequence of acpidbg commands was used to verify
     functions 2 and 5 behavior on a Fatcat device.
     acpidbg -b "evaluate \_SB.PCI0.CNVW._DSM \
             (2c 17 66 72 0b 22 29 4b 81 4f 75 e4 dd 26 b5 fd) \
             0 2 (01 00 00 00)" # Get PRR mode (type): 0x0
     acpidbg -b "evaluate \_SB.PCI0.CNVW._DSM \
             (2c 17 66 72 0b 22 29 4b 81 4f 75 e4 dd 26 b5 fd) \
             0 2 (02 00 01 00)" # Set PRR mode (type) to 0x1
     acpidbg -b "evaluate \_SB.PCI0.CNVW._DSM \
             (2c 17 66 72 0b 22 29 4b 81 4f 75 e4 dd 26 b5 fd) \
             0 2 (01 00 00 00)" # Get PRR mode (type): 0x1
     acpidbg -b "evaluate \_SB.PCI0.CNVW._DSM \
             (2c 17 66 72 0b 22 29 4b 81 4f 75 e4 dd 26 b5 fd) \
             0 2 (03 00 00 00)" # Get PRR status: 0x0
     acpidbg -b "evaluate \_SB.PCI0.CNVW.CNVP._RST"
     acpidbg -b "evaluate \_SB.PCI0.CNVW._DSM \
             (2c 17 66 72 0b 22 29 4b 81 4f 75 e4 dd 26 b5 fd) \
             0 2 (03 00 00 00)" # Get PRR status: 0x2
     acpidbg -b 'evaluate \_SB.PCI0.CNVW.WFDL' # 0x32
     acpidbg -b "evaluate \_SB.PCI0.CNVW._DSM \
           (2c 17 66 72 0b 22 29 4b 81 4f 75 e4 dd 26 b5 fd) \
           0 5 60"
     acpidbg -b 'evaluate \_SB.PCI0.CNVW.WFDL' # 0x3C

Change-Id: I6b9d3b2d407d458a94cc2a1695c84f5dc00f9d1a
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88114
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-06-23 16:21:14 +00:00
Subrata Banik
2a09db3c29 drivers/intel: Refactor logo rendering with helper functions
This commit refactors the `soc_load_logo_by_coreboot()` function by
extracting common logo rendering logic into a new helper function:
`render_logo_to_framebuffer()`.

The `render_logo_to_framebuffer()` helper is responsible for:
- Loading the BMP image (by type).
- Checking the image size.
- Converting the BMP to GOP BLT format.
- Calculating the appropriate logo coordinates based on vertical
  or horizontal alignment, considering panel orientation for the
  footer logo.
- Copying the logo data to the framebuffer.
- Releasing the allocated logo buffer.

This refactoring significantly reduces code duplication within
`soc_load_logo_by_coreboot()`, making it more concise and readable.
It also centralizes the logo rendering process, improving
maintainability and simplifying future modifications.

The `soc_load_logo_by_coreboot()` function now focuses on
higher-level orchestration: graphics info initialization, MTRR
setup, panel orientation adjustment, and sequential calls to
`render_logo_to_framebuffer()` for the main and optional footer logos.
Error handling for MTRR and logo rendering failures is streamlined
with a `cleanup` goto label.

BUG=b:423591644
TEST=Able to show OEM splash screen on google/fatcat at center of the
screen.

Change-Id: I10f84fd1c2081efcf787d00ab7cfc6bb24feca21
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88032
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-06-23 02:05:23 +00:00
Subrata Banik
dfeaead9f2 drivers/intel: Add horizontal logo alignment for splash screen
This commit adds horizontal alignment support for splash screen
logos into the existing helper function `calculate_logo_coordinates()`.
Updated helper function determines the X-coordinate for
logo placement based on specified horizontal alignment (left, right,
or center).

The `soc_load_logo_by_coreboot()` function is updated to utilize this
helper for footer logo placement when the panel orientation is
rotated (`LB_FB_ORIENTATION_RIGHT_UP`, `LB_FB_ORIENTATION_LEFT_UP`,
or `LB_FB_ORIENTATION_BOTTOM_UP`).

A new enum, `fw_splash_horizontal_alignment`, is defined in
`intelblocks/cfg.h` to explicitly represent these horizontal alignment
options, complete with descriptive comments and ASCII art.

This enhancement provides greater flexibility in positioning splash
screen elements, especially useful for rotated displays (for the footer
firmware splash screen).

BUG=b:423591644
TEST=Able to rotate the firmware splash screen (including footer logo)
while using portrait panel.

Change-Id: I23ae6d06e1df9cad1b2907a5c02b619dc831d468
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88030
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-06-23 02:04:57 +00:00
Subrata Banik
d309a9dfa8 drivers/intel/fsp2_0: Suppress OEM footer in low-battery mode
This patch modifies the low-battery shutdown logic to bail out early
when the system is in a low-power state. This prevents the display of
the OEM footer logo, ensuring power conservation and avoiding
unnecessary rendering alongside the low-battery icon.

BUG=b:423591644
TEST=Boot platform with `CONFIG(USE_COREBOOT_FOR_BMP_RENDERING)`
    and low battery. Verify splash appears before shutdown w/o OEM
    footer logo.

Change-Id: Ie9a23c0fe9d6b7d314cf4bbe8a8a90eb5689568e
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88015
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-06-23 02:04:36 +00:00
Subrata Banik
4373eea5d8 {lib, drivers/intel}: Add splash screen footer
This commit introduces the `SPLASH_SCREEN_FOOTER` Kconfig option,
enabling a custom footer image or logo on the firmware splash screen.
This provides an additional branding opportunity for device
manufacturers.

`soc_load_logo_by_coreboot()` now conditionally loads and renders
`footer_logo.bmp` when this option is enabled. The footer logo is
positioned at the bottom of the screen.

A new `SPLASH_SCREEN_FOOTER_LOGO_PATH` Kconfig option is added to
define the footer logo's file path. It defaults to a mainboard-specific
location. `Makefile.mk` is updated to ensure this logo is included in
the CBFS.

This additional branding is made possible by rendering bitmaps using
coreboot's native implementation (`USE_COREBOOT_FOR_BMP_RENDERING`).
FSP currently lacks the necessary callbacks to support this feature.

Currently, the OEM footer branding will appear even when the
system is booting in low-battery mode. A planned update will fix this
by exiting early from the boot process, preventing the footer from
showing and conserving power.

BUG=b:423591644
TEST=Able to display custom footer logo on boot.

Change-Id: I57f8af910e8b8f56e8a4a88f8cca6d60fad380b6
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88029
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-06-23 02:04:26 +00:00
Subrata Banik
f48865ab9a drivers/intel/fsp2_0: Refactor bitmap loading and GOP BLT conversion
This commit refactors the bitmap handling in the FSP2.0 driver to
enhance flexibility. Previously, `fsp_convert_bmp_to_gop_blt()`
directly called `bmp_load_logo()`, tying it to specific, predefined
bitmaps like low-battery or OEM splash logos. This prevented its
use for dynamic bitmap files (e.g., brand logos) at runtime.

To address this, `fsp_convert_bmp_to_gop_blt()` no longer handles
bitmap loading. Instead, a new unified API,
`fsp_load_and_convert_bmp_to_gop_blt()`, is introduced for scenarios
where FSP needs to load and convert a bitmap in a single step
(e.g., via its entrypoint).

This change makes `fsp_convert_bmp_to_gop_blt()` a generic API capable
of converting any provided bitmap into a BLT buffer. SoC layers
(like Alder Lake, Meteor Lake, Panther Lake) can now explicitly load
bitmaps and then pass them to `fsp_convert_bmp_to_gop_blt()`, or use
the new `fsp_load_and_convert_bmp_to_gop_blt()` for combined
operations.

Before:
- `soc_load_logo_by_coreboot()` -> `fsp_convert_bmp_to_gop_blt()`
      (loads logo internally)
- `soc_load_logo_by_fsp()` -> `fsp_convert_bmp_to_gop_blt()`
      (loads logo internally)

**After:**
- `soc_load_logo_by_coreboot()` -> loads logo
      -> `fsp_convert_bmp_to_gop_blt()`
- `soc_load_logo_by_fsp()` -> `fsp_load_and_convert_bmp_to_gop_blt()`

BUG=b:423591644
TEST=Able to build and boot google/fatcat. FW splash screen looks
proper.

Change-Id: Ia20e8d42bca6f40c4eb652eb69e3fce84409fc35
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88014
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-06-23 02:03:59 +00:00
Matt DeVillier
7f03e3bd6c drivers/efi/efivars: Change printk level from ERROR to DEBUG
This case doesn't reflect an error condition, so adjust the printk
level accordingly.

Change-Id: I3afa818447d3e7c9d08968ffc6b57a663af45c3e
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88011
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2025-06-13 15:25:45 +00:00
Matt DeVillier
c740786f12 drivers/gfx/generic: Use 'noop_read_resources'
The generic device attached to this driver doesn't have resources
separate from the parent device to which it's attached, so
use 'noop_read_resources' to suppress a false-positive error in
the cbmem console log (GENERIC: 0.0 missing read_resources).

Change-Id: I985318dcc7cc32aaa3f6a599ade95e065900031e
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88012
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-06-13 15:25:38 +00:00
Xin Ji
c2496bc62e drivers/analogix/anx7625: Add a retry mechanism to decode EDID
Anx7625 reads EDID through AUX channel with I2C Over Aux operation,
reading 16-byte chunk a time. Sometimes, panel(CSOT MNB601LS1-3)
does not returns EDID raw data in time or returns OK without providing
data.

Root cause:
The measured difference between two adjacent UI signals of the AUX
signal is 36ns (518 - 482ns), it meets the VESA DP1.2/1.3 spec < 0.08UI
(48ns) requirement. However, this value exceeds the VESA DP1.1a spec
supported by the panel: max < 0.04UI (24ns) requirement, which exceeds
the tolerance value of the panel and leads to EDID communication
failure.

To address this issue, determined by tests, so that the issue did not
reproduce in over 200 tests

Test result:
Verified on 12pcs panels(8pcs issue panels, 4pcs new panels), 10pcs
tested 300 cycles, 2pcs tested 400 cycles, issue cannot be reproduced.

BUG=b:415946451
TEST=Tested on corsola over 200 times
BRANCH=corsola

Change-Id: I2d4f6b65b8f663ea9b9459e0343897a1223d631a
Signed-off-by: Xin Ji <xji@analogix.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87961
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-06-07 09:50:32 +00:00
Wonkyu Kim
359ae67668 elog: Handle elog in later boot phase
Use POSTPONE_SPI_ACCESS to handle elog data later boot phase to avoid
flash access delay by other boot controllers.

Intel has pre-CPU boot controllers (e.g. CSE) which load non-CPU
firmwares. Boot-critical firmwares are loaded before CPU reset and
non-boot-critical firmwares are loaded during CPU boot. If another
controller accesses SPI to load firmwares, reading SPI by CPU is ok,
but writing to SPI for saving elog data can take ~32ms sometimes.
Saving elog data usually takes less than 1ms.

There are three elog handling sequences that need to move together
under the Kconfig:
- Soc folder
- Elog driver folder
- ChromeOS folder

Before this change, sometimes it delays like below:
BS: callback (0x7386d428) @ src/soc/intel/pantherlake/elog.c:216 (32 ms)
After this change, the delay is less than 1 ms:
BS: callback (0x7386d3e8) @ src/soc/intel/pantherlake/elog.c:213 (0 ms)

TEST
1. Enable DEBUG_BOOT_STATE
2. Check time
BS: callback (0x7386d3e8) @ src/soc/intel/pantherlake/elog.c:213 (0 ms))

Change-Id: I3f5e7acf5204e213179664d0d77151d415d00896
Signed-off-by: Wonkyu Kim <wonkyu.kim@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87740
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-06-05 13:36:36 +00:00
Subrata Banik
4c446751c6 {commonlib, drivers}: Track firmware splash screen rendering completion
This commit adds a new timestamp, `TS_FIRMWARE_SPLASH_RENDERED`
(ID 557), to precisely mark the moment the firmware splash screen has
finished displaying.

The timestamp is recorded in `src/drivers/intel/fsp2_0/silicon_init.c`
within the `do_silicon_init` function. It's conditionally added based on
the platform's configuration:

- For platforms using FSP's native BMP rendering (prior to FSP 2.2, with
  `CONFIG(BMP_LOGO)` and without
  `CONFIG(USE_COREBOOT_FOR_BMP_RENDERING)`).
- For platforms where coreboot handles BMP rendering (`CONFIG(BMP_LOGO)`
  and `CONFIG(USE_COREBOOT_FOR_BMP_RENDERING)`).

This enhancement provides better visibility into the boot process and
allows for more accurate performance analysis related to splash screen
display time.

BUG=b:418935715
TEST=Able to build and boot google/fatcat. Verified below details in
`cbmem -t`.

```
557:Firmware splash screen rendering finished    47,193,590 (2,235)
```

Change-Id: Ibef967dbc6e224741438e9708b42486ba03d0104
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87812
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-05-25 14:35:09 +00:00
Keith Hui
918f21b72d drivers/spi/winbond.c: Add W25Q64JV signature
I am using a pair of Winbond W25Q64JVSSIM SPI flash chips for
coreboot development. While working on Asus P8x7x Series
autonomous soft strap update support, aka CB:85413 and CB:87334,
I found that without its signature (mfgr 0xef, dev 0x7017) added,
rdev_writeat() would fail to get anything into the flash chip
even though it reports success. Its other parameters are copied
from W25Q64_V as the two are almost the same.

Change-Id: I4af6268a2a1bde4d2ff9c76879c3bc59b91a916d
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87363
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-05-21 17:18:29 +00:00
Jeremy Compostella
9979be7482 drivers/intel/fsp2_0: Remove redundant NULL checks and simplify code
This commit refactors the code by eliminating unnecessary NULL pointer
checks for the `efi_bmp_image_header header` parameter in several
functions. The calling function `fsp_convert_bmp_to_gop_blt` already
verifies that the `header` pointer is not NULL before invoking these
functions, rendering these checks redundant. Similarly, checks for
`adjusted_x` and `adjusted_y` in `calculate_adj_height_width` have been
removed. This streamlines the code and reduces unnecessary operations.

Additionally, the `is_bmp_image_compressed` function has been simplified
for improved readability by directly returning the result of the
compression type comparison.

Change-Id: Ia8afcac0fb21633e379f5d8b9713ba6f8b92c1c8
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87616
Reviewed-by: Zhixing Ma <zhixing.ma@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Reviewed-by: Cliff Huang <cliff.huang@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-05-14 18:04:53 +00:00