Commit Graph

45982 Commits

Author SHA1 Message Date
Wisley Chen 08351d2727 mb/google/brya/var/anahera: Fine tune I2C frequency
Fine tune i2c frequency.
I2C0 - 399.6 kHz
I2C1 - 391.4 kHz
I2C3 - 398.1 kHz
I2C5 - 399.9 kHz

BUG=b:213295817
TEST=build

Change-Id: I9a89820a8d9ae4c9b4ee499e8467426e0670656d
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60792
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-07 15:28:32 +00:00
Wisley Chen 060e89f347 mb/google/brya/anahera: Swap TPM I2C with touchscreen I2C
According to the latest schematic, exchange I2C port for TPM/touchscreen.
TPM: I2C3 -> I2C1
Touchscreen: I2C1 -> I2C3

BUG=b:212465011
TEST=FW_NAME=anahera emerge-brya coreboot

Change-Id: I1bb1857b4c5b06ca4ad660bf73e0c4df9c376a58
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60432
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-07 15:28:19 +00:00
Paul Menzel 2dcc7224a0 drivers/ipmi: Change type of custom_count from int to size_t
The variable `custom_count` is the number of custom fields, so only
holds non-negative values, so change the struct member type from int to
size_t.

Change-Id: Ic35aafefc870092298523ba2e10adf4fcb687a01
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60790
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-07 15:27:56 +00:00
Paul Menzel 7be44d2ad6 drivers/ipmi: Use correct unsigned int length modifier
Building an image for OCP DeltaLake with `x86_64-linux-gnu-gcc-11` fails
with the format warning below as the size of char * differs between
32-bit and 64-bit.

        CC         ramstage/drivers/ipmi/ipmi_fru.o
    src/drivers/ipmi/ipmi_fru.c: In function 'read_fru_chassis_info_area':
    src/drivers/ipmi/ipmi_fru.c:192:57: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Werror=format=]
      192 |                 printk(BIOS_ERR, "%s failed to malloc %ld bytes for "
          |                                                       ~~^
          |                                                         |
          |                                                         long int
          |                                                       %d
      193 |                         "chassis custom data array.\n", __func__,
      194 |                         info->custom_count * sizeof(char *));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                            |
          |                                            unsigned int
    src/drivers/ipmi/ipmi_fru.c: In function 'read_fru_board_info_area':
    src/drivers/ipmi/ipmi_fru.c:291:57: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Werror=format=]
      291 |                 printk(BIOS_ERR, "%s failed to malloc %ld bytes for "
          |                                                       ~~^
          |                                                         |
          |                                                         long int
          |                                                       %d
      292 |                         "board custom data array.\n", __func__,
      293 |                         info->custom_count * sizeof(char *));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                            |
          |                                            unsigned int
    src/drivers/ipmi/ipmi_fru.c: In function 'read_fru_product_info_area':
    src/drivers/ipmi/ipmi_fru.c:398:57: error: format '%ld' expects argument of type 'long int', but argument 4 has type 'unsigned int' [-Werror=format=]
      398 |                 printk(BIOS_ERR, "%s failed to malloc %ld bytes for "
          |                                                       ~~^
          |                                                         |
          |                                                         long int
          |                                                       %d
      399 |                         "product custom data array.\n", __func__,
      400 |                         info->custom_count * sizeof(char *));
          |                         ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
          |                                            |
          |                                            unsigned int

Fix the mismatches in `read_fru_chassis_info_area()` by using the length
modifier `z` for size_t as that is what `size_of` yields to.

Change-Id: If0c4266b19d56fa88abc397f305154d473ae1a93
Found-by: gcc (Debian 11.2.0-10) 11.2.0
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59055
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-01-07 15:27:44 +00:00
Kane Chen ff553ba8b3 soc/intel/alderlake: Check clkreq overlap
In some cases, partner may assign same clkreq on more than one devices.
This could happen when one device is in baseboard dev tree and another
one is in override dev tree.

This change adds a clkreq overlap check and shows a warning message

TEST=On brya, assigned one clkreq to 2 devices and found the warning
     message

Change-Id: I2f701a19118f4702c227b17e43b6551591d9b344
Signed-off-by: Kane Chen <kane.chen@intel.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60401
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-01-07 15:27:31 +00:00
Wisley Chen 328bfb3937 mb/google/brya/anahera{4es}: Correct WWAN power sequence
Correct the WWAN power sequence to meet spec

