Commit Graph

54555 Commits

Author SHA1 Message Date
Patrick Rudolph 1909c3ba9f cpu/intel/model_206ax: Only use supported C-states
When advertising C-state using the ACPI _CST object, make sure
to only advertise those that are supported by the CPU.
Downgrade if it's not and make sure to not advertise duplicate
states.

Add debug prints for the finally selected mapping of ACPI
C-state vs Intel CPU C-state.

Test: Tested on Lenovo X220.
      All C-states are still advertised as all are supported.

Change-Id: Iaaee050e0ce3c29c12e97f5819a29f485a7946c2
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78194
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-06 12:28:51 +00:00
Patrick Rudolph 588c6f006e cpu/intel/model_206ax: Use haswell cstate_map
Make the code look like on newer platforms. This doesn't change
functionality.

Test: Lenovo X220 still boots and advertises all C-states as
      before.

Change-Id: Ie7076d11720d55a4ac11318cbbdab9f75d08e15e
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78193
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-10-06 12:17:16 +00:00
Patrick Rudolph 130643277c cpu/intel/model_206ax: Print supported C-states
According to the BWG C-states are processor specific
and BIOS must check if a C-state is supported at all.

Print the supported C-states in before ACPI _CNT generation.

Test: Tested on Lenovo X220 using Intel i5-2540M.
      All C-states are reported as supported.

Change-Id: I713712a1a104714cbf3091782e564e7e784cf21d
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78133
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-06 12:16:46 +00:00
Patrick Rudolph 6a13b520e9 arch/x86/cpu_common: Add cpu_get_c_substate_support
Add a function to get the number of substates supported by
an Intel CPU C-state.

Test: Can read out the supported C-state substates.

Change-Id: Ie57e87609ea5d6ec6f37154e8b84f1e9574aa4a9
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78224
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-06 12:15:34 +00:00
Ivan Jager 6a249d688e cbfs: Restore 32-bit padding in cbfs_header
It was changed from a fixed size-1 array to a flexible array
in commit 242bac0e16 ("…: Use C99 flexible arrays") which resulted
in a change to the serialized format as the header size was no longer
the same.

That broke other tools that read CBFS files, like diffoscope
https://github.com/NixOS/nixpkgs/issues/256896

Change-Id: I4199dcc4823469c5986ac967a55b1c85cc62f780
Signed-off-by: Ivan Jager <aij+git@mrph.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78239
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-06 10:11:31 +00:00
Cong Yang 20a332a30e mb/google/starmie: Add 3 ms delay to AW37503 Power IC panel timing
Based on the power sequence of the panel [1], the power on T3 sequence
VSN to RESET should be larger than 1ms. Because the Power IC descending
slope takes 2ms, actual measurement needs 3ms to meet the timing of
panel sequence.

[1] HX83102-J02_Datasheet_v03.pdf

BUG=b:302212730
BRANCH=corsola
TEST=emerge-staryu coreboot chromeos-bootimage and boot the panel

Change-Id: I488c746d1fcfc165125b0ecccb0bccbb99231b00
Signed-off-by: Cong Yang <yangcong5@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78185
Reviewed-by: Ruihai Zhou <zhouruihai@huaqin.corp-partner.google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2023-10-06 03:14:02 +00:00
Matt DeVillier dab7a86859 Update amd_blobs submodule to upstream main branch
Updating from commit id ae822f2d0db7 (2023-09-21):
  MDN: Restore SMU fw version 90.41.0

to commit id b1741d184add (2023-10-04):
  PCO: Update SMU firmware to 4.30.77.200

This brings in 1 new commit:
b1741d184a PCO: Update SMU firmware to 4.30.77.200

BRANCH=zork
BUG=b:299603947

