Commit graph

57,703 commits

Author SHA1 Message Date
Nicholas Sudsgaard
dd7b671f46 mb/intel: Correct number of jacks in hda_verb.c
This was found due to the `_Static_assert()` from CB:84360 failing.

Change-Id: I08881e3fb25abca8c34a04b3bea6534c0dbf391a
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84424
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-20 23:24:30 +00:00
Nicholas Chin
cb7c58f626 Makefile.mk: Skip unnecessary recompiles when static.{c,h} are updated
The generated static.c file output by sconfig is currently added as a
prerequisite for all objects to ensure that static.h exists before
compiling anything that might need it. However, this forces every single
object out of date when the compiled devicetree is updated, even though
not every file actually needs static.h.

Only static.h actually needs to exist before compilation of other
objects, since static.c is an independent compilation unit that doesn't
need to exist before other objects can be built. Thus, change the
prerequisite from static.c to static.h, and add a rule for static.h that
depends on static.c. The recipe is a simple `true` since sconfig
generates static.c and static.h at the same time. To prevent unnecessary
recompiles, make static.h an order-only prerequisite [1] using the new
generated files argument for create_cc_template to ensure that the
header exists before any object might need it, but without forcing a
recompile of all objects by default whenever it is updated.

On a clean build, all objects will be compiled since they do not exist,
and these will occur after static.h is generated due to the default
order-only prerequisite. On subsequent incremental compiles, sources
that do need static.h will be appropriately marked out of date due to
the generated .d dependency files from the compiler, which list static.h
as a normal prerequisite for each objects that do include it, which
overrides the default order-only prerequisite. The dependency files
generated for all other objects will not include static.h, and thus the
objects will not be updated since the default order-only dependency does
not force them out of date.

After updating the devicetree of qemu-i440fx after a clean build,
comparing the build log with `make --debug=why` with the generated
dependency files indicates that only objects that actually depend on
static.h were rebuilt, instead of every object. Running a timeless
incremental build after making a change in the devicetree yielded
identical roms when performed with this patch and main, with the only
difference being the number of objects that needed to be rebuilt. Also
tested with the E6430.

[1] https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html

Change-Id: I34efc162760ae703285f3982fa16cc23a86b37f6
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84387
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-20 13:04:10 +00:00
Nicholas Chin
924337184e Makefile: Allow defining order-only prerequisites in create_cc_template
Generated files such as static.h are currently added as prerequisites
for all compilation units to ensure that they exist and are up to date
before anything that might need them is compiled. However, this has the
side effect of forcing every compilation unit out of date when such
files are regenerated, even if the object has no dependency on the
generated file. GNU Make has order-only prerequisites [1] which are used
to define prerequisites that must be updated before a given target, but
which don't force the target out of date.

Add a new argument to create_cc_template, similar to the "additional
dependencies" argument, which allows dependencies on such generated
files for a specified object class and source suffix to be defined. This
new functionality will be utilized in subsequent commits to fix up the
dependencies on generated files.

Objects that do depend on generated headers will still be handled
correctly due to the .d dependency files that are generated by the
compiler during the build, which declare normal prerequisites to any
headers an object directly or indirectly includes. As per the GNU Make
documentation, normal prerequisites take precedence over order-only
prerequisites, so the header dependencies declared in the .d files will
override the order-only one declared through create_cc_template.

This does mean that a necessary rebuild of an object due to a generated
file may be missed if the dependency file from the compiler is missing,
but this is an unusual situation that is unlikely to occur during normal
incremental builds.

[1] https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html

Change-Id: I50d87b3d9012967eefb197be12b2e0f096b0b67c
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84386
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-09-20 13:04:05 +00:00
kiwi liu
c867f746fe soc/mediatek/common: Correct eMMC src clk frequency to 400 MHz
Mediatek SoCs start operating at eMMC clock around 3MHz right after
power-on due to wrong src_hz value. In JEDEC spec, eMMC clock needs
under 400kHz.

When we need to set a clock output frequency, we actually set a
frequency division value. Originally, we set the source clock
frequency to 50MHz, the target frequency to 400KHz, and get the
division value 128. However, the actual source clock frequency is
400MHz, so the final actual output is 400MHz/128=3.125MHz.

