Commit Graph

47548 Commits

Author SHA1 Message Date
Raihow Shi 5215f2ffcb mb/google/brask/variants/moli: update type-c setting in overridetree
Add conn1 for pch_espi and add type-c port2 for pmc_mux.

BUG=b:220814038
TEST=emerge-brask coreboot.

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: Idfd7b761496a110f34838abb0fd408b37d390ba2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63570
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-04-19 13:08:53 +00:00
Raihow Shi 40c47b24a4 mb/google/brask/variants/moli: add delay time to rtd3-cold
This CL adds the delay time 50 ms and 20 ms into the RTD3 sequence,
the reason is that the rise and fall times of each signal
may differ by board, and so those board-specific delays
must be taken into account when power sequencing.

We checked power on sequence requires enable pin prior to reset pin,
so added delay to meet the sequence.
Based on BH799BB_Preliminary_DS_R079_20201124.pdf in chapter 7.2.

BUG=b:228907551
TEST=emerge-brask coreboot.

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: Idecb1c89655c9b8b720c3c65efc77e06e6a8b300
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63544
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-04-19 13:08:32 +00:00
Raihow Shi b83dd7ea63 mb/google/brask/variants/moli: remove i2c1 in overridetree
Remove i2c1 because brask devicetree is already has it.

BUG=b:220814038
TEST=emerge-brask coreboot.

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: Ic782e1c6434ac57bdf65b3d9f4219bdf32d25b9e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63545
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-04-19 13:08:16 +00:00
Ian Feng c6d6c88fcf mb/google/skyrim: Configure Pen Detect device
Enable pen garage. Pen detect is active low.

BUG=b:229168203
TEST:Build and boot to OS in skyrim. Evtest work as expected
Input driver version is 1.0.1
Input device ID: bus 0x19 vendor 0x1 product 0x1 version 0x100
Input device name: "PRP0001:00"
    Supported events:
  Event type 0 (EV_SYN)
  Event type 5 (EV_SW)
    Event code 15 (SW_PEN_INSERTED) state 1
Properties:
Testing ... (interrupt to exit)
Event: time 1649922170.578779, type 5 (EV_SW), code 15 (SW_PEN_INSERTED), value 0
Event: time 1649922170.578779, -------------- SYN_REPORT ------------
Event: time 1649922172.070740, type 5 (EV_SW), code 15 (SW_PEN_INSERTED), value 1

Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Change-Id: I3bb07af6aebdc355a73148d8be79b1014147f61d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63633
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-04-19 13:07:50 +00:00
Ian Feng e204690227 mb/google/skyrim: Add Goodix touchscreen
Add Goodix touchscreen according to the Programming Guide Rev.0.7

BUG=b:228907558
TEST=local build and tested with Goodix touch screen

Change-Id: I35dd3ca76e9e0f17508bef46c90b53b4be5d0033
Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63573
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-04-19 13:07:28 +00:00
Dtrain Hsu f17f6d9334 mb/google/brask: fix boot beep
Fix the issue that can't hear the boot beep at dev screen. GPP_B14 is
used for PWM_PP3300_BUZZER and it should set to GPO. Modify GPP_B14 from
PAD_CFG_NF_LOCK to PAD_CFG_GPO_LOCK.

BUG=b:229345416
BRANCH=firmware-brya-14505.B
TEST=emerge-brask coreboot and verify if the buzzer beeps.

Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Change-Id: I601735ab20974cd992ca5dd6dbaca1517a395aa2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63645
Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-04-19 13:06:14 +00:00
Raihow Shi 4b642fd512 mb/google/brask/variants/moli: Pick VBT based on FW_CONFIG
Pick specific VBTs for HDMI, DP, and ABSENT according to FW_CONFIG.

BUG=b:220241277
TEST=emerge-brask coreboot.

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: Icc8fbef1467605505459fce264697f670591c81e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63604
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-04-19 13:05:50 +00:00
Wisley Chen d9314c7efe mb/google/brya/var/anahera{4es}: select DRIVERS_GENESYSLOGIC_GL9750
select DRIVERS_GENESYSLOGIC_GL9750 to disable ASPM L0s.