BUG=b:213021172
TEST=build

Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Change-Id: Iab221fd03c637c82f6ce5c8278d432decf1b30c6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60435
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-07 15:26:51 +00:00
Wisley Chen 0de3e6570e mb/google/brya/anahera{4es}: Correct SSD power sequence
M.2 spec describes PERST# should be sequenced after power enable.

BUG=b:213021171
TEST=FW_NAME=redrix emerge-brya coreboot

Change-Id: I66345d985f4db4f13b23c0a21c179835908b6574
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60434
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-07 15:26:32 +00:00
Sean Rhodes c2c9618607 ec/starlabs/merlin: Unify EC and CMOS names
End all CMOS variable with a C and EC variables with an E.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ie0fab6b9dcd805f7b8c9bf8f14b0a799d8f396c8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60709
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2022-01-07 14:54:10 +00:00
Felix Held 2b1afef1ea soc/amd/common/block/include/lpc: add comment about RANGE_UNIT values
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I22f3485ec81f76af7e0e96b7c1271d5ccf52e701
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60771
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-01-07 13:20:30 +00:00
Felix Held 38712b84ba soc/amd/common/lpc/espi_util: move register definitions to header file
Define the register offsets and bits in a separate header file instead
of in the middle of the .c file.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I814192b2dfeff05877ac857dd89e8cdc7ae5ee25
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60770
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-01-07 13:20:17 +00:00
Felix Held beaef09a9b soc/amd/common/block/espi: use lower case hex digits in definitions
coreboot uses lower case hex digits instead of upper case ones.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I0955db7afd101ab522845d5911ff971408e520e3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60769
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-07 13:20:07 +00:00
Felix Held 5ba87a8092 soc/amd/common/lpc/espi_util: handle espi_get_configuration error
In espi_wait_channel_ready the return value of espi_get_configuration
didn't get checked before. In the case of the espi_send_command call in
espi_get_configuration returning CB_ERR, espi_get_configuration didn't
write to the local config variable, so if this happens in the first pass
of the do-while loop, the following espi_slave_is_channel_ready call
would use the uninitialized local config variable as parameter. Fix this
by checking the return value of espi_get_configuration.

TEST=None

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iff1a0670e17b9d6c6f4daf2ea56badf6c428b8c9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60209
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-01-07 13:20:00 +00:00
Zhuohao Lee e2192e6a82 mb/google/brya/var/brask: Change TPM I2C to I2C1
The latest schematics changes the TPM I2C from I2C3 to I2C1. This patch
moves the TPM I2C setting from the board layer to the baseboard and
fixes the TPM I2C bus assignment.

BUG=b:211886429
TEST=build pass

Change-Id: I70d5a8fde1866c5dd4587ab5af2d41724c60ee0c
Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60439
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-07 03:07:07 +00:00
Shelley Chen f58ce3bdaa mb/google/herobrine: Fix board id
The board id assignment CL (CB:56642) landed after
BOARD_GOOGLE_HEROBRINE has been deprecated to
BOARD_GOOGLE_HEROBRINE_REV0 (CB:60284). Fix it to accomodate for the
GOOGLE_HEROBRINE_REV0 board updates.

BUG=b:211644878
BRANCH=None
TEST=built all variants of herobrine to make sure it compiles.

For reference:
=============
CB:56642:

commit 8b63dac061
Author: Ravi Kumar Bokka <rbokka@codeaurora.org>
Date:   Tue Jul 27 19:29:18 2021 +0530

google/herobrine: configure gpio to detect board ID
=============
CB:60284:

commit 8bdbe23a93
Author: Shelley Chen <shchen@google.com>
Date:   Tue Dec 21 13:17:33 2021 -0800

mb/google/herobrine: Transition BOARD_HEROBRINE to BOARD_HEROBRINE_REV0
=============

Change-Id: I6dab994e65eadff303eb88a63b8dd81e19694678
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60805
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-01-06 22:42:53 +00:00
Kenneth Chan fc7a40fad9 mb/google/guybrush/var/dewatt: update USB3 settings for passing SI
Update tx/rx term control to 3 for passing USB3 port 0/1 SI.

b:199468920
TEST= emerge-guybrush coreboot; build and pass USB3 SI.

Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Change-Id: I637207d7c657f6dd71d70694f9a5fb35f8294b64
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60809
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2022-01-06 18:14:13 +00:00
Tim Wawrzynczak e3411cda2e mb/google/brya/var/anahera{4es}: Add Chrome OS privacy screen _HID
Similar to commit 0167f5adb (mb/google/redrix: Add _HID for privacy
screen device), add the same _HID to the privacy screen device.