Change-Id: I0ce75b762bda90a5fa3bc546de42bc5d55637e17
Signed-off-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78232
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2023-10-05 21:49:02 +00:00
Sukumar Ghorai ed1c03a138 soc/intel: separate slp-s0 residency counter frequency in LPIT table
Intel platforms use Low Power Idle Table (LPIT) to enumerate platform
Low Power Idle states. There are two types of low power residencies
 a) CPU PKG C10 - read via MSR (Function fixed hardware interface)
 b) Platform Controller Hub (PCH) SLP_S0 - read via memory mapped IO

Ref. https://www.uefi.org/sites/default/files/resources/Intel_ACPI_Low_Power_S0_Idle.pdf,
section 2.2.1: value of 0 indicates that counter runs at TSC frequency.

Ref. Intel 64 and IA-32 Architectures Software Developer’s Manual (Vol 4)
MSR 0x632: PC10 residency counter is at same frequency as the TSC.
Whereas slp_s0 residency counter running in different frequency.

BUG=b:300440936
TEST=check kernel cpuidle sysfs are created after kernel boot
  cat /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us
  cat /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us

Change-Id: Ibde764551a21b9aecb1c269948f4823548294711
Signed-off-by: Sukumar Ghorai <sukumar.ghorai@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78177
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-10-05 15:22:04 +00:00
Eric Lai 1e2541074f MAINTAINERS: Add Brya maintainer
Add myself :p

Change-Id: Ib2bd5d9e9c93cf09ce4bca6a55cb5fab137f1bbc
Signed-off-by: Eric Lai <ericllai@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78219
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-10-05 14:21:48 +00:00
Daniel Gröber c841880c12 spi/winbond: Use spi_flash_bpbits in winbond_bpbits_to_region
This consolidates the bp, tb, cmp, srp0 and srp1 variables under the new
spi_flash_bpbits struct to allow treating them as one unit in the
refactoring to follow.

Change-Id: I2a1a77fb73047df733498c0fa8b8de1153c3b09e
Signed-off-by: Daniel Gröber <dxld@darkboxed.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42113
Reviewed-by: Jakub Czapiga <czapiga@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-05 12:57:51 +00:00
Daniel Gröber f20d7d6aa4 spi: Add new struct spi_flash_bpbits for block protection bits
Currently the block protection bits are being passed around as
individual arguments. We will use this new struct to replace the
corresponding arguments in the winbond_bpbits_to_region and
winbond_set_write_protection functions.

Change-Id: I02828b1f764aea29374e794001e74cdc86a94c92
Signed-off-by: Daniel Gröber <dxld@darkboxed.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42112
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
2023-10-05 12:51:38 +00:00
Arthur Heymans a5b06b9b57 cpu/intel/socket_BGA956: Double DCACHE_RAM_SIZE to 64 kB
This fixes building lenovo/x200 with VBOOT.
All supported CPUs have enough L2 cache to support this.

Change-Id: Ifd6a16ce36c86349955cd7b7ddb3f74a19c17c4d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/71905
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2023-10-05 12:50:43 +00:00
Robert Chen f151cd2859 mb/google/nissa/var/quandiso: Change camera fw_config feild
Quandiso reserve bit 11 for mipi camera usage.

BUG=b:300574047
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot

Change-Id: Id4343083f0d69a49c642657d165ceac349cd7422
Signed-off-by: Robert Chen <robert.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78213
Reviewed-by: Shawn Ku <shawnku@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-05 12:49:35 +00:00
Robert Chen 582a6ef54b mb/google/nissa/var/quandiso: Add ALC1019 amp support
BUG=b:300573763
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot

Change-Id: Iff8167695c302f7b58976516d651a81f1a429bee
Signed-off-by: Robert Chen <robert.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77754
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shawn Ku <shawnku@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-05 12:49:07 +00:00
Dtrain Hsu 5754749830 mb/google/nissa/var/uldren: Remove fw_config probe for TS and TP
When service center repair touchscreen or touchpad will change
compatible device not specific one, the fw_config probe mechanism is not
convenient for service center. Removing touchscreen and touchpad
fw_config probe for the purpose.