So we correct source clock frequency to 400MHz for eMMC output
clock of 400KHz.

BUG=b:356578805
TEST=test boot ok; measure eMMC clock ok; no boot time impact

Change-Id: I9c8836b23fb21e9b0bdc80fbe85142ea0fa5e381
Signed-off-by: Mengqi Zhang <mengqi.zhang@mediatek.corp-partner.google.com>
Signed-off-by: Kiwi Liu <kiwi.liu@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84298
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-09-20 12:31:09 +00:00
Cliff Huang
7fc3c34dc3 soc/intel/common/block/acpi: Fix GPE1 blocks to ACPI FADT table
Use CONFIG_SOC_INTEL_COMMON_BLOCK_ACPI_HAVE_GPE1 to add GPE1 block
rather than checking if GPE1_STS(0) is '0'.

BUG:362310295
TEST=with the flag, boot google/fatcat or intel/ptlrvp to OS and check
that FADT table includes GPE1. FADT should have:
GPE1 Block Address : 00001810
GPE1 Block Length : 18
GPE1 Base Offset : 80
Without the flag, boot to OS and check that FADT table does not include
GPE1. FADT should have:
GPE1 Block Address : 0
GPE1 Block Length : 0
GPE1 Base Offset : 0

Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Change-Id: Idd8115044faff3161ea6bd1cae6c0fe8aa0ff8d7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84392
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-09-20 12:29:12 +00:00
Kevin Yang
fe2384a95c mb/google/dedede/var/beadrix: Add LTE only daughterboard support
Due to beadrix DB has C1 port before, and add FW_CONFIG without C1 port for LTE sku.

BUG=b:364431483
BRANCH=firmware-dedede-13606.B
TEST=emerge-dedede coreboot chromeos-bootimage

Set fw config to DB_PORTS_LTE and check
1.fw_config match found: DB_PORTS=DB_PORTS_LTE <= show LTE present message
2.USB3 port 3: enabled 1 <= LTE port enable

Change-Id: Ica5a2d6e19421b132a0bdbad77806a17e2c1ce69
Signed-off-by: Kevin Yang <kevin.yang@ecs.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84232
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-09-20 12:27:43 +00:00
Sowmya Aralguppe
0aa854f96b mb/google/brox: Remove psys related implementation
psys is not an optimal solution for no/low battery boot. Hence remove
function and macros related to psys implementation.

BUG=b:335046538
BRANCH=None
TEST=Build and boot on brox board

Change-Id: I6c0e9561367b5846b00be27012f002dd7c299414
Signed-off-by: Sowmya Aralguppe <sowmya.aralguppe@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84397
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Ashish Kumar Mishra <ashish.k.mishra@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-19 22:37:15 +00:00
Nicholas Sudsgaard
ec3a0d674e mb/gigabyte/ga-945gcm-s2l: Correct number of jacks in hda_verb.c
This was found due to the `_Static_assert()` from CB:84360 failing.

Change-Id: I01db9dad872cd4c9238b6c6aac73f3e6367710a4
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84416
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-09-19 16:10:45 +00:00
Nicholas Sudsgaard
e4084aa96b mb/system76/oryp9: Correct number of jacks in hda_verb.c
This was found due to the `_Static_assert()` from CB:84360 failing.

Change-Id: I3870bcd2482e55a5abcbd27cd0be18f25a35afbc
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84415
Reviewed-by: Tim Crawford <tcrawford@system76.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-19 16:08:42 +00:00
Tim Crawford
190856897d mb/system76/mtl: Enable gfx register for GMA ACPI
Add gfx register so GMA ACPI data is generated. Fixes brightness
controls on Windows.

Change-Id: I10948fb2ba670ba5232f1b116acdd1820ad0c07d
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84224
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-09-19 15:25:11 +00:00
Jeremy Soller
7664ad8a2f soc/intel/mtl: Hook up GMA ACPI brightness controls
Add function needed to generate ACPI backlight control SSDT, along with
Kconfig values for accessing the registers.