Change-Id: I58ad538dfaf602e3f4afb98d1a25d52753a15d93
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60115
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: YH Lin <yueherngl@google.com>
2022-01-06 17:04:30 +00:00
Tim Wawrzynczak cf39336ccf soc/intel/alderlake: Add minimal ACPI support for PEG ports
Add minimal Device entries with just an _ADR for each of the PEG ports
for P and M chipsets (N does not have any PEG ports).

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Id1009004969729eddf7005fa190f5e1ca2d7b468
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60181
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-01-06 16:49:51 +00:00
Tim Wawrzynczak 40c9c8aa80 soc/intel/alderlake: Add soc_get_cpu_rp_vw_idx() function
The PMC IPC method used to enable/disable PCIe srcclks uses the
LCAP PN field to distinguish PCH RPs. For CPU RPs, the PMC IPC
command expects the RP number to be its "virtual wire index"
instead. This new function returns this virtual wire index
for each of the CPU PCIe RPs.

BUG=b:197983574

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I5e9710f0d210396f9306b948d9dce8b847300147
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60180
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-01-06 16:49:00 +00:00
Tim Wawrzynczak 8d0e77bbd4 soc/intel/tigerlake: Add soc_get_cpu_rp_vw_idx() function
The PMC IPC method used to enable/disable PCIe clk sources uses the
LCAP PN field to distinguish PCH RPs. For CPU RPs, the PMC IPC
command expects the RP number to be its "virtual wire index"
instead. This new function returns this virtual wire index
for each of the CPU PCIe RPs.

BUG=b:197983574

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I7aa14a634dcd90c4817009db970fb209ae02c63d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60179
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
Reviewed-by: Cliff Huang <cliff.huang@intel.corp-partner.google.com>
Reviewed-by: Subrata Banik <subratabanik@google.com>
2022-01-06 16:48:09 +00:00
Tony Huang 7fff266b07 mb/google/brya/var/agah: Add new memory support
Do initial memory support for project agah

BUG=b:210970640
TEST=FW_NAME=agah emerge-brya coreboot

Change-Id: Iaeea12a9dd8110a499b5df4de89dc1f74b88a580
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60787
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-06 15:54:25 +00:00
Kenneth Chan 78e6b3d28b mb/google/guybrush/var/dewatt: Update for RT1019 amp dev id was changed
Due to the CL was merged: https://chromium-review.googlesource.com/c/chromiumos/third_party/kernel/+/3354766.
Update to matched id for audio work normal.
1019 id changed to 10EC1019:0/10EC1019:1 from 10EC1019:1/10EC1019:2.

BUG=b:210542422
TEST=emerge-guybrush coreboot chromeos-bootimage; Download image 14425 and tested audio function.

Signed-off-by: Kenneth Chan <kenneth.chan@quanta.corp-partner.google.com>
Change-Id: I542f886fe63205777837d7146169177b043cc5f2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60442
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2022-01-06 15:51:57 +00:00
Tony Huang 642bcbf06a mb/google/brya: Create agah variant
Create the agah variant of the brya0 reference board by copying
the template files to a new directory named for the variant.

(Auto-Generated by create_coreboot_variant.sh version 4.5.0).

BUG=b:210970640
BRANCH=None
TEST=util/abuild/abuild -p none -t google/brya -x -a
make sure the build includes GOOGLE_AGAH

Change-Id: I6adcf4e8010969cf185513d68bb1b76ea08194c7
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60785
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-06 15:47:54 +00:00
Subrata Banik 724fc89887 soc/intel/common/gpio: Skip GPP pad lock config if config is not set
Don't perform GPP lock configuration if
SOC_INTEL_COMMON_BLOCK_SMM_LOCK_GPIO_PADS config is not selected.

