Commit Graph

48720 Commits

Author SHA1 Message Date
Patrick Georgi a284a36535 util/kconfig: Add README.md documenting the uprev procedure
Change-Id: I2e74f1c5cb1657e11d4f7ea101549329274102db
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57879
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-07-22 19:27:32 +00:00
Kapil Porwal 381c21910a mb/google/rex: Add TPM device to Kconfig and devicetree
Add TPM device for Rex.
Device details:
I2C Controller/Bus = 4
I2C Slave Address = 0x50
GPE = GPE0_DW1_03/GPP_E03

BUG=b:224325352
TEST=Verified in emulator that there is no regression

Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Change-Id: Ifa3a5b503a203e3900049f27a54025156e22a285
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66014
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-22 17:07:01 +00:00
Dtrain Hsu 3132a5fb89 Revert "mb/google/brya/var/kinox: Configure TDC current"
This reverts commit 58f68fb0cb.

Reason for revert: ODM thermal team request that change IA/GT TDC
current back to 20A.

BUG=b:237230877
TEST=Build and boot to Chrome OS

Signed-off-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Change-Id: I6a5cfdc18afb6fe43a3d630e5fa3d77c19640fc2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65980
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Baieswara Reddy Sagili <baieswara.reddy.sagili@intel.corp-partner.google.com>
Reviewed-by: Vinay Kumar <vinay.kumar@intel.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Reviewed-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-by: John Su <john_su@compal.corp-partner.google.com>
2022-07-22 13:12:21 +00:00
Tarun Tuli d00048fe56 mb/google/rex: Enable EC_GOOGLE_CHROMEEC_BOARDID Kconfig
Enables the EC_GOOGLE_CHROMEEC_BOARDID feature so we can read
board_id() on rex.

TEST=Verified builds succeed and code is linked

Change-Id: Id202019519fc4a05c80374bc97663e59fdca3d76
Signed-off-by: Tarun Tuli <taruntuli@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66018
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-07-22 07:16:33 +00:00
Andy-ld Lu 05c48ec7e9 mb/google/geralt: Add eMMC and SD card configurations
Geralt reference design has both eMMC and SD card interfaces, so we
configure both in mainboard_init() in ramstage.

TEST=boot to kernel using emmc successfully.
BUG=b:236331724

Signed-off-by: Andy-ld Lu <andy-ld.lu@mediatek.corp-partner.google.com>
Change-Id: I200a065ab96584d824153480e594e19baae97f9c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65976
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-22 04:11:19 +00:00
Andy-ld Lu eb2a111b92 soc/mediatek/mt8188: Add eMMC and SD card configurations
Geralt reference design has both eMMC and SD card interfaces, so we have
to configure both in ramstage.

Implement msdc.c (mass storage device class) to place the eMMC and SD
card drivers.

This implementation is based on chapter 5.9 in MT8188 Functional
Specification.

TEST=boot to kernel using emmc successfully.
BUG=b:236331724

Signed-off-by: Andy-ld Lu <andy-ld.lu@mediatek.corp-partner.google.com>
Change-Id: I6594c8466a133d3fdb0084716acca8dcf785f94f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65975
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-22 04:10:37 +00:00
Hui Liu ba16e057ad mb/google/geralt: Implement regulator interface
Control regulator more easily with regulator interface.

TEST=measure 3.0V in VMCH and VMC.
BUG=b:236331724

Signed-off-by: Hui Liu <hui.liu@mediatek.corp-partner.google.com>
Change-Id: I9727475774b3b9a8dcd49e5e60e133f9d745b407
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65875
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-22 04:02:49 +00:00
Jack Rosenthal 15e4c0a23f mb/google/brya/var/ghost: Split ghost4adl into 3 variants
We plan to make 3 firmwares which differ only by Kconfig options and
can share a common variant directory.

ghost4adl: Board with an ADL chip.
ghost4es:  Board near identical but has RPL-ES chip.
ghost:     Will have final RPL silicon.

Since they will only differ by Kconfig options and Intel binary blobs,
let's not duplicate the variant directory but instead share it in
common.