Change-Id: Ied08e5e9fe4913bd60474ed7dcf88b945172558d
Signed-off-by: Jeremy Soller <jeremy@sysetm76.com>
Signed-off-by: Tim Crawford <tcrawford@system76.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/82729
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-09-19 15:25:00 +00:00
Cliff Huang
5105888e2d soc/intel/common/block/acpi: exclude DMI fixed memory range if no DMI
In newer SOC,  such as PTL, there is no DMI. Exclude DMI memory range in
northbridge.asl if DMI_BASE_SIZE is '0'

BUG=b:348678529
TEST=Build CB with DMI_BASE_SIZE set to '0' in the SOC directory. Boot
to OS and check ACPI PDRC device from the ACPI DSDT table. There should
not have an entry for DMI in its _CRS method.

Verified on Intel® Simics® Pre Silicon Simulation platform
     for PTL using google/fatcat mainboard.

Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Change-Id: I971af2eb214b5940fa09d9dc0f9717bb5f0dfb4d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84349
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-19 13:47:09 +00:00
David Wu
c6493d3b80 mb/google/nissa/var/riven: enable WIFI SAR
According to the CL:chrome-internal:7651905,
Riven will use the fw_config to separate SAR setting.

CNVI + ID_0 --> wifi_sar_0.hex for WIFI6
PCIE + ID_1 --> wifi_sar_9.hex for WIFI7

BUG=b:366060274
TEST=build, enabled iwlwifi debug, and check dmesg as below.
iwl_sar_fill_table   Chain[0]:
iwl_sar_fill_table     Band[0] = 132 * .125dBm
iwl_sar_fill_table     Band[1] = 136 * .125dBm
iwl_sar_fill_table     Band[2] = 136 * .125dBm
iwl_sar_fill_table     Band[3] = 136 * .125dBm
iwl_sar_fill_table     Band[4] = 136 * .125dBm
iwl_sar_fill_table     Band[5] = 144 * .125dBm
iwl_sar_fill_table     Band[6] = 144 * .125dBm
iwl_sar_fill_table     Band[7] = 144 * .125dBm
iwl_sar_fill_table     Band[8] = 144 * .125dBm
iwl_sar_fill_table     Band[9] = 144 * .125dBm
iwl_sar_fill_table     Band[10] = 144 * .125dBm
iwl_sar_fill_table   Chain[1]:
iwl_sar_fill_table     Band[0] = 132 * .125dBm
iwl_sar_fill_table     Band[1] = 136 * .125dBm
iwl_sar_fill_table     Band[2] = 136 * .125dBm
iwl_sar_fill_table     Band[3] = 136 * .125dBm
iwl_sar_fill_table     Band[4] = 136 * .125dBm
iwl_sar_fill_table     Band[5] = 144 * .125dBm
iwl_sar_fill_table     Band[6] = 144 * .125dBm
iwl_sar_fill_table     Band[7] = 144 * .125dBm
iwl_sar_fill_table     Band[8] = 144 * .125dBm
iwl_sar_fill_table     Band[9] = 144 * .125dBm
iwl_sar_fill_table     Band[10] = 144 * .125dBm

Cq-Depend: chrome-internal:7651905
Change-Id: I647d64a008991a7a20791b2c87ea6308af6bb82e
Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84339
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-09-19 13:46:43 +00:00
Mario Scheithauer
9c51ca52a4 soc/intel/ehl/fsp_params: Do not re-enable 'PchPwrOptEnable' for real-time tuning
If real-time tuning was enabled, 'PchPwrOptEnable' was set two times
with different values. This patch fixes the issue.

BUG=none
TEST=Enabled FSP UPD debug output and checked 'PchPwrOptEnable' offset

Change-Id: I2f31015c1da51a4ae1b8d5226f5d7b60a6023f3d
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84399
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-19 09:07:32 +00:00
Mario Scheithauer
5d96f0d2e8 mb/siemens/{mc_ehl2,mc_ehl3,mc_ehl5}: Enable real-time tuning in FSP
The real-time feature should also be activated for all mc_ehl
mainboards, as it has already been done for mainboard mc_ehl1. It
improves performance in the real-time environment for these mainboards.