BUG=b:297840605
BRANCH=firmware-nissa-15217.B
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I66f12ae478f74c019c53ee5e77f7e0f9c324e758
Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77538
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-05 12:48:37 +00:00
Matt DeVillier f952560bef configs: Clean up config.google.skyrim.with_binaries defconfig
Drop the Cezanne FSP binaries (which were just placeholders), as well
as all other defaults removed when running 'make savedefconfig'

Change-Id: I6d355b838d30dca64a9e6206eb6000763cc105a1
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78195
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-05 12:47:56 +00:00
Seunghwan Kim 7de7f9ab44 mb/google/nissa/var/pirrha: Turn off SD card power signal in s0ix
Turn off GPP_H13 (EN_PP3300_SD_X) in s0ix for power saving. It reduces
about 3mW of power consumption in s0ix on pirrha proto board.

BUG=b:300845527
TEST=Built and verified GPP_H13 voltage was 0V in s0ix.
     Also verified SD card worked after s0ix for 20 times.

Change-Id: I5ec53820276e50f5b8b01584595118cf2dc4c95c
Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77998
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-05 10:20:51 +00:00
Bernardo Perez Priego 85710cbe40 mb/google/rex: Configure ISH UART TX/RX as NC
This patch reverses ISH UART pin configuration to allow ISH to enter
into suspend mode. This UART port is for debugging purposes.

BUG=b:302612549
TEST=On Google/rex platform with ISH enabled, do suspend_stress_test
     This test must pass

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
Change-Id: I8aba45420744a3990e1f9637c3b31ea2e0f78f87
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78049
Reviewed-by: Tanu Malhotra <tanu.malhotra@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-10-04 20:03:48 +00:00
Subrata Banik 1e58a16264 soc/intel/cmn/gfx: Add API to report presence of external display
This patch implements an API to report the presence of an external
display on Intel silicon. The API uses information from the transcoder
and framebuffer to determine if an external display is connected.

For example, if the transcoder is attached to any DDI ports other than
DDI-A (eDP), and the framebuffer is initialized, then it is likely
that an external display is present.

This information can be used by payloads to determine whether or not
to power on the display, even if eDP is not initialized.

BUG=b:299137940
TEST=Build and boot google/rex

Scenarios:

Booting with eDP alone: has_external_display value is 0
Booting with eDP + HDMI: has_external_display value is 0
Booting with HDMI alone: has_external_display value is 1
Booting with USB-C display alone: has_external_display value is 1

Change-Id: I77436940978c7fa9368d79394b46a5e794c32e42
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78080
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-04 18:51:10 +00:00
Subrata Banik 790b5cf442 {commonlib, libpayload}: Add "has_external_display" in coreboot table
This patch introduces a new coreboot table entry named
"has_external_display" to understand if external display is attached.

This information is useful to prevent graceful shutdown by payload
when the LID is closed but an external display is present.

This piece of the information will be gathered by coreboot and passed
into the payload using this new entry aka external_display because
payload (i.e., deptcharge) doesn't have any other way to determine
if external display is available.

BUG=b:299137940
TEST=Able to build and boot google/rex.

w/o this patch:

LID closed and external display attached (HDMI) in developer mode
  (GBB 0x39):

> System is powered off by depthcharge

w/ this patch:

LID closed and external display attached (HDMI) in developer mode
  (GBB 0x39):

> Booted to OS and device is alive/usable

Change-Id: I0fa7eee4c5a50371a7a66c6ca1ac2c7d046d010b
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77796
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 18:50:49 +00:00
Subrata Banik 913ea97fbe soc/intel: Select GMA v2 for ADL, MTL, TGL to reflect port/pipe defs
Intel GFX IP TRANS_DDI_FUNC_CTL register bit definitions have changed
since Tiger Lake.

This register is used to map ports and pipes to display controllers,
so reflecting the correct status is important for detecting physical
display end point devices.

