Commit Graph

45664 Commits

Author SHA1 Message Date
Dominik Behr 079c8006bf mb/google/hatch/var/mushu: Add VBT
Add the missing VBT for Mushu, which is simply a copy of the one for the
hatch variant.

Change-Id: I3918ce9e7cfa6a7dafaa228a13d0f0a5b8913c66
Signed-off-by: Dominik Behr <dbehr@chromium.org>
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60283
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
2022-01-10 14:30:31 +00:00
Jakub Czapiga 63e54275f6 libpayload: Implement new CBFS access API
This commit adds new CBFS API, which is based on the one available in
the main coreboot source tree. Libpayload implementation supports RO/RW
file lookups and file contents verification.

Change-Id: I00da0658dbac0cddf92ad55611def947932d23c7
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59497
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-01-10 14:30:04 +00:00
Jakub Czapiga 1fa3da4d9b libpayload: Enable vboot integration
This patch introduces building and linking of 3rdparty/vboot with
libpayload. VBoot can be enabled by setting CONFIG_LP_VBOOT_LIB.
Moreover it can be configured to use either TPM or TPM 2.0 mode,
and whether to use SHA256 processor extension instructions on x86.

Change-Id: I2d9d766a461edaa0081041c020ecf580fd2ca64e
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60080
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-01-10 14:29:50 +00:00
Curtis Chen b7d1b35175 mb/google/brya/var/brask: Update PL and PsysPL
Update all the ADL-P 15W/28W/45W SKU's PL and PsysPL. These config
values are generated iPDG application with ADL-P platform package
tool. RDC Kit ID for the iPDG tools:
* Intel(R) Platform Design Studio Installer: 610905.
* Intel(R) Platform Design Studio - Libraries: 613643
* Intel(R) Platform Design Studio - Platform ADL-P (Partial): 627345.
* Intel(R) Platform Design Studio - Platform ADL-P (Full): 630261.

BUG=b:211365920
BRANCH=none
TEST=Compare the measured power from adapter with the value of 'psys'
     from the command 'dump_intel_rapl_consumption'.

Signed-off-by: Curtis Chen <curtis.chen@intel.com>
Change-Id: I4a827ae40e26294db20d5d1b2121dcce5118e290
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60323
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-10 14:27:41 +00:00
Curtis Chen 150fee60cc soc/intel/alderlake: Update the ADL-P SKU parameters for VR domains
We support all the ADL-P 15W/28W/45W SKU's and map them with the
latest VR configurations. These config values are generated by iPDG
application with ADL-P platform package tool.

RDC Kit ID for the iPDG tools
* Intel(R) Platform Design Studio Installer: 610905
* Intel(R) Platform Design Studio - Libraries: 613643
* Intel(R) Platform Design Studio - Platform ADL-P (Partial): 627345
* Intel(R) Platform Design Studio - Platform ADL-P (Full): 630261

BUG=b:211365920
TEST=Build and check fsp log to confirm the settings are set properly.

Signed-off-by: Curtis Chen <curtis.chen@intel.com>
Change-Id: Ida7a6df0422a9a3972646cb3bdd0112b5efa2755
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60322
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-01-10 14:26:16 +00:00
Robert Chen 502a761221 mb/google/brya/var/vell: Enable SaGv
Enable SaGv support for vell

BUG=b:208719081
TEST=FW_NAME=vell emerge-brya coreboot

Change-Id: I01e3da449e2cf53278f625ca265d09f7a1869ef7
Signed-off-by: Robert Chen <robert.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60811
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-01-10 14:25:58 +00:00
Rob Barnes 6a3ecc508a guybrush: Inject SPDs into APCB
Inject SPDs into APCB at coreboot build time.

BUG=b:209486191
BRANCH=None
TEST=Boot guybrush and nipperkin with injected APCB

Change-Id: Ib21085855324e0d473dd5e258f35a52bed326901
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60775
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-01-10 14:25:40 +00:00
Rob Barnes f26ce9f00e util/apcb: Add apcb_v3_edit tool
apcb_v3_edit.py tool edits APCB V3 binaries. Specifically it will inject
up to 16 SPDs into an existing APCB. The APCB must have a magic number
at the top of each SPD slot.

BUG=b:209486191
BRANCH=None
TEST=Inject 4 SPDs into magic APCB, boot guybrush with modified APCB

