Commit graph

49,745 commits

Author SHA1 Message Date
Lu Tang
3eb39a1a33 soc/mediatek/common: Fix wrong write API for protect_key_setting
When writing key_protect_setting to PMIC, PMIC expects receiving 1 byte
per write. PMIC would receive unexpected zero byte if using
mt6685_write16. Fix the write operation by using mt6685_write8.

TEST=Build pass.
BUG=b:388666377

Signed-off-by: Lu Tang <lu.tang@mediatek.corp-partner.google.com>
Change-Id: Ib6e79642e813e7a1f0d38243e9c4db5a699cc9e3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86035
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-19 07:59:19 +00:00
Jarried Lin
b9a1e64538 soc/mediatek/common: Fix wrong write API for protect_key_setting
Fix the issue where the DUT cannot power on during S5. When writing
key_protect_setting to PMIC, PMIC expects receiving 1 byte per write.
PMIC would receive unexpected zero byte if using mt6363_write16. Fix the
write operation by using mt6363_write8.

TEST=Build pass, DUT can power on during S5.
BUG=b:388666377

Change-Id: I0a7c0d2fa1f93a55731b4b58923d6f80a4c4be89
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86034
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-01-19 07:59:10 +00:00
Jason-jh Lin
0dbef76544 soc/mediatek/mt8196: Add GCE ddren sel control to mminfra
MMINFRA_GCE_DDREN_SEL is a setting for switching the DRAM transaction
ACK from SPM: 0, non-SPM: 0x1.

In MT8196, SPM has masked all the DDR requests, so this setting should
be set to non-SPM whenever mminfra is powering on. Otherwise, GCE will
hang when accessing DRAM.

BUG=b:379039600
TEST=boot up ok, GCE can access DRAM continuously

Change-Id: I30309b0426f803e28858eb15652a649927f94c7e
Signed-off-by: Jason-jh Lin <jason-jh.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86027
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2025-01-19 07:59:01 +00:00
Jarried Lin
e299b5171a soc/mediatek: Correct value's data type to u8 in dptx
TEST=build pass
BUG=b:343351631

Change-Id: I60bbb2c37811655692a5a8cd9f942fed4ead8abb
Signed-off-by: Bincai Liu <bincai.liu@mediatek.corp-partner.google.com>
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85948
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-01-18 15:10:40 +00:00
Yu-Ping Wu
1ad4474141 soc/mediatek: Introduce mtk_edp_enable() to fix eDP init flow
In the current eDP initialization flow, eDP is configured and enabled
before display data pipe (DDP) initialization. The init flow is wrong,
because eDP should be enabled only after DDP is correctly set up. The
wrong flow may lead to garbage display between enabling eDP and
configuring DDP.

To fix the problem, the dptx_video_enable(true) call needs to be moved
after mtk_ddp_mode_set(). Introduce a new API mtk_edp_enable() for eDP
enablement, to be separated from the existing mtk_edp_init(). The fixed
eDP init flow is: mtk_edp_init -> mtk_ddp_mode_set -> mtk_edp_enable.

Change-Id: Ief847320caca1af1c6deb242dc224e7698a6603c
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86028
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-18 15:10:10 +00:00
Jarried Lin
784e2fc10e mb/google/rauru: Run mtk-fsp in romstage
Run mtk_fsp_romstage.elf (MediaTek firmware support package for
romstage) in romstage to support power switch.

BUG=b:373797027
TEST=build pass, boot ok.
Load and run mtk_fsp with following logs:
[DEBUG]  FMAP: area FW_MAIN_A found @ 402000 (1527552 bytes)
[INFO ]  CBFS: Found 'fallback/mtk_fsp_romstage' @0xfc280 size 0x6bd in
         mcache @0x00122518
[INFO ]  VB2:vb2_digest_init() 1725 bytes, hash algo 2, HW acceleration
         enabled
[INFO ]  _start: MediaTek FSP_ROMSTAGE interface version: 1.0
[INFO ]  mtk_fsp_load_and_run: run fallback/mtk_fsp_romstage at phase
         0x30 done

Change-Id: Id223152e0bda71e99e72b34c91fea8f8841e824b
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86015
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-18 13:11:19 +00:00
Jarried Lin
194d0c45de soc/mediatek/mt8196: Add mtk-fsp loader in romstage
Reserve 64KB memory at 0x02140000 for mtk_fsp_romstage.elf.

