Commit graph

49,286 commits

Author SHA1 Message Date
Rui Zhou
d1dac66e61 mb/google/nissa/var/rull: add RAM ID H58G56BK8BX068
Add RAM ID for DDR Hynix H58G56BK8BX068

BUG=b:378821948
BRANCH=None
TEST=boot to kernel success

Change-Id: I4c4ad191a5e9703ee0f3bed150c816bfb098daf5
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85117
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Jayvik Desai <jayvik@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-11-18 06:55:13 +00:00
Tyler Wang
7eb2a9ad4f mb/google/rex/var/kanix: Add USB A1 port support
BUG=b:366291025
TEST=emerge-rex coreboot pass

Change-Id: Ie76b20cab9e15a1944451697ebf243c0f0cc4740
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85105
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-11-18 06:55:05 +00:00
Tyler Wang
55f0592ec2 mb/google/rex/var/kanix: Add audio codec/amp support
Add support for Realtek audio codec ALC5682I-VS and Realtek audio amp
ALC1019.

BUG=b:366291025
TEST=emerge-rex coreboot pass

Change-Id: I0cac934004b0b1b72feaacea99a602fffd2f1457
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85100
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-18 06:54:55 +00:00
Tyler Wang
6821aff655 mb/google/rex/var/kanix: Add initial overridetree settings
Update initial overridetree settings, it's basically copied from karis.

This patch includes:
1. USB port related settings
2. Display Port Configuration
3. DPTF settings
4. PCIE settings for NVME
5. Settings of MIPI camera HI556
6. Settings of ELAN9004 touchscreen
7. Settings of ELAN and PIXA touchpad
8. PCIE settings for WLAN card
9. Settings of NUVOTON FPMCU

BUG=b:368501705
TEST=emerge-rex coreboot pass

Change-Id: I468ca388f495b2e527841145f8162b21074058cc
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85021
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-11-18 06:54:49 +00:00
Tyler Wang
944e059806 mb/google/rex/var/kanix: Add initial GPIO config
Initial GPIO config for kanix, it's copied from karis.
Will update more GPIO config in future.

BUG=b:368501705
TEST=emerge-rex coreboot pass

Change-Id: Id23b836b48925a30b212b444c9f51cfd6166b9f8
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85042
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-18 06:54:41 +00:00
Tyler Wang
7bcac7bb11 mb/google/rex/var/kanix: Generate SPD ID for supported memory part
Add kanix supported memory parts in mem_parts_used.txt, generate
SPD id.

1. MICRON MT62F1G32D2DS-023 WT:B
2. HYNIX H9JCNNNBK3MLYR-N6E
3. HYNIX H58G56BK8BX068
4. SAMSUNG K3KL8L80CM-MGCT
5. MICRON MT62F512M32D2DR-031 WT:B

BUG=b:378390643
TEST=Use part_id_gen to generate related settings

Change-Id: I6ce92bac8d8e7ed64135c26387f52b7cc488c391
Signed-off-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85040
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-18 06:54:35 +00:00
Ian Feng
1565c1d108 mb/google/fatcat/var/francka: Add overridetree
Add override devicetree based on schematic_20241104.

BUG=b:376245884
TEST=emerge-fatcat coreboot

Change-Id: I8a50ca095922cdd67c3f2b13e4727608c3644d86
Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85116
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
2024-11-18 02:56:43 +00:00
Ian Feng
0b759d7647 mb/google/fatcat/var/francka: Configure Kconfig for francka
1. Select BOARD_GOOGLE_BASEBOARD_FATCAT for francka.
2. Set VARIANT_DIR to BOARD_GOOGLE_FRANCKA for francka.
3. Set TPM I2C bus to 0x01 for francka.

BUG=b:377819511
TEST=emerge-fatcat coreboot

Change-Id: I5890a1f02ef88c591973c71a2adb2bba889733e7
Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85115
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-18 02:56:38 +00:00
Ian Feng
2eaed7e262 mb/google/fatcat/var/francka: Update gpio settings
Configure GPIOs according to schematics_20241112.

BUG=b:377819511
TEST=emerge-fatcat coreboot

