Commit graph

49,567 commits

Author SHA1 Message Date
Subrata Banik
5ef70e5f22 ec/google/chromeec: Add API to check if battery is critically low
This patch adds a new API `google_chromeec_is_below_critical_threshold()
` to check if the battery level is below the critical threshold.

The API uses the existing `ec_cmd_battery_get_dynamic()` command to
retrieve the battery flags and checks the `EC_BATT_FLAG_LEVEL_CRITICAL`
flag to determine if the battery level is critical.

This API can be used by other components to query the battery critical
status and take necessary actions, for example, while the system is
booting with low battery fuel with and/or without an AC
charger attached.

This addresses the need to implement a low battery charger icon and
detect when the system is booting with low battery fuel. The existing
`google_chromeec_is_battery_present_and_above_critical_threshold()`
API is not suitable for this purpose because any negative decision
(like battery not present and/or battery is critically low) implemented
around this existing API will also render the lower battery indicator
when the system is booting into battery cut-off mode. Ideally, we do not
wish to render any icon and simply allow boot to the OS during system
battery cut-off boot.

BUG=b:377798581
TEST=Able to read the battery status correctly while booting
google/fatcat.

Change-Id: Id1fc1df374fb4c663becc371c69b285d8b9957ff
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85759
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2024-12-30 04:09:12 +00:00
Subrata Banik
42fd35b486 ec/google/chromeec: Add API to check if charger is present
This patch introduces a new API, `google_chromeec_is_charger_present()`,
to determine if a charger is connected.

The API leverages the existing `ec_cmd_battery_get_dynamic()` command
to retrieve battery flags and checks the `EC_BATT_FLAG_AC_PRESENT`
flag to ascertain charger presence.

Other components can leverage this API to query the charger status,
which is particularly useful for distinguishing between barrel chargers
and USB-C chargers after relying on the
`google_chromeec_is_usb_pd_attached()` API.

BUG=b:377798581
TEST=Able to read the charger status (w/ barrel and/or w/ USB-PD)
correctly while booting google/fatcat.

Change-Id: Iadf81400f71a51c093f71fe995cacc107c50c7af
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85758
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-30 04:09:03 +00:00
Subrata Banik
56370d0283 ec/google/chromeec: Add API to check if a USB PD charger is attached
This change introduces a new API, `google_chromeec_is_usb_pd_attached()`
which checks the current status of the USB-C port and returns whether a
USB Power Delivery (PD) charger is currently connected.

This API is useful for determining if the system is currently being
powered by a PD charger.

BUG=b:377798581
TEST=Able to read the PD status correctly while booting google/fatcat.

Change-Id: I47c934ee8a7563d4ba5124bff5613e61dd66e923
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85743
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jérémy Compostella <jeremy.compostella@intel.com>
2024-12-30 04:08:56 +00:00
Lu Tang
001e7a0b45 soc/mediatek/mt8196: Add MT6685 Clock IC driver
Add MT6685 initial settings and ADC init settings to support Thermal
Information Acquisition (TIA). TIA will read thermal info in HW.

TEST=Build pass
BUG=b:317009620

Change-Id: I26ae4f416202f04a8030259c49e009b19a60712e
Signed-off-by: Hope Wang <hope.wang@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85734
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-12-29 01:38:41 +00:00
Sean Rhodes
5852841ca7 soc/intel/meteorlake: Use ASPM helpers from Alder Lake
Use the helper functions added to Alder Lake which will configure
ASPM and L1 Subsstate control based on Kconfig, but retain the
capability to override the specific levels from devicetree.

Change-Id: Ia5cc11188b245a93c303117589bd9d3c18c2877e
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83678
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-27 19:20:57 +00:00
Kenneth Chan
b04f057efd mb/google/rex/var/kanix: Add Synaptics touchpad
BUG=None
BRANCH=firmware-rex-15709.B
TEST=1. emerge-rex coreboot
     2. check touchpad function is working properly.

