Commit graph

61,472 commits

Author SHA1 Message Date
Tony Huang
3dabe4f857 mb/google/brox/var/caboc: Increase I2C0 touchpad tHD to 0.53 us
Increase I2C0 touchpad tHD to 0.53 us by adjusting data_hold_time_ns in
I2C0 from 50 to 250, the new tHD meets SPEC between 0.3 us and 0.9 us.

The setting format is copied from baseboard/brox and modify I2C0.

BUG=b:461977573
TEST=emerge-brox coreboot
     checked TP function work
     measure the wave form meets SPEC
     Before: tHD  ~0.072 us
     After:  tHD  ~0.53 us

Change-Id: I2841107a9165fc0eacc465fe5013d23856a3f755
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90114
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
2025-11-26 18:58:26 +00:00
Erik van den Bogaert
12e763eece device/pci_ids: Add DIDs for TGL-H (GT1 and RM590E)
This commit adds the relevant DIDs to support Tiger Lake H (TGL-H) systems based on the Xeon W-11865MRE (GPU) and RM590E chipset (PCH).

TEST=A platform with Xeon W-11865MRE and RM590E booted
     the relevant information printed in coreboot log.
     [DEBUG]  CPU: ID 806d1, Tigerlake R0, ucode: 00000056
     [DEBUG]  MCH: device id 9a36 (rev 05) is Tigerlake-H-8-1
     [DEBUG]  PCH: device id 4390 (rev 11) is Tigerlake-H RM590E
     [DEBUG]  IGD: device id 9a70 (rev 01) is Tigerlake H GT1 32EU

Change-Id: I2bff2551b9f194e169c0edd080e9c869bcc9c60f
Signed-off-by: Erik van den Bogaert <ebogaert@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90179
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2025-11-26 18:57:46 +00:00
Luca Lai
01540f036e mb/google/fatcat/var/ruby: Use spd-11 for MT62F1G32D2DS-020 WT:D and
K3KL8L80EM-MGCV

Because there are some attributes of MT62F1G32D2DS-020 WT:D and
K3KL8L80EM-MGCV when review the specification again,
so modify the memory_parts.json attributes and re-generate SPD id
for MT62F1G32D2DS-020 WT:D and K3KL8L80EM-MGCV.

BUG=b:446771934
TEST=Use part_id_gen to generate related settings

Change-Id: Ic38286f38c4c6572cf2e22c78f5f202cc0a152cc
Signed-off-by: Luca Lai <luca.lai@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90124
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-11-26 18:57:33 +00:00
Terry Cheong
14e96b4ef1 mb/google/brox/caboc: Mute speaker amp to prevent pop noise on reboot
A pop noise is heard from the speakers on caboc devices when rebooting
while audio is playing.

This is caused by the speaker amplifier (class-D) being active during
the reboot process.

This change mutes the amplifier by updating the HDA verb table, which
is configured at boot time. The amplifier will be unmuted when
generating a dev beep to preserve that functionality.

BUG=b:439638686
TEST=Play audio in the OS and reboot the device. Verify that no pop
noise is heard from the speakers.

Change-Id: Ic9980d31097d60ede879c8d6dcdd541580765795
Signed-off-by: Terry Cheong <htcheong@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90199
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-26 18:57:18 +00:00
Kapil Porwal
567186a000 mb/google/bluey: Add support for off-mode charging
Implement full support for the LB_BOOT_MODE_OFFMODE_CHARGING
state. This mode is detected when the system powers on due to an
external charging event (cable insertion) while the system was
previously fully powered off.

This boot mode is critical for systems that need to maintain a light
footprint to quickly start charging without performing a full boot.
It combines with the existing low-battery mode to define a unified
"low power boot" state.

In romstage, the boot mode is detected using is_off_mode() and
the EC's low battery status, and the result is saved to CBMEM. In
ramstage, this mode is read to determine if heavy, resource-intensive
initializations should be skipped to conserve time and power.

Key changes:
- In romstage.c, implement set_boot_mode() to determine the
  mode (NORMAL, OFFMODE_CHARGING, or LOW_BATTERY) and save it to
  CBMEM_ID_BOOT_MODE.
- In mainboard.c, introduce get_boot_mode() and
  is_low_power_boot() to retrieve and check the CBMEM value.
- Skip heavy ramstage initializations (mainboard_init and
  mainboard_needs_pcie_init) when in a low-power boot mode.
- Update lb_add_boot_mode to report the mode stored in CBMEM
  to the coreboot table.

BUG=b:439819922
TEST=Verify off-mode charging behavior on Google/Quenbi.