Change-Id: I759df174a47a08319c1ada649d8bfb6f64b5aecd
Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85037
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
2024-11-18 02:56:31 +00:00
Kapil Porwal
34f54e4e4b mb/google/trulo: Fix invalid GPE route configuration
GPE route for GPE0_DW0 was not being programmed (i.e. 0) which made it
route to GPP_B since a value of 0 means GPP_B. GPE route for GPE0_DW1
is also being programmed to GPP_B which makes the overall configuration
invalid.

The fix is to program the GPE0_DW0 route to a GPIO group which is not
already being used for GPE0_DW1 & GPE0_DW2 i.e. GPP_A.

Additionally, the common GPE route configuration is moved to baseboard.

BUG=b:378455259
TEST=Verify wake from S0ix when charger is connected

Change-Id: I674cf7db160b6bc1ec3d620f9c99ea91041c48bb
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85157
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-11-18 02:55:03 +00:00
Subrata Banik
640a41f3ee soc/intel: Assert if pmc_/gpe0_dwX values are not unique
This commit adds an assertion to ensure that the values of
pmc_/gpe0_dw0, pmc_/gpe0_dw1, and pmc_/gpe0_dw2 in the
soc_intel_<soc>_config structure are unique.

This check helps to catch potential configuration errors early on,
preventing unexpected behavior during system initialization.

TEST=Built and booted normally. No assertion failure observed.

Able to catch the hidden issue due to overlapping Tier 1 GPE
configuration.

[DEBUG]  CPU: Intel(R) Core(TM) 3 N355
[DEBUG]  CPU: ID b06e0, Alderlake-N Platform, ucode: 0000001a
[DEBUG]  CPU: AES supported, TXT supported, VT supported
...
...
[DEBUG]  MCH: device id 4617 (rev 00) is Alderlake-N
[DEBUG]  PCH: device id 5481 (rev 00) is Alderlake-N SKU
[DEBUG]  IGD: device id 46d3 (rev 00) is Twinlake GT1
[EMERG]  ASSERTION ERROR: file 'src/soc/intel/alderlake/pmutil.c',
         line 163

Change-Id: I6b4f2f90a858b9ec85145bce0542f1ce61d080be
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85161
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-11-18 02:54:56 +00:00
Subrata Banik
3583fe13f7 soc/intel/pantherlake: Reduce memory test size
Enable upd to reduce size of the memory test.

TEST=Able to build and boot google/fatcat.

w/o this patch:

    951:returning from FspMemoryInit        3,452,595 (365,930)

w/ this patch:

    951:returning from FspMemoryInit        3,442,823 (353,928)

Change-Id: I67f10e234019e260923a28a2d71b83786dcb39ee
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85158
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-11-18 02:54:40 +00:00
Jeremy Compostella
38fd03dfea soc/intel/pantherlake: Bind SoC config to LowerBasicMemTestSize UPD
The lower_basic_mem_test_size SoC setting (LowerBasicMemTestSize UPD)
request FSP-M to reduce the size of memory tested after memory
training. This option reduces the boot time. This is considered a safe
option to enable on a well validated board.

BUG=b:357011633
TEST=LowerBasicMemTestSize UPD is set when lower_basic_mem_test_size
     is set

Change-Id: I465e9c138ac8f2079bfd506add4667201a8fa533
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85130
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-18 02:54:25 +00:00
Elyes Haouas
02847233f8 soc/mediatek/common/include/soc/mcu_common: Include <types.h>
Include missing <types.h>.

Change-Id: I04d18e601e010b64c46f2eb52874d3eb5664b0e1
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85165
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-11-17 14:09:24 +00:00
Patrick Rudolph
50905e7cdc mb/ocp/tiogapass: Fix build failure
Add console.c to SMM stage as well. Fixes the build failure:
"undefined reference to `get_uart_baudrate'" when CONFIG_DEBUG_SMI
is set.

Change-Id: I2587287b0074a56c49b7434553c69cae97aaa1b4
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85135
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alicja Michalska <ahplka19@gmail.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-11-17 10:35:08 +00:00
Patrick Rudolph
df7561552f drivers/intel/gma/acpi: Limit OpRegion size
Limit the ACPI OpRegion to cover only MBOX3. This seems to fix
BSOD errors seen on Windows 10/11 as reported at [1].

1: https://ticket.coreboot.org/issues/327

Change-Id: Ia2affa799e5cd84c0a03330e0f78919755f0e8ac
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81295
Reviewed-by: Joel Linn <jl_coreboot@conductive.de>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-11-17 05:33:49 +00:00
Elyes Haouas
dcf2ef9b21 tree: Remove unused <console/console.h>
Remove unused include <console/console.h>.

