Commit graph

58,619 commits

Author SHA1 Message Date
Sean Rhodes
3370e41bb2 mb/starlabs/starlite_adl: Put options in CFR cbtable
Change-Id: If92f61dece7e67bfd2e29927198c9ebb81c4d363
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85711
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-15 10:36:53 +00:00
Sean Rhodes
02f31d080c mb/starlabs/byte_adl: Put options in CFR cbtable
Change-Id: I11349397e41fb2c7a3f26ab172a2c4b30d24bc0a
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85710
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 10:36:46 +00:00
Sean Rhodes
d0ce8d8146 mb/starlabs/starfighter: Put options in CFR cbtable
Change-Id: I3e3b5448282aa81a89356f1d3145381d65e47aaa
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85709
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 10:36:40 +00:00
Sean Rhodes
121bc2a370 mb/starlabs/starbook: Put options in CFR cbtable
Change-Id: I816893e5c2663ed55ae9fa5dd662489b27332aa6
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74743
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-15 10:36:34 +00:00
Sean Rhodes
65278f5cae ec/starlabs/merlin: Only include battery ACPI for systems with a battery
Change-Id: I381714887f4319d8e1a25c1e493ba03631cbf082
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85716
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-15 10:36:21 +00:00
Sean Rhodes
43ac56bf43 ec/starlabs/merlin: Move common variants to respective files
Move the Q-Events used by the merlin EC to their respective
files, i.e. `Q0B` for Battery Status Update to battery.asl.

This means that only revelant events will be included.

Change-Id: Ib41fbafd79b999409a520361a4d372902d878794
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85945
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-01-15 10:36:16 +00:00
Ariel Otilibili
a9d4c40ba5 samsung/exynos5250: Replace 'unsigned long int' by 'unsigned long'
As suggested by the linter:

Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary

Link: https://qa.coreboot.org/job/coreboot-untested-files/lastSuccessfulBuild/artifact/lint.txt
Change-Id: I7eddb0934ccd24c9994a60d7058a1e518c6c9c9f
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85785
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 08:32:16 +00:00
Subrata Banik
f2201e20de mb/google/fatcat/var/fatcat: Refactor GPIO programming for UFS support
Refactor GPIO programming to support UFS storage on the fatcat
platform.

- Add pad configurations for UFS in `fw_config.c`.
- Update `fw_config_configure_pre_mem_gpio()` and
  `fw_config_gpio_padbased_override()` to include UFS support.
- Remove redundant UFS pad configuration from `gpio.c`.

TEST=Able to build and boot from UFS device on google/fatcat.

Change-Id: I09331d75501977d89592d1a70d5b0dca271f8747
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85958
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2025-01-15 03:48:05 +00:00
Subrata Banik
b885fd8d8d mb/google/fatcat/var/fatcat: Drop UFC/WFC GPIO programming
Skip UFC/WFC GPIO programming for power-on and clock configuration.

Clock configuration is now handled by native-function in ramstage,
and there is no need to power-on the camera module early in the boot
phase. Doing so resulted in the privacy LED being turned on during the
entire boot process, which is unnecessary.

BUG=b:381044394
TEST=No privacy LED blinking seen while booting google/fatcat.

Change-Id: Iae984a2ab6f797af450166c90f4a2c6d3e0e1caa
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85955
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 03:47:56 +00:00
Subrata Banik
c4c237ed78 mb/google/fatcat/var/fatcat: Configure _DSC for camera devices
Configure _DSC to ACPI_DEVICE_SLEEP_D3_COLD for camera devices to
prevent them from being probed during kernel boot.

This prevents the privacy LED from blinking unnecessarily.

Also includes minor code comment changes for clarity:

- Replace "560000000" with "560 * MHz" for readability.
- Explain `clknum` value `0` as `IMGCLKOUT_0` and `1` as `IMGCLKOUT_1`.
- Introduce FW_CONFIG (UFC/WFC) for probing IPU0.

BUG=b:381044394
TEST=No privacy LED blinking seen while rebooting google/fatcat.