BUG=b:229213455
TEST=emerge-brya coreboot chromeos-bootimage

Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Change-Id: Ie89fa6c66974284063cd25ae8097db94a93326ca
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63638
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-04-19 13:05:24 +00:00
Arthur Heymans 1842aa2746 Kconfig: Make HAVE_EM100_SUPPORT invisible
This is a property of a platform and should not be exposed to the
user.

Change-Id: I34f9097d40b2bf732cecf30bf13ba5a413dd53a5
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63676
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-04-19 13:04:25 +00:00
Arthur Heymans 67f29e818f cpu/x86/Kconfig*: Guard with ARCH_X86
None of these options make sense on different ARCH.

Change-Id: Ie90ad24ff9013e38c42f10285cc3b546a3cc0571
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63673
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-04-19 13:03:16 +00:00
Selma Bensaid 4bc425c521 payloads/depthcharge: enable LP_CHROMEOS in depthcharge
Fix standslone build failure after depthcharge patch
https://crrev.com/c/3461454 merge.

BUG=chrome-os-partner:226438207
TEST=Compiled brya and redrix in standalone mode.

Signed-off-by: Selma Bensaid <selma.bensaid@intel.com>
Change-Id: Ib2bb2ce42a314e05ef22ea7b8abc067d6361d511
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63240
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Jakub Czapiga <jacz@semihalf.com>
2022-04-19 13:03:00 +00:00
Bora Guvendik 40e461a00c soc/intel/alderlake: Enable Pre Reset CPU Telemetry
Insert CSE timestamps to coreboot timestamp table.

BUG=b:182575295
TEST=Boot to OS on Brya Redrix board.

Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Change-Id: Ifbea7155a294e0039a5bd1d16588775e90a29ae3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63616
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-04-19 13:02:33 +00:00
Eric Lai 51e00e60e0 mb/google/nissa: Add gpio lock pins
Followed the Brya series to lock the gpio pins in baseboard. Variant
should honor locked gpios from baseboard, but not the last. Variant can
add more gpios to lock if needed.

BUG=b:216671701
TEST='emerge-nissa coreboot chromeos-bootimage', flash and verify that
nivviks boots successfully to kernel.

Signed-off-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Change-Id: Ib34ca287596a6958407a944d0caf53f4bcc60d9b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63568
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-04-19 13:02:13 +00:00
Raihow Shi 4d4a24529a mb/google/brya: Add Kconfig for TPM I2C bus
Add TPM I2C for crota to avoid TPM I2C fail.

BUG=b:229200525
TEST=emerge-brask coreboot.

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: I8054e623fb0c3c549c3373982ce9d4fbd57e0fd7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63635
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-04-19 13:01:57 +00:00
Terry Chen 212f86bc9b mb/google/brya/var/crota: Kconfig: Select TPM I2C bus driver
Add TPM I2C for crota to avoid TPM I2C fail.

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

Signed-off-by: Terry Chen <terry_chen@wistron.corp-partner.google.com>
Change-Id: I7eb3ce6c2faf857c8f5d789af395e315caea4102
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63617
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-04-19 13:01:41 +00:00
Jakub Czapiga 9ebc6c1e26 tests: Split Makefile to allow for making host-side test tools
This patch is based on similar changes [1] done in Depthcharge projects,
which aimed to provide unified way to build host-side programs for
testing internal code. New test tools might benefit from it by having
same base code as unit-tests.

[1] https://crrev.com/c/3412108

