Commit Graph

50586 Commits

Author SHA1 Message Date
Fred Reitberger 694ef4431b soc/amd/morgana: Remove emmc select
Morgana does not have emmc, so do not select it.

Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Change-Id: Ib75618c137e825befc7384275f1a4ef9b5137b09
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70477
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 13:53:02 +00:00
Sridhar Siricilla d1237da6cc soc/intel/meteorlake: Enable SOC_INTEL_COMMON_BLOCK_ACPI_CPU_HYBRID
The patch enables CPPCv3 support for Intel Meteor Lake which is based
on hybrid core architecture.

TEST=Build code for Rex.

Change-Id: Iddf15f01a401eedf695f2dd07fbee0b643d143e2
Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70511
Reviewed-by: Sukumar Ghorai <sukumar.ghorai@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 13:52:02 +00:00
Arthur Heymans e0f08727e1 mb/ocp: Provide better defaults for UART
The baudrate of the SOC console is always 57600 and on tiogapass the
0x2f8 COM port is also used by the SOL console.

Change-Id: Ia7bf9fbe10ec66f49c2c7b41938a1a33967c131a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70500
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 13:51:46 +00:00
Saurabh Mishra f339b63b02 vc/intel/fsp/mtl: Remove deprecated header FirmwareVersionInfoHob.h
Changes include:
- FirmwareVersionInfoHob.h is removed to use new header file
  FirmwareVersionInfo.h.

BUG=b:260183604
TEST=Verified Google/Rex0 build with all the patch in relation chain
and verified the version output prints no junk data.

Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Change-Id: I06fd89f201e9e4100524e58033086327ad4ffc7b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69884
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-12-12 13:50:04 +00:00
Saurabh Mishra 16ba8e12fa soc/intel/meteorlake: Select DISPLAY_FSP_VERSION_INFO_2
Changes include:
- Add config for Meteor Lake SoC to select FirmwareVersionInfo.h
  using 'DISPLAY_FSP_VERSION_INFO_2'

BUG=b:260183604
TEST=Verified Google/Rex0 build with all the patch in relation chain
and verified the version output prints no junk data.

Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Change-Id: I789db9d280c45639eca6ceafea65b96a93a395cf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69883
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-12-12 13:49:45 +00:00
Saurabh Mishra 997e9f74a1 vc/intel/fsp/mtl: Add new header file FirmwareVersionInfo.h
Changes include:
- Add header file FirmwareVersionInfo.h

BUG=b:260183604
BRANCH=None
TEST=Verified Google/Rex0 build with all the patch in relation chain
and verified the version output prints no junk data.

Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Change-Id: Ib5c843bb0dccd5db92f74148df3a17037988392c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69882
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 13:49:31 +00:00
Nico Huber 710a38a26e Makefile: Add default for HOSTPKG_CONFIG
Kconfig uses this variable to detect `ncurses` compilation and
linking flags. Without it, some guesswork fallback is assumed
that only works by chance.

Change-Id: Iad21bdb2d61db04cf7397ab447c7c045e2067705
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70584
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Büchler <michael.buechler@posteo.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-12-12 13:40:32 +00:00
Angel Pons 9fdd557f56 nb/intel/haswell: Introduce option to not use MRC.bin
Introduce the `USE_NATIVE_RAMINIT` Kconfig option, which should allow
booting coreboot on Haswell mainboards without the need of the closed
source MRC.bin. For now, this option does not work at all; the needed
magic will be implemented in subsequent commits. Add a config file to
make sure the newly-introduced option gets build-tested.

Change-Id: I46c77586f9b5771624082e07c60c205e578edd8e
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64176
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-12-12 13:39:21 +00:00
Angel Pons f7571c43f8 commonlib/clamp.h: Add more clamping functions
Add more clamping functions that work with different types.

Change-Id: I14cf335d5a54f769f8fd9184450957e876affd6b
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64175
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 13:38:11 +00:00
Bo-Chen Chen 58d2947855 mb/google/geralt: Correct the backlight enabled GPIO naming
According to the schematic, we use the same backlight enabled GPIO
naming in eDP and MIPI panels.