Change-Id: I4712b751015d86d40dfd4d7da8cba956c435eef5
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85954
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 03:47:48 +00:00
Subrata Banik
26e9ade8f9 mb/google/fatcat/var/fatcat: Add new GFX devices with custom _PLD
Add new GFX devices for DDI and TCP with custom _PLD to describe the
corresponding ports.

TEST=Able to verify display using all the display end-point device.

Change-Id: I32f74411aa80279d63c3b12087ffc47b33fcc039
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85953
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 03:47:42 +00:00
Jeremy Compostella
140815c893 device/pci_ids: Add Intel Panther Lake device IDs for Bluetooth CNVi
This commit introduces the missing PCI device IDs for Panther Lake
CNVi Bluetooth devices. These IDs are listed in document #815002 -
Panther Lake U/H Processor - External Design Specification Volume 1.

TEST=The CNVB device is now present in the ACPI SSDT table when the
     cnvi_bluetooth device is enabled.

Change-Id: I45b42b0694d530763d4cd321aefc64141d088e2b
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85959
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-by: Cliff Huang <cliff.huang@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-14 18:36:30 +00:00
Maximilian Brune
9ec24b648b mb/amd/birman_plus/devicetree_glinda.cb: Update USB
Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: Iacf9ab43c337a8b6a7aa5a37eb8a59644fcaeac6
Original-signed-off-by: Satya SreenivasL <satya.sreenivasl@amd.com>
Original-reviewed-by: Anand Vaikar <a.vaikar2021@gmail.com>
Original-reviewed-by: Ritul Guru <ritul.bits@gmail.com>
Original-tested-by: Satya Sreenivas L <Satya.SreenivasL@amd.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84436
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ana Carolina Cabral
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2025-01-14 13:39:24 +00:00
Satya SreenivasL
2f5c29f675 vendorcode/amd/fsp/glinda: Update usb_phy_config structure
Updates the structures to match the ones in the FSP.

Signed-off-by: Maximilian Brune <maximilian.brune@9elements.com>
Change-Id: I0603f5da689b6738ea54305a665b150121bc520c
Original-signed-off-by: Satya SreenivasL <satya.sreenivasl@amd.com>
Original-reviewed-by: Anand Vaikar <a.vaikar2021@gmail.com>
Original-reviewed-by: Ritul Guru <ritul.bits@gmail.com>
Original-tested-by: Satya Sreenivas L <Satya.SreenivasL@amd.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84435
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2025-01-14 13:35:07 +00:00
Elyes Haouas
3cf2fb5773 soc/amd/common/block: Remove space after a cast
Change-Id: Icccfbc535e005648e45156fc6810210d0ec86a98
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77736
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Ana Carolina Cabral
2025-01-14 13:23:53 +00:00
Naresh Solanki
fe0c32e6db soc/amd/glinda: Update PSP MBOX offset in Kconfig
Glinda SoC PSP MBOX offset is 0x10970 & hence update the same in Kconfig

TEST=Tested with Birman Plus and it solved the issue for psp timeout

Before:
[DEBUG] PSP: Notify SMM info... error: PSP command timeout

After:
[DEBUG] PSP: Notify SMM info... OK

Change-Id: I328959513228fe0f9e78070eb6b302ef89857b42
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85627
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-14 12:51:57 +00:00
Sean Rhodes
55bbd7d46d ec/starlabs/merlin: Remove unused variant directories
Remove variant directories for boards that haven't or won't be
ported, or that now use the common "Merlin" code.

Change-Id: Ibfdd858c6460a1291d6a15bb7eccee9e9006adff
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85956
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-14 08:50:44 +00:00
Subrata Banik
4bcca66f2d soc/intel/pantherlake: Refactor FSP log level control
Refactor the FSP log level control by introducing a helper function
`fsp_set_debug_level()` to set the serial and MRC debug levels.

This change improves code readability and maintainability by separating
the log level setting logic from the main control flow. It also adds a
check to ensure the configured log levels are valid.

Change-Id: I6efd6a0ea006b4013dce1c8849b7dbbd4ea5e1dc
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85934
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
2025-01-14 07:39:45 +00:00
Kun Liu
0529c6d033 mb/google/nissa/var/telith: Reduce power limits
When battery is not present, reduce power limits,
avoid inability to enter the system.