Change-Id: I04859b2f32bc11344b0620925f2414e7a6df625e
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84391
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Uwe Poeche <uwe.poeche@siemens.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-18 21:54:07 +00:00
Jameson Thies
0f9de13d3a mb/google/brox: Switch USB-C port locations
The ordering of the USB-C port locations is swapped. When facing the
left panel, the correct ordering is port 1 (left) then port 0 (right).
Swap the positions of the two USB-C ports to their correct values.

BUG=b:349822718
TEST=Booted to OS, confirmed correct physical_location at
/sys/class/typec.

Change-Id: I98e3042c64aba885b602c99916734c2dbb9d66bd
Signed-off-by: Jameson Thies <jthies@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84403
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-18 21:53:34 +00:00
Nigel Tao
b5b97c4122 lib/jpeg: return string (not int) error messages
Change-Id: I465a6eebc2a41ca9a618b1e86dee015cea40800b
Signed-off-by: Nigel Tao <nigeltao@golang.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84341
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2024-09-18 21:51:40 +00:00
Subrata Banik
7ece43aeb5 soc/intel: Move CSE update ELOG to cse_lite.c
The ELOG for CSE updates was being added in fsp_params.c, but the
actual update happens in cse_lite.c. This commit moves the ELOG to
cse_lite.c to more accurately reflect where the event is happening.

This also removes the need for a sol_type variable in
meteorlake/romstage/fsp_params.c.

It also helps to avoid redundant ELOG event entry while performing
CSE update (due to CSE RO to RW switch dependency).

BUG=b:361253028 (Multiple CSE sync elog prints  for Nissa/Trulo)
TEST=Able to see only one instance of ELOG while performimg CSE sync.

w/o this patch:

elogtool list
0 | Log area cleared | 4088
1 | Kernel Event | Clean Shutdown
2 | Early Sign of Life | MRC Early SOL Screen Shown
3 | Early Sign of Life | CSE Sync Early SOL Screen Shown
4 | System boot | 29
5 | Memory Cache Update | Normal | Success
6 | Early Sign of Life | CSE Sync Early SOL Screen Shown

w/ this patch:

elogtool list
0 | Log area cleared | 4088
1 | Early Sign of Life | MRC Early SOL Screen Shown
2 | Memory Cache Update | Normal | Success
3 | System boot | 30
4 | Memory Cache Update | Normal | Success
5 | Early Sign of Life | CSE Sync Early SOL Screen Shown

Change-Id: I37fe3f097e581f79bf67db1ceb923f10ce651d62
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84398
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Jakub Czapiga <czapiga@google.com>
Reviewed-by: Jayvik Desai <jayvik@google.com>
2024-09-18 14:23:55 +00:00
Nicholas Sudsgaard
b8e8d078fc mb/facebook/fbg1701: Correct number of jacks in hda_verb.c
This was found due to the `_Static_assert()` from CB:84360 failing.

Change-Id: I60bb9e7df368b786e17bb49a6f35d27372fd21de
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84394
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-18 13:11:39 +00:00
Nicholas Sudsgaard
ce546192a2 mb/msi/ms7e06: Correct number of jacks in hda_verb.c
This was found due to the `_Static_assert()` from CB:84360 failing.

Change-Id: I5cf34d8c4e27835d126eb66f2015d2e9d93b700f
Signed-off-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84396
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2024-09-18 13:10:37 +00:00
Ravi Sarawadi
c43b19ff38 soc/intel/ptl: Add SoC ACPI directory for Panther Lake
List of changes:
1. Select common ACPI Kconfig to include common ACPI code block
from IA-common code
2. Select ACPI Kconfig support for wake-up from sleep states.
3. Add SoC ASL code for SoC IPs like IPU, HDA etc.
4. PTL replaces DMI3 with SAF to ensure
   common/block/acpi/acpi/northbridge.asl binding with PTL change,
   #if DMI_BASE_SIZE guard check is added in northbridge.asl
5. include GPIO ASL that supports new pinctrl schema.