Change-Id: I9148977c415df41210a3a13a1cd9b3bc1504a480
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60281
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-01-10 14:25:32 +00:00
David Wu d2bba5ccd8 mb/google/brya: Create volmar variant
Create the volmar variant of the brya0 reference board by copying
the template files to a new directory named for the variant.

(Auto-Generated by create_coreboot_variant.sh version 4.5.0).

BUG=b:213127419
BRANCH=None
TEST=util/abuild/abuild -p none -t google/brya -x -a
make sure the build includes GOOGLE_VOLMAR

Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Change-Id: I5ebf62b7a17b075c0e28fb4e8b7c501fc8db3ea3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60766
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-01-10 14:23:05 +00:00
Tony Huang 20777ec5a9 mb/google/brya/var/agah: move memory makefile to correct path
Move memory Makefile.inc and dram_id.generated.txt to correct path

BUG=b:210970640
TEST=emerge-brya coreboot

Change-Id: Ib5d9d9dd6f881f0b9cf2736809a74e5045c3c217
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60889
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-10 14:22:43 +00:00
Kenneth Chan 9b9fe92e28 mb/google/hatch/var/scout: Update DPTF parameters
Update the DPTF parameters received from the thermal team. Refer to
https://partnerissuetracker.corp.google.com/issues/195602767#comment6.

BUG=b:195602767
TEST=emerge-ambassador coreboot

Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Change-Id: I93fe388ff1862d0a96b11ce68a5d28664f11996a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60834
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-10 14:19:53 +00:00
Sheng-Liang Pan da3edab901 mb/google/volteer/var/chronicler: add Elan touch support
Enable Elan touchscreen support for chronicler.

BUG=b:213537197
TEST=emerge-volteer coreboot chromeos-bootimage
     verified touchscreen works

Signed-off-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
Change-Id: Ic56092972eb9555b097b21ff5828573926610f31
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60810
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-10 14:19:44 +00:00
Elyes HAOUAS f23cc1c0c1 southbridge/amd/agesa/hudson/smi_util.c: Remove repeated "set"
Change-Id: I6741084651a9472162cf549a4170e954e760f0f1
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60908
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2022-01-10 09:56:47 +00:00
Elyes HAOUAS 44d103581d southbridge/amd/pi/hudson/smi_util.c: Remove repeated "set"
Change-Id: Ice47aeb9b1bc462d60b396bedeaab48ae0922e00
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60907
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2022-01-10 09:56:09 +00:00
Eric Lai 69d98b3655 mb/google/brya: Use genesyslogic gl9755 SD card reader for Felwinter
Felwinter selects DRIVERS_GENESYSLOGIC_GL9755 Kconfig to make use of
SD card reader driver.

BUG=b:209501017
TEST=build PASS.

Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: I196ae9c5dbbcc6057d17605eece27563bcc79af8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60893
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-10 08:31:14 +00:00
Michael Niewöhner 02275be61e soc/intel/{icl,tgl,jsl,ehl}: enable ACPI CPPC entries
Enable CPPC entries generation, needed for Intel SpeedShift.

