Commit Graph

45235 Commits

Author SHA1 Message Date
Nicholas Chin 15d4b95cc6 payloads/Makefile.inc: Add warning for image built with no payload
Writing a coreboot image without a payload to a board's flash chip will
result in a non-bootable system, so warn the user if this is the case.

Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Change-Id: I15ae9548a45e9f566c84db41e8e171c6bc179057
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60025
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-12-23 14:39:57 +00:00
Kenneth Chan 02a2f58a6c mb/google/guybrush/var/dewatt: update DRAM ID table
1. Samsung LPDDR4X 4266 4G K4UBE3D4AB-MGCL
2. Hynix LPDDR4X 4266 4G H54G56CYRBX247 (already used by other variants)

BUG=b:203014978
BRANCH=guybrush
TEST=emerge-guybrush coreboot chromeos-bootimage

Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Change-Id: Ie5ece849a86c75be5af9bc0393090b5f1e33bfed
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60090
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2021-12-23 14:38:50 +00:00
Kevin Chiu b138a8eb85 mb/google/guybrush/var/nipperkin: update telemetry settings
Update the two load line slope settings for the SVID3 telemetry.
AGESA sends these values to the SMU, which accepts them as units
of current.  Proper calibration is determined by the AMD SDLE tool
and the Stardust test.

vdd scale:  73457 -> 73331
vdd offset: 291 -> 1893
soc scale:  30761 -> 31955
soc offset: 834 -> 852

BUG=b:207299255
BRANCH=guybrush
TEST=1. emerge-guybrush coreboot
     2. pass AMD SDLE/Stardust test

Change-Id: I9c9dd4883fd21a70a1e7a50f25a4f76df1e56bc6
Signed-off-by: Kevin Chiu <kevin.chiu.17802@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60243
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2021-12-23 14:38:35 +00:00
Krishna Prasad Bhat 351d3a1967 mb/intel/adlrvp_n: Add support for ADL-N LP5 RVP
Add support for Alder lake N LP5 RVP with board ID 0x7.
Since SPD index 7 is unused earlier, ADL-N will use it.

Change-Id: Ib2f53e65f75e23793d8c85ee924827446fd9fea7
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60193
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
2021-12-23 14:38:14 +00:00
Jakub Czapiga 8fac662f30 libpayload/libc/fmap: Implement new FlashMap API
This patch introduces new FlashMap API, the fmap_locate_area().
It works on cached FlashMap provided in lib_sysinfo.fmap_cache.

Change-Id: Idbf9016ce73aa58e17f3ee19920ab83dc6c25abb
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59494
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2021-12-23 14:37:42 +00:00
Jakub Czapiga e7006fb414 libpayload: Add commonlib/bsd include path to lpgcc
coreinfo and nvramcui are using libpayload/bin/lpgcc and libpayload
build directory as a base, instead of installing it first. This caused
include errors, because commonlib/bsd is not present there. This patch
introduces comonlib/bsd include path to lpgcc CFLAGS if it is being
built using libpayload build directory as a base.

Change-Id: I7d1fe9e5dc3e7c1c1ba825a1bf19972722b42778
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60171
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2021-12-23 14:37:04 +00:00
Teddy Shih bcd7873ea8 mb/google/dedede/var/beadrix: Remove SD controller
Remove SD controller configurations based on the beadrix's schematic.

BUG=b:204882915
BRANCH=None
TEST=Built test coreboot image

Signed-off-by: Teddy Shih <teddyshih@ami.corp-partner.google.com>
Change-Id: Iba6f5cbbe90d9307e5e8080d7063a1881acd7ed9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60266
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-12-23 14:36:45 +00:00
Teddy Shih c729ebe945 mb/google/dedede/var/beadrix: Add internal USB camera support
This change adds internal USB camera into devicetree for beadrix.

BUG=b:204882915, b:210772511
BRANCH=None
TEST=Built and checked camera device existence with lsusb