Change-Id: I57d25deb6b2b1f9ff199cea5ca2953f10ffb4746
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90176
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-26 18:56:46 +00:00
Kapil Porwal
27fcb8617d commonlib: Add CBMEM ID to store boot mode
Introduce a new CBMEM ID, CBMEM_ID_BOOT_MODE (0x444D5442, "BTMD"),
to provide a dedicated storage location for the system's detected
boot mode (e.g., normal boot, low-battery, off-mode boot etc).

Storing the boot mode in CBMEM ensures that the initial detection
performed early in the boot process (e.g., in romstage by reading
PMIC logs) is securely passed to subsequent stages like ramstage,
where different boot modes require distinct logic paths.

Key changes:
- Define CBMEM_ID_BOOT_MODE in cbmem_id.h.
- Add "BOOT MODE" entry to the CBMEM_ID_TO_NAME_TABLE.

BUG=b:439819922
TEST=Verify boot mode stored in CBMEM.

Change-Id: I7ebf29385a99ac1be491bfefe1c74c8c9e58b55d
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90175
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-26 18:56:39 +00:00
Kapil Porwal
d6132c4c03 mb/google/bluey: Use SOC PMIC API to detect off-mode charging event
Refactor the is_off_mode() detection API on the Bluey mainboard
to call the newly introduced SOC-specific PMIC function,
is_pon_on_ac().

This change delegates the complex Power-On (PON) log parsing and
PMIC register checking to the SOC layer, simplifying the mainboard
code base. The board layer now contains only the high-level policy
wrapper for detecting cable-power-on events.

This improves modularity and ensures the board code relies on the
correct hardware abstraction.

Key changes:
- Implement is_off_mode() as a simple wrapper around is_pon_on_ac()
  (from the SOC PMIC library).
- Include soc/pmic.h to access the SOC's PMIC APIs.
- Expose is_off_mode() in board.h.

BUG=b:439819922
TEST=Verify boot mode on Google/Quenbi.

Change-Id: Ibc13c3ad96846cf5b3fb9bcf461e3f338ac9b8bd
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89122
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-11-26 18:56:32 +00:00
Kapil Porwal
201ebd48ee soc/qc/x1p42100: Add APIs to read PON reason from PMIC
Add the Power-On (PON) history log parsing and status API to the
SOC layer (soc/qualcomm/x1p42100/pmic.c).

This code is specific to the Qualcomm PMIC architecture (reading
registers for PON events and reasons), making it an SOC-specific
utility rather than a board-level policy. Moving it here improves
modularization and allows other X1p42100-based boards to reuse this
critical power management logic.

Key APIs introduced:
- pm_pon_read_pon_hist(): Reads the raw circular PON event log
  from the PMIC, reverses the buffer to put the latest entry first.
- is_pon_on_ac(): Interprets the log to detect if the power-on
  reason was due to AC/Cable Power (PON_CBLPWR_RSN).

Key changes:
- Create src/soc/qualcomm/x1p42100/include/soc/pmic.h with PON
  definitions and API prototypes.
- Create src/soc/qualcomm/x1p42100/pmic.c containing the PON
  log reading and parsing logic.
- Add pmic.c to the SOC's romstage build via Makefile.mk.

BUG=b:439819922
TEST=Verify off-mode charging behavior on Google/Quenbi.

Change-Id: I8cd1478b9f8d53519f603e8f5168d0a51fa54971
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90192
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-26 18:56:25 +00:00
Kapil Porwal
293f3a7f5c soc/qc/spmi: Add API to read byte array
Introduce a new API, spmi_read_bytes(), to allow reading a
sequence of registers from a Qualcomm PMIC using the SPMI bus.

While the existing spmi_read8() is suitable for single-byte
access, reading large log areas (like the PON history log)
requires iterating over a contiguous block of addresses. This
new function encapsulates the required loop, calling spmi_read8()
sequentially for each address in the range.

This abstraction improves code cleanliness and makes high-level PMIC
log parsing much simpler.

Key changes:
- Define spmi_read_bytes() prototype in qcom_spmi.h.
- Implement spmi_read_bytes() in spmi.c to perform sequential
  reads using spmi_read8().

BUG=b:439819922
TEST=Verify off-mode charging behavior on Google/Quenbi.

Change-Id: I6017336a882a8fa8d771b0127e78dd4f0fdbdd0e
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90191
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-11-26 18:56:19 +00:00
Kapil Porwal
9f675eb96b soc/qc/common: Update SPMI_ADDR macro for better type safety
Update the SPMI_ADDR macro to wrap both the slave and reg
arguments in parentheses.