BUG=b:348678529
TEST=Verified on Intel® Simics® Pre Silicon Simulation platform
     for PTL using google/fatcat mainboard.

Change-Id: Ia5cf899b049cb8eb27b4ea30c7f3ce7a14884f15
Signed-off-by: Ravi Sarawadi <ravishankar.sarawadi@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83772
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-09-18 02:17:15 +00:00
Subrata Banik
c512585e55 mainboard/google/{brox,brya}: Drop redundant CRASHLOG config
This commit drops redundant CRASHLOG option for the brox and brya
mainboards as SOC_INTEL_CRASHLOG config is now selected by the
Alder Lake SoC directly.

TEST=Able to build and boot google/brox w/o any functional impact of
the crashlog feature.

Change-Id: I83859d6e61a151d6930785df3466c185c69e8e66
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84366
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-17 14:19:19 +00:00
Subrata Banik
e26d8d064d soc/intel/alderlake: Enable CRASHLOG for Chrome OS
Enable the CRASHLOG config option for Chrome OS boards. This allows the
Chrome OS crash reporter to collect and analyze crash dumps, aiding in
debugging and improving system stability.

TEST=Able to build and boot google/brox

Change-Id: Ia23ef1cbebdba9a3b724204eb25ee788afa3e8fd
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84365
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-09-17 14:19:14 +00:00
Alicja Michalska
c079cfac62 mb/ocp/tiogapass: Update dead links in the documentation
Change-Id: I685d1aaabab0cb14f88025cdc80d86342e354a63
Signed-off-by: Alicja Michalska <alicja.michalska@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84388
Reviewed-by: Nicholas Sudsgaard <devel+coreboot@nsudsgaard.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-17 13:51:15 +00:00
Varun Upadhyay
7cc5cdd385 mb/google/brya/var/trulo: Update ISH GPIO config for tablet mode switch
This patch configures the GPIO pins for ISH to notify EC about the
tablet mode change in accordance with schematic_20240607.

BUG=b:347811875
TEST=Build and boot google/trulo. Placed the device in tabletmode & on
EC console,"tabletmode" command shows "tablet mode".

Change-Id: Id22e397e46b522428ffdabe34a445ed7e4fb6fc5
Signed-off-by: Varun Upadhyay <varun.upadhyay@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84351
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-09-17 09:14:20 +00:00
Subrata Banik
b9a09786bc Revert "soc/intel/meteorlake: Skip the TCSS D3 cold entry sequence"
This reverts commit 88a496a9c8.

This workaround is not valid with the latest Intel PRQ silicon,
so I'm dropping it now. Additionally, able to boot to ChromeOS without
any hang, and I also ran an S0ix cycle without any failures.

BUG=b:244082753
TEST=Able to boot google/rex0 to CrOS.

Change-Id: Idf0da5841705888d2787f61dd6e6fada2fbe3e3e
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84368
Reviewed-by: Jakub Czapiga <czapiga@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-17 04:38:00 +00:00
Subrata Banik
285b74ab26 mb/google/brya: Drop redundant entries of crashlog config
This patch removes the redundant crashlog config (SOC_INTEL_CRASHLOG)
entry from BOARD_GOOGLE_BRYA0 and BOARD_GOOGLE_BRASK.
BOARD_GOOGLE_BRYA_COMMON already selects a crashlog config, and
brya0/brask board eventually selects the BOARD_GOOGLE_BRYA_COMMON
config, making SOC_INTEL_CRASHLOG redundant.

TEST=Successfully built and booted google/brya0.

Change-Id: Iaff7954d4dafb4c6ca72a1521dfb434fb36b495a
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84364
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-17 03:29:37 +00:00
Subrata Banik
6cc7c56d2d mb/google/brox: Drop redundant entries of crashlog config
This patch removes the redundant crashlog config (SOC_INTEL_CRASHLOG)
entry from BOARD_GOOGLE_BASEBOARD_BROX. BOARD_GOOGLE_BROX_COMMON
already selects a crashlog config, and brox baseboard eventually selects
the BOARD_GOOGLE_BROX_COMMON config, making SOC_INTEL_CRASHLOG
redundant.