This patch ensures that ADL, MTL, and TGL SoCs choose GMA version 2 to
properly reflect the updated port and pipe register definitions.

BUG=b:299137940
TEST=Build and boot google/rex successfully.

Change-Id: Ie2082747d18a5f136f410b1019be4d6c801617b1
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78079
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2023-10-04 18:50:32 +00:00
Subrata Banik 1858903e78 drivers/intel/gma: Update port select bit definitions
This commit updates the port select bit definitions for the
TRANS_DDI_FUNC_CTL registers in the Intel GMA driver to accommodate
the changes introduced since TGL SoC.

Specifically, the following changes were made:

- Updated the DDI select bit definitions from 3-bits (bit 28-30) to
  4-bits (bit 27-30).
- Introduces `INTEL_GMA_VERSION_2` config to accommodate the port and
  pipe related differences between previous generation GMA register
  (TRANS_DDI_FUNC_CTL) to the current generation GMA register.

This commit backports the change from the following upstream patch:
https://patchwork.freedesktop.org/patch/msgid/20190713010940.17711-3-
lucas.demarchi@intel.com

BUG=b:299137940
TEST=Able to build and boot google/rex.

Change-Id: I815ffa90c2e235afd70baa7e3837e1f9af89b1b0
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78078
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2023-10-04 18:50:21 +00:00
Joey Peng b6b3c62ea1 mb/google/dedede/var/boxy:Enable wake on USB2/3 (un)plug
Set USB port which corresponds PORTSCN/PORTSCXUSB3 register bits for
enable USB wake.

BUG=b:302230434
TEST=Verify USB-A device could wake up Boxy

Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com>
Change-Id: I0f6300dc6bbb6fb8226151e49e38f0450b1e71b7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78144
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 15:30:31 +00:00
Sheng-Liang Pan eed9c8322f mb/google/dedede/var/taranza: Enable wake on USB2/3 (un)plug
Set USB port which corresponds PORTSCN/PORTSCXUSB3 register bits for enable USB wake.
The physical USB slot is 6, USB2 port5 for Bluetooth, total USB2 port num is 7, USB3 keep 6.

BUG=b:300844110
TEST=Verify USB-A device could wake up Taranza

Signed-off-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
Change-Id: Ied92c4a70bc594bd189dcb942f1a445412509464
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78068
Reviewed-by: Ricky Chang <rickytlchang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
2023-10-04 15:30:16 +00:00
Reka Norman d2f6b3fa9c soc/intel/jasperlake: Enable wake from USB
Use the common UWES ACPI method to enable wake from USB. The only
difference to other SoCs is that JSL only has 8 USB2 ports, so the USB3
PORTSC register offset is different.

BUG=b:300844110
TEST=When enabled on taranza, all USB2 and USB3 ports can wake from
suspend

Change-Id: Ibc90246965d5d809123e954847543d28d78498a5
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78086
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
2023-10-04 15:29:57 +00:00
Reka Norman a5215c4eb3 soc/intel: Move USB wake methods to a common ASL file
The ACPI methods for enabling USB wake are identical on ADL, CNL and
SKL. Move them to a common ASL file so they can be reused more easily
on other SoCs.

Also move the USB_PORT_WAKE_ENABLE macro used to create enable bitmasks
in devicetree to a common header.

BUG=b:300844110
TEST=Use abuild to build kinox, puff, and fizz with and without this
change. Check the generated dsdt.aml is unchanged.

Change-Id: Iabdfe2bece7fafc284ddf04382f1bbcacc370cce
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78085
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-10-04 15:29:32 +00:00
Yidi Lin 773d4b8fb0 mb/google/geralt: Remove SAMSUNG_ATANA33XC20 panel support
This panel is never actually enabled on Geralt. The derived project
won't use this panel either. Therefore, remove this panel support.

BUG=none
BRANCH=none
TEST=emerge-geralt coreboot