This will check the current battery status and configure cpu power
limits using current PD power value.

BUG=b:384883899
BRANCH=none
TEST=built and verified PL4 values,power engineer verify pass.

Change-Id: I7e0c7289c20c4ce51eae2a48eb8f09acfcb9e958
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85894
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-14 07:39:28 +00:00
Ariel Otilibili
e06e33416e qualcomm/common: Remove dead code
fb_off is set to zero, meaning the else branch is never called.

Coverity-ID: 1469336
Fixes: 3b4c45efa2 ("sc7180: Add display hardware pipe line initialization")
Change-Id: I40cffcf3714decfc54f2bbce9d4a867a9313d72e
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85778
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Jonathon Hall <jonathon.hall@puri.sm>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Varshit Pandya <pandyavarshit@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-14 06:36:38 +00:00
Jeremy Compostella
ac02ae15d8 soc/intel/common: Simply code accessing scaling factors
This commit streamlines the call to the
soc_read_core_scaling_factors() function. When runtime access to the
core scaling factors is not available, a static fallback is used based
on the CONFIG_SOC_INTEL_PERFORMANCE_CORE_SCALE_FACTOR and
CONFIG_SOC_INTEL_EFFICIENT_CORE_SCALE_FACTOR options.

TEST=Successfully read performance and efficient scaling factors on a
     fatcat board.

Change-Id: I62e903bea07f2981dfcbaf61d3b918e7c332afc5
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Suggested-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85897
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-01-13 17:26:27 +00:00
Nicolas Kochlowski
afeec465f1 drivers/amd/opensil/mpio: Factor out common MPIO symbols from vendorcode
Refactor vendorcode MPIO configuration functions to be invoked from
the openSIL driver.

Change-Id: I8b1f92f08565216dd93203a06015e3eec1e7bb69
Signed-off-by: Nicolas Kochlowski <nickkochlowski@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85632
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2025-01-13 12:26:24 +00:00
Rui Zhou
cf29b45866 mb/google/nissa/var/rull: eMMC DLL tuning
According to the Intel emmc tuning results, we modify the relevant register values recommended in b:386317255/comment16 to ensure good emmc performance.

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

Change-Id: Ibdbb96f9623612a8eb5e01818859c4844ca4de13
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85933
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-01-13 02:08:37 +00:00
Dtrain Hsu
146efc36c2 mb/trulo/var/uldrenite: Change ROM size to 32MB
Modify Uldrenite ROM size from 16MB to 32MB.

BUG=b:388426787
TEST=emerge-nissa coreboot and check rom size is 32MB