BUG=b:239456576
BRANCH=firmware-brya-14505.B
TEST="make menuconfig", verify layout of board selection

Signed-off-by: Jack Rosenthal <jrosenth@chromium.org>
Change-Id: I94f2048bbe6675a807f8eba986a1ded0a4167733
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65956
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-07-22 03:25:10 +00:00
Raihow Shi a8a6738631 mb/google/brask/variants/moli: set customized_leds for RTL8111K
Follow the LED modification request in ADL_Moli_SC_MB_2022_0601.pdf and
set the customized_leds to 0x0482 based on 7.4 Customizable LED Configuration in "REALTEK+RTL8111K-CG+SPEC+0116" for RTL8111K in moli.

BUG=b:218985167
TEST=emerge-brask coreboot and check RTL8111K LED behaviour

Signed-off-by: Raihow Shi <raihow_shi@wistron.corp-partner.google.com>
Change-Id: Ia154d15ecf14b32a4d589abf27b9573693339a8a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65958
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-22 03:22:09 +00:00
Nick Vaccaro 912fea6547 mb/google/brya/var/brya0: add WFC definitions to fw_config
Reserve bits 15 and 16 in the fw_config to be used to specify WFC
population status.

Possible values for field WFC bits include:
  option WFC_ABSENT		0
  option_WFC_MIPI_OVTI5675	1
  option WFC_MIPI_OVTI8856	2

BUG=b:239613517
BRANCH=firmware-brya-14505.B
TEST='emerge-brya coreboot' and make sure it compiles successfully.

Change-Id: I23bdaf7feaff2e6a4979c3da789ab877e6ac3af2
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65988
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-07-22 03:20:14 +00:00
Matt DeVillier (AMD) 7f7f65cfb9 mb/google/kahlee: Increase VRAM from 16 to 32 MiB
While adequate for ChromeOS, 16MiB VRAM is insufficient for current
mainline Linux and Windows amdgpu drivers to operate properly. Under
Linux, the driver fails to allocate a framebuffer and causes multiple
kernel panics. Under Windows, the driver fails to load due to
insufficient resources available. Revert the VRAM allocation to the
previous amount of 32MiB.

This change reverts
commit 87dcd0061a ("mainboard/google/kahlee: Reduce VRAM to 16MB")

Test: build/boot Linux 5.17.x on google/liara, verify framebuffer
allocation succeeds and no kernel panic reported.

Change-Id: I1967a203fed80456a20af00943eba21bc1c0577b
Signed-off-by: Matt DeVillier (AMD) <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66022
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-22 02:34:52 +00:00
Tim Wawrzynczak c38347873e mb/google/brya/acpi: Poll more frequently in GPPL
The full dGPU power-on sequence, when executed from ACPI, is taking
roughly 15ms or so, which puts it close to the maximum of 20ms required
from the Nvidia spec. Changing the polling period to 100 us instead of 1
ms drastically reduces the time required for this sequence, now taking
typically 7 ms or so. This gives a lot more margin during the power on
sequence.

BUG=b:238466724
TEST=Sequence verified by EE on a scope

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I3ba676c5fac983a0c1ad1d60c3863d06ed33fa27
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66020
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-07-22 02:20:18 +00:00
Shelley Chen 2a59875694 herobrine: Create Zoglin variant
Zoglin is like Hoglin, but with a smaller flash size, which requires
us to create a new variant.

BUG=b:239851866
BRANCH=None
TEST=Make sure BOARD_GOOGLE_ZOGLIN builds

Change-Id: Id1401a052061dcfc1d1ee41b88ce4a11fd9f3d01
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66055
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-07-22 00:14:39 +00:00
Nick Vaccaro 72b8462a9f mb/google/brya/var/baseboard/skolas: set BOARD_ROMSIZE_KB_32768
Skolas baseboard needs to set BOARD_ROMSIZE_KB_32768, so this change
sets it.

BUG=b:239628052
BRANCH=firmware-brya-14505.B
TEST="emerge-brya coreboot" and verify that the following configs
are set as:
  CONFIG_BOARD_ROMSIZE_KB_32768=y
  CONFIG_COREBOOT_ROMSIZE_KB_32768=y
  CONFIG_COREBOOT_ROMSIZE_KB=32768
  CONFIG_ROM_SIZE=0x02000000