Change-Id: I97ed5b341724ed42098b2c17d0eb75eab881dbb1
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78210
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2023-10-04 09:38:55 +00:00
Yidi Lin da63073827 mb/google/geralt: Update voltage mapping tables for RAM ID and LCMD ID
The tolerance of ADC voltage table is too small. Update the table values
accordring to the suggestion from the hardware team. The patch is
prepared for the derived projects. There is no actual issue now.

BRANCH=none
BUG=b:301908091
TEST=check firmware screen

Change-Id: I3bde30b6bbe79c81e276f23f4110715c3278d42c
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78209
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2023-10-04 09:38:37 +00:00
Serin Yeh ab6f016a43 mb/google/brya/var/yavilla: Add VCM power control sequence
Add VCM power control to configure 2.8V and reset pin, and VCM can
be powered on/off properly.

BUG=b:292907385
TEST=Run ITS test

Change-Id: I242025836fd50076a40ffcc4e5d4a5d5bc6fb4d0
Signed-off-by: Serin Yeh <serin.yeh@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78170
Reviewed-by: Derek Huang <derekhuang@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 09:37:46 +00:00
Sean Rhodes de61edde1b mb/starlabs/starbook/{adl,rpl}: Remove unnecessary entries
Certain devices are enabled in Alder Lakes chipset.cb, so remove
them from the devicetree.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I929af0bed6c2e1024b4787424a8fe466edce5a36
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78198
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 09:37:09 +00:00
Sean Rhodes cc3b2db82f mb/starlabs/starbook/{adl,rpl}: Enable the CNVi device
Change-Id: I1b0052b569b575fec7893322dec0280c9f1ed79f
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78197
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 09:36:51 +00:00
Sean Rhodes 30611620ad mb/starlabs/starbook/rpl: Update the VBT to 251
Updating FSP to v4301.01 caused a strange flicker when connecting
an external display. Update the VBT to 251 from 242 with the exact
same settings to resolve this.

Change-Id: I36bb2cc92e744e761ec6af9c026c429373c1750a
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78196
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2023-10-04 09:36:35 +00:00
Sean Rhodes 825089673d ec/starlabs/merlin: Update the Q Events
Simplify the Q events for the battery and charger to just notify
when a status has changed. The EC will trigger these events when
either has changed.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I3300be5254549fe5cd3b3490d9191240c6d36b6e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77405
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 09:35:53 +00:00
Felix Held 4ab1db82bb soc/amd: rework SPL file override and SPL fusing handling
The SPL_TABLE_FILE and SPL_RW_AB_TABLE_FILE Kconfig options provide a
way to override the default SPL file configured in the SoC's fw.cfg file
by passing the '--spl-table' parameter to amdfwtool which will then use
the override instead of the SPL file from the fw.cfg file. When
SPL*_TABLE_FILE is an empty string, the corresponding add_opt_prefix
call in the makefile will result in no '--spl-table' parameter being
passed to amdfwtool, so it'll use the default SPL file from fw.cfg. In
order to not pass an SPL override by default, remove the default from
the SPL_TABLE_FILE in the SoC's Kconfig. The SoC default pointed to the
same SPL file as in fw.cfg file anyway. Now only when a mainboard sets
this option to point to a file, that file will be used as an override.
This override is used to include a special SPL file needed for the
verstage on PSP case on the Chromebooks. Since SPL_TABLE_FILE is an
empty string by default, neither the SPL_TABLE_FILE Kconfig option nor
it being evaluated in the Makefile need to be guarded by HAVE_SPL_FILE,
so remove the dependency in the Kconfig and the ifeq in the Makefile.

Before this patch, the HAVE_SPL_FILE option controlled two things that
shouldn't be controlled by the same Kconfig option: Only when
HAVE_SPL_FILE was set to y, the SPL_TABLE_FILE override was taken into
account, and it also controls if spl_fuse.c got added to the build which
when added will send the SPL fusing command to the PSP. So the case of
needing an SPL file override, but not updating the SPL fuses wasn't
supported before.