Change-Id: I89b9e24f98c1e7af571507283469411fd389431a
Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85776
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Tyler Wang <tyler.wang@quanta.corp-partner.google.com>
2024-12-27 02:46:11 +00:00
Lean Sheng Tan
af0c2e7a2e mb/prodrive/atlas: Remove the workaround for CLKREQ pins
As Intel has provided fixes regarding CLKREQ pins issue with new
UPD settings as described in commit b8abde7a8e
("soc/intel/alderlake: Disable PCIe clock gating"), remove this
WA as introduced by this commit 586b1c8da0
("mb/prodrive/atlas: Add workaround for CLKREQ pins").

Signed-off-by: Lean Sheng Tan <sheng.tan@9elements.com>
Change-Id: Icbab617428551accda66499b7c2a32b2fa8c1689
Reviewed-on: https://review.coreboot.org/c/coreboot/+/79021
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-26 21:28:08 +00:00
Pranava Y N
13316c644b mb/google/fatcat/var/fatcat: Modify interrupt GPIO for LPSS I2C touchpad
Change the interrupt GPIO for LPSS I2C based touchpad from GPP_F18
to GPP_A13 to match the current fatcat configuration.

BUG=b:376019577
TEST=Able to verify the touchpad functionality using 'THAT' touchpad
module.

Change-Id: I37a9d3aae67883f9eb4f47d76b4f48ac6ebb6d16
Signed-off-by: Pranava Y N <pranavayn@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85754
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-12-26 13:10:44 +00:00
Yidi Lin
825e9173b4 soc/mediatek: Distinguish pmic_init_setting function name
Rename pmic_init_setting to ${PMIC model}_init_setting accordingly.

Change-Id: Id591bf3089aaa2148d34c77d021c17403494a776
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85764
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-12-26 12:29:11 +00:00
Patrick Rudolph
d65ff8492c soc/intel/xeon_sp/spr/acpi: Fix regression
Fix regression introduced in commit 177bb5e9b9
("soc/intel/xeon_sp: Revise IIO domain ACPI name encoding").

Ensure domain ACPI names in the DSDT are in sync with SSDT ACPI names.
Fixes PCI devices not discovered on socket 1-3.

TEST: Booted in ibm/sbp1 and found all PCI devices working, no errors
      in dmesg are shown.

Change-Id: Ice168bdebc46dc0cfb9c63c78c46a5d9ff2b7658
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85562
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Shuo Liu <shuo.liu@intel.com>
2024-12-26 10:45:33 +00:00
Yang Wu
291778a1bd mb/google/corsola: Add new board variant Wyrdeer
Add a new Staryu follower device 'Wyrdeer'. And add MIPI panel support.

BUG=b:379810871
TEST=emerge-staryu coreboot chromeos-bootimage and check FW screen
BRANCH=corsola

Change-Id: I07b73c97d8d51b32f557e31d834ffc6cfb8420ed
Signed-off-by: Yang Wu <wuyang5@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85742
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-12-25 21:31:28 +00:00
Yang Wu
745dcc861d mb/google/corsola: Refactor mipi_panel_power_on function
Refactor mipi_panel_power_on function in panel-starmie.c to reduce
code duplication.

BUG=b:379810871
TEST=emerge-staryu coreboot chromeos-bootimage and check FW screen
BRANCH=corsola

Change-Id: Ic0561e57d99ab55e6dcbb7744b2228c4cebb0d88
Signed-off-by: Yang Wu <wuyang5@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85745
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-12-25 21:31:21 +00:00
Kun Liu
79f60c6b22 mb/google/nissa/var/telith: Disable stylus function
Disable stylus function based on hardware schematic diagram.Because the external environment is floating, EE requires setting GPIO output to be pulled high or low.

BUG=b:372506691
TEST=Local build successfully.

Change-Id: I7b72284ab173633405d5de9541f0ea7520d09658
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85738
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-12-25 14:17:05 +00:00
Hope Wang
3cb7db4075 soc/mediatek/mt8196: Add PMIC MT6316 driver
Add MT6316 driver in SoC folder.

TEST=Build pass
BUG=b:317009620

Change-Id: I39e91d64e77cff03281845dfbea565e6ddf748f6
Signed-off-by: Hope Wang <hope.wang@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85630
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-by: Yidi Lin <yidilin@google.com>
2024-12-25 08:06:07 +00:00
Yang Wu
60bce10750 drivers/mipi: Add support for KD_KD110N11_51IE panel
Add K&D panel KD_KD110N11_51IE serializable data to CBFS.
Datasheet: KD110N11-51IE-A008_SPEC_A00_20241219.pdf