This patch fixes a compilation issue when APL/GLK boards are
failing while gpio_lock_pads() function is getting called from
IA common gpio block.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I392dc2007dba8169e480f82b58b7f0a1578bb09f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60776
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-01-06 15:19:44 +00:00
Subrata Banik d43d864fc0 soc/intel/common/gpio: Modify pad_config.pad type from `int` to 'gpio_t'
This patch modifies struct pad_config.pad type from `int` to 'gpio_t'
as pad offset inside GPIO community is unsigned type and also to
maintain parity with `struct gpio_lock_config.pad` type.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I15da8a1aff2d81805ba6584f5cc7e569faf456e1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60773
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2022-01-06 15:19:24 +00:00
Subrata Banik 0dc0772118 soc/intel/common/gpio: Rename struct gpio_lock_config.gpio to .pad
This patch renames struct gpio_lock_config variable `gpio` to `pad`,
to represent the pad offset within the GPIO community.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I6bed99c401435c96c9543f99406a934d7141c575
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60772
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2022-01-06 15:19:13 +00:00
Subrata Banik 90c6cff159 soc/intel/alderlake: Fix GPIO reset mapping as per GPIO BWG
This patch fixes the documentation discrepancy of GPIO reset type
between PCH EDS and GPIO BWG. As per GPIO BWG, there are four GPIO
reset types in Alder Lake as below:
- Power Good - (Value 00)
- Deep - (Value 01)
- Host Reset/PLTRST - (Value 10)
- RSMRST for GPD/Reserved for GPP - (Value 11)

Hence, created two different reset types for `GPP` and `GPD`.
Also, replaced PAD_CFG0_LOGICAL_RESET_x macros with PAD_RESET().

BUG=b:213293047

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I4b8742c7a0cc1dc420e3e22e34a16355294ed61b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60789
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-06 15:19:02 +00:00
Rex-BC Chen c46cadd22b soc/mediatek/mt8186: Increase CBFS_MCACHE size to 8KiB
The current CBFS mcache size (roughly 7KiB) is insufficient for mt8186,
so we need to increase it by 1KiB (and decrease the stack by 1KiB).

Error logs:
CBFS ERROR: mcache overflow, should increase CBFS_MCACHE size!
CBFS: mcache @0x0010e004 built for 63 files, used 0xde4 of 0xdfc bytes

BUG=b:202871018
TEST=no cbfs error logs.

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I1e627ede3774665575006f752f89101e3c5bde9f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60529
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-01-06 02:24:39 +00:00
Rex-BC Chen a8a9552d75 mb/google/corsola: Configure audio
According schematics, we configure audio by turning on setting of
audio power and selecting I2S pin-mux.

Schematics references:
kingler: schematic_kingler_proto0_gerber_20211115.pdf
krabby: crab_proto 0_20211112_final.pdf

BUG=b:204164695
TEST=Verified by CLI command(badusbbeep/devbeep) on kingler and krabby

Signed-off-by: Jiaxin Yu <jiaxin.yu@mediatek.com>
Change-Id: Ia6374d0e5535b7cff4df8759312786fef8b94b6b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60738
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
2022-01-06 02:24:33 +00:00
FrankChu df1d2b4bb9 mb/google/volteer/var/delbin: Add fw_config probe for ALC5682-VD & VS
ALC5682-VD/ALC5682I-VS load different kernel driver by different hid
name. Update hid name depending on the AUDIO_CODEC_SOURCE field of
fw_config. Define FW_CONFIG bits 41 - 43 (SSFC bits 9 - 11)
for codec selection.

ALC5682-VD: _HID = "10EC5682"
ALC5682I-VS: _HID = "RTL5682"

BUG=b:204523176
BRANCH=volteer
TEST=ALC5682-VD/ALC5682I-VS audio codec can work

Signed-off-by: FrankChu <frank_chu@pegatron.corp-partner.google.com>
Change-Id: Ieef638f78edd3428e572a76f06fb9c8757278971
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59557
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-01-05 21:41:46 +00:00
Joey Peng a265c49eaa mb/google/brya/var/taeko:Remove duplicate DB_SD fw_config fields.
Since fw config fields for DB_SD can share the same driver, we will
remove the duplicate fields DB_SD_GL9750 and DB_SD_RTS5232S.

BUG=b:212240358
TEST=emerge-brya coreboot and can boot to OS.
Signed-off-by: Joey Peng <joey.peng@lcfc.corp-partner.google.com>
Change-Id: If7814c35f63fd6fa27195d448c4d51fc980aaa9c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60409
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-01-05 20:26:44 +00:00
Paul Menzel 6f1435e0a9 mb/google/sarien: Add VBT extracted from Chrome OS
The VBT is extracted from Chromium OS in developer mode with the device
running firwmare .

    $ sudo dmesg | grep ' DMI:'
    [    0.000000] DMI: Dell Inc. Sarien/Sarien, BIOS Google_Sarien.12200.99.0 07/29/2020
    $ sudo cbmem -1
    coreboot-v1.9308_26_0.0.22-8761-gdba94f429a Wed Jul 29 16:09:30 UTC 2020 bootblock starting (log level: 8)...
    […]
    coreboot-v1.9308_26_0.0.22-8761-gdba94f429a Wed Jul 29 16:09:30 UTC 2020 ramstage starting (log level: 8)...
    […]
    CBFS: Locating 'vbt.bin'
    CBFS: Found @ offset 614c0 size 4a0
    Found a VBT of 4608 bytes after decompression
    […]
    $ sudo cp /sys/kernel/debug/dri/0/i915_vbt vbt.bin