Change-Id: I39f50415e093eb82342462f03cf50e89bce8cd93
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85932
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2025-01-13 02:08:07 +00:00
Keith Hui
a781c9037d mb/lenovo/x230: Remove old USB configurations
As of commit a911b75848 ("mb/*: Remove old USB configurations from
SNB/IVB boards") USB configurations are drawn exclusively from devicetree.
These stuff should have been removed then.

Drop early_init.c that only contains these old configurations.

Change-Id: I3c92ab408219291fef355c9462134dbbd2e4ea87
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85941
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2025-01-12 08:05:57 +00:00
Keith Hui
1bc0021333 mb/hp/snb_ivb_laptops: Remove old USB configurations
As of commit a911b75848 ("mb/*: Remove old USB configurations from
SNB/IVB boards") USB configurations are drawn exclusively from devicetree.
These stuff should have been removed then.

Change-Id: Idc9e7892f978e52cfb30eb0239fcfd394c9f484e
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85940
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2025-01-12 08:04:59 +00:00
Keith Hui
faa19a5169 mb/biostar/th61-itx: Drop early_init.c
It only contains old USB port configurations which has been unused as of
commit a911b75848 ("mb/*: Remove old USB configurations from SNB/IVB boards")
and left out of the build since around that time.

Change-Id: I768ace8e3f0486a0dc601a3e90084432280c6fef
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85938
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2025-01-12 08:04:03 +00:00
Ariel Otilibili
29759ee6b9 util/cbfstool: Refine type and signatures
As suggested by the linter:

> Prefer 'unsigned long' over 'unsigned long int' as the int is
> unnecessary

In fmap_bsearch(), removed needless assignment of offset; it is already
set to 0 in the search loop.

fmap_find() uses the return value of fmap_bsearch(); and is declared as
'long int'. Per the linter warnings, replaced 'long int' by 'long'.

> Prefer 'long' over 'long int' as the int is unnecessary

Link: https://qa.coreboot.org/job/coreboot-untested-files/lastSuccessfulBuild/artifact/lint.txt
Change-Id: If94e70778d0302552f151c31d3073524162faf9e
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85786
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2025-01-12 07:54:27 +00:00
Ariel Otilibili
bce4fb43aa tests: Replace 'unsigned long int' by 'unsigned long'
As suggested by the linter:

Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary

Link: https://qa.coreboot.org/job/coreboot-untested-files/lastSuccessfulBuild/artifact/lint.txt
Cc: Jakub Czapiga <czapiga@google.com>
Change-Id: Ia41f0674f4abab285d89ed5101b3805975f3f381
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85788
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-12 04:52:30 +00:00
Ariel Otilibili
32085aec84 lib: Replace 'unsigned long int' by 'unsigned long'
As suggested by the linter:

Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary

Link: https://qa.coreboot.org/job/coreboot-untested-files/lastSuccessfulBuild/artifact/lint.txt
Change-Id: I93d951eac69150b6cd73c9e56cb02a73c5118340
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85787
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2025-01-12 04:51:51 +00:00
Ariel Otilibili
f4d3474441 intel/fsp1_1: Replace 'unsigned long int' by 'unsigned long'
As suggested by the linter:

Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary

Link: https://qa.coreboot.org/job/coreboot-untested-files/lastSuccessfulBuild/artifact/lint.txt
Huang Jin <huang.jin@intel.com>
Intel_Coreboot_Reviewers <intel_coreboot_reviewers@intel.com>
Change-Id: I940528dc4f8cb9b2d441d0f0d181cccebd315255
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85783
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-01-12 04:50:24 +00:00
Patrick Rudolph
90196f530f soc/intel/xeon_sp: Allow OS to control LTR and AER
There's no reason to tell the OS to disable LTR. On UEFI and
on coreboot's GNR LTR is allowed, thus allow it for all Xeon-SP.

There's no SMM (RAS) code that is able to parse AER structures,
thus let the OS always control AER. On coreboot's GNR AER is
also always granted to the OS.

TEST: Run code on ocp/tiogapass and observed dmesg:
      The OS now prints:
acpi PNP0A08:04: _OSC: OS now controls [PCIeHotplug PME AER PCIeCapability LTR]

Change-Id: I7c4176a4df898cee28f6319c6684763e825d9c46
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85561
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marvin Drees <marvin.drees@9elements.com>
2025-01-11 09:37:00 +00:00
Patrick Rudolph
3ebd9ce887 soc/intel/xeon_sp: Use \_SB.POSC on all platforms
Reduce ACPI code size by using the existing \_SB.POSC instead of
duplicating the method in every PCI/CXL host bridge.

TEST: On ocp/tiogapass the OS still gets granted the PCIe capabilities
      as previously through _OSC. Reduces DSDT size by 1366 bytes.
      On ibm/sbp1 the OS still gets granted the PCIe capabilities
      as previously through _OSC.

Change-Id: I2f25ffbde9b83d286c568202fcffb75ffb07286c
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85559
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-11 09:36:37 +00:00
Patrick Rudolph
ec2d7077b5 soc/intel/xeon_sp: Guard function prototypes
Guard function prototypes to allow the header to be used in ACPI
ASL code. The defines will be used in the next commit.

Change-Id: Id6c361155c914f168577833279b4b7cc317b2eec
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85595
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2025-01-11 09:35:52 +00:00
Yu-Ping Wu
589b9841b7 soc/mediatek/mt8186/rtc: Remove unused variable "sw"
The function rtc_get_frequency_meter() already uses the wait_us() macro,
so the stopwatch variable "sw" is not needed.

Change-Id: I7e282b6ce881f4e8f9d5e1c92803fda363fe28d7
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85921
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2025-01-11 07:11:36 +00:00
Jarried Lin
8682d8f2e5 mb/google/rauru: Initialize clkbuf and srclken in romstage
BUG=b:317009620
TEST=Build pass. Check boot log:
srclken:
[INFO ]  RG_CENTRAL_CFG1 : 0x104014e5
[INFO ]  RG_CENTRAL_CFG2 : 0x1011
[INFO ]  RG_CENTRAL_CFG3 : 0x400f
[INFO ]  RG_CENTRAL_CFG5 : 0x3bfc1761
[INFO ]  RG_CENTRAL_CFG6_1 : 0xffffffff
[INFO ]  RG_CENTRAL_CFG6_2 : 0x110e
clkbuf:
[INFO ]  clk_buf_dump_clkbuf_log: xo_buf_cw(0x79A ~ 0x7A6):
[INFO ]  0xb9/0xb9/0x30/0x30/0x30/0x10/0x9/0x10/0x10/0x10/0x10/0x10/0x10
[INFO ]  clk_buf_dump_clkbuf_log: xo_buf_vote(0x54C ~ 0x565):
[INFO ]  0x1/0x280/0x0/0x0/0x0/0x0/0x2000/0x0/0x0/0x0/0x0/0x0/0x0/

Change-Id: I9a6f93d3ec27944bea72bbadf95a03a54a8a0662
Signed-off-by: ot_song fan <ot_song.fan@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85843
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-01-11 07:11:09 +00:00
ot_song fan
61f46fa7c0 soc/mediatek/mt8196: Add srclken_rc drivers
MT8196 uses new RC mode with clk_buf driver, and needs srclken_rc to
send PMRC_EN. PMRC_EN will collect the requirements of all users,
such as MD, GPS, PCIE, NFC.

TEST=Build pass.
BUG=b:317009620

Signed-off-by: ot_song fan <ot_song.fan@mediatek.corp-partner.google.com>
Change-Id: I40f8d2b12027955e6bd57b666e9f04c0116a0a93
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85842
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-01-11 07:10:59 +00:00
ot_song fan
cbb244a291 soc/mediatek/mt8196: Add clk_buf drivers
MT8196 uses MT6685 clk_buf, and will use new RC mode with srclken_rc.
The clk_buf will provide several 26M clocks, and these clocks can be
independently turned on. RC mode will determine which clocks to be
turned on based on users' requests, which is collected into PMRC_EN
register by srclken_rc.

TEST=Build pass.
BUG=b:317009620

Signed-off-by: ot_song fan <ot_song.fan@mediatek.corp-partner.google.com>
Change-Id: Ie18bfbb2f3354ba3645799857061dc20de7f6d84
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85841
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2025-01-11 07:10:50 +00:00
Yidi Lin
36b0822a9d soc/mediatek/common/dp: Use assert to check read/write API params
With CB:85918 and CB:85930, we can clean up the TODO in mtk_dp_mask.
Follow DP Phy APIs to use `assert` for the param examination.

TEST=verified on Ciri and Navi

Change-Id: I94e6ad36d190d773876cbb43eb4ebe17164f3c92
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85931
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-11 07:10:24 +00:00
Yidi Lin
7a8a40c887 soc/mediatek/common/dp: Correct the settings in dptx_hal_set_msa
Correct the settings according to Linux kernel driver. The related
settings can be found in [1]:

[1]: https://github.com/torvalds/linux/blob/master/drivers/gpu/drm/mediatek/mtk_dp.c#L473

TEST=emerge-rauru coreboot; check FW screen on Ciri and Navi

Change-Id: I4ba7da74ce6394240513c482b19ec879b1a0a619
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85930
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-11 07:10:14 +00:00
Yidi Lin
89c3bb4b08 soc/mediatek/common/dp: Use DP_WRITE2BYTE if possible
This patch prevents wrong mask passing to mtk_dp_mask.

TEST=emerge-rauru coreboot, check FW screen

Change-Id: If8c801173089761db55992279045d053c60dcd86
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85918
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-11 07:10:03 +00:00
Yidi Lin
1e56bc4851 src/soc/mediatek/common/dp: Fix mask data type in mtk_dp_write_byte
TEST=emerge-rauru coreboot

Change-Id: I2762d6ca024d60663f6dae0db62a959a191adc02
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85917
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-01-11 07:09:49 +00:00
Yidi Lin
57022e16a3 soc/mediatek/common/dp: Add read/write APIs for DP Phy register
MT8196's eDP architecture is different from previous SoCs. DP Phy needs
to be configured during the initialization. Add read/write APIs for DP
Phy register configuration. Add a mock definition EDP_PHY_BASE for the
SoC that do not support DP Phy configuration.

BUG=b:382363408
TEST=emerge-geralt coreboot && emerge-rauru coreboot
TEST=check FW screen on Navi

Change-Id: I5c00d0aa7e35f03cc3c3aef6a58eadd3d334d8ed
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85914
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-11 07:09:38 +00:00
Yidi Lin
45c4d70b74 soc/mediatek/common/dp: Move common functions to dptx_hal_common.c
Move the functions that can be shared with MT8196 to dptx_hal_common.c.

BUG=b:382363408
TEST=emerge-geralt coreboot && emerge-cherry coreboot
TEST=verify FW screen on Navi

Change-Id: I9e151bc766c312eaf81b4220782775ef1c9d2297
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85861
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-01-11 07:09:27 +00:00
Matt DeVillier
78a4101bfb util/chromeos/crosfirmware: Add special handling for REEF board
The layout of an extracted REEF shellball doesn't conform to the
usual ones used by other boards, so add a special-case handler for it.

TEST= run `bash croshfirmware.sh reef` and receive the correct firmware
image for the board.

Change-Id: Ib391f30a77b6aa75aa130ffb525e6e1d1239a588
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85873
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-11 02:20:45 +00:00
Jarried Lin
aba7f44ecd mb/google/rauru: Disable modem power
BUG=b:315894234
TEST=Build pass.
The actual measurement of the average power over 20 seconds decreased
from 6.755W to 6.716W.

Change-Id: I71bda7055afc902525501ddf7074f9b2c5550d4a
Signed-off-by: Xavier Chang <xavier.chang@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85663
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-10 14:48:37 +00:00
Jarried Lin
9ff48e4b9e soc/mediatek/mt8196: Add modem power driver to disable unused power
Disable MT6363 unused power:
vbuck5, vcn15, vrf09, vrf12, vrf13, vrf18, vsram_digrf, vsram_mdfe.
Disable MT6373 unused power:
vant18, vsim1, vsim2.

BUG=b:315894234
TEST=Build pass, Check there are no check failed logs. And check logs:
Vmodem value: 0x78 (means SPMI_SLAVE_4_750MV)

Signed-off-by: Xavier Chang <xavier.chang@mediatek.corp-partner.google.com>
Change-Id: Ia8808e3500727753e4537017b46ac8ab39d59468
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85651
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-10 14:48:31 +00:00
Hope Wang
1920c0cca9 soc/mediatek/mt8196: Add mt6363_read8 API
Add mt6363_read8 API for common use.

BUG=b:317009620
TEST=Build pass.

Change-Id: I3cca4c2e5f6c2537c9661623260b21fb6088eff9
Signed-off-by: Hope Wang <hope.wang@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85892
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-10 14:48:23 +00:00
Elyes Haouas
f2caaf3e7f lint/checkpatch: Add __aligned to the list of attribute notes
This updates the script to upstream version 6.8
2f9dadba5b

Change-Id: I9274e8b5ed5ada27c290c462b0c59eccf1b0b60d
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81949
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2025-01-10 13:46:38 +00:00
Naresh Solanki
7cd7db6991 soc/amd/common/psp_gen2: Add config for PSP MBOX offset
Some SoC like Glinda use different PSP MBOX offset.
Add config to allow SoC Kconfig to override PSP MBOX offset.

Change-Id: Iefcc7d3b75689b43399a7a7b612417c155619211
Signed-off-by: Naresh Solanki <naresh.solanki@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85626
Reviewed-by: Ana Carolina Cabral
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2025-01-10 13:03:31 +00:00