BUG=b:379810871
TEST=build and check the CBFS include the panel
BRANCH=None

Change-Id: Iecf7957185afd1c62f768d163bba69ed373b7f92
Signed-off-by: Yang Wu <wuyang5@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85741
Reviewed-by: Xinxiong Xu <xuxinxiong@huaqin.corp-partner.google.com>
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-12-24 14:05:24 +00:00
Ke Zheng
d4c80054a4 soc/mediatek/mt8189: Enable timer compensation v2.5
Enable timer compensation v2.5 for MT8189 systimer.

BUG=b:379008996
BRANCH=none
TEST=Check SYSTIMER_BASE register is configurated correctly.

Change-Id: I28c051c2e51481464f5dacb4c93f41e4f7e62501
Signed-off-by: Ke Zheng <ot_ke.zheng@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85689
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-12-24 11:22:38 +00:00
Yu-Ping Wu
403846f177 soc/mediatek/mt8196: Define MFGPLL_*_BASE using MFGSYS_BASE
The MFGPLL_*_BASE addresses are based on MFGSYS_BASE (0x40000000)
instead of IO_PHYS (0x10000000). Rewrite the address calculation for
readability.

Also rename these macros to MFG_PLL_* to make them consistent with other
macros to be added in CB:85654.

Change-Id: Ifd5d77b95c698cb6030c58ba259f2cdf2a29d87b
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85740
Reviewed-by: Yidi Lin <yidilin@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-24 11:22:17 +00:00
Jarried Lin
b3edaa7b10 mb/google/rauru: Implement SKU ID
Retrieve the SKU ID for Rauru via CBI interface. If that failed
(or no data found), fall back to ADC channels for SKU ID.

TEST=Build pass, boot ok, log show:
SKU Code: 0x2
BUG=b:317009620

Change-Id: I49ba6f428f55d3aae1b84a4d5ce06bec765caece
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85666
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-12-24 11:18:33 +00:00
Jarried Lin
b470b48718 mb/google/rauru: Add support for getting storage id
We add storage_id() to read the storage id from auxadc.

BUG=b:317009620
TEST=Build pass

Change-Id: I036df324cd6644ff69110c6247af29360b83225f
Signed-off-by: Jarried Lin <jarried.lin@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85717
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-24 11:18:01 +00:00
Luca Lai
24a5048948 mb/google/nissa/var/pujjo: Add new supported memory part
Add pujjo new supported memory parts in mem_parts_used.txt.
Generate SPD id for this part.

Hynix H58G56CK8BX146

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

Change-Id: Idb48e849424aac79ef9af29f21b84194455c813e
Signed-off-by: Luca Lai <luca.lai@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85735
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
2024-12-24 07:11:25 +00:00
Rui Zhou
c6e27c5fbf mb/google/nissa/var/rull: Add G2 touchscreen to devicetree
Add G2 touchscreen override devicetree.

BUG=b:384871815
BRANCH=None
TEST=1. emerge-nissa coreboot chromeos-bootimage
     2. touchpanel function is normal and 'evtest' command displays the
        touch point

Change-Id: I0d68b8d09f2fd280dea17a0542243b88618b5fa1
Signed-off-by: Rui Zhou <zhourui@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85656
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
2024-12-24 07:09:01 +00:00
Subrata Banik
639def1d84 mb/google/fatcat/var/fatcat: Enable FPS
Lists of changes:
- GPIO programmimg when FW_CONFIG bit 17 is set

FPMCU_PWREN -> GPP_E19 -> OUTPUT
SOC_INT_L   -> GPP_D1 -> INPUT
FPMCU_FW_UPDATE -> GPP_E20 -> NF1
FPS_RST_N -> GPP_C15 -> OUTPUT
GPP_F16_GSPI0A_CLK -> GPP_F16 -> SPI CLK -> NF8
GPP_F15_GSPI0A_MISO -> GPP_F15 -> SPI MISO -> NF8
GPP_F14_GPSI0A_MOSI -> GPP_F14 -> SPI MOSI -> NF8
GPP_F18_GSPI0A_CS0 -> GPP_F18 -> SPI CS -> NF8