Change-Id: I0846b8e69c8b65e010eef9a8f4a88606197cd0c6
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65854
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-07-21 23:02:40 +00:00
Matt DeVillier (AMD) 0303d690c4 MAINTAINERS: Add myself (Matt DeVillier) as a maintainer for all AMD SoCs
Change-Id: I16b3a3b01b54c7bb779f13a76bbd45bee1c864f7
Signed-off-by: Matt DeVillier (AMD) <matt.devillier@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/66029
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-21 23:00:13 +00:00
Sean Rhodes 04fc601e04 Documentation: Add the coreboot logo in SVG format
Add the white hare coreboot logo in Documentation so that it can be
used for various things, including the bootsplash for edk2.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ia3a1d64cc3bf695f88e163eda96e03b841ad04a9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65931
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-21 10:35:16 +00:00
Rex-BC Chen c5d4d964f1 mb/google: Use boolean type for "enable" argument for regulator
Because 0 and 1 are the only possible values,
1. Change input argument "enable" of mainboard_enable_regulator to bool.
2. Change return value of mainboard_regulator_is_enabled() to bool.

TEST=build pass
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Iae09c5fedf8f7394bfbb677e5aee37ed061304fd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65997
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-21 10:33:22 +00:00
Rex-BC Chen d5dafb2c0a mb/google: Replace some strings in regulator.c
From comments of CB:65875, we replace *_vol to *_voltage.

s/mainboard_set_regulator_vol/mainboard_set_regulator_voltage/
s/mainboard_get_regulator_vol/mainboard_get_regulator_voltage/

TEST=build pass
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: Iadf0408e8914d6e32915464f93979978c4634eaf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65994
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-07-21 10:30:57 +00:00
Hui Liu 8ba3e34f18 soc/mediatek/mt8188: Add VMCH, VMC support for MT8188
For MT8188, we need to enable and adjust VMCH and VMC to support SD
cards. Therefore, we add VPA and VSIM1 voltage adjustment APIs.

TEST=measure 3.0V in VMCH and VMC.
BUG=b:236331724

Signed-off-by: Hui Liu <hui.liu@mediatek.corp-partner.google.com>
Change-Id: I03938f9ef17a0bdd615bcbbfc7b59fa5acb8fbfb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65874
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-21 10:30:02 +00:00
Bo-Chen Chen 9d11cd7081 mb/google/geralt: Initialize PMICs in romstage
TEST=build pass
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I71cc69c74dd618f441140790af351095ead3f6f9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65759
Reviewed-by: Yidi Lin <yidilin@chromium.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-21 10:29:31 +00:00
Hui Liu f1d9e42269 soc/mediatek/mt8188: Add PMIF and PMIC init support
Add PMIF, SPI, SPMI and PMIC init code.

These PMIC settings are used by MediaTek internally. We can find these
registers in "MT6365_PMIC_Data_Sheet_V1.4.pdf" and
"MT6315 datasheet v1.3.pdf". The setting values are provided by MeidaTek
designers.

TEST=build pass
BUG=b:233720142

Signed-off-by: Hui Liu <hui.liu@mediatek.corp-partner.google.com>
Change-Id: I05a51894b130a59c28d957b64d6401c8bb9cee91
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65758
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-07-21 10:28:24 +00:00
Rex-BC Chen 823dcea39c soc/mediatek: Create a function to check ulposc
We will use the same drivers for checking ulposc in MT8188, so we add a
new function pmif_ulposc_check() to common.

TEST=build pass
BUG=b:233720142

Signed-off-by: Bo-Chen Chen <rex-bc.chen@mediatek.com>
Change-Id: I40136eaeb2c08a97cd65bfb8a81f2f24739d4d51
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65841
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-21 10:27:27 +00:00
Yu-Ping Wu b9c1ce67a5 mg/google/corsola: Enable TI50_FIRMWARE_VERSION_NOT_SUPPORTED
Ti50 hasn't implemented version reading yet. To avoid the confusing
error message

 Did not recognize Cr50 version format