TEST=make unit-tests
TEST=COV=1 make unit-tests coverage-report

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: Iac4517ab6146fa3f2d2b7a20df54601ab2d04c3d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63637
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-04-19 13:00:56 +00:00
Jakub Czapiga c91b55a201 tests: update CMocka to stable-1.1
CMocka stable-1.1 has some convenience bugfixes like vprint buffer
increase or leftover values log fix (funtion names display correctly
now.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I20ebd15324a21c17cccd2976ae9c3f86b040426d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63636
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-04-19 13:00:36 +00:00
Chris.Wang 38f7ba3db4 mb/google/guybrush/var/dewatt: Update APU STT setting
update STT setting for dewatt.

BUG=b:228040295
BRANCH=guybrush
TEST=build, verify the parameter has been applied to
     the system by checking the AGT tool.

Signed-off-by: Chris.Wang <chris.wang@amd.corp-partner.google.com>
Change-Id: Id319d42747dd0d5f6a9ca727635d85e6b9bd65af
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63699
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-04-19 12:15:04 +00:00
Subrata Banik d643165c64 soc/intel/cmn/fast_spi: Add API to set SPI controller VCL
This patch creates a helper function to set SPI controller VCL bit as
recommended by Intel Flash Security Specification.

BUG=b:211954778
TEST=Able to build google/brya and verified that SPI flash controller
MMIO register 0xC4 bit 30 is set.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ie9a12db1bab81779fd8e7db90221d08da3c65011
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63626
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2022-04-19 05:46:38 +00:00
Subrata Banik d5e7c63a85 soc/intel/cmn/fast_spi: Add API to clear outstanding SPI status
This patch creates a helper function to clear HSFSTS_CTL (offset 0x04)
register Bits 0 to 4.

As per Intel PCH BIOS spec section 3.6 Flash Security Recommendation,
it's important to clear all SPI outstanding status before setting SPI
lock bits.

BUG=b:211954778
TEST=Able to build google/brya with this patch and clear SPI controller
HSFSTS_CTL register Bits 0 to 4.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I62adba0d0cef1d4c53b24800f90b4fe76a9d78b7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63625
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2022-04-19 05:46:11 +00:00
Subrata Banik a26bb7878b soc/intel/cmn/fast_spi: Add API to check if SPI Cycle In Progress
This patch creates a helper function to check if any SPI transaction
is pending.

As per Intel PCH BIOS spec section 3.6 Flash Security Recommendation,
it's important to ensure there is no pending SPI transaction before
setting SPI lock bits.

BUG=b:211954778
TEST=Able to build google/brya with this patch and no error msg seen
due to `SPI transaction is pending`.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ibd3f67ae60bfcb3610cd0950b057da97ff74b5b9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63624
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2022-04-19 05:45:43 +00:00
Subrata Banik 6b888adcff soc/intel/cmn/lpc: Fix typo from FAST_SPIBAR to LPC
BUG=b:211954778
TEST=None

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ib8cc4b8d13b61e3935f2050d25ce0278162c91c4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63629
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-04-19 05:45:07 +00:00
Subrata Banik e0b7423d67 soc/intel/cmn/fast_spi: Use tab instead space
This patch converts whitespace into tabs to maintain the uniformity
across the fast_spi_def.h file.

BUG=b:211954778
TEST=Able to build google/brya.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I56bcd263c6a5c0036e459926a25538e3448fbce6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63623
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-04-19 05:44:58 +00:00
Rob Barnes 0e4ca759f4 mb/google/guybrush: Remove EC_ENABLE_LID_SWITCH
Remove EC_ENABLE_LID_SWITCH since this causes a duplicate SW_LID
entries. The other SW_LID entry is generated by MKBP.

BUG=b:228907256
BRANCH=guybrush
TEST=Lid open close triggers events on Nipperkin

Change-Id: I5c1cf7aeac8405bce7bfc77110eceaf3e5383fe7
Signed-off-by: Rob Barnes <robbarnes@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63658
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Robert Zieba <robertzieba@google.com>
Reviewed-by: Jon Murphy <jpmurphy@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-04-18 23:03:59 +00:00
Kevin Chiu 4d4c0a5f27 mb/google/guybrush/var/nipperkin: turn off WLAN ASPM L1ss
BUG=b:227296841
BRANCH=guybrush
TEST=emerge-guybrush coreboot chromeos-bootimage
     pass PLT criteria: S0 > 600ms, s0i3 > 14 days

Change-Id: I9c61e1d0f3db8b9885040255d6de266616768b68
Signed-off-by: Kevin Chiu <kevin.chiu.17802@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63537
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Jon Murphy <jpmurphy@google.com>
2022-04-18 23:03:44 +00:00
Damien Zammit e0ff2735f3 mb/hp/z220_series: Add Z220 CMT Workstation variant
This is based on previous work done by a good friend of mine.

The notable differences between this board and the SFF variant is that:
 - CMT has 4 more PCI/PCIe ports than SFF.
 - CMT has 2 more SATA ports than SFF.

TESTED on Z220 CMT Workstation (boots to payload)

Change-Id: I2b298921e6f509440ec7b049e086c0878f708bd3
Signed-off-by: Damien Zammit <damien@zamaudio.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62809
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-04-18 01:01:02 +00:00
Felix Singer 598ff42f12 mb/lenovo/t440p/Kconfig: Reorder selects alphabetically
Built lenovo/t440p with BUILD_TIMELESS=1 and coreboot.rom remains the
same.

Change-Id: I7bac7ad5236346a3c2a8928ecdfadde6564ff232
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63429
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-04-16 17:58:13 +00:00
Felix Singer d22fc77704 mb/lenovo/t440p/dsdt.asl: Remove redundant comment
Change-Id: Ie772701192a3589b51642df446f0b2527fb7d630
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63428
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-04-16 17:58:05 +00:00
Tim Van Patten e229c6005f mb/google/guybrush: Set BT USB to use GPIO for status
Set the BT USB device to use GPIO for the power status. This causes an
ACPI `_STA()` function to be generated that returns the power status of
the BT USB device, rather than always returning `0x1`. This `_STA()`
function can be used during boot to skip enabling the device (and
performing the associated sleep) if the device is already powered on.

BRANCH=None
BUG=b:225022810
TEST=Dump SSDT table for guybrush

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: I72f6b28671efddfbef53f328d904a05f73f39efa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63559
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-04-14 22:31:11 +00:00
Tim Van Patten 3d4665cc71 src/acpi/device: Early return in _ON if device already enabled
If the device has enabled `use_gpio_for_status`, then call the `_STA`
method in `_ON` to determine if the device is already enabled. If it is
already enabled, return early to skip re-enabling the device and
performing the associated sleep.

This change is necessary since the Linux kernel does not call `_STA`
before calling `_ON`.

BRANCH=None
BUG=b:225022810
TEST=Dump SSDT table for guybrush

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: I13aa41766555953b86eded4c72e3b317fe6db5c8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63613
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-04-14 22:30:05 +00:00
Tim Van Patten e9667f4df1 drivers/usb/acpi: acpi_power_res_params: Add use_gpio_for_status
Add the member `use_gpio_for_status` to the structure
`drivers_usb_acpi_config`, so the `devicetree.cb` can specify it.

This field is then used to initialize the corresponding field in the
structure `acpi_power_res_params` in `usb_acpi_fill_ssdt_generator()`.

The member `acpi_power_res_params::use_gpio_for_status()` is already
being used by `acpi_device_add_power_res()` to determine which version
of the `_STA()` method to output.

BRANCH=None
BUG=b:225022810
TEST=Dump SSDT table for guybrush

Signed-off-by: Tim Van Patten <timvp@google.com>
Change-Id: I69eb5f1ad79f3b2980f43dcf4a36585fca198ec9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63558
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-04-14 22:29:10 +00:00
Jianjun Wang b2537bdad5 coreboot_tables: Replace 'struct lb_uint64' with lb_uint64_t
Replace 'struct lb_uint64' with 'typedef __aligned(4) uint64_t
lb_uint64_t', and remove unpack_lb64/pack_lb64 functions since it's no
longer needed.

Also replace 'struct cbuint64' with 'cb_uint64_t' and remove
'cb_unpack64' in libpayload for compatible with lb_uint64_t.

Signed-off-by: Jianjun Wang <jianjun.wang@mediatek.com>
Change-Id: If6b037e4403a8000625f4a5fb8d20311fe76200a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63494
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-04-14 22:27:50 +00:00
Karthikeyan Ramasubramanian 6f023ece08 mb/google/skyrim: Inject SPDs into APCB
Update the build scripts to inject variant specific SPDs into APCB.

BUG=None
TEST=Build and boot to OS in Skyrim boards with all the concerned memory
parts.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: I3b3f6f248d54681c6f55c00660d1f2988ae906ba
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63600
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-04-14 22:25:51 +00:00
Karthikeyan Ramasubramanian 44e449b15c mb/google/skyrim/var/skyrim: Add supported memory parts
Add supported memory parts and generate the associated DRAM part ID.
Also for MT62F2G32D8DR-031 WT:B memory part, add a custom SPD that
configures the DRAM speed at 5500 MHz. Use this custom SPD until that
part can operate at full speed (i.e. 6400 MHz).

BUG=None
TEST=Build Skyrim.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: Id87e79f5d6187d57d74487841c09aa309f1450b4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63599
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Robert Zieba <robertzieba@google.com>
Reviewed-by: Jon Murphy <jpmurphy@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-04-14 22:25:05 +00:00
Karthikeyan Ramasubramanian 4bdc2320a4 util/apcb/apcb_v3_edit.py: Edit APCB based on different SPD magic
APCB edit tool edits APCBs with LP4 specific SPDs. Introduce an option
to support different SPD magic so that the tool can be used to edit
APCBs with LP5 specific SPDs.

BUG=None
TEST=Build Skyrim board with LP5 specific SPDs. Build Guybrush board
with LP4 specific SPDs.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: I8e96c89e4e5ce8e0567a17bf7685b69080fa1708
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63598
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-04-14 22:24:09 +00:00
Karthikeyan Ramasubramanian 58d75f80b4 util/spd_tools/part_id_gen: Support Sabrina SoC
Add support to generate DRAM part ID for boards using Sabrina SoC.

BUG=None
TEST=Generate DRAM part ID for Skyrim mainboard.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: Ica57b12239019831f7bf93982be3c93b7f8b6986
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63597
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Robert Zieba <robertzieba@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-04-14 22:23:51 +00:00
David Wu 7dd92959a3 mb/google/brya/var/kano: Configure Acoustic noise mitigation
Setup the following acoustic noise mitigation features:
1) Slew rate for both IA and GT domains to 1/8
2) Disable Fast package C ramp