- GPIO programmimg when FW_CONFIG bit 17 is not set

GPP_E19 -> NC
MOD_TCSS1_TYP_A_VBUS_EN -> GPP_D1 -> OUTPUT
GPP_E20 -> NC
GPP_C15 -> NC
GPP_F16 -> NC
GPP_F15 -> NC
GPP_F14 -> NC
GPP_F18 -> NC

- ACPI Entry
- Keep ISH (0x12.0) enable for GSPI0A to be operational
- Keep GSPI0/1 disable and GSPI0A enable (PCI)

BUG=b:377595986
TEST=TBD

Change-Id: Ifced5c779407b4ffcc69a7ed1297704def09b554
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85687
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
2024-12-24 07:08:31 +00:00
Jeremy Compostella
acb8c870b2 mb/google/fatcat: Suppress unnecessary extra space in device trees
Change-Id: I546e704fa1c525406edede24cf0b4485276b878e
Signed-off-by: Jeremy Compostella <jeremy.compostella@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85661
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-12-23 17:32:52 +00:00
Kun Liu
d79ba5565d mb/google/nissa/var/telith: Modify PLD for typeC and typeA
Modify PLD according to the actual positions of typeC and typeA on the DUT.

+----------------+
| |
| Screen |
| |
+----------------+
C0 | |
A0 | |
C1 | |
+----------------+

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

Change-Id: Ifc5cd7c8e61b20632d2dcf4b7b2d506c42162063
Signed-off-by: Kun Liu <liukun11@huaqin.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85618
Reviewed-by: Rui Zhou <zhourui@huaqin.corp-partner.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-12-23 08:35:22 +00:00
Vince Liu
620d2fab06 soc/mediatek/mt8189: Replace SPDX identifiers to GPL-2.0-only OR MIT
These files were originally from MediaTek and follow coreboot's main
license: "GPL-2.0-only". Now MediaTek replaces this file to
"GPL-2.0-only OR MIT" license for better code re-use in other open
source software stack.

BUG=b:379008996
BRANCH=none
TEST=build pass

Change-Id: I2821a8c097b8d22e1aa91b316ae0fdce80f342de
Signed-off-by: Vince Liu <vince-wl.liu@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85723
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-12-23 07:37:18 +00:00
Dinesh Gehlot
d90b1322ab commonlib: Refactor CSE sync eventLog
This patch enhances the readability of the CSE sync event
ELOG_TYPE_FW_CSE_SYNC by updating the event naming from "early and late
bootstage" to "pre and post memory."

BUG=b:379585294
TEST=boot verified on google/rex0 and google/rex64
without change:
```
rex-rev3 ~ # elogtool list
rex64-rev3 ~ # /media/usb/elogtool list
3 | 2024-01-01 22:25:59-0800 | Firmware CSE sync | Late CSE Sync
```
with change:
```
rex64-rev3 ~ # elogtool list
3 | 2024-12-17 02:22:36-0800 | Firmware CSE sync | Post RAM CSE Sync
```

Change-Id: Ia5db3ffb43b2ceac821de72ef9e88ed62e617d41
Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85622
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-12-23 01:57:13 +00:00
Jayvik Desai
4ef6c13b38 mb/google/brya: Adjust EC memory map range to support indexed IO
Adjust the EC memory map range for indexed IO access in trulo variant
from 0x900 to 0x380

BUG=b:379224648
TEST= able to build nissa/trulo.

Change-Id: Ide5026b35da7c00deab4464eedfca9d52d294fd6
Signed-off-by: Jayvik Desai <jayvik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85547
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-23 01:56:48 +00:00
Jayvik Desai
1e90bbadfa ec/google/chromeec: Add indexed IO support
Add support for indexed IO for ec communication, Indexed I/O allows
memory access using a single I/O port base address usually called an
index register and another port address called a data register.

BUG=b:379224648
TEST= able to build nissa/trulo.