Change-Id: I2a7cafd7b755a5c3e2bbfa9fc814bf2686c1ccf1
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85163
Reviewed-by: Nicholas Chin <nic.c3.14@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-16 23:34:08 +00:00
Patrick Rudolph
4dcda853fd device: Add helper to identify PCI IOAPICs
Add a helper function to identify PCI IOAPICs.
Will be used in the following commits.

Change-Id: Ibe50934260b025575440fd52eace73fe2327a193
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84849
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-11-16 22:08:17 +00:00
Patrick Rudolph
f618b265ad soc/intel/xeon_sp/skx: Load microcode
Update microcode on BSP before MPinit and on all APs if necessary.
When the APs already have a MCU loaded, MPinit will skip the update.

This aligns the code with other platforms that attempt to update the
microcode in MPinit even when FIT already has loaded a MCU.
Drop the UPD PcdCpuMicrocodePatchBase to prevent FSP-S from updating
MCU before MPinit runs.

Reduced code differences between SKX and CPX and will allow to
merge the codebase into one.

Change-Id: I7df6f82055a879a738fd29092e750084557bbd5c
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84848
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-16 22:08:02 +00:00
Patrick Rudolph
5004c78ef7 soc/intel/xeon_sp/skx: Use Kconfig symbol
Use Kconfig symbol CPU_BCLK_MHZ as done on CPX.

Reduced code differences between SKX and CPX and will allow to
merge the codebase into one.

Change-Id: I8a0a51d4280e4370e0e8695f8b9d8f2ed943d9e4
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84847
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-11-16 20:19:34 +00:00
Patrick Rudolph
69a65752a7 soc/intel/xeon_sp/skx: Lock PMC in post_mp_init
Since SKX and CPX are using the PCH, copy the code from CPX and
lock the PMC in the same place.
Reduced code differences between SKX and CPX and will allow to
merge the codebase into one.

Change-Id: I9495456fc2650b25ba164b336dc10ea0b88989aa
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84846
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-16 20:19:21 +00:00
Patrick Rudolph
b4a4a76a71 soc/intel/xeon_sp: Reduce code differences
Use get_platform_thread_count() instead of duplicated
get_thread_count(), that is also less precise.

Change-Id: I70c095c284aab6898b8351e82243f534963f333b
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84845
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-16 20:19:06 +00:00
Patrick Rudolph
70546ebc40 soc/intel/xeon_sp/skx: Lock all PCU registers
Lock all PCU registers on all sockets. The same code can be found
on CPX, which is basically the same CPU. Once the differences between
CPX and SKX are minimal, the platforms can be merged into one codebase.

Change-Id: I73eaa0905e8a418fc9dfe515c42cd257c041cf61
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84843
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-16 20:11:29 +00:00
Kun Liu
de3eb9c9d9 mb/google/nissa/var/telith: Add Fn key scancode
The Fn key on telith emits a scancode of 94 (0x5e).

BUG=b:372506691
TEST=Flash telith, boot to Linux kernel, and verify that KEY_FN is
generated when pressed using `evtest`.

Change-Id: Ib69af9a8448312b275de46f9c835f8a9d592312a
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85045
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-11-15 06:29:03 +00:00
Kun Liu
7cf2189446 mb/google/nissa/var/telith: Add 6W and 15W DPTF parameters
The DPTF parameters were defined by the thermal team.
Based on thermal table in 377955793#comment2

BUG=b:377955793
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I7cb44a707d7a87f5caaf259b069a21826f5c0a2e
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85114
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-11-15 06:28:50 +00:00
Subrata Banik
c2424ee253 mb/google/fatcat: Refactor EC_SOC_INT_ODL (GPP_E07) configuration
This patch refactors the configuration of GPP_E07 (EC_SOC_INT_ODL) to
accommodate different hardware configurations.

Specifically, GPP_E07 is not connected (NC) on google/fatcat boards
with the Microchip EC AIC. However, it is required for google/fatcat
boards with Nuvoton/ITE AICs.

BUG=b:378603337