BUG=b:244208960
TEST=emerge-geralt coreboot

Change-Id: If8d3ca7098c6b22af41861bba74b764d71d27e1b
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70403
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 08:27:15 +00:00
Bo-Chen Chen c5d0c94868 mb/google/geralt: Add support for getting panel id
According to ID table(go/geralt-id), we add panel_id() to read the
panel id from auxadc channel 5.

BUG=b:244208960
TEST=emerge-geralt coreboot

Change-Id: I2c0f4ee5a642c41dda9594fbaf2c63f2b2ebac6e
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70402
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 08:26:58 +00:00
Bo-Chen Chen 7e11dcb510 mb/google/geralt: Correct auxadc channel for SKU ID
According to ID table(go/geralt-id), geralt only uses channel 4 for SKU
ID.

BUG=b:244208960
TEST=emerge-geralt coreboot

Change-Id: I0f7303b8809e6000e3e16228b00b525a77feee87
Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70401
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 08:26:36 +00:00
Leo Chou 5aabdf6e12 mb/google/nissa/var/pujjo: Add wifi sar table
Add wifi sar table for pujjo intel wifi config.
Use fw_config to separate different project settings.

BUG=b:256042825,b:256042769
Test=emerge-nissa coreboot

Signed-off-by: Leo Chou <leo.chou@lcfc.corp-partner.google.com>
Change-Id: Ibdbe1c0a477e47af9cbbc9bf73ac583d06ad7a0d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70480
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-12-12 02:47:42 +00:00
Frank Chu 891e6c37a0 mb/google/brya/var/marasov: Disable unused I2C bus
Disable unused I2C2/I2C4 bus for marasov.

BUG=b:260565911
BRANCH=firmware-brya-14505.B
TEST=emerge-brya coreboot chromeos-bootimage

Signed-off-by: Frank Chu <Frank_Chu@pegatron.corp-partner.google.com>
Change-Id: Id1c41bfdca9b752e3f027e6b071629d67aa06761
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70237
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Frank Chu <frank_chu@pegatron.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
2022-12-12 02:26:37 +00:00
Kapil Porwal 843699e3cf drivers/wifi: Move ADL-P CNVi IDs from generic to IA common code CNVi driver
BUG=b:259716145
TEST=Dump SSDT and see that _PRW and _DSD for CNVi device contains
the value from the devicetree on google/redrix.

Before:
    Scope (\_SB.PCI0.WFA3)
    {
        Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
        {
            0x6D,
            0x03
        })
        Name (_DSD, Package (0x02)  // _DSD: Device-Specific Data
        {
            ToUUID ("70d24161-6dd5-4c9e-8070-705531292865"),
            Package (0x01)
            {
                Package (0x02)
                {
                    "DmaProperty",
                    One
                }
            }
        })
    ...
    }

After:
    Scope (\_SB.PCI0.CNVW)
    {
        Name (_PRW, Package (0x02)  // _PRW: Power Resources for Wake
        {
            0x6D,
            0x03
        })
        Name (_DSD, Package (0x02)  // _DSD: Device-Specific Data
        {
            ToUUID ("70d24161-6dd5-4c9e-8070-705531292865"),
            Package (0x01)
            {
                Package (0x02)
                {
                    "DmaProperty",
                    One
                }
            }
        })
    ...
    }

Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Change-Id: Ia4ffedcb53afe350694eb03a144d12f714190cc4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70447
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 01:31:48 +00:00
Elyes Haouas 3d1b2db1af vc/mediatek/mt8195/Makefile.inc: Remove path to non-existent folder
The directory src/vendorcode/mediatek/mt8195/dramc/include never
existed, and was added in commit b0b8dc37
(vendor/mediatek: Add MT8195 dram initialization code).
Found using 'Wmissing-include-dirs' command option.