Change-Id: I6c1aab3fc914eb5af2736a8ea3adf447040905e0
Signed-off-by: Jayvik Desai <jayvik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85449
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-12-23 01:56:32 +00:00
Shon Wang
a8ab708584 mb/google/nissa/var/quandiso2: Create a quandiso2 variant
This patch creates a new quandiso2 variant which is a Twin Lake
platform. This variant uses Quandiso board mounted with the Twin Lake
SOC and hence the plan is to reuse the existing quandiso code.

BRANCH=firmware-nissa-15217.B
TEST=build, and boot into OS

Change-Id: I404b579f1758c637d3456f6bed7119e3f4ecc06c
Signed-off-by: Shon Wang <shon.wang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85570
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: Paul Menzel <paulepanter@mailbox.org>
2024-12-23 01:56:00 +00:00
Cathy Xu
aa562d2881 soc/mediatek/mt8189: Add GPIO driver
Add GPIO driver for other modules to control GPIO pins.

BUG=b:379008996
BRANCH=none
TEST=build pass

Change-Id: Ia87fe0975add95fcfad16d55586559c7f912a624
Signed-off-by: Cathy Xu <ot_cathy.xu@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85667
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2024-12-21 16:10:18 +00:00
Vince Liu
40a863cd60 soc/mediatek/mt8189: Initialize watchdog
Add watchdog support for MT8189.

BUG=b:379008996
BRANCH=none
TEST=build pass and WDT makes DUT reboot when MTK_WDT_MODE_ENABLE is
set.

Change-Id: I496fce91e52393db31fd1fb5a1c68d91b2ed073e
Signed-off-by: Vince Liu <vince-wl.liu@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85678
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-12-21 16:10:05 +00:00
Yidi Lin
1380ed0cd2 soc/mediatek: Add support for MediaTek firmware support package
Starting from MT8196, MediaTek platform introudces a new blob named
MediaTek firmware support package (mtk-fsp). The features of mtk-fsp
include but not limit to,
- Security settings, e.g: Device Access Proctection Control, Security
  Memory Protection Unit.
- Initialization for advanced CPU frequency control.

This patch implements APIs for
1) Exchanging data between coreboot and mtk-fsp.
2) Loading and running the mtk-fsp blob at a specific bootstage.

BUG=b:373797027
TEST=emerge-rauru coreboot; Run mock blob and return from mock blob.

Change-Id: Idef3518f9763fe5f74adb459c137db164563e483
Signed-off-by: Yidi Lin <yidilin@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85665
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-21 16:09:36 +00:00
Ke Zheng
4f92943c89 soc/mediatek/common: Rename GPT_MHZ to TIMER_MHZ for readability
Update timer macro name for common.

The new ICs (e.g. mt8196, mt8189) will no longer use GPT. In order
to improve code readability, replace GPT_MHZ with TIMER_MHZ for
existing SoCs.

BUG=b:379008996
BRANCH=none
TEST=Build pass, Macro name is correct.

Change-Id: I02f18bfa5b5912f28e322d40cd46823a0095bbf4
Signed-off-by: Ke Zheng <ot_ke.zheng@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85681
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-21 16:09:23 +00:00
Wenzhen Yu
5a73692e0c soc/mediatek/mt8196: Add SPM loader
This patch adds support for loading SPM firmware from CBFS to SPM SRAM
and fix the SPM register definitions. SPM needs its own firmware to
enable SPM suspend/resume function which turns off several resources
such as DRAM/mainpll/26M clk when linux system suspends.

coreboot log:
CBFS: Found 'spm_firmware.pm' @0xadf00 size 0x5a60 in mcache @0xfffdd3c
mtk_init_mcu: Loaded (and reset) spm_firmware.pm in 3 msecs (30080 byt)

TEST=build pass
BUG=348147674

Change-Id: Ie09346f46cb734c74776b760485e7f35d4357e5e
Signed-off-by: Wenzhen Yu <wenzhen.yu@mediatek.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85599
Reviewed-by: Yidi Lin <yidilin@google.com>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-21 16:09:01 +00:00
Subrata Banik
f3adc74e44 mb/google/fatcat: Keep GSPIx interface default PCI
BUG=b:377595986
TEST=Able to see 0x12.6 device is visible using `lspci`.