Using the Chrome OS recovery image, Matt DeVillier verified, that the
Sarien VBT is identical to Arcada, so add the VBT for all variants.

Change-Id: Ibab8a7b0b3f721ca434ac38b51528b81e66f3bb7
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60735
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-05 17:44:58 +00:00
Paul Menzel 1ef30cbf75 mb/google/sarien/Kconfig: Remove blank line at beginning
Change-Id: I0410be48f360bdd00e4ed7599cbee405915344b9
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60767
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-01-05 17:44:46 +00:00
Sean Rhodes 0bb9104ead mb/starlabs/labtop: Remove display from devicetree
Remove display from devicetree as Intel's brightness
controls are not used on this platform.

This solves the below errors appearing in dmesg:

    No Local Variables are initialized for Method [_BCL]
    No Arguments are initialized for method [_BCL]

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Icf2f2fa33abd11952c888c9502d1d5ef1ad6544f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59258
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2022-01-05 17:43:29 +00:00
Elyes HAOUAS 6a8e0b14f7 src/northbridge: Remove unused <delay.h>
Change-Id: I5449feeb65c49c79bc7657a1c3777a0f128a13b1
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60606
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-01-05 17:42:31 +00:00
Elyes HAOUAS 8def542ff9 src/soc/amd: Remove unused <delay.h>
Found using:
diff <(git grep -l '#include <delay.h>' -- src/) <(git grep -l 'get_timer_fsb(\|init_timer(\|udelay(\|mdelay(\|delay(' -- src/) |grep "<"

Change-Id: Iefb37d28c7f13563fa652cd6b2f661f462a3a32e
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60605
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-01-05 17:42:22 +00:00
Elyes HAOUAS 47235990d4 src/soc/intel: Remove unused <delay.h>
Change-Id: Id8e6221a9801d5198171dc9cd564000d19720a42
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60604
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-05 17:42:01 +00:00
Elyes HAOUAS 35eabc7c23 src/soc/mediatek: Remove unused <delay.h>
Change-Id: I414ad3824819f441f316567795999ed9539cba7b
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60603
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-01-05 17:41:40 +00:00
Elyes HAOUAS 667f51193a src/southbridge: Remove unused <delay.h>
Found using:
diff <(git grep -l '#include <delay.h>' -- src/) <(git grep -l 'get_timer_fsb(\|init_timer(\|udelay(\|mdelay(\|delay(' -- src/) |grep "<"

Change-Id: If7751b0e7d222979973518f57b310f5e2fe2bc25
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60601
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-01-05 17:41:25 +00:00
Elyes HAOUAS 056b2501e2 soc/mediatek: Remove unused <string.h>
Change-Id: I8f88541dce457e978a2cbea036d4f6eae387963f
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60559
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-01-05 17:39:27 +00:00
Elyes HAOUAS 9e95f6e0bc soc/amd: Remove unused <string.h>
Change-Id: Ibd3e7a62a2e833017f550eddd915b7dfb539d019
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60558
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-01-05 17:39:13 +00:00
Elyes HAOUAS a97f03513f device/dram/lpddr4.c: Remove unused <string.h>
Change-Id: Iba3135178f2d6021702971e4d887e9b4f8afeb76
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60556
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-01-05 17:38:39 +00:00
Elyes HAOUAS 249343bebb src/southbridge: Remove unused <string.h>
Change-Id: Idc0cd9d6865cd9c1b95e6c838795cce9dbc643a3
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60554
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-01-05 17:38:18 +00:00
Elyes HAOUAS 5a5ed1fb20 soc/intel: Remove unused <string.h>
Found using following command:
diff <(git grep -l '#include <string.h>' -- src/) <(git grep -l 'STRINGIFY\|memcpy(\|memmove(\|memset(\|memcmp(\|memchr(\|strdup(\|strconcat(\|strnlen(\|strlen(\|strchr(\|strncpy(\|strcpy(\|strcmp(\|strncmp(\|strspn(\|strcspn(\|strstr(\|strtok_r(\|strtok(\|atol(\|strrchr(\|skip_atoi(\|vsnprintf(\|snprintf(' -- src/)