Change-Id: Iec349e816a1b646f1ea5fa1db13e05a78ffe1af8
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70464
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 01:30:26 +00:00
Wisley Chen 200f8f7ec8 mb/google/nissa/var/yaviks:Generate SPD ID for supported memory parts
Add new memory parts
- H58G56BK7BX068
- MT62F1G32D2DS-026 WT:B
- K3KL8L80CM-MGCT

BUG=b:261539879
TEST=run part_id_gen to generate SPD id
Change-Id: I74f35d1afad90c3b6a79679a8126904565695fbc
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70410
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 01:29:54 +00:00
Reka Norman 427ec78932 util/ifdtool/Makefile.inc: Respect LDFLAGS from environment
The ChromeOS build system performs ASAN builds by appending
-fsanitize=address to CFLAGS and LDFLAGS. Currently, the ASAN build of
ifdtool fails with linker errors because the Makefile does not respect
LDFLAGS.

Modify the Makefile to respect LDFLAGS from the environment. This
is consistent with the Makefiles of most other coreboot utils.

BUG=b:255462682
TEST=`USE=asan emerge-nissa coreboot-utils` now succeeds with CL:4018976

Change-Id: I1a497562d4d979829edb47c4c4b3f2c64266324e
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70054
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 01:29:41 +00:00
Reka Norman 1d49d3e40b mb/google/brya: Don't add MPTS to both DSDT and SSDT
commit 52ccd293d7 ("mb/google/brya: Implement shutdown function for
dGPU") started unconditionally adding MPTS to the SSDT. On variants
with HAVE_WWAN_POWER_SEQUENCE selected, MPTS is already added to the
DSDT via wwan_power.asl. The duplicate definition results in a kernel
error:
ERR kernel: [    0.109237] ACPI BIOS Error (bug): Failure creating named object [\_SB.MPTS], AE_ALREADY_EXISTS (20210730/dswload2-327)
ERR kernel: [    0.109242] ACPI Error: AE_ALREADY_EXISTS, During name lookup/catalog (20210730/psobject-220)

Don't add MPTS to the SSDT if HAVE_WWAN_POWER_SEQUENCE is selected.
There are no variants which use both, so this should only result in
empty MPTS methods being removed.

BUG=b:260380268
TEST=On pujjo, the SSDT no longer contains an empty MPTS method, there's
no kernel error, and the WWAN power-off sequence is met.

Change-Id: I9f411aae81ea87aa9c8fc7754c3709e398771a32
Signed-off-by: Reka Norman <rekanorman@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70146
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 01:29:27 +00:00
Angel Pons 122e1dfe5d soc/intel/alderlake/Kconfig: Sort defaults alphabetically
"Argh! Lack of consistency! UNACCEPTABLE!" - Emotions

Swap the position of two lines so that defaults are listed in
alphabetical order according to the PCH type: M, N, P, S.

Change-Id: I82a23eb2b5036d3b7ec6766ae9891078f1caab69
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70522
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-12-12 01:28:33 +00:00
Joey Peng 5a724a1adc mb/google/octopus/variants/phaser: Implement variant_memory_sku()
This change override memory ID 3 to 1 to workaround the incorrect
memory straps in hardware.
We would use board_id 7 to identify the specific boards which need
to correct the memory ID.

BUG=b:259301885
BRANCH=Octopus
TEST=Verified on Phaser

Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com>
Change-Id: I2330b7e16a09f8cc76ed96e81a6165afa80a03a4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70353
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Henry Sun <henrysun@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 01:26:37 +00:00
Felix Held bd9ab06808 vc/amd/fsp/morgana/FspmUpd: don't use pointers for usb_phy config
The size of a pointer changes between a 32 and 64 bit coreboot build. In
order to be able to use a 32 bit FSP in a 64 bit coreboot build, change
the pointer in the UPDs to a uint32_t to always have a 32 bit field in
the UPD for this. Also make sure that the address of the lcl_usb_phy
struct is located below the 4GB boundary, so that the truncation to 32
bits won't result in pointing to a different memory location than
intended. In this error case, which I don't expect to happen, print an
error and write 0 to mcfg->usb_phy_ptr so that the FSP will use its
default values.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I1394aa6ef5f401e0c7bdd4861f1e28ae46e56e4f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70505
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 01:26:03 +00:00
Yu-Ping Wu 4f30539b47 drivers/mrc_cache: Prevent printing errors in expected use cases
The following are considered "expected" situations, where we shouldn't
print error messages as in other unexpected errors:

1. When the previous boot is in recovery mode, under certain config
   combination the normal MRC cache would have been invalidated.
   Therefore the "couldn't read metadata" error is expected to show in
   the current normal boot. Special-case this situation by printing a
   different message.
2. If the platform doesn't have recovery cache (!HAS_RECOVERY_MRC_CACHE)
   and vboot starts before romstage (!VBOOT_STARTS_IN_ROMSTAGE), then
   there should be no region for recovery cache. In this case, "failed
   to locate region type 0" will be shown. Since it's pretty clear from
   the code that this is the only case for the error to happen, simply
   change it to BIOS_DEBUG. Also remove a duplicate message when
   mrc_header_valid() fails.

BUG=b:257401937
TEST=emerge-corsola coreboot
TEST=Ran `cbmem -1 | grep ERROR` in recovery boot
TEST=Ran `cbmem -1 | grep ERROR` in normal boot following recovery boot
BRANCH=corsola

Change-Id: Ia942eeecaca3f6b2b90bac725279d2dc6174e0fd
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69542
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-12 00:50:20 +00:00
Tarun Tuli bf62e977c0 mb/google/brya/var/agah: Correct dGPU Power GPIOs
PP1800_GPU_X should dynamically move from GPP_E18 to GPP_F12
depending on board revision.

PP0950_GPU_X (PEX) should remain on GPP_E10 for all board
revisions.

BUG=b:242752623
TEST=dGPU is functional on both revisions of the board

Change-Id: I20994fcac4d7b98ee893d5eb98b096c037d31d6c
Signed-off-by: Tarun Tuli <taruntuli@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70320
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-11 17:15:03 +00:00
Kyösti Mälkki 56395f4883 sb/intel/common: Move definition of TRAP
Both TRAP and TRP0 are now only defined for i82801gx ASL.

This fixes an issue with updating to IASL 20221020, with many
intel platform builds failing with:

  dsdt.asl     38:  TRP0 = 0
  Error    6084 -     ^ Object does not exist (TRP0)

The error was ignored with older IASL.

Change-Id: Ie8a59803f4a27a8315c16bde401f8ca90ee814a7
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70476
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-12-11 12:43:55 +00:00
Frank Chu f8fbf0917c mb/google/brya/var/marasov: Change FSP board type to Type3
Change FSP board type to Type3.

BUG=b:260565911
BRANCH=firmware-brya-14505.B
TEST=emerge-brya coreboot chromeos-bootimage
     check MRC log "Maximum requested frequency" is 4800

Signed-off-by: Frank Chu <Frank_Chu@pegatron.corp-partner.google.com>
Change-Id: I69365bc726b4faac4cedb94cc7b08baa06056c1d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70439
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Frank Chu <frank_chu@pegatron.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 17:56:11 +00:00
Frank Chu 0029840db9 mb/google/brya/var/marasov: Enable PCIe port 5 for WLAN
Enable PCIe port 5 for WLAN device

BUG=b:261514079
BRANCH=firmware-brya-14505.B
TEST=Build and boot on marasov.
     Ensure that the WLAN module is enumerated in the output of lspci.
localhost ~ # lspci
01:00.0 Network controller: MEDIATEK Corp. MT7921 802.11ax PCI Express Wireless Network Adapter

Signed-off-by: Frank Chu <Frank_Chu@pegatron.corp-partner.google.com>
Change-Id: I007501bb00e2b7b83de1292f3066874d07646cb7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70442
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Frank Chu <frank_chu@pegatron.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 17:55:35 +00:00
Arthur Heymans 6e23da2983 cpu/cpu.h: Change the function signature
There is no need to pass the CPU index around.

Change-Id: Iad8e3cb318e6520ac5877118dbf43597dedb75b9
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/69504
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-12-10 17:54:53 +00:00
Martin Roth 2db459edb0 /: Update and rewrite README.md
Update the top level readme file to reflect the updated documentation
and project status.

This is mostly a rewrite, but some text was just reformatted.

Signed-off-by: Martin Roth <gaumless@gmail.com>
Change-Id: I2cd59d75da47b287029a9fc5eeddefaf99198965
Reviewed-on: https://review.coreboot.org/c/coreboot/+/67119
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-12-10 17:53:53 +00:00
Elyes Haouas 4faa72f39a include/gpio.h: Add 'IWYU pragma: export' comment
This pragma says to IWYU (Include What You Use) that the current file
is supposed to provide commented headers.

Change-Id: Iedd798eebf3376b7631fc9aa1ca0ba92867382bd
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70520
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 17:47:31 +00:00
Frank Wu 593ac8d749 mb/google/skyrim/var/frostflow: Add FW_CONFIG definition
Based on the SKU plan, add FW_CONFIG definition.

BUG=b:260473966
BRANCH=None
TEST=emerge-skyrim coreboot chromeos-bootimage

Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Change-Id: I727f69e8fe340cfe624adb5a49bd080ba9544786
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70418
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 17:47:15 +00:00
Subrata Banik ff433b7176 soc/intel: Move TCSS FW latency macros to IA common tcss.h
This patch moves TCSS firmware latency related macros from SoC
specific tcss.h to IA common tcss.h

Additionally, ensure other structure definitions belonging to the
IA common code tcss.h are not causing compilation issues for ASL files
(due to including FW latency macros) hence, guarded against
`!defined(__ACPI__)`.

TEST=Able to build and boot Google/Rex and Google/Kano.

Change-Id: Id51545ef714979c6ba09a2b468231b1f4bab0be7
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70487
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 08:02:42 +00:00
Subrata Banik 49204e30f3 soc/intel/tigerlake: Move TCSS FW latency macros to tcss.h
This patch moves TCSS firmware latency related macros from
`tcss_pcierp.asl` to SoC specific `tcss.h`.

TEST=Able to build and boot Google/Volteer.

Change-Id: I96416f3b68d853c9a5a44c499719f154aa15f0ca
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70486
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 08:02:26 +00:00
Subrata Banik 650de58220 soc/intel/alderlake: Move TCSS FW latency macros to tcss.h
This patch moves TCSS firmware latency related macros from
`tcss_pcierp.asl` to SoC specific `tcss.h`.

TEST=Able to build and boot Google/Kano.

Change-Id: I96db2dbf050c8f09e4d9c4018a2caa286f7ef1d1
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70485
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 08:02:19 +00:00
Subrata Banik 9a59858888 soc/intel/meteorlake: Fix typo
This patch fixes typo mistake `Pyhsical` -> `Physical`.

Change-Id: I211a3a710f5b63c4c16d4105f2eac50c992cfcf2
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70484
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 08:01:56 +00:00
Subrata Banik e2828c0a20 soc/intel/meteorlake: Update DPTF participants ACPI IDs
This patch updates DPTF participants' ACPI IDs based on the Intel
Meteor Lake Reference Code.

TEST=Able to build and boot Google/Rex.

Change-Id: Iccc7f3cad26a028a3b11d5e5e761bbefa7776583
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70482
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 08:01:40 +00:00
Dinesh Gehlot 5778e06771 soc/intel/meteorlake: Drop casts around `soc_read_pmc_base()`
The `soc_read_pmc_base()` function returns an `uintptr_t`, which
is then casted to a pointer type for use with `read32()` and/or
`write32()`. But since commit b324df6a54 ("arch/x86:
Provide readXp/writeXp helpers in arch/mmio.h"), the
`read32p()` and `write32p()` functions live in `arch/mmio.h`.
These functions use the `uintptr_t type for the address parameter
instead of a pointer type, and using them with the
`soc_read_pmc_base()` function allows dropping the casts to pointer.

BUG=none
TEST=Build and Boot verified on google/rex

Port of 'commit f585c6eeea ("soc/intel: Drop casts
around `soc_read_pmc_base()`")'

Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Change-Id: I914190f2d2d0507c84b19340159990f9b62ce101
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70272
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 08:01:33 +00:00
Dinesh Gehlot e7c1f7da25 soc/intel/meteorlake: Allow configuring 8254 timer via CMOS
Currently, the `USE_LEGACY_8254_TIMER` Kconfig option is the only way
to enable or disable the legacy 8254 timer. Add the `legacy_8254_timer`
CMOS option to allow enabling and disabling the 8254 timer without
having to rebuild and reflash coreboot. If options are not enabled or
the option is missing in cmos.layout, the Kconfig setting is used.

BUG=none
TEST=Build and Boot verified on google/rex

Port of 'commit bc35bed18e ("soc/intel/*: Allow configuring
8254 timer via CMOS")'

Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Change-Id: Ibf6c43ddecb3da325c22228205243bb6af00d1d2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70423
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 08:01:24 +00:00
Subrata Banik 1f5154ee8c soc/intel/meteorlake: Fix `unknown` voltage field in SMBIOS table
This patch fixes the `unknown` voltage field issue in processor SMBIOS
table.

This patch is backported from
commit 30e8fc1f4e (soc/intel/alderlake:
Fix unknown voltage in SMBIOS)

TEST=Able to see meaningful voltage data in the SMBIOS table.

Without this patch:

localhost ~ # dmidecode -t 4
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.

Handle 0x0004, DMI type 4, 48 bytes
Processor Information
	Socket Designation: CPU0
	Type: Central Processor
	Family: Pentium Pro
	 ...
      	Voltage: Unknown

With this patch:

localhost ~ # dmidecode -t 4
Getting SMBIOS data from sysfs.
SMBIOS 3.0 present.

Handle 0x0004, DMI type 4, 48 bytes
Processor Information
	Socket Designation: CPU0
	Type: Central Processor
	Family: Pentium Pro
	...
	Voltage: 0.8 V

Change-Id: I0cd7c1e3c0746309600e4480f4822a4d72147041
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70424
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 08:01:15 +00:00
Subrata Banik c0f4b1258d soc/intel/meteorlake: Support PCIe hardware compliance test mode
The validation process verifies that hardware components comply with
the standard hardware specifications. For instance, PCI express
implementation must comply with the hardware PCIe specification
requirements: Electrical, Configuration, Link Protocol and Transaction
Protocol. To perform these tests the hardware must be configured in a
particular state: some feature related to power management need to be
turned off, hot plug should be enabled...

This patch sets the appropriate FSP Updateable Product Data flags to
get the hardware in the proper configuration:
- Enable PCIe hotplug on all ports
- Set clock sources to run free
- Set the FSP compliance test mode flag

This patch is backported from
commit 096ce1444e (soc/intel/alderlake:
Support PCIe hardware compliance test mode)

Change-Id: Idd7a1adf0f53b014093ba70fee599dbb7887a0fc
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70416
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 08:01:09 +00:00
Subrata Banik 64dd9d000e soc/intel/meteorlake: Skip duplicate PCIe RP CLKSRC programming
When an enabled root port without pcie_rp clock being specified, the
empty structure provides invalid info, which indicates '0' is the
clock source and request. If a root port does not use clock source, it
should still need to provide pcie_rp clock structure with flags set to
PCIE_RP_CLK_SRC_UNUSED. If flags, clk_src, and clk_req are all '0', it
is considered that pcie_rp clock structure is not provided for that
root port.

Add check and skip PCIe CLKSRC programming without a clock structure.
In addition, a root port can not use a free running clock or clock set
to LAN.

Note that ClockUsage is either free running clock, LAN clock, or the
root port number which consumes the clock.

This patch is backported from
commit edf71a08b4 (soc/intel/alderlake:
Skip PCIe source clock assignment if incorrect)

Change-Id: Ie9179880a57796d8595874325203280590d7ee9d
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70415
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.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-12-10 07:59:57 +00:00
Subrata Banik 3eac04982a soc/intel/meteorlake: 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.

This patch is backported from
commit ff553ba8b3 (soc/intel/alderlake:
Check clkreq overlap)

Change-Id: Ifc1c57578eca376685196ad497d9db825d63aa76
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70414
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 07:59:45 +00:00
Subrata Banik cb3291965d mb/google/rex: Implement S0ix hooks aka `MS0X` method
This patch ensures to be able to drive SYS_SLP_S0IX_L `low` based
on the state of the system while `SLP_S0_L` signal is `low` (while
the system is in S0ix).

Implemented runtime ASL method (MS0X) being called by PEPD device
_DSM to configure `SLP_S0_GATE (GPP_H14)` PIN at S0ix entry/exit.

Scope (\_SB)
{
   Method (MS0X, 1, Serialized)
   {
      If ((Arg0 == One))
      {
         \_SB.PCI0.CTXS (0x75)
      }
      Else
      {
         \_SB.PCI0.STXS (0x75)
      }
}

BUG=b:256807255
TEST=Able to see SYS_SLP_S0IX_L goes low in S0ix.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ie6b5e066f228ea5dc79ae14dd803fc283fd248ce
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70196
Reviewed-by: Sukumar Ghorai <sukumar.ghorai@intel.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 07:57:32 +00:00
Elyes Haouas 8823ba1673 treewide: Include <device/mmio.h> instead of <arch/mmio.h>
<device/mmio.h>` chain-include `<arch/mmio.h>:
https://doc.coreboot.org/contributing/coding_style.html#headers-and-includes

Also sort includes while on it.

Change-Id: Ie62e4295ce735a6ca74fbe2499b41aab2e76d506
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70291
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-12-10 05:07:14 +00:00
Felix Held 8d1ef734a2 mb/google/skyrim: use gpio.h include
Replace the amdblocks/gpio.h and soc/gpio.h includes with the common
gpio.h which will include soc/gpio.h which will include amdblocks/gpio.h
in the AMD SoC case.
Since baseboard/ec.h and indirectly baseboard/gpio.h files will get
included in the DSDT, the soc/gpio.h includes in those aren't replaced
with a gpio.h include for now.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ib982e338b5c6bc145ec1a8f6dd75175a42dfb426
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70436
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 05:04:25 +00:00
Felix Held fa0bf5c2a4 mb/google/guybrush: use gpio.h include
Replace the amdblocks/gpio.h and soc/gpio.h includes with the common
gpio.h which will include soc/gpio.h which will include amdblocks/gpio.h
in the AMD SoC case.
Since baseboard/ec.h and indirectly baseboard/gpio.h files will get
included in the DSDT, the soc/gpio.h includes in those aren't replaced
with a gpio.h include for now.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ifa82c10d10e4438b0437b78ddd95b5e823805571
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70435
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 03:50:23 +00:00
Elyes Haouas 0a7a2694f9 drivers/siemens/nc_fpga/nc_fpga_early.c: Use write32p()
Change-Id: Ic7139f0adc0ce4556268612f5e77eb01738fc068
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70471
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-10 00:17:19 +00:00
Elyes Haouas 793403c740 lib/ramtest.c: Use {read,write}32p()
Change-Id: I63abe019490f72bd73bcdbddb974aff2b2bfd803
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70473
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-12-10 00:01:05 +00:00
Elyes Haouas ca20fc3c6d mb/google/{herobrine,peach_pit,trogdor}: Use {read,write}32p()
Change-Id: I2e1978f20b085f609cbeb0907374383f2d11fbf0
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70474
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-12-09 23:59:40 +00:00
Elyes Haouas 60803c12fc drivers/net/atl1e.c: Use {read,write}32p()
Change-Id: Idc9dd4434a8023af4758f921f6279d09059166d9
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/70472
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-12-09 23:59:26 +00:00