Change-Id: Ia3348f78614e61259333ccf2babf20eaf4666a0e
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85686
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
2024-12-21 07:42:46 +00:00
Subrata Banik
809e704101 soc/intel/pantherlake: Rename GSPI2 to GSPI0A
Rename GSPI2 to GSPI0A to align with the latest Intel documentation
and platform specifications (doc: 815002)

BUG=b:377595986
TEST=Able to see 0x12.6 device is visible using `lspci`.

Change-Id: I9b87d38e44c07a053104b53df38ee1ce14a86c7f
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85685
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Pranava Y N <pranavayn@google.com>
Reviewed-by: YH Lin <yueherngl@google.com>
2024-12-21 07:42:37 +00:00
Subrata Banik
222ef676f9 soc/intel/pantherlake: Add ACPI name for GSPI2
This change adds the ACPI name "SPI2" for the GSPI2 device
in the Panther Lake SOC.

Replace space with tab for PCI_DEVFN_GSPI2 macro.

w/o this patch:

[ERROR]  Missing ACPI Name for PCI: 00:12.6
[ERROR]  Missing ACPI Name for PCI: 00:12.6

w/ this patch:

No error

Change-Id: I404ddb893b82836e06d0f52a6d6f2aff2273d8c6
Signed-off-by: Subrata Banik <subratabanik@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85712
Reviewed-by: YH Lin <yueherngl@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-21 07:42:31 +00:00
Sean Rhodes
87ae3573b5 mb/starlabs/starlite_adl: Configure GPIO interrupt for Virtual Button
Configure GPP_F15 to generate an IRQ, that is used by the Virtual
Button driver to report whether the tablet is docked or undocked to
the OS.

Change-Id: I0815da09bd7ffd3926622e10df6a06ab5593dc2d
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83880
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maxim <max.senia.poliak@gmail.com>
2024-12-20 09:28:48 +00:00
Sean Rhodes
eaf87422b1 ec/starlabs/merlin: Add Intel Virtual Button Driver for Tablet Mode
This patch adds support for the Intel Virtual Button driver, which
reports whether a tablet is docked or undocked. The GPIO used for
detection is hardcoded to GPP_F15 for now, specific to the
`mb/starlite_adl` board.

The GPIO value is returned to the HID driver via the `_STA` and
`VGBS` methods. These methods ensure proper notification to the OS,
allowing it to show or hide the virtual keyboard depending on the
docking status.

Tested on `starlite_adl` with Ubuntu 24.04, confirming the virtual
keyboard appears when the tablet is undocked and hides when docked.
This was verified with ACPI debug enabled, as dmesg does not
report the state of the GPIO.

Change-Id: I574a1b2d3907b2341a0dfdc412151d574ba4848e
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83879
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-20 09:28:29 +00:00
Yunlong Jia
8c0df740c7 mb/google/nissa/var/gothrax: Add probe and GPIO config for HDMI and
touchpanel

1. Reuse DB_A (now DB_A_HDMI_LTE) as the HDMI switch.
2. Turn off the Type-C port C1 when using HDMI because both of them use
  the same interface in hardware.
3. Use TOUCH_PANEL_I2C_GENERIC (formerly TOUCH_PANEL_DISABLE) to
  support other screen models as we cannot have different fields to
  support individual touch screen models.

BUG=b:365445053
TEST=emerge-nissa coreboot and run in DUT

Change-Id: I1900658f7c2e09180287a4e61f02e04be203b6e9
Signed-off-by: Yunlong Jia <yunlong.jia@ecs.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85512
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Kyle Lin <kylelinck@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-20 04:17:40 +00:00
John Su
0dba17da0c mb/google/brya/uldrenite: Add WWAN RW350R-GL power on sequence
Uldrenite supports the WWAN 5G device and uses variant.c to handle the
power-on sequence according to the Rolling Wireless_RW350R-GL_Hardware
Guide_Generic_V1.1. Due to no hardware access, the boot time is
estimated to increase by 50 ms.

At this stage, we do not yet have the board or key parts for
verification. However, I still need to merge the CL to ensure that the
WWAN functionality works. Once the motherboard is available, I will make
adjustments to optimize and reduce the boot time.

BUG=b:381393809, b:383212261
BRANCH=None
TEST=emerge-nissa coreboot