enable TI50_FIRMWARE_VERSION_NOT_SUPPORTED to make clear that this
feature is not supported.

BUG=b:234533588
TEST=emerge-corsola coreboot
BRANCH=none

Change-Id: I18dd4b5bc05c2af06627275968e49aba048ba05e
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65839
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@chromium.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2022-07-21 10:26:47 +00:00
Subrata Banik 06e11f4b09 mb/google/rex: Pulling GPIO programming early to get debug msg
This patch moves the early GPIO programming from
`bootblock_mainboard_init` to `bootblock_mainboard_early_init`.

It will help to get the early debug prints as below.

TEST=Without this CL the initial report platform information
was missing as below:

[DEBUG]  VBOOT: Loading verstage.
[DEBUG]  FMAP: Found "FLASH" version 1.1 at 0x1c04000.
[DEBUG]  FMAP: base = 0xfe000000 size = 0x2000000 #areas = 33
[DEBUG]  FMAP: area COREBOOT found @ 1c09000 (4157440 bytes)
[INFO ]  CBFS: mcache @0xfef84a00 built for 18 files, used 0x414
         of 0x2000 bytes
[INFO ]  CBFS: Found 'fallback/verstage' @0x24d240 size 0x133d0 in
         mcache @0xfef84d50

With this CL the complete bootblock serial msg is coming.
[NOTE ]  coreboot-.mtl.po.ww29.5 Fri Jul 15 21:47:36 UTC 2022
         bootblock starting (log level: 8)...
[DEBUG]  CPU: Genuine Intel(R) 0000 @
[DEBUG]  CPU: ID a06a0, MeteorLake A0, ucode: f0270108
[DEBUG]  CPU: AES supported, TXT supported, VT supported
[DEBUG]  MCH: device id 7d14 (rev 00) is MeteorLake P
[DEBUG]  PCH: device id 7e01 (rev 00) is MeteorLake SOC
[DEBUG]  IGD: device id 7d55 (rev 00) is MeteorLake-P GT2
[DEBUG]  VBOOT: Loading verstage.
[DEBUG]  FMAP: Found "FLASH" version 1.1 at 0x1c04000.
[DEBUG]  FMAP: base = 0xfe000000 size = 0x2000000 #areas = 33
[DEBUG]  FMAP: area COREBOOT found @ 1c09000 (4157440 bytes)
[INFO ]  CBFS: mcache @0xfef84a00 built for 18 files, used 0x414
         of 0x2000 bytes
[INFO ]  CBFS: Found 'fallback/verstage' @0x24d240 size 0x133d0
         in mcache @0xfef84d50

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I3e092cd749359e54fe518de21671275af4b03062
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65986
Reviewed-by: Tarun Tuli <taruntuli@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2022-07-21 07:15:54 +00:00
Robert Zieba 5725a9b82b mainboard/google/guybrush: Update Wake-On-LAN functionality
The generic wifi driver currently contains a lot of intel specific
functionality that results in it not working properly on AMD platforms.
This commit updates the base device tree to use the generic PCIe driver
instead.

BUG=none
TEST=Ran on nipperkin device, dumped SSDT and checked wakeup sources

Change-Id: Iafbc68c1ae33ccc260889f0b39fc5fe8a59d7aca
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65990
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-20 22:33:12 +00:00
Robert Zieba 247d034a7a mainboard/google/skyrim/baseboard: Enable Wake-On-LAN functionality
The generic wifi driver currently contains a lot of intel-specific
functionality that interferes with enabling wake-on-lan. This commit
changes the device tree to use the generic PCIe driver which better
supports this functionality.

BUG=b:237682766
TEST=Booted on skyrim device and verified that wake on LAN works

Signed-off-by: Robert Zieba <robertzieba@google.com>
Change-Id: I5d15d33fd0a152eb3bf2bfe78e802483a701e750
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65800
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-20 22:32:43 +00:00
Robert Zieba d1cc04b5eb drivers/pci/generic: Add support for `_PRW`
This commit adds support for `_PRW` in this driver.