TEST=Successfully built and booted google/brox.

Change-Id: Idcb03d13ee3943f188246663d47f47cb8afccbd9
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84363
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-09-17 03:29:32 +00:00
Felix Held
baefa0bd6f soc/amd/common/psp/psb: add missing newline in debug message
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I794899fa55b510e6f39dadc1a831b86389ab31ca
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84355
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-09-16 16:23:47 +00:00
Matt DeVillier
ad8cac34a4 mb/google/volteer: Fix USB port definitions
Commit bc8f5405b5 ("tgl mainboards: Move usb{2,3}_ports settings into
XHCI device scope") not only moved the USB port definitions under the
XHCI device reference, but also combined multiple register definitions.
In doing so, it broke the inheritance from the baseboard, since the
variant overridetree registers now replaced the entire usb2_ports/
usb3_ports structs, rather than replacing individual array elements
therein. This resulted in any USB ports inherited from the baseboard
and not overridden by the variant being non-functional as they were
not included in the resulting combined devicetree.

To fix this, return to overriding individual array elements in the
usb2/3_ports structs.

TEST=build/boot google/drobit. Verify all USB ports present and
functional. Verify mainboard/static.c in built shows all ports.

Change-Id: I54921fa4ecf594a1ecbcfa7c45e5d745d4a95652
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84348
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2024-09-16 14:14:32 +00:00
Ren Kuo
19788920cb mb/google/brox/jubilant: Update cpu power limit settings
1)Modify jubilant cpu power limit setting depend on the brox
  baseboad settgins,refer to CL:
  https://review.coreboot.org/c/coreboot/+/83752

2)Update PL1,PL2, and PL4 value from jubilant thermal design
   PL1 = 15W
   PL2 = 41W
   PL4 = 87W

BUG=b:364441688
BRANCH=None
TEST=Able to successfully boot on jubilant photo SKU1 and SKU2
     boards with AC w/o battery.
     Test on AC 65W and 45W w/o battery,and check the PL values.

Change-Id: I9a143d9faaa6c57b0d314c0ff6c0e55f556d7216
Signed-off-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84219
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
2024-09-16 14:13:38 +00:00
Subrata Banik
fa5e3d9d44 ec/google/chromeec: Optimize battery string readout with caching
This commit refactors the long battery string implementation to include
caching of the EC response for battery information (model, serial, and
manufacturer).

This optimization reduces resume time by approximately 63ms by
minimizing communication overhead between the AP and EC.

BUG=b:366338622
TEST=Verified on google/tivviks_ufs:
    * Long battery string is displayed when
      EC_GOOGLE_CHROMEEC_READ_BATTERY_LONG_STRING is enabled.
    * Short battery string is displayed when
      EC_GOOGLE_CHROMEEC_READ_BATTERY_LONG_STRING=n.

Change-Id: I32ae5b5e618f20335f3d344811a97f1416df529e
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84354
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
2024-09-14 18:13:47 +00:00
Subrata Banik
3d5412f8d4 ec/google/chromeec: Add option to control reading long battery strings
Older ChromeOS devices (pre-CR50) do not support reading long battery
strings. This commit adds a Kconfig option,
EC_GOOGLE_CHROMEEC_READ_BATTERY_LONG_STRING, to enable or disable this
feature.

This allows devices with TPM_GOOGLE (CR50/TI50) to read and display
long battery strings, while older devices like google/link, wolf, samus,
and chell will continue to display only the first 8 characters.

This change ensures compatibility with older devices while enabling
the display of complete battery information on newer platforms.

BUG=b:366338622
TEST=Verified on google/tivviks_ufs:
     * Long battery string is displayed when
       EC_GOOGLE_CHROMEEC_READ_BATTERY_LONG_STRING is enabled.
     * Short battery string is displayed when
       EC_GOOGLE_CHROMEEC_READ_BATTERY_LONG_STRING=n.