BUG=b:373797027
TEST=build pass

Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Change-Id: I73710227e6d9e3f0c717e17db0cc798265eb1f72
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86014
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-18 13:11:09 +00:00
Jarried Lin
69c2d75d52 soc/mediatek/mt8196: Add mtk-fsp loader in ramstage
MediaTek firmware support package (mtk-fsp) contains romstage and
ramstage blobs. Add support for the ramstage blob, which includes:
- UFS mphy settings.
- DPAC (Device Access Permission Control) settings.
- MMinfra (Multimedia Infrastrucutre) settings.
- SMPU (Security Memory Protection Unit) settings.
- Advanced CPU frequency control.

BUG=b:373797027
TEST=build pass, boot ok.
Load and run mtk_fsp with following logs:
[INFO ] CBFS: Found 'fallback/mtk_fsp_ramstage' @0xfca00 size 0x263d in
        mcache @0xfffdd5a0
[DEBUG] read SPI 0x4fea88 0x263d: 773 us, 12663 KB/s, 101.304 Mbps
[INFO ] VB2:vb2_digest_init() 9789 bytes, hash algo 2, HW acceleration
        enabled
[INFO ] _start: MediaTek FSP_RAMSTAGE interface version: 1.0
[INFO ] mtk_fsp_load_and_run: run fallback/mtk_fsp_ramstage at phase
        0x50 done

Change-Id: Ia73d241694ca9a4686bf4b0533c51a663a765c21
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86013
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-18 13:10:56 +00:00
Yu-Ping Wu
b229c120f7 soc/mediatek: Allow specifying multiple EINT base registers
Unlike MT8186/MT8188/MT8192/MT8195, MT8196 has 5 EINT base registers,
each with a different number of EINT bits. In preparation for the
upcoming MT8196 EINT unmasking support, replace the `eint_event_reg`
struct (which has a hardcoded register number) with an array
`eint_event` to specify the EINT base register(s).

BUG=none
TEST=emerge-geralt coreboot
BRANCH=none

Change-Id: I86fd3109c9ff72f33b9fea45587d012b003a34ba
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86033
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-18 13:09:40 +00:00
Agogo Huang
c5f6daba81 soc/mediatek/mt8196: Initialize MCUPM
Load MCUPM firmware and boot up MCUPM in ramstage.

It takes 54 ms to load mcupm.bin.

coreboot logs:
CBFS: Found 'mcupm.bin' @0x37a80 size 0xdbda in mcache @0xfffdd308
mtk_init_mcu: Loaded (and reset) mcupm.bin in 54 msecs (486931 bytes)

TEST=Build pass and we can see the mcupm logs after reset releases.
BUG=b:317009620

Change-Id: I223f245d384f32d54f6170a28b29573638f77296
Signed-off-by: Agogo Huang <agogo.huang@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85888
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-01-18 04:32:13 +00:00
Nicolas Kochlowski
928189fd04 soc/amd/phoenix/pci_irq_routing.c: Populate PCI IRQ routing table
Populate the PCI bridge IRQ routing table for Phoenix from the SMN
registers to replace the stub implementation. The base addresses are
copied from Genoa OpenSIL headers, which also correspond to Phoenix.

TEST=Successful build and boot. There are no longer warnings about not
being able to write PCI IRQ assignments.

Before applying patch:

[NOTE ] get_pci_routing_table stub: returning empty IRQ routing table
[WARN ] Can't write PCI IRQ assignments because 'mainboard_pirq_data' structure does not exist

After applying patch:

[DEBUG] 01.1: group: 0, swizzle: 0, irq: 0
[DEBUG] 01.2: group: 1, swizzle: 0, irq: 0
[DEBUG] 01.4: group: 0, swizzle: 2, irq: 2
[DEBUG] 01.5: group: 3, swizzle: 0, irq: 0
[DEBUG] 01.6: group: 4, swizzle: 0, irq: 0
[DEBUG] 02.5: group: 5, swizzle: 0, irq: 0
[DEBUG] 02.4: group: 0, swizzle: 1, irq: 2
[DEBUG] 01.3: group: 1, swizzle: 1, irq: 2
[DEBUG] 02.1: group: 2, swizzle: 2, irq: 3
[DEBUG] 02.2: group: 1, swizzle: 2, irq: 2
[DEBUG] 02.3: group: 3, swizzle: 2, irq: 1
[DEBUG] 02.6: group: 4, swizzle: 2, irq: 1
[DEBUG] 03.1: group: 2, swizzle: 0, irq: 0
[DEBUG] 03.2: group: 5, swizzle: 0, irq: 1
[DEBUG] 03.3: group: 5, swizzle: 2, irq: 1
[DEBUG] 03.4: group: 5, swizzle: 2, irq: 1
[DEBUG] 04.1: group: 2, swizzle: 2, irq: 1
[DEBUG] 08.1: group: 3, swizzle: 2, irq: 4
[DEBUG] 08.2: group: 4, swizzle: 2, irq: 4
[DEBUG] 08.3: group: 5, swizzle: 2, irq: 4
[DEBUG] PCI_CFG IRQ: Write PCI config space IRQ assignments
[DEBUG] PCI_CFG IRQ: Finished writing PCI config space IRQ assignments