The SPL file in the amdfw part will be used by the PSP bootloader for
the anti-rollback feature which makes sure that the SPL file version
isn't lower than what is in the SPL fuses. For this the SPL file needs
to be present in the PSP directory table. The SPL version check happens
way before we're running code on the x86 cores. The SPL fusing PSP
command that can be sent by coreboot will tell the PSP to update the SPL
fuses so that the fused minimal SPL version will be updated to the
current SPL version.

Since the former HAVE_SPL_FILE option now only controls if the SPL
fusing command will be sent to the PSP mailbox, rename it to
PERFORM_SPL_FUSING to clarify what this will do and update the help text
correctly describe what this does.

TEST=With INCLUDE_CONFIG_FILE set to n, timeless builds for both Birman
with Phoenix APU and Skyrim result in identical binaries.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6cec1f1b285fe48e81a961414fbc9978fa1003cc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78178
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 09:34:54 +00:00
Krishna Prasad Bhat 4b224cbc37 soc/intel/mtl: Select SOC_INTEL_CSE_LITE_PSR config for Meteorlake
During CSE firmware downgrade, data is cleared. To preserve PSR data
during downgrade, it needs to be backed up. Select
SOC_INTEL_CSE_LITE_PSR config to ensure PSR backup related flow is
executed on CSE Lite SKU.

BRANCH=None
BUG=b:273207144
TEST=Verify CSE firmware upgrade/downgrade on rex.

Change-Id: I39af029a5f0c018a5db3ac68191764abfa9518ac
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76115
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 05:51:52 +00:00
Krishna Prasad Bhat b58fd2de04 soc/intel/cse: Add entries to eventlog on PSR backup events
This patch adds eventlog entries for the below scenarios:
1. To indicate success or failure of PSR data back-up command
2. To indicate the loss of PSR data when CSE update is corrupted, and
data clear command is issued to clear the data.
3. To indicate the loss of PSR data when CSE boot partition info
response is corrupted and data back-up is not initiated.

BRANCH=None
BUG=b:273207144
TEST=Verify elog event added after PSR data backup command is sent
cse_lite: PSR_HECI_FW_DOWNGRADE_BACKUP command sent
...
ELOG: Event(B9) added with size 10 at 2023-06-27 06:44:49 UTC

Change-Id: I2459a2b941d28a87b6c78f75dbe8779d73328d7a
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75760
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anil Kumar K <anil.kumar.k@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-10-04 05:51:31 +00:00
Anil Kumar a2d10bb029 soc/intel/cse: Check PSR bit before issuing PSR backup command
Get PSR bit state using MKHI_FWCAPS_GET_FW_FEATURE_STATE HECI command
Use this bit info to check if SKU supports PSR and consequently issue
PSR_HECI_FW_DOWNGRADE_BACKUP command for PSR data backup during
downgrade.

BUG=b:273207144
TEST=build CB image and boot on google/rex board. Check for
"PSR is supported in this SKU" message in coreboot logs to confirm
that PSR bit is set in SKU

Signed-off-by: Anil Kumar <anil.kumar.k@intel.com>
Change-Id: I6e92341a9dc799146eb8f1a70b3a4a16fd1aa0ae
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74874
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-10-04 05:51:19 +00:00
Anil Kumar 7b2edc3b6b soc/intel/cse: Back up PSR data during CSE FW downgrade
During CSE FW downgrade we erase CSE data. This would result in
Platform Service Record(PSR) data also to be erased.

To avoid losing PSR data we need to make a backup before data clear.

This patch sends PSR_HECI_FW_DOWNGRADE_BACKUP HECI command to CSE,
informing the CSE to backup PSR data before a data clear operation
during downgrade.

CMOS memory is used to track the backup status. PENDING is the default
state, it is updated to DONE once PSR_HECI_FW_DOWNGRADE_BACKUP HECI
command is sent.