Change-Id: I540ba1feadc962866be16d44d2ad607fd0e97ad2
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85106
Reviewed-by: Pranava Y N <pranavayn@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-15 04:41:55 +00:00
Ren Kuo
c95f2eeebf mb/google/brox/var/jubilant: Add fw_config for WWAN Sar Sensor
The current WWAN(LTE) does not require any sar setting from RF team's
suggestion, and sar sensor will be removed from DVT schematic.
To reserve the extendibility, add the fw_config DB_1A_LTE_SAR:
field DB_USB 11 12
	option DB_1A		0 (None LTE)
	option DB_1A_LTE	1 (LTE without sar sensor)
	option DB_1A_LTE_SAR	2 (LTE with sar sensor)
end

Base on the fw_config to enable/disable related functions:
0)Disable WWAN and Sar if DB_USB = DB_1A
1)Enable WWAN and disable sar sensor if DB_USB = DB_1A_LTE
2)Enable WWAN and Sar sensor if DB_USB = DB_1A_LTE_SAR

BUG=b:375341992
TEST=Build and verify on jubilant by DB_USB= 0,1,and 2 of fw_config
     Check sar sensor and WWAN module from commands:
     ls -l /sys/bus/i2c/devices
     i2cdetect -y -r
     lsusb

Change-Id: If9231ac8df94e1dc514ecf0780c99adbfb902893
Signed-off-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85107
Reviewed-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2024-11-15 02:21:39 +00:00
Yuchi Chen
1a22344d58 southbridge/intel/common: Improve ACPI _PRT method generation
Add a scope parameter for `intel_write_pci0_PRT()` so that it could be
reused for multiple domains.

Change-Id: I867a0c74e633ddfe63d29870f9fd50ca883c2e78
Signed-off-by: Yuchi Chen <yuchi.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85013
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
2024-11-14 19:55:04 +00:00
Karthikeyan Ramasubramanian
618fbe0d21 soc/intel/alderlake: Display early Sign of Life for CSE FW Sync
This will ensure that the user is informed about an ongoing CSE FW Sync.

BUG=b:378458829
TEST=Build Brox BIOS image and boot to OS. Ensure that ESOL is displayed
during CSE FW Sync.

Change-Id: I5e7b71da7a98be87361dc7ab9e6c4ae572f61773
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85103
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2024-11-14 16:33:44 +00:00
Gang Chen
3d32f915a9 soc/intel/xeon_sp: Reserve PRMRR
PRMRR (Protected Region Memory Range Region) are not accessible as
normal DRAM regions and needs to be explicitly reserved in memory
map.

Change-Id: I81d17b1376459510f7c0d43ba4b519b1f2bd3e1f
Signed-off-by: Gang Chen <gang.c.chen@intel.com>
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Signed-off-by: Jincheng Li <jincheng.li@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84314
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2024-11-14 14:29:23 +00:00
Shuo Liu
97412d1929 cpu/x86/mtrr: Use fls/ffs from lib.h
Definitions of __fls/__ffs from lib.h and fms/fls from
cpu/x86/mtrr.h are duplicated. Use definition from lib.h which is
more generic.

Change-Id: Ic9c6f1027447b04627d7f21d777cbea142588093
Signed-off-by: Shuo Liu <shuo.liu@intel.com>
Suggested-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85104
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-14 14:29:18 +00:00
Kapil Porwal
8808e8c2b1 vc/google: Refactor config to set Fn key scancode
Create a new config option to indicate that a board has Google Strauss
keyboard. The scan code for Fn key will be set to 94 if the new config
is selected.

Previously each board was setting the integer config option for Fn key
scan code which was not scalable. The new option is a bool and can be
easily selected by different boards.

BUG=none
TEST=Verify coreboot.config before and after this change.

Change-Id: I2b5d54879d415e4403b2d7948432bb06ab983b86
Signed-off-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85109
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Jayvik Desai <jayvik@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-13 10:07:13 +00:00
Ian Feng
20f95c7050 mb/google/fatcat/var/francka: Add HDA verb tables
We use ALC256 as HDA codec on francka, add the verb table.

BUG=b:370668037
TEST=emerge-fatcat coreboot

Change-Id: I579c9fd23c763d6791944732889021ffa03da448
Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85036
Reviewed-by: Amanda Hwang <amanda_hwang@compal.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-13 04:44:54 +00:00
Varun Upadhyay
9432b66f55 mb/google/fatcat: Add FW_CONFIG Support for ALC721 soundwire
This change adds support for the ALC721 codec in the device tree
and enables it based on the fw_config.