Change-Id: Iae90ff482f534d8de2a519619c20a019d054e700
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60553
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-05 17:37:49 +00:00
Elyes HAOUAS 51b9eb74bf src/drivers/wifi/generic/smbios.c: Remove unused <string.h>
Found using following command:
diff <(git grep -l '#include <string.h>' -- src/) <(git grep -l 'STRINGIFY\|memcpy(\|memmove(\|memset(\|memcmp(\|memchr(\|strdup(\|strconcat(\|strnlen(\|strlen(\|strchr(\|strncpy(\|strcpy(\|strcmp(\|strncmp(\|strspn(\|strcspn(\|strstr(\|strtok_r(\|strtok(\|atol(\|strrchr(\|skip_atoi(\|vsnprintf(\|snprintf(' -- src/)

Change-Id: I2a6c5b67af1d2544159e92d4b8c06cc1f5504bd2
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60552
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-01-05 17:37:12 +00:00
Ariel Fang 6dfc0aebb3 mb/google/brya/var/primus: Fix some GPIO programming
After checking them against schematics, a few unused GPIOs that were inherited
from the baseboard were missed, so this CL programs them as PAD_NC.
   GPP_B2  => non-use
   GPP_B15 => non-use (for FPR)
   GPP_D3  => non-use (Test point)
   GPP_E21 => non-use (for LCLW Detect)

BUG=b:211721639
TEST= USE="project_primus" emerge-brya coreboot

Signed-off-by: Ariel Fang <ariel_fang@wistron.corp-partner.google.com>
Change-Id: I4e269bc6fb6eda7b2de57e1a9c900864d3e86e98
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60104
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
2022-01-05 17:26:39 +00:00
Seunghwan Kim 774ffe3998 mb/google/dedede/var/bugzzy: Increase reset_delay_ms for touch screen
Touch screen IC couldn't wake up after rebind with current 120 ms delay
after reset since the HID would be activated after 200 ms from reset.
This change increases the reset_delay_ms for touch device to 200 ms to
wait for the touch HID to be ready.

BUG=b:204950000
BRANCH=dedede
TEST=Verified that TSP IC could wake up after rebind

Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com>
Change-Id: I34cbc82e2d691266389d498e77d8389cdee23efe
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60273
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-01-05 17:11:52 +00:00
Subrata Banik 088667a2d9 mb/google/brya/(anahera,primus): Use eNEM for CAR by default
More Brya variants like Anahera and Primus have migrated to use
Alder Lake QS SoC which enables eNEM feature by default. Hence,
select eNEM for CAR by default for these variants.

BUG=b:168820083
TEST=Able to build and boot primus variant using eNEM mode.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I65d12de08adf85140976e1a7659ad7b684aa75c8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60739
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2022-01-05 16:37:06 +00:00
Zhi Li 159a3045ce mb/google/dedede/var/storo: Generate SPD ID for Samsung K4U6E3S4AA-MGCR
Add supported memory parts in the mem_parts_used.txt and generate the
SPD ID for Samsung K4U6E3S4AA-MGCR.

BUG=b:211950312
TEST=emerge-dedede coreboot

Signed-off-by: Zhi Li <lizhi7@huaqin.corp-partner.google.com>
Change-Id: Ic436db8fe3ef6fb8379ec629b128c05c691ea6fe
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60337
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: zanxi chen <chenzanxi@huaqin.corp-partner.google.com>
2022-01-05 10:14:00 +00:00
Subrata Banik eb14a979f9 mb/google/herobrine: Initialize `pins` to fix the compilation issue
Fix compilation issue introduced with commit 8b63dac0
(google/herobrine: configure gpio to detect board ID) by initialising
the gpio pins.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I084fec777b56f402efb3b04a1d358cd5b0891846
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60784
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
2022-01-05 08:32:51 +00:00
Subrata Banik c045b099e4 mb/starlabs/labtop: Replace leading whitespace with tab
Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I4d7324148ba182d0317b1f64e39f04a8a55fe79b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60733
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Sean Rhodes <admin@starlabs.systems>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2022-01-05 06:30:40 +00:00