Change-Id: If8695920c2b3d2a27da62afcbe75e70d1ea09792
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85537
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
2024-12-20 03:23:36 +00:00
Alicja Michalska
2c4af7cd29 mb/topton/adl: Enable TPM2 (Intel fTPM/PTT)
Change-Id: If1a52cacf2eeef68efdd98c48d5802712305f354
Signed-off-by: Alicja Michalska <alicja.michalska@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85611
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-12-20 00:23:57 +00:00
Keith Hui
c11558d4c7 mb/asus/p8z77-m: Drop GPIO by I/O
Per Fabian Groffen <grobian@gentoo.org> in CB:75145:

This particular setting results in

[ERROR]  PNP: 002e.308 missing read_resources

The underlying root cause was fixed by commit f5b993de4f
(sio/nuvoton/nct6779d: Correct GPIOBASE virtual LDN). However, to make
GPIO by I/O work requires setting up an I/O port resource here and
a generic LPC I/O decode at southbridge/intel/bd82x6x, and both weren't
done. Even if done, this newfound capability still doesn't offer much.

Change-Id: I39739ab71bc644619667b3e123cc9ad85f9d109f
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/84617
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: coreboot org <coreboot.org@gmail.com>
2024-12-19 21:48:26 +00:00
Alicja Michalska
4f1a1adef6 mb/topton/adl: Disable mapped SATA port
According to Intel mFIT tool, SATA Port 0 is mapped as RP11 (PCI-E).
Disable SATA mapping on that port.

Setting SATAXPCIE1 GPIO fixes broken SATA port.
Therefore, this port is now fully functional.

TEST: Plug in 2.5in SATA drive, check detection in EDK2/Linux.

Change-Id: I9556383952d163a145ac73cb846740a4ce67a1e1
Signed-off-by: Alicja Michalska <alicja.michalska@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85609
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2024-12-19 20:48:44 +00:00
Keith Hui
81cbe11361 mb/asus/p8z77-m: Revert SIO IRQ settings carried from OEM
Revert super I/O IRQ polarity settings replicated from OEM firmware
back to its power-on defaults.

With OEM settings COM 1/UART A/serial port 1 gets blocked right after
the kernel boots.  It no longer works or responds, which actually means
the Linux boot process gets stuck forever when configured to write
to ttyS0.

Also revised the comment on another SIO setting to say it's being set
for PECI.

TEST=Not using these settings, I have not found any downside.
Serial keeps working, sensors still work, S3 suspend/resume works
correctly.

Reported by Fabian and confirmed by Keith.

Signed-off-by: Fabian Groffen <grobian@gentoo.org>
Signed-off-by: Keith Hui <buurin@gmail.com>
Change-Id: Iae526762e79e9e2d46d06e12c338f375e5555e8c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/75137
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: coreboot org <coreboot.org@gmail.com>
Reviewed-by: Felix Singer <service+coreboot-gerrit@felixsinger.de>
2024-12-19 20:38:28 +00:00
Karthikeyan Ramasubramanian
9578c67c77 mb/google/brox: Include CSE reset in mainboard reset expectation
If CSE is in RO, then a reset is expected for CSE to jump to RW. Include
that reset in mainboard_expects_another_reset() logic. This will avoid
unnecessary warm reset during regular boot flow in boards with non-UFS
storage.

BUG=None
TEST=Build Brox BIOS image and boot to OS. Ensure that redundant reset
to disable UFS controller is avoided.
Before this change:
[INFO ]  Disabling UFS controllers
[INFO ]  Warm Reset after disabling UFS controllers
[INFO ]  system_reset() called!
<snip>
[DEBUG]  HECI: Global Reset(Type:1) Command
<snip>
[INFO ]  Disabling UFS controllers
[INFO ]  Warm Reset after disabling UFS controllers
[INFO ]  system_reset() called!

After this change:
[DEBUG]  HECI: Global Reset(Type:1) Command
<snip>
[INFO ]  Disabling UFS controllers
[INFO ]  Warm Reset after disabling UFS controllers
[INFO ]  system_reset() called!