The previous definition, ((slave << 16) | reg), led to incorrect
address calculation when the slave argument was an arithmetic or
logical expression (e.g., (a | b)), as the bit-shift operator (<<)
has higher precedence than the logical OR (|).

The revised macro guarantees that the full slave expression is
evaluated before the bit shift, ensuring correct SPMI register
address construction.

Key changes:
- Wrap slave and reg arguments in parentheses within
  SPMI_ADDR definition.

BUG=b:439819922
TEST=Verify that the SPMI_ADDR output is correct.

e.g. SPMI_ADDR(0x02 | 0x01, 0x200)
Output before this change:
```
((0x02 | 0x01 << 16) | 0x200)
(0x02 | 0x010000 | 0x200)
(0x010202)
```
Output after this change:
```
(((0x02 | 0x01) << 16) | 0x200)
(((0x03) << 16) | 0x200)
((0x030000) | 0x200)
(0x030200)
```

Change-Id: I58b36b62f0b5a59c03a1c1d08640fe9086d81d7a
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90198
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-26 18:56:14 +00:00
Jeremy Compostella
cb1045a8b8 soc/intel/pantherlake: Update GT domain TDC value for PTL_TDC_1 SKU
Update the GT domain Thermal Design Current (TDC) value for the
PTL_TDC_1 SKU from 15A to 23A to align with the latest hardware
specifications. The previous value was inconsistent with the intended
power map, which could lead to incorrect power delivery settings and
potential system instability. This change ensures compliance with
Document #813289, revision 2.1.

Change-Id: Ib6b4ddc422de62585658b5e8464d598762b947ee
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90136
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Guvendik, Bora <bora.guvendik@intel.com>
2025-11-26 18:55:36 +00:00
Jeremy Compostella
b0ee0c4620 soc/intel/pantherlake: Fix IA domain TDC value for PTL_TDC_2 SKU
Align the IA domain Thermal Design Current (TDC) value for PTL_TDC_2
with Document #813289 power map revision 2.1. The previous value 23A did
not match the updated specification, which now requires 28A. This change
ensures that the firmware correctly reflects the hardware power limits
for this SKU, preventing potential power delivery issues and improving
system stability.

Change-Id: I16bb510b8ec2ad1ffdeba20bfe26d0cbad209088
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89935
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-26 18:55:24 +00:00
Jeremy Compostella
6dbcf903a5 soc/intel/pantherlake: Add ICC Max and TDC settings for SKU_7
SKU_7 ICC Max and TDC were not accurate. This commit aligns SKU_7
settings with document #813278 - Panther Lake H Platform Power Map
2.1.1.

Change-Id: Ia66ca5c0d2dc1ba0f0cf3b21476e83923e49969e
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90096
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-11-26 18:55:17 +00:00
Jeremy Compostella
2148143ae9 soc/intel/pantherlake: Separate TDC configuration for different TDPs
This commit refactors the Panther Lake SoC power mapping and
configuration to support distinct Thermal Design Current (TDC) settings
for each TDP variant and SKU. Previously, TDC values were mapped
directly to SKUs, which limited flexibility and could lead to incorrect
current settings for CPUs with the same SKU but different TDP
requirements.

TEST=On a Fatcat device with a 25W TDP, the FSP logs show that the
     appropriate TDC settings were applied.

Change-Id: Ie645110e9ff200ecb601faf427958ded731fb22b
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89932
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Guvendik, Bora <bora.guvendik@intel.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-11-26 18:55:05 +00:00
Luca Lai
c7273c8ddc mb/google/fatcat/var/ruby: Add proto touch panel address
Because the proto and evt build use the same panel but different
controllers, so add proto touch panel address to fit two controllers.

BUG=b:452216678
TEST=Build FW and boot to OS, check touch function works.

Change-Id: Ia9a3764ffe85aa69ba1c4c3f4ae8fd2717e1e570
Signed-off-by: Luca Lai <luca.lai@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90200
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
2025-11-26 18:54:55 +00:00
Aamir Bohra
8575232317 mb/google/ruby: Migrate to UFSC
Enable Unified Firmware and Secondary Source Configuration (UFSC)
support for Ruby.
UFSC standardizes the bitfields and bitmap definitions for firmware
configuration. Update overridetree.cb with new UFSC definitions and
enable EC_GOOGLE_CHROMEEC_FW_CONFIG_FROM_UFSC.

BUG=b:460231264
TEST=util/abuild/abuild -x -t GOOGLE_RUBY -a
BRANCH=none