Signed-off-by: Teddy Shih <teddyshih@ami.corp-partner.google.com>
Change-Id: Iddc58c0d27d5da0fa4652f503f15ebb308be18c7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60252
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-12-23 14:36:26 +00:00
Teddy Shih 7ff067ce38 mb/google/dedede/var/beadrix: Enable audio feature
This change adds ALC5682I audio codec and MAX98360A amplifier for beadrix.

BUG=b:204882915, b:210756131
BRANCH=None
TEST=Built and heared speaker sound on OS

Signed-off-by: Teddy Shih <teddyshih@ami.corp-partner.google.com>
Change-Id: I6f12f71ec66acd420471ab9a7612b1821650ad54
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60250
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-12-23 14:36:04 +00:00
Teddy Shih fe7554c3ac mb/google/dedede/var/beadrix: Enable PIXA touchpad
This change adds PIXA touchpad into devicetree for beadrix.

BUG=b:204882915, b:203113111
TEST=Built and verified touchpad function

Signed-off-by: Teddy Shih <teddyshih@ami.corp-partner.google.com>
Change-Id: I0b551554c69d52f0559ace4ad9c1335270dacea9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60246
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-12-23 14:35:45 +00:00
Sean Rhodes 8f363cd00f mb/starlabs/labtop: Update VBT
Using Vbt.bin version 244, with the following changes:
* Add 200ms delay to sink (T3) to avoid no response to AUX Channel
transaction, which manifests as a repeating, colourful flicker.
* Increase maximum supported refresh rate to 120Hz

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ifc03b8f5d45cbbf90fb61d8b08148ed402dd85ec
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59727
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Andy Pont <andy.pont@sdcsystems.com>
2021-12-23 14:34:55 +00:00
Dtrain Hsu 94ee1cb19c mb/google/dedede/var/cret: Generate new SPD ID for new memory parts
Add new memory parts in the mem_parts_used.txt and generate the
SPD ID for the parts. The memory parts being added are:
1. Samsung K4U6E3S4AB-MGCL
2. Hynix H54G46CYRBX267

BUG=b:203837656
BRANCH=dedede
TEST=FW_NAME=cret emerge-dedede coreboot chromeos-bootimage

Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Change-Id: I03980858f89e56320ddff3a808110a5f1dd57784
Reviewed-on: https://review.coreboot.org/c/coreboot/+/58412
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-12-23 14:34:35 +00:00
Wisley Chen ae8004ad5f mb/google/brya/var/anahera: Enable SaGv
Enable SaGv support for anahera/anahera4es.

BUG=b:211362081
TEST=FW_NAME=anahera emerge-brya coreboot

Change-Id: I68c916dbc570759dba3a4c32fbb8ebfc6e387be4
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60249
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-23 14:34:16 +00:00
Joey Peng 591789b50b mb/google/brya/var/taeko4es: Fix PLD group order (W/A)
In commit 667471b8d8 (ec/google/chromeec: Add PLD to EC conn in ACPI
table), PLD is added to ACPI table. It causes the DUT to not boot into
the OS. So fix the USB3/USB2 Type-C Port C2 PLD group order from 3 to 2
to solve this issue.