Change-Id: I80a46b15813b6bdfa6c029c54590f4b7c2a6754b
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85642
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-12-19 16:40:13 +00:00
Dinesh Gehlot
5af5e66686 util/cbfstool: eliminate late sign of life event
The purpose of the late sign-of-life (SOL) event was to add logs for
the CSE sync at the payload. However, recent changes have decoupled CSE
sync and SOL events, resulting in redundant event logging. This update
eliminates the superfluous late SOL event logs.

BUG=b:379585294
TEST=boot verified on google/rex0 and google/rex64

without change:
```
rex-rev3 ~ # elogtool list
rex64-rev3 ~ # /media/usb/elogtool list
0 | 2024-01-01 22:50:19-0800 | Log area cleared | 250
1 | 2024-01-01 22:50:59-0800 | System boot | 30
2 | 2024-01-01 22:50:59-0800 | Firmware Splash Screen | Enabled
3 | 2024-01-01 22:51:00-0800 | Power Fail
4 | 2024-01-01 22:51:00-0800 | SUS Power Fail
5 | 2024-01-01 22:51:00-0800 | ACPI Wake | S5
6 | 2024-01-01 22:51:00-0800 | Wake Source | Power Button | 0
7 | 2024-01-01 22:51:00-0800 | Late Sign of Life  | CSE Sync Late SOL Screen Shown
8 | 2024-01-01 22:51:00-0800 | Firmware CSE sync | CSE Sync at Payload
```
with change:
```
rex64-rev3 ~ # elogtool list
0 | 2024-12-17 02:42:23-0800 | Log area cleared | 141
1 | 2024-12-17 02:43:14-0800 | System boot | 81
2 | 2024-12-17 02:43:14-0800 | Firmware Splash Screen | Enabled
3 | 2024-12-17 02:43:16-0800 | Power Fail
4 | 2024-12-17 02:43:16-0800 | SUS Power Fail
5 | 2024-12-17 02:43:16-0800 | ACPI Wake | S5
6 | 2024-12-17 02:43:16-0800 | Wake Source | Power Button | 0
7 | 2024-12-17 02:43:16-0800 | Firmware CSE sync | CSE Sync at Payload
```

Change-Id: I53baecb3ca0cef5e0e18732e02832e8331e000d0
Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85621
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-12-19 14:30:23 +00:00
Dinesh Gehlot
0797c40d52 src/soc/intel/cmn/blk/cse: Log cse sync information
This patch adds an event log entry for successful CSE synchronization,
along with the boot stage where the synchronization occurred, either
early or late.

BUG=b:379585294
TEST=elog verified on rex0 and rex64

Rex0:
```
rex-rev3 ~ # /media/usb/elogtool list
3 | 2024-01-01 22:25:59-0800 | Firmware CSE sync | Late CSE Sync
```
Rex64:
```
rex64-rev3 ~ # /media/usb/elogtool list
8 | 2024-01-01 22:51:00-0800 | Firmware CSE sync | CSE Sync at Payload
```

Change-Id: Idece841c2b069d7688afc258470667ed2851a282
Signed-off-by: Dinesh Gehlot <digehlot@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85219
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2024-12-19 14:29:16 +00:00
Karthikeyan Ramasubramanian
9a15a1ed21 soc/intel: Log CSE Sync Early Sign of Life event from a better place
CSE Sync Early Sign of Life (ESOL) event is logged as soon as the CSE FW
update is complete. This happens irrespective of whether Early Sign of
Life screen is enabled or not. Move CSE Sync ESOL event right before
displaying the ESOL screen.

BUG=b:378458829, b:379585294
TEST=Build Brox BIOS image and boot to OS. Ensure that the ESOL event
for CSE Sync is logged.

Change-Id: Iaa0dbb87ddde69dc3f4a9e058fc6bed8711b29e7
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85111
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
2024-12-19 14:28:36 +00:00
John Su
c812c78618 mb/trulo/var/uldrenite: Support USB_OC on the A0 port
According to the discussion on the issue tracker, set
GPP_A14 as USB_OC1 for the A0 port

BUG=b:380789023
TEST=emerge-nissa coreboot

Change-Id: I2b782216c0392b1a98ea57300e683c32999d5a32
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/85653
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kapil Porwal <kapilporwal@google.com>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Dtrain Hsu <dtrain_hsu@compal.corp-partner.google.com>
2024-12-19 14:22:44 +00:00