Change-Id: If992b89e1c6563404c71af2f77b6170d15c92d61
Signed-off-by: Aamir Bohra <aamirbohra@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90177
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-11-26 14:49:59 +00:00
Maximilian Brune
47101fc224 soc/amd/cezanne/Kconfig: Make AMDFW_CONFIG_FILE configurable
Its useful if you have some binaries downstream which are not published
yet.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I00f67e6eb93af095e3ae1f4851d13cd7666a9851
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90180
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-25 19:23:52 +00:00
Ana Carolina Cabral
c9f124a8fb mb/amd/crater/ec: Make macro ENABLE_M2_SSD1 a Kconfig option
Move the option to enable M.2 SDD slot to Kconfig file instead of using
a macro. Its already used like a Kconfig option later on, so the if
condition actually works now.

Change-Id: I104eae5501da6ed1fe43039f88d6722c1e54e82d
Signed-off-by: Ana Carolina Cabral <ana.cpmelo95@gmail.com>
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87443
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2025-11-25 19:21:27 +00:00
Ana Carolina Cabral
430e34cd0f mb/amd/crater: Move gpio configuration to early_gpio
Remove the gpio function calls from ec code and mode to early gpio file.

Change-Id: I941828808bdcdac00ab59d48907da1f70024d6e0
Signed-off-by: Ana Carolina Cabral <ana.cpmelo95@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87442
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-25 19:21:03 +00:00
Ana Carolina Cabral
14b5c004f5 mb/amd/crater/ec: Create function to get board revision
Remove duplicate code and make it into a single function to
read the board revision from ec.

Change-Id: If7f3e7eda2c43417639494880a080fa472474cab
Signed-off-by: Ana Carolina Cabral <ana.cpmelo95@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87441
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-25 19:20:50 +00:00
Maximilian Brune
bd858faee8 mb/amd/crater: Add XGBE support
If XGBE is used on the platform, it can be configured to match different
use cases.

Change-Id: Ia6f7c2b836050e52bfb1d9ff64745d83715c874b
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90104
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-25 19:20:29 +00:00
Ana Carolina Cabral
f61553c9fa vc/amd/fsp/cezanne: Add Renoir FSP
Add FSP folder for Renoir and include it in the build from soc/cezanne
path. Cezanne and Renoir are very similar but there are still enough
changes to justify a separate vendorcode directory.