BUG=b:237682766
TEST=Built and booted on Skyrim device, dumped SSDT

Change-Id: Ife4ba48994cbf993bc88df8354576336438e4258
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65799
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-20 22:31:22 +00:00
Robert Zieba 23e94a4e23 drivers/pcie/generic: Add support for custom ACPI name
This commit adds code to allow the driver to use an ACPI device name
that is set in the device tree.

BUG=b:237682766
TEST=Boot changes on Skyrim device, dumped SSDT

Signed-off-by: Robert Zieba <robertzieba@google.com>
Change-Id: Ie40a335e35b8ac83658e67d7cfba0750dd4784ad
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65798
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-20 22:24:51 +00:00
Robert Zieba 5609f7a684 drivers/pcie/generic: Clean up driver
This removes unneeded and unused functionality in the driver as part of
an effort to make the driver more generic and useful. The things that
have been removed are: `DmaProperty` and its associated `is_untrusted`
config, `_DSD` generation, and the companion device functionality. This
driver isn't currently used anywhere so there won't be any issues from
removing the above functionality.

BUG=b:237682766
TEST=Built and booted coreboot on Skyrim device

Change-Id: I0abd9148ab66ea9426069102ecc8c2fa77fea98e
Signed-off-by: Robert Zieba <robertzieba@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65797
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-20 22:23:40 +00:00
Fred Reitberger 65f558f576 soc/amd/common/block/spi/fch_spi_ctrl: Fix restricted command write
The SPI_RESTRICTED_CMD register is not a PCI configuration register.  It
is memory mapped from the SPI bar.

Verified against PPR 55570 rev 3.16, PPR 56569 rev 3.03, and PPR 57243
rev 1.50

TEST=Compile tested only

Change-Id: I7c88aaea9ddac200644bb368be3bd4e9be47fd7b
Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63305
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-20 22:22:14 +00:00
Tony Huang 6a0e470197 mb/google/brya/var/agah: Adjust I2C speed
Adjust I2C speed for codec, TPM, touchpad.

BUG=b:237691531
TEST=Built and verified adjusted I2C speed < 400KHz

Change-Id: I203d137d61019235ddf38ef74607427db2a7e975
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65957
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-07-20 20:29:57 +00:00
Lijian Zhao 6f4c18db0d Documentation: Fix broken link
Link to Linux kernel coding style changed, fix it.