This can be tested by checking sysfs in Linux:
$ grep . /sys/devices/system/cpu/cpu?/acpi_cppc/*perf

The output should look like this, while the values may differ:

  /sys/devices/system/cpu/cpu0/acpi_cppc/highest_perf:28
  /sys/devices/system/cpu/cpu0/acpi_cppc/lowest_nonlinear_perf:5
  /sys/devices/system/cpu/cpu0/acpi_cppc/lowest_perf:1
  /sys/devices/system/cpu/cpu0/acpi_cppc/nominal_perf:24
  /sys/devices/system/cpu/cpu1/acpi_cppc/highest_perf:28
  /sys/devices/system/cpu/cpu1/acpi_cppc/lowest_nonlinear_perf:5
  ...

Change-Id: I910b4e17d4044f1bf1ecfa0643ac62fc7a8cb51b
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47543
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lance Zhao
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: Sheng Lean Tan <sheng.tan@9elements.com>
2022-01-09 01:47:22 +00:00
Arthur Heymans 63660592dc soc/intel/xeon_sp: Don't handle FSP reserved memory explicitly
FSP reserved memory is allocated inside cbmem which already gets
marked as a reserved memory region, so there is no need to do this
explicitly.

Change-Id: I39ec70bd9404d7bc2a4228c4364e4cc86f95d7c1
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60838
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
2022-01-08 02:52:02 +00:00
Julius Werner c1d1cfa243 configs: Add build test configs for CBFS verification
Now that CBFS verification is available as an optional feature in
menuconfig (CB:59982), we should add build test configs to ensure it
doesn't break without notice. One Arm and one x86 board should be good
enough for now.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I530dfd37472e63b80a67badd22a13d54d2c4621b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60467
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
2022-01-08 00:41:18 +00:00
Julius Werner 20ba6e4834 sc7180: Increase bootblock size and add pre-RAM TCPA buffer
In order to make SC7180 boards compatbile with some optional Kconfigs,
increase the bootblock size a bit and add room for a TCPA log buffer to
memlayout. The large pre-RAM CBFS cache wasn't really needed anymore
anyway since we switched QcLib to use LZ4 compression.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I7321cca9d7b79368115c57f156b8e71657802a41
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60469
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Shelley Chen <shchen@google.com>
2022-01-08 00:41:02 +00:00
Srinivasa Rao Mandadapu 2360d7c277 mb/google/herobrine: Add support for audio
Add GPIO configuration for target specific i2s ports.

BUG=b:182963902
TEST=Validated on qualcomm sc7280 development board
     Boot on herobrine board (no speakers to test yet)

Signed-off-by: Srinivasa Rao Mandadapu <srivasam@codeaurora.org>
Change-Id: I2ce95332f892d5d4acb2755307df84d37feb8002
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57449
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-01-08 00:35:59 +00:00
Shelley Chen 3538461468 mb/google/herobrine: Initialize EC and TPM devices
Initialize EC and H1/TPM instances on herobrine devices.

BUG=b:182963902
BRANCH=None
TEST=Validated on qualcomm sc7280 development board
     and verified booting on herobrine.

Change-Id: I8cbdd1d59a0166688d52d61646db1b6764879a7c
Signed-off-by: Roja Rani Yarubandi <rojay@codeaurora.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/50581
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-01-07 22:27:37 +00:00
Shon Wang f00680afc5 mb/google/brya/var/vell: Add MIPI camera info
Add OVTI8856 information for vell:

BUG=b:210801553
TEST=Build and boot on vell

Change-Id: I43de859cd0cdd9fe21c16cabfad511ed0b368ee3
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60276
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-01-07 20:02:02 +00:00
Shon Wang 138f547c8b mb/google/brya/var/vell: Swap TPM I2C with touchscreen I2C
According to the latest schematic for the next build phase, exchange I2C port for TPM/touchscreen.
TPM: I2C3 -> I2C1
Touchscreen: I2C1 -> I2C3

BUG=b:210572663
TEST=FW_NAME=vell emerge-brya coreboot

Change-Id: If72717a2c073f5b871c3109399f466a04a9d2484
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60106
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-07 20:01:53 +00:00
Joey Peng af69af996e mb/google/brya/var/taniks: Change probe for audio 4 channel speaker
Taniks only uses 4 channel speakers. Change the probe name to match
SOF topology settings.

BUG=b:207808510
TEST=dmidecode -t 11 shows correct audio fw_config.

Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com>
Change-Id: I2986bd212cef47f70dfeedc642a8db3314c947f6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60532
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-07 20:01:40 +00:00
Tim Wawrzynczak b6a15a7227 soc/intel/common/block/pcie/rtd3: Update ACPI methods for CPU PCIe RPs
The PMC IPC method that is used for RTD3 support expects to be provided
the virtual wire index instead of the LCAP PN for CPU PCIe RPs.
Therefore, use the prior patches to update pcie_rp for CPU RPs.

Note that an unused argument to pcie_rtd3_acpi_method_status() was also
dropped.

BUG=b:197983574
TEST=add rtd3 node under pcie4_0 in overridetree for brya0, boot and
inspect the SSDT to see the PMC IPC parameters are as expected for the
CPU RP, and the ModPhy power gating code is not found in the AML for the
PEG port.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: Tim Crawford <tcrawford@system76.com>
Change-Id: I84a1affb32cb53e686dbe825d3c3a424715df873
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60183
Reviewed-by: Tim Crawford <tcrawford@system76.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-07 20:00:09 +00:00
Tim Wawrzynczak f94405219c soc/intel/alderlake: Hook up FSP-S CPU PCIe UPDs
The Alder Lake chip.h file has pcie_rp_config entries for the CPU PCIe
ports, but the UPDs are not set. This patch hooks up those config
structs to the appropriate FSP-S UPDs.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ibb2375e66d53b4b7567dbe88b941cd720fdad927
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60182
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2022-01-07 19:59:29 +00:00
Angel Pons ef5f7ee696 soc/intel/common/blk/memory: Make mixed topo work
When using a mixed memory topology with DDR4, it's not possible to boot
when no DIMMs are installed, even though memory-down is available. This
happens because the DIMM SPD length defaults to 256 when no DIMM SPD is
available. Relax the length check when no DIMMs are present to overcome
this problem.

Tested on system76/lemp10. Unit boots with and without DIMM installed.

Change-Id: I1cabf64fade1c06a44b6c3892659d54febc7a79a
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60800
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
2022-01-07 16:06:26 +00:00
Stanley Wu c921da3f0e mb/google/dedede/var/boten: Add Wifi SAR for bookem
Add new sku id apply for bookem wifi sar table.

BUG=b:211705077
TEST=emerge-dedede coreboot-private-files-baseboard-dedede coreboot chromeos-bootimage

Signed-off-by: Stanley Wu <stanley1.wu@lcfc.corp-partner.google.com>
Change-Id: I1e5bac662fb44cf631ae1453068dec898b6e2607
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60399
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-01-07 15:30:25 +00:00
Runyang Chen d4c161ec55 soc/mediatek/mt8186: fix incorrect devapc settings
We need to protect debugsys for firmware image without serial console.
Original settings for protecting debugsys is wrong which will cause some
hardware modules to fail to set their registers correctly.

We move the setting from MM_AO_APC to INFRA_AO_APC because the setting
of debugsys is defined in INFRA_AO_APC and set the debugsys index to
correct value of 94.

BUG=b:213125558
TEST=all modules work normally using image without serial console.

Signed-off-by: Runyang Chen <runyang.chen@mediatek.corp-partner.google.com>
Change-Id: Ibce626386ac1f8de42f8717c4ad9ba403640b3ec
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60833
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-07 15:30:07 +00:00
Rex-BC Chen 362a4819b3 soc/mediatek/mt8186: initialize DFD
DFD (Design for Debug) is a debugging tool, which scans flip-flops
and dumps to internal RAM on the WDT reset. After system reboots,
those values can be shown for debugging using MTK internal parsing
tools.

BUG=b:202871018
TEST=build pass

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I7b711755022b5d9767019611151fea65e71edc66
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60828
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-07 15:29:31 +00:00
Rex-BC Chen 1e9dfd9d8c mb/google/corsola: Enable the SD card reader
The Kingler board has an SD card reader connected via USB and can be
enabled by setting GPIO EN_PP3300_SDBRDG_X to output mode and activated.

BUG=b:211385131
TEST=boot kernel using SD card.

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I903731ea4906328b2f0f5a7c6c06bd9c964d24ec
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60780
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-07 15:29:06 +00:00
Wisley Chen 8eedca3e9e mb/google/brya/var/redrix: Tune I2c frequency
Tune the I2c frequency

I2C0 - 391 kHz
I2C1 - 391 Khz
I2C2 - 393 kHz
I2C3 - 394.7 KHz
I2C5 - 399.6 KHz

BUG=b:213298209
TEST=build

Change-Id: Id15c5298f8917bac404026f1ecb000fa7f925416
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60791
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-07 15:28:49 +00:00
Wisley Chen 08351d2727 mb/google/brya/var/anahera: Fine tune I2C frequency
Fine tune i2c frequency.
I2C0 - 399.6 kHz
I2C1 - 391.4 kHz
I2C3 - 398.1 kHz
I2C5 - 399.9 kHz

BUG=b:213295817
TEST=build

Change-Id: I9a89820a8d9ae4c9b4ee499e8467426e0670656d
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60792
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-07 15:28:32 +00:00
Wisley Chen 060e89f347 mb/google/brya/anahera: Swap TPM I2C with touchscreen I2C
According to the latest schematic, exchange I2C port for TPM/touchscreen.
TPM: I2C3 -> I2C1
Touchscreen: I2C1 -> I2C3

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

Change-Id: I1bb1857b4c5b06ca4ad660bf73e0c4df9c376a58
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60432
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-07 15:28:19 +00:00
Paul Menzel 2dcc7224a0 drivers/ipmi: Change type of custom_count from int to size_t
The variable `custom_count` is the number of custom fields, so only
holds non-negative values, so change the struct member type from int to
size_t.

Change-Id: Ic35aafefc870092298523ba2e10adf4fcb687a01
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60790
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-07 15:27:56 +00:00
Paul Menzel 7be44d2ad6 drivers/ipmi: Use correct unsigned int length modifier
Building an image for OCP DeltaLake with `x86_64-linux-gnu-gcc-11` fails
with the format warning below as the size of char * differs between
32-bit and 64-bit.

        CC         ramstage/drivers/ipmi/ipmi_fru.o
    src/drivers/ipmi/ipmi_fru.c: In function 'read_fru_chassis_info_area':
    src/drivers/ipmi/ipmi_fru.c:192:57: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Werror=format=]
      192 |                 printk(BIOS_ERR, "%s failed to malloc %ld bytes for "
          |                                                       ~~^
          |                                                         |
          |                                                         long int
          |                                                       %d
      193 |                         "chassis custom data array.\n", __func__,
      194 |                         info->custom_count * sizeof(char *));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                            |
          |                                            unsigned int
    src/drivers/ipmi/ipmi_fru.c: In function 'read_fru_board_info_area':
    src/drivers/ipmi/ipmi_fru.c:291:57: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Werror=format=]
      291 |                 printk(BIOS_ERR, "%s failed to malloc %ld bytes for "
          |                                                       ~~^
          |                                                         |
          |                                                         long int
          |                                                       %d
      292 |                         "board custom data array.\n", __func__,
      293 |                         info->custom_count * sizeof(char *));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                            |
          |                                            unsigned int
    src/drivers/ipmi/ipmi_fru.c: In function 'read_fru_product_info_area':
    src/drivers/ipmi/ipmi_fru.c:398:57: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Werror=format=]
      398 |                 printk(BIOS_ERR, "%s failed to malloc %ld bytes for "
          |                                                       ~~^
          |                                                         |
          |                                                         long int
          |                                                       %d
      399 |                         "product custom data array.\n", __func__,
      400 |                         info->custom_count * sizeof(char *));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                            |
          |                                            unsigned int

Fix the mismatches in `read_fru_chassis_info_area()` by using the length
modifier `z` for size_t as that is what `size_of` yields to.

Change-Id: If0c4266b19d56fa88abc397f305154d473ae1a93
Found-by: gcc (Debian 11.2.0-10) 11.2.0
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59055
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-01-07 15:27:44 +00:00
Kane Chen ff553ba8b3 soc/intel/alderlake: Check clkreq overlap
In some cases, partner may assign same clkreq on more than one devices.
This could happen when one device is in baseboard dev tree and another
one is in override dev tree.

This change adds a clkreq overlap check and shows a warning message

TEST=On brya, assigned one clkreq to 2 devices and found the warning
     message

Change-Id: I2f701a19118f4702c227b17e43b6551591d9b344
Signed-off-by: Kane Chen <kane.chen@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60401
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-01-07 15:27:31 +00:00
Wisley Chen 328bfb3937 mb/google/brya/anahera{4es}: Correct WWAN power sequence
Correct the WWAN power sequence to meet spec

BUG=b:213021172
TEST=build

Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Change-Id: Iab221fd03c637c82f6ce5c8278d432decf1b30c6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60435
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-07 15:26:51 +00:00
Wisley Chen 0de3e6570e mb/google/brya/anahera{4es}: Correct SSD power sequence
M.2 spec describes PERST# should be sequenced after power enable.

BUG=b:213021171
TEST=FW_NAME=redrix emerge-brya coreboot

Change-Id: I66345d985f4db4f13b23c0a21c179835908b6574
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60434
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-07 15:26:32 +00:00
Sean Rhodes c2c9618607 ec/starlabs/merlin: Unify EC and CMOS names
End all CMOS variable with a C and EC variables with an E.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ie0fab6b9dcd805f7b8c9bf8f14b0a799d8f396c8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60709
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2022-01-07 14:54:10 +00:00
Felix Held 2b1afef1ea soc/amd/common/block/include/lpc: add comment about RANGE_UNIT values
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I22f3485ec81f76af7e0e96b7c1271d5ccf52e701
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60771
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-01-07 13:20:30 +00:00
Felix Held 38712b84ba soc/amd/common/lpc/espi_util: move register definitions to header file
Define the register offsets and bits in a separate header file instead
of in the middle of the .c file.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I814192b2dfeff05877ac857dd89e8cdc7ae5ee25
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60770
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-01-07 13:20:17 +00:00
Felix Held beaef09a9b soc/amd/common/block/espi: use lower case hex digits in definitions
coreboot uses lower case hex digits instead of upper case ones.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0955db7afd101ab522845d5911ff971408e520e3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60769
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-07 13:20:07 +00:00
Felix Held 5ba87a8092 soc/amd/common/lpc/espi_util: handle espi_get_configuration error
In espi_wait_channel_ready the return value of espi_get_configuration
didn't get checked before. In the case of the espi_send_command call in
espi_get_configuration returning CB_ERR, espi_get_configuration didn't
write to the local config variable, so if this happens in the first pass
of the do-while loop, the following espi_slave_is_channel_ready call
would use the uninitialized local config variable as parameter. Fix this
by checking the return value of espi_get_configuration.

TEST=None

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iff1a0670e17b9d6c6f4daf2ea56badf6c428b8c9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60209
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-01-07 13:20:00 +00:00
Zhuohao Lee e2192e6a82 mb/google/brya/var/brask: Change TPM I2C to I2C1
The latest schematics changes the TPM I2C from I2C3 to I2C1. This patch
moves the TPM I2C setting from the board layer to the baseboard and
fixes the TPM I2C bus assignment.

BUG=b:211886429
TEST=build pass

Change-Id: I70d5a8fde1866c5dd4587ab5af2d41724c60ee0c
Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60439
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-07 03:07:07 +00:00
Shelley Chen f58ce3bdaa mb/google/herobrine: Fix board id
The board id assignment CL (CB:56642) landed after
BOARD_GOOGLE_HEROBRINE has been deprecated to
BOARD_GOOGLE_HEROBRINE_REV0 (CB:60284). Fix it to accomodate for the
GOOGLE_HEROBRINE_REV0 board updates.

BUG=b:211644878
BRANCH=None
TEST=built all variants of herobrine to make sure it compiles.

For reference:
=============
CB:56642:

commit 8b63dac061
Author: Ravi Kumar Bokka <rbokka@codeaurora.org>
Date:   Tue Jul 27 19:29:18 2021 +0530

google/herobrine: configure gpio to detect board ID
=============
CB:60284:

commit 8bdbe23a93
Author: Shelley Chen <shchen@google.com>
Date:   Tue Dec 21 13:17:33 2021 -0800

mb/google/herobrine: Transition BOARD_HEROBRINE to BOARD_HEROBRINE_REV0
=============

Change-Id: I6dab994e65eadff303eb88a63b8dd81e19694678
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60805
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-01-06 22:42:53 +00:00
Kenneth Chan fc7a40fad9 mb/google/guybrush/var/dewatt: update USB3 settings for passing SI
Update tx/rx term control to 3 for passing USB3 port 0/1 SI.

b:199468920
TEST= emerge-guybrush coreboot; build and pass USB3 SI.

Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Change-Id: I637207d7c657f6dd71d70694f9a5fb35f8294b64
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60809
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2022-01-06 18:14:13 +00:00
Tim Wawrzynczak e3411cda2e mb/google/brya/var/anahera{4es}: Add Chrome OS privacy screen _HID
Similar to commit 0167f5adb (mb/google/redrix: Add _HID for privacy
screen device), add the same _HID to the privacy screen device.

Change-Id: I58ad538dfaf602e3f4afb98d1a25d52753a15d93
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60115
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
2022-01-06 17:04:30 +00:00
Tim Wawrzynczak cf39336ccf soc/intel/alderlake: Add minimal ACPI support for PEG ports
Add minimal Device entries with just an _ADR for each of the PEG ports
for P and M chipsets (N does not have any PEG ports).

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Id1009004969729eddf7005fa190f5e1ca2d7b468
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60181
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-01-06 16:49:51 +00:00
Tim Wawrzynczak 40c9c8aa80 soc/intel/alderlake: Add soc_get_cpu_rp_vw_idx() function
The PMC IPC method used to enable/disable PCIe srcclks uses the
LCAP PN field to distinguish PCH RPs. For CPU RPs, the PMC IPC
command expects the RP number to be its "virtual wire index"
instead. This new function returns this virtual wire index
for each of the CPU PCIe RPs.

BUG=b:197983574

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I5e9710f0d210396f9306b948d9dce8b847300147
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60180
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-01-06 16:49:00 +00:00