PSR data can be backed up only post DRAM is initialized. The idea is to
perform cse_fw_sync actions in ramstage when PSR is enabled on a
platform. As part of the cse_fw_sync actions, when a firmware downgrade
is requested the command to back-up data is sent. Once the backup has
been done, trigger the firmware downgrade.

BRANCH=None
BUG=b:273207144
TEST=build CB image for google/rex board and check PSR backup command
is being sent during a CSE FW downgrade. Also check PSR data is not
lost/erased after a downgrade using intel PSR tool.

Change-Id: I135d197b5df0a20def823fe615860b5ead4391f8
Signed-off-by: Anil Kumar <anil.kumar.k@intel.com>
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74577
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 05:50:56 +00:00
Krishna Prasad Bhat 98fb5ffd6b soc/intel/cse: Implement APIs to access PSR backup status in CMOS
PSR data is created and stored in CSE data partition. In platforms that
employ CSE Lite SKU firmware, a firmware downgrade involves clearing of
CSE data partition which results in PSR data being lost. The PSR data
needs to be preserved across the firmware downgrade flow. CSE Lite SKU
firmware supports command to backup PSR data. Since firmware downgrade
and PSR data backup flows involve global resets, there is a need to
track the PSR data backup status across resets. So adding a CMOS
variable for the same.

This patch implements API to access PSR backup status stored in CMOS.
The get API allows to retrieve the PSR backup status from CMOS memory.
The update API allows to update the PSR backup status in CMOS.

BRANCH=None
BUG=b:273207144
TEST=Able to retrieve PSR backup status across resets.

Change-Id: I270894e3e08dd50ca88e5402b59c211d7e693d14
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77069
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2023-10-04 05:48:36 +00:00
Krishna Prasad Bhat 183092743b soc/intel/mtl: Override SOC_INTEL_CSE_FW_PARTITION_CMOS_OFFSET
CSE firmware downgrade and PSR data backup flows involve global resets,
there is a need to track the PSR data backup status across resets. In
the subsequent patches, a CMOS structure to store PSR back-up status
will be added.

The current SOC_INTEL_CSE_FW_PARTITION_CMOS_OFFSET of 68 can only store
cse_specific_info, as ramtop is at offset 100 and PSR back-up status
structure will not be able to fit within the range.

This patch overrides the SOC_INTEL_CSE_FW_PARTITION_CMOS_OFFSET to 161
to accommodate all CSE related info in adjacent CMOS memory.

BUG=b:273207144
TEST=Verify CSE RW FW versions are stored in CMOS memory in rex.

Change-Id: I8bae5245f93b99be15b4e59cfeffbc23eec95001
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78054
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 05:48:23 +00:00
Krishna Prasad Bhat 7542fa19a9 soc/intel/mtl: Call cse_fill_bp_info early in romstage
Intel Platform Service Record(PSR) will be enabled on Meteor Lake
platforms. cse_fw_sync actions happen in ramstage when PSR is enabled.
To avoid the boot time penalty of sending the cse_get_bp_info in
ramstage, call cse_fill_bp_info to get cse_bp_info response early in
romstage and store in cbmem. This data can be later used in ramstage.

BUG=b:273207144
TEST=Verify cse_bp_info is filled in romstage in rex.

Change-Id: Ic0e8fb34f21ff07e182a7b848d38e9d329010028
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78056
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anil Kumar K <anil.kumar.k@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2023-10-04 05:48:15 +00:00
Krishna Prasad Bhat 4f062ec34b soc/intel/cse: Add function to get cse_bp_info early
PSR data is created and stored in CSE data partition. In platforms that
employ CSE Lite SKU firmware, a firmware downgrade involves clearing of
CSE data partition which results in PSR data being lost. The PSR data
needs to be preserved across the firmware downgrade flow. CSE Lite SKU
firmware supports command to backup PSR data, and this command can be
sent only in post-RAM stages. So the cse_fw_sync actions needs to be
moved to ramstage.

