Commit graph

62,386 commits

Author SHA1 Message Date
Patrick Rudolph
3a5e4660bb mb/lenovo/t530: Unify GEN_DEC entries
Use the same GEN_DEC ranges as on t430. This makes the code look more
similar, but doesn't change the functionality. It changes the TIMELESS
build artifact.

Change-Id: Ibfac61f615fba2b91101125a2187b45af6dadd19
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91283
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-28 15:03:27 +00:00
Patrick Rudolph
416875e93e mb/lenovo/t430|t530: Reduces differences in code
Make the T430 look like the T530 codebase by reordering includes,
update the ACPI code and update the CMOS defaults file. Should have
not influence on functionality, but changes the TIMELESS build artifacts.

Change-Id: I2c300ecbf44fa950183ee5e05ba1e05cdf5ff00d
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91281
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2026-02-28 15:03:17 +00:00
Matt DeVillier
57f96b83fe mb/google/link/hda_verb: Remove presence detect flag from internal sources
The pin widgets for the internal speakers and microphone should not
have the presence detect flag set, as this causes the jack detect
to fail on some distros, leading to headphone output not working.

TEST=build/boot LINK

Change-Id: I798d0cc4a0f4de65ebe51f1dafaeeb12728d2f40
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91444
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2026-02-28 15:02:54 +00:00
Matt DeVillier
6be9ee7ce4 mb/google/link: Use AZALIA_PIN_DESC macros for pin widgets
Update the Creative CA0132 Pin Widget Verb Table from raw hex config
values to AZALIA_PIN_DESC for NIDs 0x0B–0x13, and use
AZALIA_PIN_CFG_NC(0) for N/C pins (0x0C–0x0F).

Mapping generated by hda-decoder utility.

TEST=build/boot LINK

Change-Id: Ia1c9bce2bf0a71aa3a60678828cbc6bc55f7bfc1
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91443
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2026-02-28 15:02:48 +00:00
Hualin Wei
8718db133a mb/google/fatcat/var/lapis: Add 2 Micron modules to RAM id table
Add Micron MT62F1G32D2DS-020 WT:D  as id 1, and add Micron
MT62F2G32D4DS-020 WT:D as id 0, resulting in the list below:

DRAM Part Name                 ID to assign
H58G66CK8BX147                 0 (0000)
K3KL9L90EM-MGCU                0 (0000)
MT62F2G32D4DS-023 WT:C         0 (0000)
H58G56CK8BX146                 1 (0001)
K3KL8L80EM-MGCU                1 (0001)
MT62F1G32D2DS-023 WT:C         1 (0001)
K3KLALA0EM-MGCU                2 (0010)
MT62F1G32D2DS-020 WT:D         1 (0001)
MT62F2G32D4DS-020 WT:D         0 (0000)

BUG=b:488228474
TEST=emerge-fatcat coreboot, rework by EE
         flash it and boot normal.

Change-Id: I23ee56fe7e8f2e2ade75eaaf1fa19b91e784030f
Signed-off-by: Hualin Wei <weihualin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91452
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-28 15:02:34 +00:00
Hualin Wei
f9f43d862d spd/lp5: Add Micron memory part
Add Micron memory part MT62F2G32D4DS-023 to LP5
global list.

BUG=b:488228474
TEST=emerge-fatcat coreboot, rework by EE
     flash it and boot normal.

Change-Id: I5c628f35ae789a20688a761c09c1c04578e40f1f
Signed-off-by: Hualin Wei <weihualin@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91451
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Weimin Wu <wuweimin@huaqin.corp-partner.google.com>
Reviewed-by: Pranava Y N <pranavayn@google.com>
2026-02-28 15:02:29 +00:00
Rui Zhou
c57b88d74d mb/google/brox/var/lotso: delete mb_get_channel_disable_mask
We found that the lotso project has already used
variant_is_half_populated. If we continue to use the
mb_get_channel_disable_mask API, it will reduce the memory of each DDR
by half. In reality, we are reducing the number of DDR modules (from 4
to 2), so we should remove mb_get_channel_disable_mask to ensure proper
DIMM identification.

BUG=b:468889066
BRANCH=None
TEST=boot to kernel success, and the log shows that the RAM ID is correct.