BUG=b:368495490
TEST=Boot on google fatcat board
Change-Id: If5ca1502942f0ca009db398589c4a243d9e2804c
Signed-off-by: Varun Upadhyay <varun.upadhyay@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85074
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-11-13 03:31:34 +00:00
Rui Zhou
85d8962fdf mb/google/nissa/var/rull: when using pcie wifi7, turn off CNVI BT
When we use PCIE wifi7, CNVI BT and BT offload should be turned off.

BUG=b:378053901
BRANCH=None
TEST=emerge-nissa coreboot chromeos-bootimage

Change-Id: I0adc446220051da59560c9a59d6f334b3a11ac7b
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85044
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Jayvik Desai <jayvik@google.com>
Reviewed-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-11-13 03:27:15 +00:00
Subrata Banik
386b7ee859 soc/intel/alderlake: Use CSE sync in ramstage config
This patch updates the eSOL rendering logic to use the
SOC_INTEL_CSE_LITE_SYNC_IN_RAMSTAGE config option instead of
SOC_INTEL_CSE_LITE_SKU.

The SOC_INTEL_CSE_LITE_SKU config option was incorrectly used to
determine whether to render eSOL during ramstage.

The SOC_INTEL_CSE_LITE_SYNC_IN_RAMSTAGE config option specifically
indicates whether CSE synchronization is performed during ramstage,
making it a more appropriate choice for this purpose.

This change ensures that eSOL is rendered correctly during ramstage on
platforms that require CSE synchronization.

TEST=Able to render eSOL during ramstage for google/trulo.

Change-Id: I0dd335d5653d774bb5a2e6d7b65831bba080f272
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85108
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: Jayvik Desai <jayvik@google.com>
2024-11-13 03:22:20 +00:00
Xiwen Shao
fce6e02a60 soc/mediatek/mt8196: Enable lastbus debug hardware
Lastbus is a bus debug tool. When the bus hangs, the bus transmission
information before resetting will be recorded.

The watchdog cannot clear it and it will be printed out on the serial
console for bus hanging analysis.

TEST=build pass, and check log with:
[INFO ]  ******************* MT8196 lastbus ******************
[INFO ]  --- debug_ctrl_ao_APINFRA_IO_AO 0x10155000 37 ---
[INFO ]  00402504
[INFO ]  c34b00d6
[INFO ]  61804050
[INFO ]  00051840
[INFO ]  10401610

BUG=b:317009620

Signed-off-by: Xiwen Shao <xiwen.shao@mediatek.corp-partner.google.com>
Change-Id: Ib030d88faa2d4d6f6a8501f8c752deeafff92c5c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84928
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-11-13 02:48:15 +00:00
Yidi Lin
35cfefd1a4 mb/google/rauru: Pass reset gpio parameter to BL31
Pass the reset gpio parameter to BL31 to support SoC reset.

BUG=b:334753311
TEST=run reboot command

Change-Id: I4ddecfb8f36a8f721b57ca16e6a861f933b058b4
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84933
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-13 02:48:07 +00:00
Yidi Lin
a7ed63cbc8 mb/google/rauru: Configure TPM
1. Add Google Ti50 TPM support
2. Configure I2C speed to I2C_SPEED_FAST_PLUS
3. Pass GPIO_GSC_AP_INT_ODL to the payload
4. Configure IRQ type to IRQ_TYPE_EDGE_RISING for now

BUG=b:317009620
TEST=build pass, boot ok and there is no CR50 TPM timeout log
Pass log:
[INFO ]  Probing TPM I2C: done! DID_VID 0x504a6666
[DEBUG]  GSC TPM 2.0 (i2c 1:0x50 id 0x504a)

Change-Id: I582f010a9033ccb1771dbb3ccab9f16314628796
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84932
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-11-13 02:48:03 +00:00
Crystal Guo
613c5f9ff2 soc/mediatek/mt8196: Map LPDDR type to mem_chip_type
Implement map_to_lpddr_dram_type to convert MT8196 specific
DRAM_DRAM_TYPE_T values to mem_chip_type.