BUG=b:229046516
TEST=build and verified by power team

Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Change-Id: Ifb5700391e33818878994f205acae7ee3b1b96d9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63610
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-04-14 18:02:24 +00:00
Lean Sheng Tan bb92a7f6a7 mb/prodrive/atlas: Update Kconfig
Update Kconfig per Atlas usages:
1. Set EC I/O mapped UART as default UART output
2. Add EC IFD region & ACPI support

Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com>
Change-Id: I970de724237bcb08899aed7a4b87a23c5cdb0b48
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63464
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
2022-04-14 17:15:30 +00:00
Karthikeyan Ramasubramanian 8ee9429e75 soc/amd/sabrina: Allow to specify custom SPL File
PSP needs SPL file to boot. Introduce the support to add SPL file.
Currently Sabrina does not have a specific SPL file. Use Cezanne SPL
file as a placeholder.

BUG=b:224618411
TEST=Build and boot to OS in Skyrim after adding Sabrina specific SPL
file.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: I222bb81b2babddc778b2cff858ef7979f85ac0e6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63313
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-04-14 17:15:02 +00:00
Rob Barnes 76fddd9639 mb/google/nipperkin: Disable PSPP for WLAN
Disable PSPP parameters for WLAN card on Nipperkin. This feature
is causing S0ix resume hangs.