Fixes: 667471b8d8 ("ec/google/chromeec: Add PLD to EC conn in ACPI table")
BUG=b:209723556
BRANCH=none
TEST=build coreboot and boot into OS.

Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com>
Change-Id: Iff1302fa758bcde1ce8b03c16f7cc6eac807e5c9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60187
Reviewed-by: YH Lin <yueherngl@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-12-23 14:34:00 +00:00
Paul Menzel 0afecdf95a sb/intel/common/rcba_pirq: Use correct size_t length modifier
Building an image for the Lenovo T60 with `x86_64-linux-gnu-gcc-11`
fails with the format warning below.

        CC         ramstage/southbridge/intel/common/rcba_pirq.o
    src/southbridge/intel/common/rcba_pirq.c: In function 'intel_acpi_gen_def_acpi_pirq':
    src/southbridge/intel/common/rcba_pirq.c:86:69: error: format '%ld' expects argument of type 'long int', but argument 5 has type 'size_t' {aka 'unsigned int'} [-Werror=format=]
       86 |                 printk(BIOS_SPEW, "ACPI_PIRQ_GEN: %s: pin=%d pirq=%ld\n",
          |                                                                   ~~^
          |                                                                     |
          |                                                                     long int
          |                                                                   %d
       87 |                        dev_path(dev), int_pin - PCI_INT_A,
       88 |                        pirq_idx(pin_irq_map[map_count].pic_pirq));
          |                        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                        |
          |                        size_t {aka unsigned int}

The return value of `pirq_idx()` is of type `size_t`, so use the
appropriate length modifier `z`.

Change-Id: I7af24cee536b81e4825b77942bcac75afeb9f476
Found-by: gcc (Debian 11.2.0-13) 11.2.0
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60194
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-23 14:33:50 +00:00
Reka Norman d448f8ce0f drivers/intel/pmc_mux/conn: Change usb{23}_port_number fields to device pointers
Currently, the pmc_mux/conn driver uses integer fields to store the
USB-2 and USB-3 port numbers from the SoC's point of view. Specifying
these as integers in the devicetree is error-prone, and this
information can instead be represented using pointers to the USB-2 and
USB-3 devices. The port numbers can then be obtained from the paths of
the linked devices, i.e. dev->path.usb.port_id.

Modify the driver to store device pointers instead of integer port
numbers, and update all devicetrees using the driver. These are the
mainboards affected (all are Intel TGL or ADL based):
google/brya
google/volteer
intel/adlrvp
intel/shadowmountain
intel/tglrvp
system76/darp7
system76/galp5
system76/lemp10

Command used to update the devicetrees:
git grep -l "usb._port_number" src/mainboard/ | \
  xargs sed -i \
  -e 's/register "usb2_port_number" = "\(.*\)"/use usb2_port\1 as usb2_port/g' \
  -e 's/register "usb3_port_number" = "\(.*\)"/use tcss_usb3_port\1 as usb3_port/g'

BUG=b:208502191
TEST=Build test all affected boards. On brya0, boot device and check
that the ACPI tables generated with and without the change are the same.

Change-Id: I5045b8ea57e8ca6f9ebd7d68a19486736b7e2809
Signed-off-by: Reka Norman <rekanorman@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60143
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-23 14:33:28 +00:00
Kenneth Chan 9fe2ce802a mb/google/guybrush/var/dewatt: update USB 2.0 Lane Parameter settings for USB ports
Tune the USB phy settings to update txpreempamptune to 3 and txvreftune to 6 for passing USB 2.0 SI Eye diagram measurement (port 0/1/4).

BUG=b:199468920
TEST= emerge-guybrush coreboot; pass USB 2.0 SI Eye diagram measurement.

Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Change-Id: Ie46c9019186f1893d736fc2806ab74a4f1171be7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60239
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2021-12-23 14:32:20 +00:00
Angel Pons 2ea8b945ec nb/intel/ironlake: Use `NUM_CHANNELS` macro
Change-Id: I3f4dc26699e3618740af5a0ade1a19599d5a2cc7
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60225
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2021-12-23 14:31:53 +00:00
= e061fbf1e7 mb/google/brya/var/vell: update overridetree for SSD setting
Change CLKSRC#3 to CLKSRC#1 in override devicetree based on schematics

BUG=b:208756696
TEST=emerge-brya coreboot

Change-Id: I4d452eaa690a91814739cc1b80966fc3a9f1be37
Signed-off-by: = <robert.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60099
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-23 14:31:13 +00:00
= 0617d5a16f mb/google/brya/var/vell: update overridetree for touchpad
update override devicetree for touchpad based on schematics