Change-Id: Id014ff3e675831eec42bc46c0a76271341e0e3e4
Signed-off-by: Nicolas Kochlowski <nickkochlowski@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85195
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-17 17:52:54 +00:00
Jeremy Compostella
8f0b0f7f95 cpu/x86/topology: Fix FSP-S crash caused by shared core ID
This resolves a crash issue observed on Meteor Lake and introduced by
commit 70bdd2e1fa ("cpu/x86/topology:
Simplify CPU topology initialization"). This commit simplifies the
code and provides more detailed CPU topology information by
generalizing the use of the Extended Topology Enumeration Leaves
0x1f. As a result, the coreboot APIC core_id field does not provide
the fully detailed path information.

It turns out that the topology core identifier is used by the coreboot
MP service mp_get_processor_info() implementation. But the MP Service
EFI_CPU_PHYSICAL_LOCATION data structure only captures information
about the package, core, and thread. The core identifier returned to
the MP service caller must incorporate the full hierarchical path (die
group, die, module, tile, module and core).

This commit adds a new field to the cpu topology structure to
represent the core ID within the package.

For reference, here is that signature of the crash:

   LAPIC 0x40 in X2APIC mode.
   CPU Index 2 - APIC 64 Unexpected Exception:13 @ 10:69f3d1e4 - Halting
   Code: 0 eflags: 00010046 cr2: 00000000
   eax: 00000001 ebx: 69f313e8 ecx: 0000004e edx: 00000000
   edi: 69f38018 esi: 00000029 ebp: 69aeee0c esp: 69aeedc0
   [...]

The crash occurred when FSP attempted to lock the Protected
Processor Inventory Number Enable Control MSR (IA32_PPIN_CTL
0x4e).

   69f3d1d3:	8b 43 f4             	mov    -0xc(%ebx),%eax
   69f3d1d6:	89 4d c4             	mov    %ecx,-0x3c(%ebp)
   69f3d1d9:	89 45 dc             	mov    %eax,-0x24(%ebp)
   69f3d1dc:	8b 55 c4             	mov    -0x3c(%ebp),%edx
   69f3d1df:	8b 45 c0             	mov    -0x40(%ebp),%eax
   69f3d1e2:	8b 4d dc             	mov    -0x24(%ebp),%ecx
   69f3d1e5:	0f 30                	wrmsr
   69f3d1e7:	e9 ee fd ff ff       	jmp    0xfffffe39

FSP experiences issues due to attempting to lock the same register
multiple times for a single core. This is caused by an inconsistency
in the processor information data structure, where multiple cores
share the same identifier. This is not permitted and triggers a
General Protection Fault Exception.

TEST=Executing CpuFeaturesPei.efi in FSP-S does not crash on a rex
     board.

Change-Id: I06db580cddaeaf5c452fa72f131d37d10dbc5974
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86004
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-by: Cliff Huang <cliff.huang@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Zhixing Ma <zhixing.ma@intel.com>
2025-01-17 16:50:31 +00:00
Jayvik Desai
759dd5379e ec/google/chromeec: Add debug timestamp for host EC commands
Improve host EC command debugging with timestamps and duration for
better analysis, this feature can be enabled by selecting the config
EC_GOOGLE_CHROMEEC_HOST_CMD_DEBUG.

BUG=none
TEST=Brox/lotso device successfully built and booted. Debug messages
confirmed in device logs only when the specific configuration is
selected. Sample print: "EC HOST CMD Duration: 661 us, Command: 0x4b,
version: 0x0"

Change-Id: I8ab89830ede940d2237ad21187b137dca9689fb0
Signed-off-by: Jayvik Desai <jayvik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85326
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2025-01-17 07:54:14 +00:00
Jayvik Desai
b64baff331 mb/google/fatcat: Select DRIVER_INTEL_ISH_HAS_MAIN_FW for fatcat
This patch selects the ISH main firmware Kconfig to prevent
google/fatcat from trying to retrieve a dummy ISH SHIM firmware version,
since ISH FW in google/fatcat will be part of the kernel firmware image.

BUG=b:370984186
TEST=Build and boot google/fatcat, config exists in coreboot.config

Change-Id: Id24394cb6c6dbaed13c87612da341e47eb69895f
Signed-off-by: Jayvik Desai <jayvik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85920
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-17 07:54:00 +00:00
Ian Feng
13a808749f mb/google/fatcat/var/francka: Fix incorrect memory ram_id
Fix ram_id index is always "0".

Memory configuration board straps:
 GPIO_MEM_CONFIG_0	GPP_D08
 GPIO_MEM_CONFIG_1	GPP_D07

BUG=b:372395010, b:381992696
TEST=emerge-fatcat coreboot

Change-Id: I24ba06bc8d61ac5bd372ff4611d3ea876ac9bb92
Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86011
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>
2025-01-17 06:59:58 +00:00
Elyes Haouas
28b4905132 tree: Use boolean for docking_supported
Change-Id: I25f09457edf4cfb9bec6939de3e56c2ea7965801
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86022
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2025-01-16 23:16:25 +00:00
Elyes Haouas
6457a1b1b8 tree: Use boolean for usb_phy_custom
Change-Id: I96decb66d632be874e517ffe1c842cd6124529b1
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86021
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2025-01-16 23:16:11 +00:00
Elyes Haouas
70d1f1a2d6 tree: Use boolean for deep_s{3,5}_enable_{ac,dc}
Change-Id: I1621e98e7925b140c608f893a6680c9384bac2f0
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86020
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2025-01-16 23:16:03 +00:00
Sean Rhodes
17942b7895 mb/starlabs/starbook: Add Meteor Lake (165H) variant
Tested using `edk2` from
`https://github.com/starlabsltd/edk2/tree/uefipayload_vs`:
* Ubuntu 24.04
* Manjaro 24

No known issues.

https://starlabs.systems/pages/starbook-specification

Change-Id: I6621585086c58d19574841314796ed9db779036e
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85715
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-16 16:13:09 +00:00
Sean Rhodes
187ec7986d acpi: Guard CBMEM driver against Chrome devices
Commit ce10b6f821 unhid the BOOT0000
device from Windows. It requires a driver that's available from Coolstars EC bundle.

Guard this against the ChromeEC, so that non-Chromebooks don't get an
error device in Device Manager.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I6645c1be7d602a2775f703f5cf56e4c9d6f3bb76
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81029
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-16 16:12:19 +00:00
Sean Rhodes
d503ce1277 drivers/crb: Return an accurate status
Rather than unconditionally returning that the device is present,
return whether the fTPM is on or not.

Test=Boot the StarLite Mk V with the Intel ME disabled, and check
that the TPM is reported as not present.

Change-Id: If8236021bf0e1264646971cff9c998fac99ac220
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85228
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-16 16:12:12 +00:00
Sean Rhodes
c1432f4085 soc/intel/common/cnvi: Fix path for CFLR method
The CLFR method exists outside the CNVi device, so add `^` to allow
it to be found. This fixes the SSDT and allows the method to be used.

TEST=build/boot starlabs/starlite_adl

Change-Id: I1158cf1ccf50d9095fdab8d2d663041ef1985513
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85885
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-16 16:12:07 +00:00
Sean Rhodes
98f2f488eb mb/starlabs/starbook: Add Alder Lake-N (N200) variant
Tested using `edk2` from
`https://github.com/starlabsltd/edk2/tree/uefipayload_vs`:
* Ubuntu 24.04
* Manjaro 24

No known issues.

https://starlabs.systems/pages/starbook-specification

Change-Id: Id45e31b61046748a57c8104081f689057621bb04
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85714
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-16 16:12:02 +00:00
Kenneth Chan
4ba0dec657 mb/google/rex/var/kanix: Update CPU power limit
Update PL1/PL2/PL4 settings for kanix thermal design
PL1_min = 12W
PL1_max = 18W
PL2 = 40W
PL4 = 84W

BUG=b:389726952
BRANCH=firmware-rex-15709.B
TEST=build success and thermal team's confirm

Change-Id: Ie5377d92792b20c33c2628009863c11f5d4bc096
Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85998
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-16 13:28:56 +00:00
Ivy Jian
fe91b0c83a mb/google/nissa/var/dirks: Add GPIO table
Refer to the reference board of nivviks, and update GPIO settings
based on latest schematic (0W4_TWL_A_MB_0113.pdf).

BUG=b:388117663
TEST=none.

Change-Id: I5e3bc60a1c749b65c542a74eb6167e921ef369f2
Signed-off-by: Ivy Jian <ivy.jian@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85975
Reviewed-by: Jayvik Desai <jayvik@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
2025-01-16 13:28:22 +00:00
Kun Liu
5ba8d70f0f mb/google/nissa/var/telith: Update 6W and 15W DPTF parameters
The DPTF parameters were defined by the thermal team.
Based on thermal table in 377955793#comment20

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

Change-Id: I0455d62a9f174fd911e5aa0b9626329ad2ac8f06
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/86000
Reviewed-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jayvik Desai <jayvik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2025-01-16 12:48:47 +00:00
Subrata Banik
f3f72bd198 mb/google/fatcat/var/fatcat: Workaround for codec enable with FPS
There is an issue where the codec enable signal is not working correctly
when FPS (Fingerprint Sensor) is enabled. This commit applies a
temporary workaround by using a dedicated GPIO pin for codec enable.

This allows the codec to function properly even when FPS is enabled,
preventing audio issues. A proper fix in hardware schematics will be
implemented in a future update.

BUG=b:390031369
TEST=Verified audio playback works with FPS being enabled.

Change-Id: I9883036b5e964cb55bd34c36398a501f69a8ecaa
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85992
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
2025-01-16 03:11:19 +00:00
Subrata Banik
11eeeb5e2a mb/google/fatcat: Remove chromeos-debug-fsp.fmd
The file chromeos-debug-fsp.fmd is no longer needed, as the FMD
configuration is now handled by the generic Chrome OS FMD file.

This change removes the file to simplify the build process and
reduce the amount of code that needs to be maintained.

Change-Id: Ida430d415ae3f7dc93b89eb4d7c7ba59ed280e1b
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85971
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-16 03:11:11 +00:00
Julius Werner
cd912cf4a1 commonlib/device_tree: Skip dt_read_cell_props() when not needed
dt_find_node() calls dt_read_cell_props() for every node it walks, but
this is only actually necessary when the caller is interested in the
`#address-cells` and `#size-cells` values and passed out-parameters to
receive them. Most callers don't actually do that, and we scan through
all properties needlessly on every node. This patch adds a fast path to
skip that.

Change-Id: I114f824a7d88b0bac4a96aca3f7dced459503b02
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85989
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-01-15 20:31:27 +00:00
Julius Werner
5266191670 commonlib/device_tree: Initialize cells to default values on find()
This patch wraps `dt_find_node()` in a function that initializes the
addr_cells and size_cells values to the defaults provided in the FDT
specification before potentially updating them from found values, so
that we always return the correct result and remove the burden of
correctly initializing them from the caller.

Change-Id: I39ba2c82d3a0d0b39a2ed5eba2420a04fbccb2f7
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85988
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-01-15 20:31:15 +00:00
Julius Werner
46eae436c0 commonlib/device_tree: Return cells properties of parent node
In Flattened Device Trees, there exist special properties called
`#address-cells` and `#size-cells` that determine how large addresses
and sizes in `reg` properties are. According to the FDT specification,
each `reg` node cares about the `...cells` property in the _parent_ of
its node. Our current implementation looks for those properties in the
node it finds and returns, which would presumably be the node with the
`reg` property itself. Therefore, we're returning the wrong `...cells`
values.

This isn't really a problem in practice because we also allow inheriting
these properties from the parent when they don't exist in the child, and
nodes that contain `reg` properties usually don't contain `...cells`
properties themselves (because those properties would be incorrect and
useless there), so we usually just end up falling back to the (correct)
value we inherited from the parent. But it's still better to just fix
the mistake, and if we ever happen to have a situation where the node
containing the `reg` property still has children that require different
`...cells` values as well, it could make a difference. (The fact that
we're inheriting these properties is also technically incorrect
according to the spec, but we're doing that intentionally to match
behavior in the Linux kernel.)

This issue was already correctly implemented in the recently added
fdt_find_node() from commit 33079b8174 ("lib/device_tree: Add some FDT
helper functions"), and this patch also fixes it in the older
dt_find_node().

Change-Id: I323066477a4d4be17225e0915a81ce2ff39c1e40
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85964
Reviewed-by: Doug Anderson <dianders@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
2025-01-15 20:31:08 +00:00
Yidi Lin
a81e09612b soc/mediatek/mt8196: Initialize PMIF for SD Card
mt6373_init_pmif_arb() needs to be initialized for SD card to control
the regulator.

TEST=emrege-rauru coreboot
TEST=The assertion is gone on Rauru during normal boot.

Change-Id: I7e3265bb62a6c78d44e2c756be9a020a49a03056
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85969
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 10:58:31 +00:00
Yidi Lin
f51c279d7c soc/mediatek: Rename is_pmif_init_done to check_init_done
TEST=emerge-geralt coreboot && emerge-rauru coreboot

Change-Id: Ib4b9a7969f5af6e001c5b491ec09a43e1289a6ae
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85968
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-01-15 10:58:23 +00:00
Yidi Lin
cb4c52d620 soc/mediatek: Skip duplicate pmif_arb->is_pmif_init_done() call
Return to the caller immediately if pmif_arb has been initiailized. In
this way, we can skip unnecessary check and reduce the access to the
PMIF register.

TEST=emerge-geralt coreboot && emerge-rauru coreboot

Change-Id: Id1d11f8b238855edb393d77151159792e7716d22
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85967
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2025-01-15 10:58:17 +00:00
Sean Rhodes
71c8a5663b mb/starlabs/*: Unset ADD_ITE_BINARY
This has always been set in downstream defconfig's; remove it here
to avoid build issues with Jenkin's being unable to find a suitable
EC binary.

Change-Id: I02a10211d7cec9a2c8a0837f77ca17acdcb06c22
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85973
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-15 10:37:27 +00:00
Sean Rhodes
6fedf20bd4 mb/starlabs/starlite: Add smart battery variant
Add Kconfig options for `_SB`, the smart battery variant which
is identical apart from a different EC which supports a Smart
Battery instead of the CW2015.

Change-Id: I1e04ea26ef597ce542a7348982d056fb55de0d22
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85701
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-15 10:37:19 +00:00
Sean Rhodes
ade4be0ed2 mb/starlabs/starlite_adl: Organise the Kconfig options
The selected options were a bit illogical, so but them all under
the common board Kconfig, alphabetise and dedpulicate them.

Change-Id: I277249323e8735dda0a6e394e475435ddedf5537
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85972
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 10:37:12 +00:00
Sean Rhodes
9ed0beccd8 mb/starlabs/lite: Put options in CFR cbtable
Change-Id: I42ae5b35e6b53b5a13ec3f80180f4955db9b6ce2
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/76583
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-15 10:37:01 +00:00
Sean Rhodes
3370e41bb2 mb/starlabs/starlite_adl: Put options in CFR cbtable
Change-Id: If92f61dece7e67bfd2e29927198c9ebb81c4d363
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85711
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-15 10:36:53 +00:00
Sean Rhodes
02f31d080c mb/starlabs/byte_adl: Put options in CFR cbtable
Change-Id: I11349397e41fb2c7a3f26ab172a2c4b30d24bc0a
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85710
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 10:36:46 +00:00
Sean Rhodes
d0ce8d8146 mb/starlabs/starfighter: Put options in CFR cbtable
Change-Id: I3e3b5448282aa81a89356f1d3145381d65e47aaa
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85709
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 10:36:40 +00:00
Sean Rhodes
121bc2a370 mb/starlabs/starbook: Put options in CFR cbtable
Change-Id: I816893e5c2663ed55ae9fa5dd662489b27332aa6
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/74743
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-15 10:36:34 +00:00
Sean Rhodes
65278f5cae ec/starlabs/merlin: Only include battery ACPI for systems with a battery
Change-Id: I381714887f4319d8e1a25c1e493ba03631cbf082
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85716
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2025-01-15 10:36:21 +00:00
Sean Rhodes
43ac56bf43 ec/starlabs/merlin: Move common variants to respective files
Move the Q-Events used by the merlin EC to their respective
files, i.e. `Q0B` for Battery Status Update to battery.asl.

This means that only revelant events will be included.

Change-Id: Ib41fbafd79b999409a520361a4d372902d878794
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85945
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 10:36:16 +00:00
Ariel Otilibili
a9d4c40ba5 samsung/exynos5250: Replace 'unsigned long int' by 'unsigned long'
As suggested by the linter:

Prefer 'unsigned long' over 'unsigned long int' as the int is unnecessary

Link: https://qa.coreboot.org/job/coreboot-untested-files/lastSuccessfulBuild/artifact/lint.txt
Change-Id: I7eddb0934ccd24c9994a60d7058a1e518c6c9c9f
Signed-off-by: Ariel Otilibili <otilibil@eurecom.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85785
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 08:32:16 +00:00
Subrata Banik
f2201e20de mb/google/fatcat/var/fatcat: Refactor GPIO programming for UFS support
Refactor GPIO programming to support UFS storage on the fatcat
platform.

- Add pad configurations for UFS in `fw_config.c`.
- Update `fw_config_configure_pre_mem_gpio()` and
  `fw_config_gpio_padbased_override()` to include UFS support.
- Remove redundant UFS pad configuration from `gpio.c`.

TEST=Able to build and boot from UFS device on google/fatcat.

Change-Id: I09331d75501977d89592d1a70d5b0dca271f8747
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85958
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2025-01-15 03:48:05 +00:00
Subrata Banik
b885fd8d8d mb/google/fatcat/var/fatcat: Drop UFC/WFC GPIO programming
Skip UFC/WFC GPIO programming for power-on and clock configuration.

Clock configuration is now handled by native-function in ramstage,
and there is no need to power-on the camera module early in the boot
phase. Doing so resulted in the privacy LED being turned on during the
entire boot process, which is unnecessary.

BUG=b:381044394
TEST=No privacy LED blinking seen while booting google/fatcat.

Change-Id: Iae984a2ab6f797af450166c90f4a2c6d3e0e1caa
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85955
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 03:47:56 +00:00
Subrata Banik
c4c237ed78 mb/google/fatcat/var/fatcat: Configure _DSC for camera devices
Configure _DSC to ACPI_DEVICE_SLEEP_D3_COLD for camera devices to
prevent them from being probed during kernel boot.

This prevents the privacy LED from blinking unnecessarily.

Also includes minor code comment changes for clarity:

- Replace "560000000" with "560 * MHz" for readability.
- Explain `clknum` value `0` as `IMGCLKOUT_0` and `1` as `IMGCLKOUT_1`.
- Introduce FW_CONFIG (UFC/WFC) for probing IPU0.

BUG=b:381044394
TEST=No privacy LED blinking seen while rebooting google/fatcat.

Change-Id: I4712b751015d86d40dfd4d7da8cba956c435eef5
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85954
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 03:47:48 +00:00
Subrata Banik
26e9ade8f9 mb/google/fatcat/var/fatcat: Add new GFX devices with custom _PLD
Add new GFX devices for DDI and TCP with custom _PLD to describe the
corresponding ports.

TEST=Able to verify display using all the display end-point device.

Change-Id: I32f74411aa80279d63c3b12087ffc47b33fcc039
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85953
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-15 03:47:42 +00:00
Jeremy Compostella
140815c893 device/pci_ids: Add Intel Panther Lake device IDs for Bluetooth CNVi
This commit introduces the missing PCI device IDs for Panther Lake
CNVi Bluetooth devices. These IDs are listed in document #815002 -
Panther Lake U/H Processor - External Design Specification Volume 1.

TEST=The CNVB device is now present in the ACPI SSDT table when the
     cnvi_bluetooth device is enabled.

Change-Id: I45b42b0694d530763d4cd321aefc64141d088e2b
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85959
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-by: Jamie Ryu <jamie.m.ryu@intel.com>
Reviewed-by: Cliff Huang <cliff.huang@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2025-01-14 18:36:30 +00:00