BUG=b:227296841,b:228830362
BRANCH=guybrush
TEST=Suspend stress test passes on Nipperkin

Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: I38f05b92ace4aba61163194a6a638915882b8871
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63593
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-04-14 16:29:12 +00:00
Werner Zeh eaf11c9445 x86/mtrr: Print address ranges inclusive to be more consistent
The printed address ranges in the tree (resource allocator and even
some MTRR code) usually shows the range inclusive (meaning from start
address to the real end address of the range). Though there is still
some code in the MTRR context which prints the ranges with an exclusive
end. This patch aligns the printing of ranges in the MTRR code to be
consistent among the tree so that the shown end addresses are now
inclusive.

Change-Id: I0ca292f9cf272564cb5ef1c4ea38f5c483605c94
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63541
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
2022-04-14 15:43:27 +00:00
Tim Wawrzynczak a46056fa9a mb/google/brya: Add variant_init and variant_finalize callbacks
Some brya variants may need to initialize and finalize some
variant-specific devices during ramstage, therefore add the
commonly-used hooks and callbacks to support this.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Iede6dc5a5b9a7385fedd59d4eeaaba118eff0e20
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62382
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-04-14 15:42:56 +00:00
Eric Lai daed4ea1d0 soc/intel/common/gpio: Add PAD_CFG_GPI_SCI_LOW/HIGH_LOCK macro
Add PAD_CFG_GPI_SCI_LOW_LOCK and PAD_CFG_GPI_SCI_HIGH_LOCK macro
to support mainboard to lock NC and GPI_SCI pins as applicable.