Sending cse_get_bp_info command in ramstage takes additional boot time
of ~45-55ms on rex. To avoid the boot time penalty, this patch provides
an API to get the cse_bp_info in early romstage. The response data is
then migrated to cbmem once memory is initialized. The same data in
cbmem can be utilized in ramstage to perform other cse_fw_sync actions.

This patch also adds check to validate cse_bp_info in cbmem and avoids
sending the command again if the data is valid.

BUG=b:273207144
TEST=Verify the command works in early romstage, data is migrated to
cbmem and valid data is available in ramstage on rex.

Change-Id: Ib1e72c950ba0f4911924805f501ec1bd54b6ba3c
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78053
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-04 05:47:54 +00:00
Wisley Chen c0dfd982ba mb/google/nissa/var/yaviks: Add probe in devicetree for USB C1/A0 port
Add probe fw_config to USB C1/A0 port on daught_board for DB_1A sku.

BUG=b:294456574
TEST=emerge-nissa coreboot

Change-Id: I2261b0e4d2b673b6186a435cce8dc6a4ccacb0a7
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78175
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Derek Huang <derekhuang@google.com>
2023-10-04 05:02:08 +00:00
Tim Crawford f339190d07 util/docker: Fix setting SDK_VERSION
The `SDK_VERSION` was incorrectly set to itself instead of keeping the
`COREBOOT_IMAGE_TAG` variable, leaving it as an empty string.

Test: Run `make coreboot-sdk` and see `SDK_VERSION` matches the tag.

Fixes: d3a89cdb74 ("util/docker: Replace use of sed with build args")
Change-Id: I4c8be7d0f7c1ac82da397e720d13a7075f22ec4d
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78141
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-10-03 22:30:02 +00:00
Felix Singer fcfdc695a1 util/docker/coreboot-sdk: Remove superfluous NASM package
Since commit 9b186e0ffe ("util/xcompile: Add NASM to xcompile") NASM
from the coreboot toolchain is properly hooked up to the build system.
So it's not needed to install the distro package. Remove it.

Change-Id: I2ab0317531e25ae6d5baa8be8ac4d41dc145658f
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/77728
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-10-03 21:28:11 +00:00
Felix Singer faea7af32a mb/google/brya: Move selects from Kconfig.name to Kconfig
Selects should be done in the Kconfig file instead of Kconfig.name and
not mixed over both files.

Change-Id: I1439f785cb9ceeefab9d24caa88e35bd43f68315
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/78126
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-10-03 18:53:57 +00:00
Felix Singer 2ceac09f8f mb/asus/p8x7x-series: Move selects from Kconfig.name to Kconfig
Selects should be done in the Kconfig file instead of Kconfig.name and
not mixed over both files.

Change-Id: I5ff9170ac6a3f50830a707dacf4f941587e531ef
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75076
Reviewed-by: Martin L Roth <gaumless@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2023-10-03 17:14:25 +00:00
Felix Singer d684d277a4 mb/prodrive: Move selects from Kconfig.name to Kconfig
Selects should be done in the Kconfig file instead of Kconfig.name and
not mixed over both files.

Change-Id: Iface0fd1d44649c6d9773940818e028e3d3a4292
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75029
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-10-03 17:14:15 +00:00
Felix Singer f1a19f4b81 mb/amd/mayan: Move selects from Kconfig.name to Kconfig
Selects should be done in the Kconfig file instead of Kconfig.name and
not mixed over both files.

Change-Id: I5a321680b1b84ca0b2598d2446ff10257947a733
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75083
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-10-03 17:14:01 +00:00
Felix Singer 8fca63f98f dell/snb_ivb_workstations: Move selects from Kconfig.name to Kconfig
Selects should be done in the Kconfig file instead of Kconfig.name and
not mixed over both files.

Change-Id: I80bd87aa2f97da74a1bbcf05b16f0d5980e142f2
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75072
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin L Roth <gaumless@gmail.com>
2023-10-03 17:13:29 +00:00