Change-Id: I7859809278b7e926bbe8beb1a0a9e12c7e6c220d
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84352
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
2024-09-14 18:13:18 +00:00
Shuo Liu
8560c7197a mainboard/intel/avenuecity_crb: Update full IIO configuration
Change-Id: I88baa159475ac57ec6a2a638ab84f76a6af4fe82
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84318
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-14 09:41:38 +00:00
Sowmya Aralguppe
c3f9c4a511 mb/google/brox: Fix booting to kernel without battery
When battery is disconnected and only adaptor is connected higher PL2
power draw causes cpu brown out and system does not boot to kernel. To
avoid this set Boot frequency UPD to 1. Reduce PL4 value to overcome
power spikes from SoC during boot. Remove Psys implementation as it
impacts active state platform performance.

BUG=b:335046538,b:329722827
BRANCH=None
TEST=Able to successfully boot on 3 different Brox proto2 SKU1
     and SKU2 boards with 65W, 45W and 30W adaptors for 3
     iterations of cold boot.
Change-Id: I58e136c607ea9290ecac0cee453d6632760a6433
Signed-off-by: Sowmya Aralguppe <sowmya.aralguppe@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83752
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-09-13 22:47:55 +00:00
Sean Rhodes
73c23aa727 Documentation/mb/starlabs/byte_adl: Correct title
Change-Id: Ia35c656a66c623e88579cf4b9e894c77a404c375
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84280
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
2024-09-13 16:50:36 +00:00
Shon
0251f7da80 mb/google/brask/var/bujia: Fix PSYS voltage setting
It return 0 when google_chromeec_command() on success, so
get_input_power_voltage() should return adaptor voltage instead of
psys_config default value.

BUG=b:329037849
BRANCH=firmware-brya-14505.B
TEST= cbmem -c | grep -i PsysPmax

Change-Id: I848c92752b7a7b53f47c6296aad0bdda20e9b0bd
Signed-off-by: Shon <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84333
Reviewed-by: Derek Huang <derekhuang@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-13 14:19:39 +00:00
Nicholas Chin
2a2c78aeea util/autoport: Make printing of SPDX headers generic
Previously, Add_gpl() was only used with C and ASL source code files,
and was hard coded to use the C /* */ style comment, preventing it from
being used with files with other comment styles. Convert this into a
generic function for adding arbitrary SPDX license identifiers for
arbitrary filetypes. This replaces the hard coded GPL-2.0-or-later
string used in gma-mainboard.ads with a call to the new function.

This is also used to add SPDX headers to Kconfig and Makefile sources;
as previous commits added them to all such files in the tree.

Tested against logs from a Latitude E6430 (Ivy Bridge) and Precision
M6800 (Haswell) to check that license headers that were already being
generated did not change.

Change-Id: I24a1ccd0afb7045e878bf6eaae7a23f828a9240d
Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83184
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-09-13 14:18:48 +00:00
Zheng Bao
c421ed6f81 amdfwtool: Add PSP backup directory for A/B recovery
Change-Id: Ia5a745c86595554c83cd13a35c312c17987b716b
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75682
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-13 14:17:06 +00:00
Shuo Liu
475565e9cc soc/intel/xeon_sp/gnr: Support full IIO UPD configurations
Change-Id: Iebfadffd2da83992af983b8c0dfe2706f81eb728
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84317
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-13 11:53:42 +00:00
Shuo Liu
4725e57a95 configs: Disable graphics on intel/archercity CRB
Change-Id: Ic78190a6bff233388bf52fdbb94fa3d7812010f2
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84320
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2024-09-13 11:14:56 +00:00
Jincheng Li
332c3b27d2 soc/intel/xeon_sp/gnr: Move CPU ID definition to common header
Change-Id: I816c6f68840c122fbc37085e31a1b0368a819f4a
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84313
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-13 11:14:33 +00:00
Jincheng Li
b72e95dd99 soc/intel/xeon_sp/gnr: Enlarge MAX_CPUS to 512
GNR-AP supports up-to 128 cores/256 threads per socket. Enlarge
MAX_CPUS to 512 = 128*2*2 with 2 socket configuration considered.