Change-Id: I9792d360d301b93c255306488c90375c6cc882c4
Signed-off-by: Lance Zhao <lance.zhao@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65959
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: John Zhao <john.zhao@intel.com>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
2022-07-20 20:29:40 +00:00
Arthur Heymans 28de28d8de arch/x86/*.ld: Don't use CPP to include linker scripts
This makes inspection of linker scripts in the build dir a little
easier.

Change-Id: I509faa4cee2c9f066f4e20f6038349e1165a619a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64362
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-07-20 20:29:13 +00:00
Arthur Heymans 3e914d3726 arch/arm64,arm: Prepare for !SEPARATE_ROMSTAGE
Prepare platforms for linking romstage code in the bootblock.

Change-Id: Ic20799b4d6e3f62cd05791a2bd275000a12cc83c
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/63420
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-07-20 20:28:39 +00:00
Lean Sheng Tan a91821b677 mb/prodrive/atlas: Swtich from EC UART to LPSS UART
Switch x86 uart output from EC to LPSS.

Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com>
Change-Id: I2756d139a72185ba6a5c6d1079d770ce33afdf71
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65985
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-20 20:25:46 +00:00
Sheng-Liang Pan 281a55e903 google/herobrine: Add Evoker variant
BUG=b:238571507
BRANCH=None
TEST=emerge-herobrine coreboot

Change-Id: Ie596e5c4b72de84d16571043db4291bbd0825c78
Signed-off-by: Sheng-Liang Pan <sheng-liang.pan@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65947
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shelley Chen <shchen@google.com>
Reviewed-by: Bob Moragues <moragues@chromium.org>
2022-07-20 17:54:29 +00:00
Karthikeyan Ramasubramanian 8ebb04c257 soc/amd/sabrina: Fix boot region address passed to PSP
PSP expects PSP L2 directory address relative to the start of the SPI
ROM. Also PSP does not expect BIOS L2 directory address since it is an
entry in PSP L2 directory. Update the configuration such that PSP
verstage passes the right address to PSP.

BUG=b:217414563
TEST=Build Skyrim BIOS image. Ensure that PSP verstage passes the
address as expected by PSP.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: I8dc3aa4cb401d16a68da446f83eb9e68ee290fea
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65866
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-07-20 14:15:55 +00:00
Karthikeyan Ramasubramanian e3eedf7548 soc/amd/common/psp_verstage: Fix update_boot_region
On SoCs where PSP use A/B recovery layout, PSP expects PSP L2 directory
address relative to the start of the SPI ROM. Unfortunately there is
nothing in the EFS2 header to help identify such SoCs. Hence add a
config item to statically identify such SoCs.

Also when PSP uses A/B recovery layout, BIOS L2 directory is an entry in
the PSP L2 directory. Hence the address of BIOS L2 directory is not part
of EFS2 header. Thankfully PSP is able to identify the BIOS L2 directory
itself and does not expect PSP verstage to pass the address. Modify PSP
verstage to handle these updates.

BUG=b:217414563
TEST=Build Skyrim BIOS image. Ensure that PSP verstage returned the PSP
L2 directory as expected.

Change-Id: I2f856a62055c80b8e2db91c983832611a5f0389c
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65865
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-07-20 14:14:30 +00:00
Karthikeyan Ramasubramanian df74de1cac soc/amd/sabrina: Do not dump CBMEM pre-bootblock contents to console
PSP supports mapping FCH UART and verstage logs are visible in console.
Hence pre-bootblock cbmem contents do not have to be dumped to console.

BUG=b:238937687
TEST=Build Skyrim BIOS image. Ensure that PSP verstage logs in CBMEM are
not dumped to console again during bootblock.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: I8336e372b894d8b2f9bbfb21ab15a78527dcc4c4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65863
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-07-20 14:12:28 +00:00
Karthikeyan Ramasubramanian a99c9e39bf soc/amd/sabrina, mb/google/skyrim: Call espi_switch_to_spi1_pads
Skyrim uses second SPI pads for ESPI. Switch to it initialize ESPI in
verstage.

BUG=b:217414563
TEST=Build Skyrim BIOS image. Ensure that ESPI init is successful in PSP
verstage.

Change-Id: I6e3462e95c50d256b6c159ae1d854dd69a538bb0
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65862
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Martin L Roth <gaumless@tutanota.com>
2022-07-20 14:11:49 +00:00
Karthikeyan Ramasubramanian af331a96cc vc/amd/fsp/sabrin/bl_uapp_header: Add SoC FW ID at the right offset
SoC FW ID needs to be populated at offset 0x58 and 0x59 in the PSP
header.

BUG=b:217414563
TEST=Build Skyrim BIOS image and ensure that PSP verstage is getting
loaded.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: Ibe7b26aea0567e5337ee3e6e9447aa3944c55f5b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65860
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jon Murphy <jpmurphy@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-07-20 14:10:56 +00:00
Elyes Haouas d797608e73 treewide: Remove unused <cpu/x86/mtrr.h>
Change-Id: Ib852d0b2cf4d3cbdf7475bd5493bf2e585a5894a
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64899
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-07-20 13:18:39 +00:00
Elyes Haouas ef26dee2f4 treewide: Remove unused <cpu/x86/msr.h>
Change-Id: I187c2482dd82c6c6d1fe1cbda71710ae1a2f54ad
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/64890
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-07-20 13:16:52 +00:00
Karthikeyan Ramasubramanian eb8a81fca0 mb/google/skyrim: Regenerate SPD part IDs
Now that the speed is limited to 5500 Mbps for all memory parts used in
Skyrim, regenerate the part IDs. Remove any custom generated part IDs
and the associated SPDs.

BUG=b:238074863
TEST=Build and boot to OS in Skyrim.

Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Change-Id: I6d8326208580a971e781887a7ec83355bb085c7f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65709
Reviewed-by: Robert Zieba <robertzieba@google.com>
Reviewed-by: Jon Murphy <jpmurphy@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-20 12:56:26 +00:00
Sean Rhodes e71ea1e1b6 soc/apollolake: Add CSE Firmware Status Registers
Add the CSE, General Status and Miscellaneous registers and
print information from them accordingly. All values were taken
from Intel document number 571993.

Tested on the StarLite Mk III and the correct values are
shown:
   [DEBUG]  CSE: Working State          : 2
   [DEBUG]  CSE: Manufacturing Mode     : NO
   [DEBUG]  CSE: Operation State        : 1
   [DEBUG]  CSE: FW Init Complete       : NO
   [DEBUG]  CSE: Error Code             : 3
   [DEBUG]  CSE: Operation Mode         : 0
   [DEBUG]  CSE: FPF status              : unknown

Please note, the values shown are in an error state.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I1a5548132dadbb188a33a7ae30a0a1fa144d130f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65981
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-07-20 12:37:21 +00:00
Franklin Lin 759bb4c00d soc/intel/alderlake/fsp_params.c: Set DdrSpeedControl UPD
When override "max_dram_speed_mts", set the DdrSpeedControl to manual.
(0:Auto, 1:Manual)

BUG=b:229549930
BRANCH=none
TEST=build coreboot without error

Signed-off-by: Franklin Lin <franklin_lin@wistron.corp-partner.google.com>
Change-Id: Iffbbee8082fb1a41e0ed1db3f4ea9ec4709c9ce7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65877
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-07-20 12:36:52 +00:00
Selma Bensaid e69851cd8a Update vboot submodule to upstream main
Updating from commit id 61971455:
    vboot_ref/Makefile: Expose symbols irregardless of USE_FLASHROM

to commit id a975eed3:
    2kernel.c: check display request in vb2api_kernel_phase2

This brings in 20 new commits.

BUG=b:172339016
TEST=builds with vboot_ref uprev.

Signed-off-by: Selma Bensaid <selma.bensaid@intel.com>
Change-Id: I8f9339f169c4c16216a9f380a7ca00a36098d7f8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65955
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-07-20 12:36:25 +00:00
Tim Wawrzynczak 8702450e51 mb/google/brya/acpi: Add support for D Notify event from the Chrome EC
The agah EC code includes a driver to keep track of the current D Notify
level that the GPU should be at. When it changes, it will send a host
event to the ACPI FW, which will then pass that Notify on to the kernel
driver. This patch adds support for that feature, which is described in
the Nvidia Software Design Guide.

BUG=b:229405562
TEST=add Printf() calls to the ACPI, and work through the various
scenarios on the EC that will cause D Notify levels to change; this
will cause the Printfs() to show up in the kernel log.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I5cd8bd7d177ea10a165613ed0726a6d6fd86c226
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65486
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Robert Zieba <robertzieba@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Eric Lai <eric_lai@quanta.corp-partner.google.com>
2022-07-20 12:35:59 +00:00
Sean Rhodes de21ba0758 soc/intel/cmn/pch/lockdown: Guard gpmr_lockdown_cfg
Guard gpmr_lockdown_cfg with SOC_INTEL_COMMON_BLOCK_GPMR
so it doesn't run on platforms that don't select this.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Iab5bbd399c3a654dcb95eaa8fce683a50c7322f2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65227
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-20 12:34:00 +00:00
Angel Pons eb90c512ab soc/intel/common/pch: Decouple CLIENT from BASE
In preparation to add a third option, have "Client" platforms select a
dedicated Kconfig option instead of the common "_BASE" option. Rewrite
the help texts to clarify what "Client" and "Server" mean, because the
terms refer to the type of silicon and not to the market segment. Some
uniprocessor (single-socket) servers are actually client platforms and
there are some multi-socket workstations based on a server platform.

Change-Id: I646729d709f60ca2b5e74df18c2b4e52f9b10e6b
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/65951
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2022-07-20 12:33:25 +00:00