Change-Id: Ia7fc4610b3257bc20a871080f52f02e089b8531c
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91426
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2026-02-27 18:48:11 +00:00
Matt DeVillier
8ba58ef800 mb/samsung/lumpy: Correct NID 0x08 HDA pin config macro usage
Commit eb504eb49a ("mb/samsung/lumpy: Fix HDA pin configuration
issues") incorrectly used AZALIA_PIN_CFG_NC(0) as a standalone entry
for NID 0x08. Change to AZALIA_PIN_CFG(0, 0x08, AZALIA_PIN_CFG_NC(0))
so the verb for NID 0x08 is emitted correctly.

Change-Id: Iaf23b6e8791a352758189d92ad9c89414fc5a22d
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91442
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2026-02-27 15:01:55 +00:00
Jarried Lin
38988a727e util/mediatek: Reduce non-boot related BROM settings
Reduce BROM settings that are not related to boot to save boot time.

BUG=b:480810041
TEST= 0:1st timestamp reduce from 400ms to 250ms

Change-Id: Ia97a78515d80a141b9b409407f6e41a07261cad9
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91423
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2026-02-27 13:47:47 +00:00
Tony Huang
e84415b8f8 mb/google/nissa/var/yaviks: Add micron memory to RAM ID table
DRAM Part Name                 ID to assign
MT62F1G32D2DS-031RF WT:C       2 (0010)
MT62F2G32D4DS-031RF WT:C       5 (0101)

BUG=b:487113903
TEST=build nissa coreboot

Change-Id: I171d2cdfcd4ec41562b09705dab64f00ce51c6a2
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91407
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
2026-02-27 13:47:32 +00:00
Tony Huang
08dcaf404c mb/google/nissa/var/yavilla: Add micron memory to RAM ID table
DRAM Part Name                 ID to assign
MT62F1G32D2DS-031RF WT:C       2 (0010)
MT62F2G32D4DS-031RF WT:C       5 (0101)

BUG=b:487113903
TEST=build nissa coreboot

Change-Id: I5b49ec3513fd1878942c96bc8b5375d79e049898
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91406
Reviewed-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-27 13:47:27 +00:00
Subrata Banik
523242b2b9 google/bluey: Add RW_CDT region to flash map
Carve out 256K from the RW_UNUSED region to create a new RW_CDT
section at the end of the flash. The RW_UNUSED region is reduced
from 4096K (4M) to 3840K to maintain the existing flash offset
for the start of the unused block.

The RW_CDT region will be used to store Configuration Data Tables,
allowing for platform-specific configuration binary blobs to be
stored and updated in the RW section of the flash.

BUG=b:483194720
TEST=Build bluey and verify the FMAP layout using 'dump_fmap'.
     Ensure RW_CDT exists at the expected offset.

dump_fmap -h ../../out/build/bluey/firmware/image-bluey.serial.bin
RW_CDT                     01fc0000    02000000    00040000
RW_UNUSED                  01c00000    01fc0000    003c0000
RW_LEGACY                  0192e000    01c00000    002d2000
RW_SECTION_B               010ae000    0192e000    00880000
  RW_FWID_B                  0192df00    0192e000    00000100
  FW_MAIN_B                  010b0000    0192df00    0087df00
  VBLOCK_B                   010ae000    010b0000    00002000
RW_SECTION_A               0082e000    010ae000    00880000
  RW_FWID_A                  010adf00    010ae000    00000100
  FW_MAIN_A                  00830000    010adf00    0087df00
  VBLOCK_A                   0082e000    00830000    00002000
RW_MISC                    00800000    0082e000    0002e000
  RW_NVRAM                   0082a000    0082e000    00004000
  RW_VPD                     00822000    0082a000    00008000
  RW_SHARED                  00821000    00822000    00001000
  SHARED_DATA                00821000    00822000    00001000
  RW_ELOG                    00820000    00821000    00001000
  UNIFIED_MRC_CACHE          00800000    00820000    00020000
    RW_MRC_CACHE               00810000    00820000    00010000
    RECOVERY_MRC_CACHE         00800000    00810000    00010000
WP_RO                      00000000    00800000    00800000
  RO_VPD                     007fc000    00800000    00004000
  RO_GSCVD                   007fa000    007fc000    00002000
  RO_SECTION                 00000000    007fa000    007fa000
    RO_FRID                    007f9f00    007fa000    00000100
    GBB                        007f7000    007f9f00    00002f00
    COREBOOT                   00081000    007f7000    00776000
    FMAP                       00080000    00081000    00001000
    BOOTBLOCK                  00000000    00080000    00080000

Change-Id: I7d305647731862e61871e781ad7bfb7cd430b699
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91380
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2026-02-27 13:47:09 +00:00
Subrata Banik
5e46ac1364 mb/google/bluey: Resize WP_RO and add RW_UNUSED region
Modify the flash map (fmd) to reduce the Write-Protected RO (WP_RO)
section from 12M to 8M. The recovered 4M of space is reallocated
to a new RW_UNUSED region positioned before RW_LEGACY.

BUG=None
TEST=Build bluey image and verify FMAP table with 'fmap_decode'.
Ensure resulting layout matches the intended offsets.

Change-Id: I6dde5fac5ba3be5fb28f2cd46c5518d87082c067
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91379
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2026-02-27 13:47:03 +00:00
Angel Pons
08f2f3a21b Haswell NRI: Implement 1D margin training
Implement an algorithm that performs a simple 1D margin training. This
algorithm is generic, i.e. it can be used with multiple margin params.
Use this algorithm to train three margin parameters: RdT, WrT and RdV.

This algorithm also does per-bit calibration, but only for RdT and WrT
since Haswell does not have per-rank per-bit RdV (c.f. `RX_OFFSET_VDQ`
register). Still, implement support in `change_margin()` for all three
types of per-bit margins (WrTBit, RdTBit, RdVBit) for completeness.

Tested on Asrock Z97 Extreme6 with 2 DIMMs per channel (1R + 2R):
- NRI finishes successfully, board still boots to Arch Linux.
- Both fast training as well as S3 suspend/resume still work.

Change-Id: I382cea8e230aee46a0dc66248f1e678d8a9a0090
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89314
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-27 13:46:53 +00:00
Sowmya V
098a5cf16e mb/google/ocelot: Configure CDCLK frequency for display
Configure the Core Display Clock (CDCLK) frequency selection by setting
the 'vga_cd_clk_freq_sel' register to CD_CLK_461MHZ in the ocelot
baseboard devicetree. This ensures the display engine operates at the
required frequency for the panel to meet the hardware configuration.

TEST=Build and boot ocelot, verify display initialization.

Change-Id: Ic2f8fccc4391febd342f8f140014c5f3e09472c4
Signed-off-by: Sowmya V <v.sowmya@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91312
Reviewed-by: Avi Uday <aviuday@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-27 13:45:24 +00:00
Jarried Lin
7b205808e4 mb/google/rauru: Disable CHROMEOS_USE_EC_WATCHDOG_FLAG
Now that we use the WATCHDOG_TOMBSTONE section to store the watchdog
event magic, there is no need to ask EC for the last reset reason. In
fact, with MEDIATEK_WDT_RESET_BY_SW enabled, EC doesn't even record the
watchdog reset reason.

Enable CHROMEOS_USE_EC_WATCHDOG_FLAG only if MEDIATEK_WDT_RESET_BY_SW is
disabled.

BUG=b:481854714
TEST= After triggering WDT timeout, the following log can be observed:
[NOTE ]  coreboot-coreboot-unknown.9999.782bb84 Mon Feb 23 06:42:21 UTC 2026 aarch64 bootblock starting (log level: 8)
[DEBUG]  ARM64: Exception handlers installed.
[DEBUG]  ARM64: Testing exception
[DEBUG]  ARM64: Done test exception
[DEBUG]  [booker_init] AP hash rule: 0xbe00
[INFO ]  mtk_cksys_init = 0x1
[INFO ]  WDT: Status = 0x20000
[INFO ]  WDT: Last reset was other reset type: 0x00020000
[INFO ]  mtk_wdt_swreset() called!
[INFO ]  board_reset() called!

And "elogtool list" contained "Hardware watchdog reset".

Change-Id: I44a940d88948897e6727fad5c87f364e3ba9ac61
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91421
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-27 13:30:34 +00:00
Jarried Lin
b1e8f87b30 mb/google/rauru: Enable MEDIATEK_WDT_RESET_BY_SW
For MT8196p, watchdog external reset is enabled by kernel configuration,
and EC ignores the reset signal AP_PMIC_WDTRST_L. Therefore, enable
MEDIATEK_WDT_RESET_BY_SW to allow triggering the secondary watchdog
reset via software instead of watchdog hardware.

BUG=b:481854714
TEST=cbmem logs preserved on WDT timeout

Change-Id: Ib6b1ddbe28b0cd2aac2043f18dcd15caf4cac37a
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91420
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-27 13:30:29 +00:00
Patrick Rudolph
f4825e5c12 soc/amd/common: Add I3C driver
Add an I3C driver that allows to use the I3C HW from the OS.
It does:
- Power on/off the I3C HW
- Configures the IOMUX

Add the SoC specific AOAC devices and GPIO pins to reconfigure
the GPIO for I3C HW.

New log messages are seen in coreboot:
[DEBUG]  MMIO: fedd2000 disabled

TEST: The I3C driver loads on amd/glinda using Ubuntu 25.04.

Change-Id: Ibca20e2a4f0cb0e6006cfa47fd4addbe27504645
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87960
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2026-02-27 13:02:58 +00:00
Jeremy Compostella
cf5d6f1c88 soc/intel/common/block/gspi: Simplify Makefile using all-$()
Replace individual stage-specific lines with all-$() for each file.
This simplifies the Makefile from 6 lines to 2 lines while maintaining
identical functionality.

The all-$() variable automatically includes the file in all build stages
(bootblock, verstage, romstage, postcar, ramstage, smm), which is
exactly what the original code was doing manually for each stage.

Change-Id: Ie89ba86a545c548fcc4ad0eb48a5cbb33733b541
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91358
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2026-02-26 19:38:36 +00:00
Jeremy Compostella
56ede20f10 soc/intel/pantherlake: Use common SPI device function driver
Switch to the common SPI device function driver implementation. This
eliminates platform-specific SPI code by leveraging the common driver
with platform-specific Kconfig and macros.

This commit:
- Selects SOC_INTEL_COMMON_FEATURE_SPI_DEVFN and
  SOC_INTEL_COMMON_FEATURE_SPI_DEVFN_PSF in Kconfig
- Adds CONFIG_SOC_INTEL_SPI_DEV_MAX=3
- Adds CONFIG_SOC_INTEL_SPI_PSF_DESTINATION_ID=0x5140
- Removes src/soc/intel/pantherlake/spi.c
- Updates Makefile.mk to remove spi.c compilation

The common code uses SOC_GSPI_DEVFN(n) macro directly.

TEST=Panther Lake Fatcat OS boots properly

Change-Id: Id7462deeb80c1efe32accf0ab7fc9fa68494ddfd
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91328
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 19:38:28 +00:00
Jeremy Compostella
4bdeb73635 soc/intel/meteorlake: Use common SPI device function driver
Switch to the common SPI device function driver implementation. This
eliminates platform-specific SPI code by leveraging the common driver
with platform-specific Kconfig and macros.

This commit:
- Selects SOC_INTEL_COMMON_FEATURE_SPI_DEVFN and
  SOC_INTEL_COMMON_FEATURE_SPI_DEVFN_PSF in Kconfig
- Adds CONFIG_SOC_INTEL_SPI_DEV_MAX=3
- Adds CONFIG_SOC_INTEL_SPI_PSF_DESTINATION_ID=0x5140
- Removes src/soc/intel/meteorlake/spi.c
- Updates Makefile.mk to remove spi.c compilation

The common code uses SOC_GSPI_DEVFN(n) macro directly.

Change-Id: I6ac7bdf4c9eeaab2d0d0ecbe8cd2ea2bf7f9ea19
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91327
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2026-02-26 19:38:21 +00:00
Jeremy Compostella
8ecff12528 soc/intel/alderlake: Use common SPI device function driver
Switch to the common SPI device function driver implementation. This
eliminates platform-specific SPI code by leveraging the common driver
with platform-specific Kconfig and macros.

This commit:
- Selects SOC_INTEL_COMMON_FEATURE_SPI_DEVFN and
  SOC_INTEL_COMMON_FEATURE_SPI_DEVFN_PSF in Kconfig
- Adds CONFIG_SOC_INTEL_SPI_DEV_MAX=4
- Adds CONFIG_SOC_INTEL_SPI_PSF_DESTINATION_ID=0x23a8
- Removes src/soc/intel/alderlake/spi.c
- Updates Makefile.mk to remove spi.c compilation

The common code uses SOC_GSPI_DEVFN(n) macro directly.

Change-Id: I346e6c6cbe95c8608009e5f9fc53dbcff5edba4e
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91326
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 19:38:15 +00:00
Jeremy Compostella
0aea05411d soc/intel/tigerlake: Use common SPI device function driver
Switch to the common SPI device function driver implementation. This
eliminates platform-specific SPI code by leveraging the common driver
with platform-specific Kconfig and macros.

This commit:
- Selects SOC_INTEL_COMMON_FEATURE_SPI_DEVFN and
  SOC_INTEL_COMMON_FEATURE_SPI_DEVFN_PSF in Kconfig
- Adds CONFIG_SOC_INTEL_SPI_DEV_MAX=3
- Adds CONFIG_SOC_INTEL_SPI_PSF_DESTINATION_ID (0x23b0 for PCH-H, 0x23a8
  default)
- Removes src/soc/intel/tigerlake/spi.c
- Updates Makefile.mk to remove spi.c compilation

The common code uses SOC_GSPI_DEVFN(n) macro directly.

Change-Id: Ib195ffcc0d46f7e95eba2d0a2c66fbcdcca615a2
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91325
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2026-02-26 19:38:09 +00:00
Jeremy Compostella
47f3e7e3cc soc/intel/jasperlake: Use common SPI device function driver
Switch to the common SPI device function driver implementation. This
eliminates platform-specific SPI code by leveraging the common driver
with platform-specific Kconfig and macros.

This commit:
- Selects SOC_INTEL_COMMON_FEATURE_SPI_DEVFN in Kconfig
- Adds CONFIG_SOC_INTEL_SPI_DEV_MAX=3
- Removes src/soc/intel/jasperlake/spi.c
- Updates Makefile.mk to remove spi.c compilation

Note: This platform does not use PSF destination ID.
The common code uses SOC_GSPI_DEVFN(n) macro directly.

Change-Id: If42aa1f955bc0aae2698aac35dbe23b79c68bf09
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91324
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 19:38:03 +00:00
Jeremy Compostella
91520ab096 soc/intel/common/feature/spi: Add common SPI device function driver
Add a common driver for SPI device function to bus mapping. This
eliminates code duplication across Intel SoC platforms by providing
a generic implementation that can be configured via platform-specific
macros.

The driver provides:
- spi_soc_devfn_to_bus(): Convert device function to bus number using
  platform-defined SOC_SPI_DEVFN(n) macros
- soc_get_spi_psf_destination_id(): Optional PSF destination ID support
  for platforms that need it

Platforms must define SOC_SPI_DEVFN(n) in soc/pci_devs.h.

Platforms must define the following Kconfig:
- SOC_INTEL_SPI_DEV_MAX: Number of SPI controllers available on the
  platform.
- SOC_INTEL_COMMON_FEATURE_SPI_DEVFN_PSF: To enable PSF designation, the
  ID must be provided with SOC_INTEL_SPI_PSF_DESTINATION_ID.
- SOC_INTEL_SPI_PSF_DESTINATION_ID: (optional) PSF destination ID for
  SPI controller.

Change-Id: I07ded6e6d2156a02eef7b4fea86ac1c8fa5ff3ce
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91323
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 19:37:57 +00:00
Jeremy Compostella
0668959a92 soc/intel/skylake: Use common GSPI devfn mapping
Replace platform-specific gspi.c with the common GSPI device function
mapping implementation.

Changes:
- Select SOC_INTEL_COMMON_FEATURE_GSPI_DEVFN in Kconfig
- Define SOC_GSPI_DEVFN(n) macro in pci_devs.h
- Remove platform-specific gspi.c file

Change-Id: Ib7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5c6
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91321
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2026-02-26 19:37:42 +00:00
Jeremy Compostella
45d3ab84a8 soc/intel/cannonlake: Use common GSPI devfn mapping
Replace platform-specific gspi.c with the common GSPI device function
mapping implementation.

Changes:
- Select SOC_INTEL_COMMON_FEATURE_GSPI_DEVFN in Kconfig
- Define SOC_GSPI_DEVFN(n) macro in pci_devs.h
- Remove platform-specific gspi.c file

Change-Id: Ia6b7c8d9e0f1a2b3c4d5e6f7a8b9c0d1e2f3a4b5
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91320
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 19:37:34 +00:00
Jeremy Compostella
4aae5fb66d soc/intel/elkhartlake: Use common GSPI devfn mapping
Replace platform-specific gspi.c with the common GSPI device function
mapping implementation.

Changes:
- Select SOC_INTEL_COMMON_FEATURE_GSPI_DEVFN in Kconfig
- Define SOC_GSPI_DEVFN(n) macro in pci_devs.h
- Remove platform-specific gspi.c file

Change-Id: If6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4a5
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91319
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 19:37:27 +00:00
Jeremy Compostella
78ef2d0433 soc/intel/jasperlake: Use common GSPI devfn mapping
Replace platform-specific gspi.c with the common GSPI device function
mapping implementation.

Changes:
- Select SOC_INTEL_COMMON_FEATURE_GSPI_DEVFN in Kconfig
- Define SOC_GSPI_DEVFN(n) macro in pci_devs.h
- Remove platform-specific gspi.c file

Change-Id: Ie5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3f4
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91318
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2026-02-26 19:37:20 +00:00
Jeremy Compostella
66a6c25ef8 soc/intel/tigerlake: Use common GSPI devfn mapping
Replace platform-specific gspi.c with the common GSPI device function
mapping implementation.

Changes:
- Select SOC_INTEL_COMMON_FEATURE_GSPI_DEVFN in Kconfig
- Define SOC_GSPI_DEVFN(n) macro in pci_devs.h
- Remove platform-specific gspi.c file

Change-Id: Id4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2e3
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91317
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 19:37:13 +00:00
Jeremy Compostella
3c92c8402a soc/intel/pantherlake: Use common GSPI devfn mapping
Replace platform-specific gspi.c with the common GSPI device function
mapping implementation.

Changes:
- Select SOC_INTEL_COMMON_FEATURE_GSPI_DEVFN in Kconfig
- Define SOC_GSPI_DEVFN(n) macro in pci_devs.h
- Remove platform-specific gspi.c file

TEST=Panther Lake Fatcat OS boots properly

Change-Id: Ic3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1d2
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91316
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 19:37:04 +00:00
Jeremy Compostella
6459039b76 soc/intel/meteorlake: Use common GSPI devfn mapping
Replace platform-specific gspi.c with the common GSPI device function
mapping implementation.

Changes:
- Select SOC_INTEL_COMMON_FEATURE_GSPI_DEVFN in Kconfig
- Define SOC_GSPI_DEVFN(n) macro in pci_devs.h
- Remove platform-specific gspi.c file

Change-Id: Ib2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0c1
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91315
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 19:36:57 +00:00
Jeremy Compostella
039f21b5e3 soc/intel/alderlake: Use common GSPI devfn mapping
Replace platform-specific gspi.c with the common GSPI device function
mapping implementation.

Changes:
- Select SOC_INTEL_COMMON_FEATURE_GSPI_DEVFN in Kconfig
- Define SOC_GSPI_DEVFN(n) macro in pci_devs.h
- Remove platform-specific gspi.c file

Change-Id: Ia1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91314
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 19:36:50 +00:00
Jeremy Compostella
a4bc3131a5 soc/intel/common/feature/gspi: Add common devfn mapping
Add a common implementation of gspi_soc_bus_to_devfn() to reduce code
duplication across multiple Intel SoC platforms. This implementation
uses the SOC_GSPI_DEVFN(n) macro which must be defined by each platform
in their soc/pci_devs.h header to map GSPI bus numbers to PCI device and
function values.

This change enables consolidation of nearly identical gspi.c files from
Alder Lake, Meteor Lake, Panther Lake, Tiger Lake, Jasper Lake, Elkhart
Lake, Cannon Lake, and Skylake platforms.

The implementation leverages the existing
CONFIG_SOC_INTEL_COMMON_BLOCK_GSPI_MAX Kconfig option and includes
compile-time assertions to ensure the configuration is within supported
limits (up to 7 GSPI controllers).

Change-Id: I776cebd70968fd4b8bbab176bca0a446a0cc76ab
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91322
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 19:36:45 +00:00
Angel Pons
253689aebb sb/intel/lynxpoint/acpi/xhci.asl: Guard PCH-LP methods
The `LPCL` and `LPS0` methods are specific to PCH-LP, and are not used
at all on PCH-H. To prevent accidental use and to reduce the DSDT size
on PCH-H builds, add some preprocessor guards around those methods.

For the ASRock Z97 Extreme, `build/dsdt.aml` size goes from 8538 bytes
down to 7904 bytes, a reduction of about 7%.

Change-Id: I775dcde4932f6039ba7d5673364e495837a386da
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91395
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2026-02-26 19:34:05 +00:00
Angel Pons
72ecebf0c3 soc/intel/broadwell/acpi/xhci.asl: Use macros for constants
Declaring named objects for constants is not ideal, especially when done
inside of a method (it is highly inefficient). Instead, use preprocessor
defines.

Change-Id: I2d9d17b820ee72ba628b44ae508a7c467c023dd9
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91394
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2026-02-26 19:33:56 +00:00
Angel Pons
813edbbde8 sb/intel/lynxpoint/acpi/xhci.asl: Use macros for constants
Declaring named objects for constants is not ideal, especially when done
inside of a method (it is highly inefficient). Instead, use preprocessor
defines.

Change-Id: I1143f2aa09a2ed04da92edcf6ae9d832c0b5e2fa
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91393
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2026-02-26 19:33:49 +00:00
Angel Pons
3cde265c28 sb/intel/lynxpoint/acpi/xhci.asl: Drop redundant writes
Setting `SWAI` and `SAIP` is already done in the LPT-H and LPT-LP
specific branches, so there's no need to do it again. WPT-LP does
NOT need these writes.

Change-Id: Ib5156fab1384cdc531fc1d49dd61e5fc4600e894
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91391
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2026-02-26 19:33:42 +00:00
Purdea Andrei
a59ddda11e Doc/mb/protectli/fw6: describe revisions and more variants
- Add documentation about Old/New motherboard revisions
- Mention that FW6A/B/C exist as both Old and New Revision
- Mention that the current codebase only supports the Old Revision
- Add documentation about FW6D and FW6E variants, currently unsupported

Signed-off-by: Purdea Andrei <andrei@purdea.ro>
Change-Id: Ifdf1624c8d206326c64163382b31c6001300b4df
Reviewed-on: https://review.coreboot.org/c/coreboot/+/88226
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2026-02-26 19:33:28 +00:00
Jeremy Compostella
d5161611a4 soc/intel/pantherlake: Use common I2C devfn mapping
Replace platform-specific i2c.c with common implementation.

Defines SOC_I2C_DEVFN(n) macro and uses existing
CONFIG_SOC_INTEL_I2C_DEV_MAX Kconfig.

Change-Id: I9200c41bf459dfef29599cc1c736e14e8cbd36b9
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91266
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Guvendik, Bora <bora.guvendik@intel.com>
2026-02-26 16:31:42 +00:00
Jeremy Compostella
78e36f8c78 soc/intel/meteorlake: Use common I2C devfn mapping
Replace platform-specific i2c.c with common implementation.

Defines SOC_I2C_DEVFN(n) macro and uses existing
CONFIG_SOC_INTEL_I2C_DEV_MAX Kconfig.

Change-Id: Ifab488ada515656a5108aee5a6f481abda6a9c0d
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91265
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Guvendik, Bora <bora.guvendik@intel.com>
2026-02-26 16:31:33 +00:00
Jeremy Compostella
f703f2800c soc/intel/skylake: Use common I2C devfn mapping
Replace platform-specific i2c.c with common implementation.

Defines SOC_I2C_DEVFN(n) macro and uses existing
CONFIG_SOC_INTEL_I2C_DEV_MAX Kconfig.

Change-Id: I9ae46e252c599e4ee82a60c03a8d83f874a8da98
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91264
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Guvendik, Bora <bora.guvendik@intel.com>
2026-02-26 16:31:20 +00:00
Jeremy Compostella
7f922438be soc/intel/cannonlake: Use common I2C devfn mapping
Replace platform-specific i2c.c with common implementation.

Defines SOC_I2C_DEVFN(n) macro and uses existing
CONFIG_SOC_INTEL_I2C_DEV_MAX Kconfig.

Change-Id: I0117a418d35cea3e7c0442c8c3ea27d17b8bdf06
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91263
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Guvendik, Bora <bora.guvendik@intel.com>
2026-02-26 16:31:11 +00:00
Jeremy Compostella
a0ba812a09 soc/intel/jasperlake: Use common I2C devfn mapping
Replace platform-specific i2c.c with common implementation.

Defines SOC_I2C_DEVFN(n) macro and uses existing
CONFIG_SOC_INTEL_I2C_DEV_MAX Kconfig.

Change-Id: Ia98748818fde9d1048355d4a144211a327c453ba
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91262
Reviewed-by: Guvendik, Bora <bora.guvendik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 16:31:02 +00:00
Jeremy Compostella
83325f354b soc/intel/tigerlake: Use common I2C devfn mapping
Replace platform-specific i2c.c with common implementation.

Defines SOC_I2C_DEVFN(n) macro and uses existing
CONFIG_SOC_INTEL_I2C_DEV_MAX Kconfig.

Change-Id: Id8ac536813cadedc8d49ccb922d583a678436d2e
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91261
Reviewed-by: Guvendik, Bora <bora.guvendik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 16:30:46 +00:00
Jeremy Compostella
fe728d62c9 soc/intel/elkhartlake: Use common I2C devfn mapping
Replace platform-specific i2c.c with common implementation.

Defines SOC_I2C_DEVFN(n) macro and uses existing
CONFIG_SOC_INTEL_I2C_DEV_MAX Kconfig.

Change-Id: I09aec87fbac0861d3b50d26f475016fdd5aa6fb7
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91260
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Guvendik, Bora <bora.guvendik@intel.com>
2026-02-26 16:30:37 +00:00
Jeremy Compostella
749bae2f94 soc/intel/alderlake: Use common I2C devfn mapping
Replace platform-specific i2c.c with common implementation.

Defines SOC_I2C_DEVFN(n) macro and uses existing
CONFIG_SOC_INTEL_I2C_DEV_MAX Kconfig.

Change-Id: I5d8420231d1252986b8b7274a4c8c2f6d41f759d
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91259
Reviewed-by: Guvendik, Bora <bora.guvendik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 16:30:28 +00:00
Jeremy Compostella
b21e861ab5 soc/intel/common/feature/i2c: Add common devfn mapping
Introduce a common implementation for I2C device function to bus
number mapping that can be shared across multiple Intel SoC platforms.

The implementation uses:
- CONFIG_SOC_INTEL_I2C_DEV_MAX: Kconfig value for max I2C controllers
- SOC_I2C_DEVFN(n): SoC-specific macro for I2C devfn names

This eliminates duplicate code across platforms that follow the
standard I2C controller numbering scheme.

Change-Id: Ib242d7a839ccb26394794382098cecb658adf698
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91258
Reviewed-by: Guvendik, Bora <bora.guvendik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2026-02-26 16:30:13 +00:00
Patrick Rudolph
34c156427d soc/intel/common/block/lpc: Fix AMASK decoding in window detection
Commit 339ef9b5c9 ("soc/intel/common/block/lpc: Improve automatic
window opening") introduced a bug in the decoding of existing LPC I/O
window sizes from the LGIR (LPC Generic I/O Range) registers.

The AMASK field in the LGIR register stores bits [7:2] of the address
mask, with bits [1:0] implicitly always set to 1 (representing 4-byte
granularity). The original implementation incorrectly calculated the
window size as:

  exist_size = 1 + ((reg32 & LPC_LGIR_AMASK_MASK) >> 16)

This fails to restore the implicit lower bits [1:0] of the mask.

For example, a window programmed with size 8 bytes:
- Stored mask: (8-1) & 0xfc = 0x4 (bits [7:2] only)
- Incorrectly decoded: 0x4 + 1 = 5 bytes (WRONG)
- Correctly decoded: (0x4 | 0x3) + 1 = 8 bytes (CORRECT)

This bug caused failures on Panther Lake boards where existing windows
were not recognized as covering requested ranges, leading to:

  [ERROR] LPC: Cannot open IO window: 800 size 8
  [ERROR] No more IO windows

The fix properly reconstructs the full mask by OR-ing in the implicit
bits [1:0] before calculating the size:

  exist_size = ((amask_raw & 0xfc) | 0x3) + 1

BUG=b:486133237
TEST=Boot Panther Lake Fatcat board, verify no LPC window errors

Change-Id: I0b5f95c01da6ce84924a038106edec600e3b97f8
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91418
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
2026-02-26 16:12:08 +00:00
Subrata Banik
b50c219557 soc/intel: Use centralized emergency battery shutdown hook
Migrate the low-battery power-off sequence in Intel common reset
logic to use platform_handle_emergency_low_battery().

This ensures that all Intel-based boards benefit from the unified
ChromeOS battery alert flow (LED notification and ELOG recording)
without duplicating the logic in the SOC layer.

BUG=none
BRANCH=none
TEST=Verified that low-battery shutdown on Intel platforms still
correctly logs ELOG and triggers visual alerts via the new hook.

Change-Id: I37c15a1f7dd5acee10389c0521e8c9b2f2d90d42
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91411
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2026-02-25 22:56:14 +00:00