BUG=b:216583542
TEST=build passed

Signed-off-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Change-Id: I5060777cc09af6cb3144ad799154e77167521de3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63569
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-04-14 15:42:32 +00:00
Subrata Banik 32e1022611 soc/intel/cmn/{block, pch}: Rename configs from `DMI` to `GPMR`
This patch renames all required IA common code blocks and PCH configs
from DMI to GPMR.

TEST=Able to build and boot google/redrix.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ic6e576dd7f207eb16d90c5cc2892d919980d91c4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63608
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-04-14 15:41:45 +00:00
Subrata Banik e7089e12a1 soc/intel/cmn/gpmr: Enhance GPMR driver
This patch enhances the GPMR driver to add public APIs for other IA
common code drivers and/or SoC code to utilize.

Also, migrated all PCR GPMR register definitions into the common
`pcr_gpmr.h` header file.

TEST=Able to build and boot google/redrix.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I87dca55a068366cb9a26a5218589166c1723da7f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63607
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-04-14 15:41:12 +00:00
Wonkyu Kim bb1ecc5662 intel/common/block: rename dmi folder to gpmr as starting gpmr migration
As a start of GPMR(General Purpose Memory Range) driver migration,
1. rename dmi folder to gpmr folder
2. rename dmi.c to gpmr.c

TEST=build
Signed-off-by: Wonkyu Kim <wonkyu.kim@intel.com>
Change-Id: I4d57f4b8bd06e0cf6c9afa4baf4a7bed64ecb56b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63170
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2022-04-14 15:40:46 +00:00
Karthikeyan Ramasubramanian 176b563897 soc/amd/sabrina: Maintain a single copy of PSP Level2 entries
If verified boot uses 2 RW FW slots, configure amdfwtool to maintain
single copy of PSP Level2 entries.

BUG=None
TEST=Build and boot to OS in Skyrim.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: I94eea693139b714c321b4be89380342ec7a21222
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63510
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-04-14 15:39:42 +00:00
Karthikeyan Ramasubramanian ad06bae7b1 util/amdfwtool: Maintain one copy of PSP Level2 entries
AMDFWtool maintains 2 copies of PSP Level2 entries - one in primary slot
A (Type 0x48) and another in backup slot B (Type 0x4A). On boards which
use VBOOT with 2 RW firmware slots, maintaining 2 copies of PSP Level2
entries in each FW slot is redundant and space-consuming. Introduce
option to maintain only one copy of PSP Level2 entries and point to it
from both slots A & B.

BUG=None
TEST=Build and boot to OS in Skyrim. Ensure that only one copy is added
to each FW slot. This achieved a space saving of 1.5 MB in each FW slot.
Before:
apu/amdfw                      0x415fc0   raw           3043328 none
After:
apu/amdfw                      0x415fc0   raw           1556480 none

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: I06eef8e14b9c14db1d02b621c2f7207188d86326
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63509
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-04-14 15:39:15 +00:00
Shelley Chen 420ba8b708 soc/qualcomm/common: Make clock_configure() check for exact matches
Previously, clock_configure() will configure the clocks to round up to
the next highest frequency bin.  This seems non-intuitive.  Changing
the logic to find an exact frequency match and will halt booting if no
match is found.  Recently fixed a bug in CB:63311, where the clock was
being set incorrectly for emmc and was able to find it because of this
stricter check.

BUG=b:198627043
BRANCH=None
TEST=build herobrine image and try to set SPI frequency to number not
     supported.  Ensure device doesn't boot.

Change-Id: I9cfad7236241f4d03ff1a56683654649658b68fc
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63289
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
2022-04-14 14:05:04 +00:00
Zheng Bao c3007f3877 amdfwtool: Add a flag to record the second gen instead of romsig
This is for future feature combo, which gets the soc id from fw.cfg in
a loop instead of the command line, and the romsig is not set until
fw.cfg is processed.

Change-Id: Id50311034b46aa1791dcc10b107de4af6c86b927
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63344
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-04-13 23:25:00 +00:00