BUG=b:357743097
TEST=Firmware shows the following log:
LPDDR5 chan0(x16) rank0: density 12288mbits x16, MF 06 rev 0800
LPDDR5 chan0(x16) rank1: density 12288mbits x16, MF 06 rev 0800
LPDDR5 chan1(x16) rank0: density 12288mbits x16, MF 06 rev 0800
LPDDR5 chan1(x16) rank1: density 12288mbits x16, MF 06 rev 0800
LPDDR5 chan2(x16) rank0: density 12288mbits x16, MF 06 rev 0800
LPDDR5 chan2(x16) rank1: density 12288mbits x16, MF 06 rev 0800
LPDDR5 chan3(x16) rank0: density 12288mbits x16, MF 06 rev 0800
LPDDR5 chan3(x16) rank1: density 12288mbits x16, MF 06 rev 0800

Change-Id: I63ce238ff0fbcdde9020a7cf4fee2e29d6decf37
Signed-off-by: Crystal Guo <crystal.guo@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85099
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-13 02:28:00 +00:00
Crystal Guo
4ccfcc11d9 mem_chip_info: Add LPDDR5 enums to mem_chip_type
Add MEM_CHIP_LPDDR5 and MEM_CHIP_LPDDR5X to mem_chip_type enum.

BUG=b:357743097
TEST=build pass

Change-Id: Ic947932bacf9bef53f275685b2616601d0a6823c
Signed-off-by: Crystal Guo <crystal.guo@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85034
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-13 02:27:23 +00:00
Crystal Guo
a356d234f8 soc/mediatek: Obtain LPDDR type from trained memory info
Add lpddr_type to ddr_base_info struct to obtain LPDDR type
from trained memory info.

BUG=b:357743097
TEST=build pass

Change-Id: I73c9014784cc4872826d721f3fab9ed1c5255f31
Signed-off-by: Crystal Guo <crystal.guo@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85033
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-11-13 02:27:13 +00:00
Jarried Lin
b8724cd9a5 soc/mediatek/mt8196: Add dram calibration support
Add support for MT8196 DRAM calibration. DRAM parameters and related
constants are added in dramc_param.h and dramc_soc.h. As MT8196's
dramc_param struct size is different from other MediaTek SoCs,
replace the hardcoded RW_MRC_CACHE size in common code with a constant
derived from chromeos.fmd.

The common emi.c can be reused for MT8196 as well, so remove the
duplicate mt8196/emi.{c,h}.

Enable MEDIATEK_DRAM_BLOB_FAST_INIT to allow running DRAM fast
calibration via the DRAM blob.

Test=Build pass
BUG=b:317009620

Change-Id: Ifeaf73e31b29ef376a28ca2721dba0d4866d6e8b
Signed-off-by: Crystal Guo <crystal.guo@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85098
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-13 02:27:04 +00:00
Jarried Lin
2919a85be8 mb/google/rauru: Enlarge RW_MRC_CACHE from 8K to 16K
Rauru has MT8196 SoC. Following previous MediaTek SoCs, MT8196 will
enable CACHE_MRC_SETTINGS, in order to store the DRAM parameters in the
FMAP section RW_MRC_CACHE. As the size of the MT8196 parameters is
larger (15968 bytes) compared to previous SoCs (7616 bytes), enlarge
RW_MRC_CACHE from 8K to 16K.

TEST=Build pass
BUG=b:317009620

Change-Id: I35aad5a3a82686a68dd66e993355aa32cc19043e
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85094
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-11-13 02:26:54 +00:00
Felix Held
6ab9623f46 drivers/spi/spi_flash_sfdp: use spi_crop_chunk when reading SFDP data
The basic flash parameter table described in JESB216F can be up to 23
DWORDs (92 bytes) long which is larger than the 47 byte SPI data buffer
in the AMD SoCs which also contains the data from the command buffer
except the command byte.

TEST=Calling 'read_sfdp_data' with a data length of 256 bytes which is
larger than the buffer of the AMD SPI host controller now works and
returns the SFDP data expected from the W74M12JW SPI flash:

0x00: 53 46 44 50 06 01 02 ff 00 06 01 10 80 00 00 ff  SFDP............
0x10: 84 00 01 02 d0 00 00 ff 03 00 01 02 f0 00 00 ff  ................
0x20: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
...
0x80: e5 20 f9 ff ff ff ff 07 44 eb 08 6b 08 3b 42 bb  . ......D..k.;B.
0x90: fe ff ff ff ff ff 00 00 ff ff 40 eb 0c 20 0f 52  ..........@.. .R
0xa0: 10 d8 00 00 36 02 a6 00 82 ea 14 c9 e9 63 76 33  ....6........cv3
0xb0: 7a 75 7a 75 f7 bd d5 5c 19 f7 4d ff e9 30 f8 80  zuzu...\..M..0..
0xc0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
0xd0: 00 00 f0 ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
0xe0: ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff  ................
0xf0: 38 9b 96 f0 a5 ad a5 ff ff ff ff ff ff ff ff ff  8...............