BUG=b:209554950
TEST=emerge-brya coreboot

Change-Id: I835958349537ed490191db7c8e35847630de64ed
Signed-off-by: = <robert.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60098
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-23 14:31:05 +00:00
Angel Pons 0071e6b528 lib/Makefile.inc: Remove effect-free line
Because of a typo, `bootblcok-y += rtc.c` does nothing. Drop it.

Change-Id: Ife2ee152ab32ef23df5986c47bec490db592ab60
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56216
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-12-23 12:14:17 +00:00
Subrata Banik f78a4b9f86 mb/intel/{adlrvp,sm}: Remove unused header `helpers.h`
This patch removes unused header inclusion as <commonlib/helpers.h>
from several mainboard gpio definition files.

Change-Id: I36758089a4981bba916f4d9cf485f64fca2f81ae
Signed-off-by: subratabanik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60305
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
2021-12-23 04:17:11 +00:00
Tim Wawrzynczak 235a2a11b3 mb/google/brya/var/taeko: Enable Bayhub LV2 driver
Some SKUs of google/taeko have a Bayhub LV2 card reader chip,
therefore enable the corresponding driver for the mainboard.

BUG=b:204343849

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I738af7e77a3c076742a3d6c6f48fad29dfc978ac
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60017
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-12-22 18:41:51 +00:00
Tim Wawrzynczak 3ee9bb012d drivers/generic/bayhub_lv2: Work around known errata
The Bayhub LV2 has a known errata wherein PCI config registers at
offsets 0x234, 0x238, and 0x24C will only correctly accept writes
when they are addressed via a DWORD (32-bit) wide write operation
on the PCIe bus. Offset 0x234 is the LTR max snoop and max no-snoop
latency register, therefore add a finalize callback to this driver
which will program the LTR max-snoop/no-snoop register with a 32-bit
write using the values from pciexp_get_ltr_max_latencies().

BUG=b:204343849
TEST=verified the PCI config space writes took effect on google/taeko

Change-Id: I1813f798faa534fb212cb1a074bc7bcadd17a517
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60016
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-12-22 18:41:39 +00:00
Tim Wawrzynczak a62cb5693b device: Make pciexp_get_ltr_max_latencies a public function
Some device drivers may need to get access to the LTR values for their
respective devices, therefore export this function instead of marking it
static.

BUG=b:204343849

Change-Id: Id372600e8adec0d55d3483726bb9353139685774
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60015
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2021-12-22 18:14:47 +00:00
Mark Hsieh d27dd97e17 mb/google/brya/var/gimble: Configure GPIO to release PERST# earlier
This change in power sequencing appears to fix issues with power
consumption of the SD card controller. Possibly this change
ensures the device has enough time to properly initialize itself
after reset is deasserted but before it is accessed.

BUG=b:206014046
TEST=USE="project_gimble emerge-brya coreboot" and verify it builds
without error.

Signed-off-by: Mark Hsieh <mark_hsieh@wistron.corp-partner.google.com>
Change-Id: I90e5dd074ceda365283fe7e1f43dfd8c692d7338
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60279
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-22 15:40:48 +00:00
Scott Chao baf027d50c soc/intel/alderlake: remove SOC_INTEL_COMMON_BLOCK_SMM_LOCK_GPIO_PADS
This causes the I2C touchpad device to stop working after warm reboot.

BUG=b:210701402
BRANCH=none
TEST=after warm reboot, the touchpad still works.

Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com>
Change-Id: I106ddc96c3185656d3f1fbcd45f198d2d46f3f4d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60126
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-12-22 15:40:25 +00:00
Joey Peng 82a283dad9 mb/google/brya/variant/taniks: Add devicetree settings
Based on schematic G570_MB_CHROME_1207_1630_ADC and gpio table of
taniks, generate overridetree.cb settings for taniks.