Change-Id: Id7f51a70c02ea632d87a635e92a6c422ac369bef
Signed-off-by: Ana Carolina Cabral <ana.cpmelo95@gmail.com>
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/87216
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2025-11-25 19:20:09 +00:00
Matt DeVillier
87f8d15c87 ec/google/chromeec/cfr: Fix CFR callback signatures
Commit 04778ddd38 ("drivers/option/cfr: Remove old sm_object from
constructor") updated the function signature for CFR callbacks, but the
commits adding the fan and backlight controls were merged afterwards
without being adjusted accordingly. Do so here.

TEST=build/boot google/link with these CFR options enabled.

Change-Id: I9ea5224a820b014c4c8edb93e8a6b336ea6f58d0
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90158
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
2025-11-25 16:50:04 +00:00
Julius Werner
7fb0f14ebe libpayload: arm64: Fix asynchronous exception routing in payload
Six years ago we had a problem with not getting SError exceptions in
coreboot, and we fixed it by setting the right SCR_EL3 bits to force
exception routing to EL3 (commit bb345abbfc ("arm64: Correctly unmask
asynchronous SError interrupts")). Turns out that we have the same
problem in the payload but we never fixed it there. EL2 exception
routing works differently, so in order to achieve the same effect here
we can either enable the HCR_EL2 AMO, FMO and IMO bits (respectively),
or we can just enable the TGE bit which traps everything. This patch
chooses the latter, and it also ensures that the PSTATE exception
masking (DAIF) bits are in the expected state (although they usually
already are).

This state will persist after handoff to the kernel or chained payload,
and will prevent transition into EL1 if not cleared first. This should
be fine since any code taking control in EL2 should be expected to
correctly reintialize HCR_EL2 before handing off into EL1 (the Linux
kernel has always reinitialized this very early after its entry point).
If any selfboot() payloads are broken after this change, the payload
should be fixed to reinitialize HCR_EL2 to 0 (or desired value).

Change-Id: I339eded5a5344b5753c94be82e4f1e52e00b39f4
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90127
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
2025-11-25 16:49:56 +00:00
Varun Upadhyay
b584967d04 mb/google/ocelot: Add wake configuration to cnvi_bluetooth
This commit adds wake functionality to the CNVi Bluetooth device by
registering to "GPE0_PME_B0" using the common CNVi block.

BUG=454341255
TEST=Able to wake up the device from a low power state using a keyboard
     Bluetooth device.

Change-Id: I4bcbb34e1d53b3438f9e9f2b39f09d91e8dc7110
Signed-off-by: Varun Upadhyay <varun.upadhyay@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89982
Reviewed-by: P, Usha <usha.p@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-25 16:49:28 +00:00
Uwe Poeche
fc88b62174 mb/siemens/mc_ehl6: Enable PCIe root ports and clocks
Configure and enable the PCIe root ports and associated clocks for the
mc_ehl6 mainboard. This is necessary because the PCIe configuration
differs from the mc_ehl2 baseboard.

TEST=Boot into the OS and verify that all expected PCIe devices are
correctly detected.

Change-Id: Ie5ac3d437088d1db08f869317ef3e5712c3baa3e
Signed-off-by: Uwe Poeche <uwe.poeche@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90082
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
2025-11-25 16:49:15 +00:00
Uwe Poeche
5a4c749520 mb/siemens/mc_ehl6: Add new board variant based on mc_ehl2
This new mainboard variant for the Siemens mc_ehl6 is initially based on
a direct copy of the mc_ehl2 configuration. This commit contains the
basic board setup with only minimal changes to enable the new variant.

Further specific adaptations for the mc_ehl6 hardware will be handled
in subsequent commits.

Change-Id: Ifcc730da492edb084e67762ce643f27b1a2576b0
Signed-off-by: Uwe Poeche <uwe.poeche@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90081
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
2025-11-25 16:49:02 +00:00
Yu-Ping Wu
f5f304a5f3 mb/google/skywalker: 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:433636690
TEST=emerge-skywalker coreboot
TEST="elogtool list" contained "Hardware watchdog reset"
BRANCH=skywalker

Change-Id: Iac6ec72d5c148244ccbd7d1b02af78c359897d7d
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90174
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-25 16:48:41 +00:00
Yu-Ping Wu
e4b0410946 soc/mediatek/mt8189: Enable MEDIATEK_WDT_RESET_BY_SW
For MT8189, 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:433636690
TEST=emerge-skywalker coreboot
TEST=watchdog event added to eventlog on WDT timeout
TEST=cbmem logs preserved on WDT timeout
BRANCH=skywalker

Change-Id: I5ab73a06dd1bd7848e2e166d4717a970043ea20a
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90173
Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-25 16:48:34 +00:00
Yu-Ping Wu
1ae0cebff3 soc/mediatek: Add Kconfig option MEDIATEK_WDT_RESET_BY_SW
When the watchdog timeout triggers a reset, the CPU will return to the
default frequency. If there is a mismatch between voltage and frequency,
the device will fail to reboot. Therefore, the kernel configuration
"mediatek,disable-extrst" is removed for MT8189, meaning the watchdog
timeout will trigger external reset, by notifying PMIC and EC via
AP_PMIC_WDTRST_L.

As we want to keep the watchdog status registers until coreboot runs,
the MT8189's EC simply ignores the external reset signal
AP_PMIC_WDTRST_L. Because EC ignores it, coreboot has to trigger the
secondary reset by another method other than watchdog hardware.

Therefore, introduce a Kconfig option MEDIATEK_WDT_RESET_BY_SW to
trigger the secondary reset by board_reset(), which is often implemented
by asserting a GPIO (for example GPIO_AP_EC_WARM_RST_REQ for MT8189).

BUG=b:433636690
TEST=emerge-skywalker coreboot
BRANCH=skywalker

Change-Id: Ib4c698bfd1b85705be05f40f385f4e252975c319
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90172
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
2025-11-25 16:48:28 +00:00
Yu-Ping Wu
7d3bf767cc soc/mediatek/mt8189: Move WATCHDOG_TOMBSTONE from SRAM to SRAM_L2C
The purpose of the WATCHDOG_TOMBSTONE section is to temporarily record
the watchdog timeout event, before triggering the reboot. Then, in the
next boot, if WATCHDOG_TOMBSTONE contains the watchdog event magic, then
a watchdog event will be added to the event log.

The flow relies on the fact that the WATCHDOG_TOMBSTONE section can be
preserved across AP resets. However, for MT8189, the whole SRAM region
will be powered down during AP reset via GPIO AP_SYSRST_ODL (SYSRSTB).

Fortunately, the Kconfig option CHROMEOS_USE_EC_WATCHDOG_FLAG is also
enabled. Therefore, even if WATCHDOG_TOMBSTONE data is cleared, the
elog_handle_watchdog_tombstone() function can still obtain the correct
watchdog reset reason from EC.

On MT8189, L3C (used as SRAM_L2C) is powered on by default. Also, per
MT8189 PMIC configuration, a SYSRSTB reset will retain the L3C power.
Therefore, region data in SRAM_L2C can be preserved across AP resets.

Fix the WATCHDOG_TOMBSTONE preservation by moving it to SRAM_L2C.
Reduce PRERAM_CBMEM_CONSOLE by 1K for WATCHDOG_TOMBSTONE.

BUG=b:433636690, b:456672760
TEST=emerge-skywalker coreboot
TEST=watchdog event added to eventlog on WDT timeout
TEST=cbmem logs preserved on WDT timeout
BRANCH=skywalker

Change-Id: Id1cfc2700301ebb0b6399356b884b2473c883445
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90171
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
2025-11-25 16:48:22 +00:00
Luca Lai
a64dd410d8 mb/google/fatcat/var/ruby: Update EN_SPK_PA GPIO pin configuration
Update EN_SPK_PA pin configuration based on the schematic to enable speaker function.

schematics: RUBY_EVT_0902_2112.pdf

BUG=b:452216678
TEST=Build FW and boot to OS, verify that the speaker is functioning
by playing a YouTube video.

Change-Id: Iabb3e9d214841aaa155ce5b782740ad0722722fa
Signed-off-by: Luca Lai <luca.lai@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90169
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
2025-11-25 16:47:31 +00:00
Swathi Tamilselvan
2f9b4ad6a5 soc/qualcomm/x1p42100: Add DFSR table configuration support
Add support to configure DFSR table, introduce qupv3_clock_v2
structure to calculate register addresses for serial engines 2
and 3. Update CBCR registers to use the new structure for QUPv3
clock enablement.

BUG=b:444617760
TEST=Create an image.serial.bin and ensure it boots on X1P42100.
Dump DFSR registers for corresponding QUP and check if values are
updated properly into correct register address.

Change-Id: Ibd7e4bf121bd99130336047a50ed70d4cbec2234
Signed-off-by: Swathi Tamilselvan <tswathi@qualcomm.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90145
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-11-25 16:47:20 +00:00
Filip Lewiński
51e99de558 soc/intel/common/block/rtc/rtc.c: control Top Swap via CMOS option
Toggle the RTC BUC control bit for Top Swap bootblock selection based on
the "attempt_slot_b" flag CMOS option, allowing to select which of the
BOOTBLOCK or TOP_SWAP regions to boot from.

This means that after an update, the CMOS option can be set to boot from
the newer TOP_SWAP bootblock. In case of failure, CMOS can be cleared to
revert to the known-good base BOOTBLOCK.

This is part of ongoing implementation of a redundancy feature proposed
on the mailing list:
https://mail.coreboot.org/archives/list/coreboot@coreboot.org/thread/C6JN2PB7K7D67EG7OIKB6BBERZU5YV35/

Switching between identical bootblocks doesn't impact further boot flow,
i.e. selecting which FMAP region to load consecutive stages from.
That is to be enabled in following patches.

So far tested and enabled for the Alder Lake SoC.

TEST=Boot VP6650, setting the attempt_slot_b flag to different values,
observing that it resets/continues booting correctly.

Change-Id: Ib183a1f72ee8585b2c4ad4376344de33ff54cbb9
Signed-off-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90042
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
2025-11-25 16:47:10 +00:00
Yidi Lin
56be23114e mb/google/rauru: Use chromeos-legacy.fmd for Hylia and Navi
The recent increase of the RW size to 1756KB (CB:89545) has led to an
FMAP incompatibility. This issue arises during testing when both the ToT
firmware (which utilizes a new FMAP layout) and the firmware
branch-built firmware (which relies on an older FMAP layout) are used on
the same device.

To address this testing failure and streamline the testing process, the
updated FMAP will be exclusively implemented for the new variant. The
Navi and Hylia devices will continue to use the legacy FMAP.

BUG=b:461559917,b:463050048
TEST=emerge-{rauru,tanjiro} coreboot chromeos-bootimage

Change-Id: Icb4a12030f7a2e05757c903b70899c07b92c9875
Signed-off-by: Yidi Lin <yidilin@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90168
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
2025-11-25 05:17:42 +00:00
Luca Lai
10802bac16 spd/lp5: Modify SPD for MT62F1G32D2DS-020 WT:D and K3KL8L80EM-MGCV
Modify ranksPerChannel and diesPerPackage attributes for
MT62F1G32D2DS-020 WT:D and K3KL8L80EM-MGCV.

TEST=util/spd_tools/bin/spd_gen spd/lp5/memory_parts.json lp5

Change-Id: I1069fac58d099d58f76fe268973081f49842f16d
Signed-off-by: Luca Lai <luca.lai@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90123
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
2025-11-25 04:44:11 +00:00
Arthur Heymans
e5d10e5d23 mb/lenovo/t480: Fix headphone jack
Add additional register configuration for the Realtek ALC257 audio
codec on the Lenovo ThinkPad T480. This includes:

- Hidden register SW reset sequence
- ClassD 2W amplifier configuration
- Jack detection (JD1) setup for headphone port
- Silence data mode threshold setting at -84dB

Shamelessly taken from google/brya/variants/pujjolo/hda_verb.c

Change-Id: Ib77138d782ceb9feeaef82935bc1c0d5c3066183
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90023
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2025-11-24 14:52:27 +00:00
Jarried Lin
40b2a2b03c soc/mediatek/mt8196/booker: Refactor CMO property clearing with loop
Replace multiple hardcoded clrbits64p calls with a loop over
booker_base. This improves readability and maintainability.

BRANCH=rauru
BUG=b:438666196
TEST=manual test

Change-Id: I4799bc3eff2ab24265bac093600948dccc4916de
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90143
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Chen-Tsung Hsieh <chentsung@google.com>
2025-11-24 04:32:34 +00:00
Kun Liu
1b0f9c5458 mb/google/nissa/var/telith: Add parade touchscreen support
Add parade PRT3408 touchscreen support

BUG=b:461693725
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I7d320bcaf3554c9adde4813a366ee60c28b8cc13
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90093
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-11-24 03:12:45 +00:00
Matt DeVillier
ddb3f0b17f drivers/hwid_dmi: Populate SMBIOS product name from CBFS hwid file
Add driver to read 'hwid' file from CBFS and use it for SMBIOS product
name. Processes the ChromeOS-format HWID string by removing prefix
after colon, trimming whitespace, and extracting base name before
any hyphen/space. Returned string is normalized to have the first
character/letter capitalized, and the rest lower case. If no HWID file
is found in CBFS, the fallback is CONFIG_MAINBOARD_SMBIOS_PRODUCT_NAME.

This driver is intended to allow ChromeOS devices running upstream
coreboot to persist their board's unique HWID and use it as the SMBIOS
board name, but it is not limited to that function.

TEST=tested in MrChromebox downstream. Multiple devices which use the
same ChromeOS board but differ in HWID can use the same firmware image
and still be properly identified.

Change-Id: I1af1df4c79858d23ef71400abe72f41eec6c25c6
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90063
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2025-11-23 20:07:54 +00:00
Fabio Baltieri
7a1e63308a acpigen_ps2_keybd: map insert
This is going to be used in some devices in place of KEY_ASSISTANT, map
it.

BUG=b:446676921
TEST=flashed and tested on a brox board, checked that the correct code
is generated with evtest

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: I006c232c2924e8b6dc06338b0282c76f1f529a9e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90026
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-22 18:55:53 +00:00
Fabio Baltieri
607740999d acpigen_ps2_keybd: map capslock
Looks like some devices may be using the capslock key, this a standard
code, just map it.

BUG=b:446677367
TEST=flashed and tested on a brox board, checked that the correct code
is generated with evtest

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: Ieb0f55e7f25a1b34d226efe12ad9dc481a53a082
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90025
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-11-22 18:55:46 +00:00
Fabio Baltieri
a7efa40e39 acpigen_ps2_keybd: map KEY_HOMEPAGE to 0xaa scancode and TK_HOME
Chromium OS EC has some specialized handling of chromebook specific
function keys on the keyboard top row, these have a function specific
action key code that is exposed to the OS and used to map their
position, and also a specific scancode that has to be mapped to a Linux
event code.

This adds the necessary mapping for KEY_HOMEPAGE, which is going to be
used in new devices.

The scancode picked is 0xe012, which maps to e02a or 0xaa, the
corresponding EC CL is:

https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/7118961

BUG=b:446007724
TEST=flashed and tested on a brox board with chromiumos, checked the
code with evtest

Signed-off-by: Fabio Baltieri <fabiobaltieri@google.com>
Change-Id: I395721a342f507453dae19373df2f189ac1b5dac
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90024
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2025-11-22 18:55:35 +00:00
Jakub Czapiga
fd603e5102 libpayload: Add CBMEM_ID_MEMINFO to sysinfo
BUG=b:450374306
TEST=Build and boot Google/Brya

Change-Id: I16d51e9aab7ec3d7430a1e6b6467007a3669d083
Signed-off-by: Jakub Czapiga <czapiga@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90120
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-11-22 18:55:00 +00:00
Jakub Czapiga
bae3e02662 include: commonlib: Move memory_info and dimm_info to commonlib
memory_info with dimm_info entries is available as CBMEM_ID_MEMINFO.
Moving the structures definitions to the commonlib allows the payloads
to easily access the memory information.

BUG=b:450374306
TEST=Build and boot Google/Brya

Change-Id: I25e788d5afd668e93f8ea60adaefb7b8b5d5ec28
Signed-off-by: Jakub Czapiga <czapiga@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90119
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-11-22 18:54:55 +00:00
Jeff Xu
d03799ec3c soc/mediatek/mt8196: Configure registers and parameters required for MTE
To support Memory Tagging Extension (MTE), configure booker
(custom CI-700) registers related to MTE to set up MTE tag address.

According to CI-700 documentation, the por_mtu_tag_addr_base register is
only accessible by Secure accesses. Therefore these registers are now
configured in coreboot ramstage before passing to payloads.

BRANCH=rauru
BUG=b:438666196
TEST=manual test

Change-Id: I0d98cfee3e208a559116f84362528f005ea6f2c8
Signed-off-by: Jeff Xu <jeffxu@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90141
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2025-11-22 17:27:25 +00:00
Subrata Banik
7521f3ea83 soc/qualcomm/x1p42100: Define pre and post-RAM DMA coherent regions
This commit updates the linker script to properly define and name the
DMA coherent memory regions used before and after DRAM initialization.

1. Rename Pre-RAM DMA Region:
The existing `DMA_COHERENT` region allocated in BSRAM at `0x14857000` is
renamed to `PRERAM_DMA_COHERENT`. This aligns the linker script with the
code changes (in `mmu.c`) which use the more specific name for the early
boot DMA buffer.

2. Add Post-RAM DMA Region:
A new region, `POSTRAM_DMA_COHERENT`, is defined at the very start of
DRAM (`0x80000000`) with an 8KB size. This region is intended for
general-purpose DMA operations that occur after DRAM is active,
ensuring a reserved, known, and uncached region for peripherals.

The memory map diagram comments are also updated to reflect these new
region names.

BUG=b:456953373
TEST=Able to build and boot google/quenbi.

Change-Id: I6fb4b9bf3425b311169ac43e1997f6574b571e00
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90098
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2025-11-22 17:24:20 +00:00
Subrata Banik
d277b35307 soc/qualcomm/x1p42100: Relocate ddr_information and watchdog tombstone
This commit relocates the following two regions:
1. `ddr_information`
2. `WATCHDOG_TOMBSTONE`

Previously, these regions were allocated in a higher address range
(starting near 0x14800000).

The regions are now defined within SSRAM`:

- `ddr_information` is moved from `0x14860000` to `0x146ABFE8`.
- `WATCHDOG_TOMBSTONE` is moved from `0x14818FFC` to `0x146ABFFC`.

This memory map change updates the linker script's visual diagram and
section definitions to reflect the new memory layout.

BUG=b:456953373
TEST=Able to build google/quenbi.

Change-Id: I4545722a836ec472e8086d1a941515cb3956c763
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90052
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-22 17:24:13 +00:00
Subrata Banik
958099b114 soc/qualcomm: Map the post-RAM DMA coherent buffer
The MMU configuration in qc_mmu_dram_config_post_dram_init() needs to
include the memory region allocated for DMA coherent buffers.

Map the `postram_dma_coherent` region as UNCACHED_RAM to ensure memory
writes bypass the CPU cache hierarchy.

The mapping is only configured if the `_postram_dma_coherent` address
is different from `_preram_dma_coherent` address aka migration of the
region.

This is necessary for DMA operations that occur after DRAM is
initialized.

BUG=b:456953373
TEST=Able to build google/quenbi.

Change-Id: If5f625ad74f4f6ea244c8b377543be3666122cea
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90050
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-11-22 17:24:05 +00:00
Subrata Banik
931fa9c01d memlayout: Introduce PRERAM and POSTRAM DMA coherent regions
Refactor the DMA coherent memory region definition to support
stage-specific allocations.

In some boot flows, it is necessary to define separate DMA coherent
buffers for the early boot stage (e.g., romstage/bootblock) and the
later stage (ramstage). It allows the firmware to use only the memory
it needs, where it needs it, and prevents small-scale memory constraints
from crippling the overall boot flow.

The arch-specific, and now redundant, definitions of DMA_COHERENT are
removed from arm/memlayout.h and arm64/memlayout.h.

BUG=b:456953373
TEST=Able to build google/quenbi.

Change-Id: Ic32d14dda6cda0f731233dd3d86f3215c6af3637
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90049
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-11-22 17:23:55 +00:00