Change-Id: Ia602a54566c9e9cffaebc813ee493254d966e9e4
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85059
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
2024-11-12 15:41:22 +00:00
Felix Held
95d8edadcb drivers/spi: add RPMC info to spi_flash struct
Fill 'rpmc_caps' struct inside the 'spi_flash' struct with the RPMC info
from the SFDP table.

TEST=On a board with a W74M12JW SPI flash chip, the 'rpmc_caps' struct
has the expected entries (RPMC available, OP2 extended status as polling
method, 4 RPMC counters, OP1 is 0x9b, and OP2 is 0x96).

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3a8332bffe93e1691f6fc87c3936025f158f3ab9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85009
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2024-11-12 15:41:11 +00:00
Felix Held
8c9e6a1f1d drivers/spi/spi_flash_sfdp: add SFDP support to get RPMC parameters
JESD216F.02 and JESD260 were used as a reference.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I3a1f7a5d16dd3ca6c8263b617ae9c21184b6a5b9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85008
Reviewed-by: Matt DeVillier <matt.devillier@amd.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-12 15:40:38 +00:00
Felix Held
3040e99679 drivers/spi/spi_flash_sfdp: add basic SFDP support
Add basic support for the Serial Flash Discoverable Parameters (SFDP)
standard which can be used to discover the parameters to interact with
any SPI flash chip that supports this mechanism. This commit adds
functionality to find specific SFDP parameter headers and print all SFDP
parameter headers, but not to parse any SFDP parameter table. This is a
preparation for a follow-up patch that adds support to parse the RPMC
SFDP parameter table. Since 'find_sfdp_parameter_header' is only used in
the next patch, it's marked as static inline in this commit so that the
code still build; the 'inline' keyword will be removed again in that
follow-up patch.

For now, only the legacy access protocol using single bit SPI transfers
is supported, but this should cover most of the SPI NOR flash chips. In
any other case, the code will error out. It's also assumed that the SFDP
data blocks read from the SPI flash chip are small enough to fit into
the SPI host controller buffer and don't need to be broken up into
multiple transfers. This limitation will be addressed in a follow-up
patch.

JESD216F.02 was used as a reference.

TEST=On a board with a W74M12JW SPI flash chip, calling
'spi_flash_print_sfdp_headers' prints this on the console output:

Manufacturer: ef
SF: Detected ef 6018 with sector size 0x1000, total 0x1000000
SF: Exiting 4-byte addressing mode
SFDP header found in SPI flash.
major rev 0x1, minor rev 0x6, access protocol 0xff, number of headers 3
SFPD header with index 0:
  table ID 0xff00, major rev 0x1, minor rev 0x6
  table pointer 0x80, table length DWORDS 0x10
SFPD header with index 1:
  table ID 0xff84, major rev 0x1, minor rev 0x0
  table pointer 0xd0, table length DWORDS 0x2
SFPD header with index 2:
  table ID 0xff03, major rev 0x1, minor rev 0x0
  table pointer 0xf0, table length DWORDS 0x2

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I5a1706acf7d60fd64292e8f0677992ab4aebf46a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84786
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martin.roth@amd.corp-partner.google.com>
2024-11-12 15:40:24 +00:00
Yu-Ping Wu
49e6be85cd soc/mediatek/**/spi.h: Enclose complex macros in parentheses
Fix the checkpatch error:

 Macros with complex values should be enclosed in parentheses

Change-Id: Ia0e4582c1dd19ed3f757a2cb3c3fc33138302d74
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85001
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-11-12 05:33:15 +00:00
Subrata Banik
e431f96f80 mb/google/fatcat/var/francka: Override DRAM Freq
Due to the hardware limitation on francka, reduce the memory speed to
7467 MT/s.

BUG=b:373394046
TEST=emerge-fatcat coreboot

Change-Id: I9c45c90952e20fc96943df03f591075338624e88
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85102
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-by: Amanda Hwang <amanda_hwang@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-11-12 04:58:35 +00:00