BUG=b:209926534
TEST=FW_NAME=taniks emerge-brya coreboot chromeos-bootimage

Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com>
Change-Id: Ib333150117832480f70fbe13bdbdf2982a7f70e6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59998
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-21 23:23:29 +00:00
Bill XIE f0215b4cae arch/x86: Init firmware pointer for EC SMSC KBC1098/KBC1126 at build time
According to util/kbc1126/README.md, for these ECs to work, the
address and size of their two firmware should be written to $s-0x100`
(`$s` means the image size, done with kbc1126_ec_insert), which means
that every existing section (especially those used to store code)
should not overlap this address, otherwise the bootblock will get
damaged when inserting firmwares of the EC.

In this commit, ecfw_ptr is a structure initialized at build time
according to CONFIG_KBC1126_FW1_OFFSET and CONFIG_KBC1126_FW2_OFFSET
(to do so, they should be redefined as hex), and linked to
CONFIG_ECFW_PTR_ADDR within bootblock, so kbc1126_ec_insert is not
needed at build time any more.

Test passed on Elitebook Folio 9470m.

Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
Change-Id: I4f0de0c4d7283e630242fbe84a46e0547783c49e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/51671
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-12-21 18:13:45 +00:00
Nick Vaccaro a4dddfc3a3 Revert "vendorcode/intel/fsp: Add Alder Lake FSP headers for FSP v2471_02"
This reverts commit ae0ea32c52.
This change should not have merged until the 2471_02 FSP change is ready
for merge.

BUG=b:211481222
TEST='emerge-brya coreboot chromeos-bootimage', flash and boot brya0
to kernel.

Change-Id: Iae5b0c53ace196053e1e155efd2e08f438979ba7
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60262
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Zhuohao Lee <zhuohao@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-21 05:49:40 +00:00
Felix Singer b5ff51719d mb/google/reef: Move selects from Kconfig.name to Kconfig
Move selects from Kconfig.name to Kconfig so that the configuration is
at one place and not distributed over two files.

Change-Id: Id71c63556da73a09c5a6d3e844686ddc3e113ea7
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60148
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-20 22:11:50 +00:00
Felix Singer 02031018e1 mb/google/reef: Restore alphabetical order on Kconfig selects
Change-Id: I9578dd7cd4766b4b2ce8fb14992b1ef4701d9878
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60147
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-20 22:10:18 +00:00
Felix Singer d22d692a19 mb/google/poppy: Select board-specific options per board
Move board-specific selects out of common configuration and add them to
each board where necessary.

Change-Id: I5bda94b20da4c9184cef2a39598e25a214c044b1
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60146
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-20 22:09:08 +00:00
Felix Singer 01c06d7ba5 mb/google/poppy: Drop unnecessary Kconfig options
These variant-specific options are only selected by their board options
and are not used for anything else. Thus, merge their selects into the
board options and drop them.

Change-Id: I0eb3fdc4fd7306e76d5479494e3ab80bbdb984fe
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60189
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-20 22:06:51 +00:00
Felix Singer ae69f518b6 mb/google/poppy: Move selects from Kconfig.name to Kconfig
Move selects from Kconfig.name to Kconfig so that the configuration is
at one place and not distributed over two files.

Change-Id: I462426f2ef4a0ff62c0a7c1eb2a4946fba68c4a9
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60188
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-20 22:04:09 +00:00
Felix Singer ec9de74d2d mb/google/poppy: Restore alphabetical order on Kconfig selects
Change-Id: If5cb98712767e2acab8955931d4f342c8f3d7824
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60144
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-20 22:03:29 +00:00
Rob Barnes 4b75b44bd8 mb/google/guybrush: Enable PSP_S0I3_RESUME_VERSTAGE
Enable PSP_S0I3_RESUME_VERSTAGE for all guybrush based boards. This will
cause verstage to run during s0i3 resume. The TPM will be reinitialized
in verstage during s0i3 resume. This is necessary on guybrush boards
because the TPM_RST_L pin is asserted by the SOC in S0i3.

BUG=b:200578885
BRANCH=None
TEST=TPM initialized after s0i3

Change-Id: I9d64fe92ffc67a421be6d5e013e636332ce86dd5
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60139
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-12-20 17:53:10 +00:00
Rob Barnes 4454c9af3c soc/amd/cezanne: Correct S0i3 verstage softfuse bit
PSP_S0I3_RESUME_VERSTAGE softfuse bit is 58, not 40.

BUG=b:202397678
BRANCH=None
TEST=Boot guybrush, ensure S0i3 verstage runs with latest PSP.

Change-Id: Ia27f6e48e345aac0d5f6579d663a6b655688239a
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60214
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2021-12-20 17:52:50 +00:00
Angel Pons 57af68fec9 configs: Add config for Prodrive Hermes
Build-test the configuration Prodrive uses to build coreboot for their
Hermes mainboard.

Change-Id: I62e79d3143851bf14dfdbe70e60c60f13dd06c3f
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57168
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Justin van Son <justin.van.son@prodrive-technologies.com>
2021-12-20 17:51:52 +00:00
Sridhar Siricilla aff2457723 commonlib: Add new TS for CSE firmware Sync
The patch defines new TS for CSE firmware synchronization.
Also, removes unused TS_FIT_UCODE_LOADED TS.

TEST=Build the code for Brya

Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Change-Id: I9ed82c5358eb94b5e7c91b9fd783c5e09189b77a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59668
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-12-20 17:51:27 +00:00
Rory Liu 58ce8b7db0 mb/google/brya/var/brask: Add wake-on-lan function
Add a wake-on-lan GPIO in devicetree for RTL8125.
Modify GPIO A7 for wake-on-lan.

BUG=b:204289108
TEST=emerge-brask coreboot chromeos-bootimage

Signed-off-by: Rory Liu <rory.liu@quanta.corp-partner.google.com>
Change-Id: Ic40301888a138df4a67398485f2a484d69b83fc9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60132
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-20 17:50:17 +00:00
Curtis Chen b89c798ddc soc/intel/common: Do not trigger crashlog on all resets by default
Crashlog has error records and PMC reset records two parts. When we
send ipc cmd "PMC_IPC_CMD_ID_CRASHLOG_ON_RESET", PMC reset record is
enabled. At each warm/cold/global reset, crashlog would be triggered.
The cause of this crash would be "TRIGGER_ON_ALL_RESETS", it is used to
catch unknown reset reason. At the same time, we would see [Hardware
Error] in the kernel log.

If we default enable TRIGGER_ON_ALL_RESETS, we would have too many false
alarm. Now we disable PMC reset records part by default. And we could
enable it when we need it for the debug purpose.

The generated bert dump is under /var/spool/crash/, we could check this
path to verify this CONFIG disable/enable status.

BUG=b:202737385
TEST=No new bert dump after a warm reset.

Signed-off-by: Curtis Chen <curtis.chen@intel.com>
Change-Id: I3ec4ff3c8a3799156de030f4556fe6ce61305139
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59951
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-20 17:49:53 +00:00
Shon Wang b39f2a9066 mb/google/brya/var/vell: update memory settings
DQ/DQS info from Intel_Platform_DQ_DQS_RCOMP_Info_Utility
GPIO_MEN_CONFIG_0	GPP_E11 to GPP_E3
GPIO_MEN_CONFIG_3	GPP_E12 to GPP_E7
GPIO_MEM_CH_SEL_GPP_E5  GPP_E13 to GPP_E5

BUG=b:205908918
TEST=emerge-brya coreboot

Change-Id: Ic0bbac5eaebc77639be6c1bc399658ac90e72fbb
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59334
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-20 17:48:54 +00:00
Kevin Chiu 1a7afb8363 mb/google/brya/var/vell: update gpio override
Configure GPIOs according to schematics

BUG=b:205908918
TEST=emerge-brya coreboot

Change-Id: Icc91866f7555c294af7eed9e5d1550e73d8059d0
Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59305
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-20 17:48:14 +00:00
Jakub Czapiga f490d48b5c libpayload: Add -Wno-address-of-packed-member for ARCH_MOCK
When compiling libpayload using x86_64 toolchain for ARCH_MOCK compiler
reports an error about gerring address of packed member. Until now it
had to be disabled by passing -Wno-address-of-packed-member to
EXTRA_CFLAGS. This patch disables this warning.

Change-Id: I9a948fabe66f7297632ecaca8ec1bfa5c842b750
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60169
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2021-12-20 17:47:50 +00:00
Tim Wawrzynczak a7e85d43c8 mb/google/brya/var/*: Add disable_gpio_export_in_crs to all devicetrees
None of the touchscreens used in the brya program (any brya board)
should require exporting of GPIOs in the ACPI _CRS method for any i2c
device. This can cause i2c devices to malfunction or cause timing
sequence violations if:

1) ACPI exports a PowerResource for the device that uses GPIOs that are
   also exported in _CRS
2) The kernel driver for the device uses the GPIOs exported in _CRS for
   its own purposes. This means the state of the pin is out of sync
   between platform firmware and the kernel. The Linux ELAN I2C
   touchcsreen driver (https://source.chromium.org/chromiumos/chromiumos/codesearch/+/main:src/third_party/kernel/upstream/drivers/input/touchscreen/elants_i2c.c;l=1429)
   is one example of this.

Therefore, add disable_gpio_export_in_crs to all brya variants that use
the drivers/i2c/generic or drivers/i2c/hid chip drivers.

Change-Id: Ib4475bd0dc885e230911de6298fd95baa868ef29
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60175
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2021-12-20 17:47:24 +00:00
Ariel_Fang 8140691742 mb/google/brya/var/primus: Update thermal table for primus
- Because primus have five sensors,we need to define 5 sensors.

BUG=b:200836803
TEST=USE="project_primus emerge-brya coreboot" and verify it builds
without error.

Signed-off-by: Ariel_Fang <ariel_fang@wistron.corp-partner.google.com>
Change-Id: I02fb8eee644f9999d9c5d48e3a056499d968f85d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60101
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-12-20 17:45:48 +00:00
Zhuohao Lee fba3668f5a mb/google/brya/variants/brask: Disable autonomous GPIO power management
We experienced the `Cr50 i2c TPM IRQ timeout!` error when the device
executed the reboot test even though we have updated the Cr50 firmware
to the latest version 0.6.70. Besides, we also experienced the device
failed with the IRQ timeout when using the 0.3.22 Cr50 firmware in the
factory. In order to fix these issues, we disable the gpio power
management from the devicetree.

BUG=b:210540890
TEST=reboot 100 cycles without the error message.

Change-Id: I5f18fea5bc28493107c6d4951805de640a0b8ae5
Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60100
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2021-12-20 17:45:28 +00:00
Felix Held aed38a94e3 soc/amd/common/lpc/espi_util: use enum cb_err type for return values
Use enum cb_err as return type of all remaining functions that only
return success or failure.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6cff8480d99641fdfb613bb3e4edc4055ad5efc6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60208
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2021-12-20 17:40:52 +00:00
Felix Held 4b4114f709 soc/amd/common/lpc/espi_util: use enum cb_err type for return values
Use enum cb_err as return type of all functions that aren't exposed
outside of this compilation unit. The checks if a function has returned
a failure are replaced with checks if the return value isn't CB_SUCCESS
which is equivalent if only those two values are used, but also detects
a failure if any unexpected value would be returned.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: If8c703f62babac31948d0878e91bd31b31bebc01
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60207
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2021-12-20 17:40:32 +00:00