Change-Id: I8dc46dcdd3ca1c3ddfa47fbb28912a2c6e4c46fa
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84312
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-13 11:10:16 +00:00
Jincheng Li
e626a4b0c0 vc/intel/fsp/fsp2_0/graniterapids: Update FSP headers
FSP n-1 headers in vc/intel/fsp/fsp2_0/graniterapid are updated to
pass compilation with full platform codes.

Change-Id: I1d13ddd4db8409a4928bd1bf152a9c284d138e48
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84303
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-09-13 11:09:57 +00:00
Gang Chen
2f56049778 soc/intel/xeon_sp/gnr: Use default DCACHE_BSP_STACK_SIZE
For Xeon-SP, DCACHE_BSP_STACK_SIZE is by default 0x10000. For GNR,
this default size is enough. Use the default size so that more
CAR spaces could be saved for other purpose.

Change-Id: I68a79df150c4954ef8d703987d7c0bb446ba4cda
Signed-off-by: Gang Chen <gang.c.chen@intel.com>
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84302
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-09-13 11:09:50 +00:00
Saurabh Mishra
95cf9c0052 soc/intel/ptl: Do initial Panther Lake SoC commit till ramstage
List of changes:
1. Add required SoC programming till ramstage.
2. Include only required headers into include/soc.
3. Skeleton code used to call FSP-S API.

BUG=b:348678529
TEST=Verified on Intel® Simics® Pre Silicon Simulation platform
     for PTL using google/fatcat mainboard.

Change-Id: I61930726ad0c765bfa1d72c5df893262be884834
Signed-off-by: Saurabh Mishra <mishra.saurabh@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84332
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-09-13 08:23:55 +00:00
Subrata Banik
4ba9eeab08 soc/intel/cmn/block/cpu: Simplify calculation of non-eviction ways
The calculation of non-eviction ways (used for cache-as-ram
configuration) has been simplified by removing conditional move
instructions and directly adding the remainder to the quotient.

This achieves the same ceiling operation but with potentially improved
efficiency (less instructions).

No functional changes are expected.

TEST=Able to build and boot google/rex.

Change-Id: I7cf5ff19ec440d049edc3bf52c660dea96b1f08a
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84236
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2024-09-13 07:07:47 +00:00
Karthikeyan Ramasubramanian
300fbc502b mb/google/brox: Set PCIE WLAN bluetooth companion device
To publish the Bluetooth Regulator Domain Settings under the right
ACPI device scope, the wifi generic driver requires the bluetooth
companion to be set accordingly.

BUG=b:362672785
TEST=Build Brox firmware and boot to OS. Ensure that the BRDS table is
populated under the right ACPI device scope.
Scope (\_SB.PCI0.XHCI.RHUB.HS10)
{
    Name (BRDS, Package (0x02)
    {
        0x00000001,
        Package (0x0A)
        {
            0x00000012,
            0x00000001,
            0x00000001,
            0x7C,
            0x70,
            0x70,
            0x70,
            0x70,
            0x70,
            0x70
        }
    })
}

Change-Id: I9a74a995bca8d412b85c243c7f2f98c9917b5e76
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84296
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bob Moragues <moragues@google.com>
2024-09-12 17:28:46 +00:00
Karthikeyan Ramasubramanian
192a140843 mb/google/brox/var/brox: Enable ASPM for PCIe4 SSD of CPU
Check that lnkCap supports ASPM L1, so set it to ASPM_L1
to avoid excessive power consumption.

BUG=b:363854853
TEST=emerge-brox sys-boot/coreboot sys-boot/chromeos-bootimage

Change-Id: I386f8e88a5af661b1f4c04d2e2a34cd181608bd8
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84278
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: <srinivas.kulkarni@intel.com>
2024-09-12 17:27:57 +00:00
Zheng Bao
b46bd95ccd amdfwtool: Set the fields when the header is created
The fields spi_block_size and base_addr of regular PSP header, lookup
and reserved of combo header, are constants. So we
move the setting statements to the creation functions.
Only update the count, size and fletcher in later function
file_dir_header.

TEST=Binary identical test on all AMD SOC platforms

Change-Id: I55c400e45536a57841b01d7c90d3fef9afa53e78
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84130
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2024-09-12 17:04:05 +00:00