Commit Graph

43523 Commits

Author SHA1 Message Date
Zheng Bao dac446165e amdfwtool: Copy string in a safer way
The issue is reported by Coverity. Using strcpy or strcat copying
string without checking length may cause overflow.

BUG=b:188769921

Reported-by: Coverity (CID:1438964)
Change-Id: I609d9ce405d01c57b1847a6310630ea0341e13be
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54946
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-31 15:05:48 +00:00
Felix Held fd2982ec8a soc/amd/cezanne/fch: implement and use fch_clk_output_48Mhz
Make sure that the 48MHz clock output that is typically used as a clock
source for an I2S audio codec or a Super I/O chip.

TEST=On Guybrush before and after this patch the final state of
MISC_CLK_CNTL0 is 0x1006044, so BP_X48M0_OUTPUT_EN is set in both cases.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I38be344a95ccf166c344b2bddcb388fea437a4df
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56528
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-30 19:46:17 +00:00
Martin Roth ce5813fdc5 mb/(amd,google): Remove spi configuration from devicetree
Now that the SPI configuration has been moved into Kconfig, it is no
longer needed in devicetree.

BUG=b:194919326
TEST=Build & boot guybrush

Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: Ifdcd3f33173194c4a25794137756b143751edd70
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56962
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-08-30 18:54:40 +00:00
Martin Roth fd078d85d0 soc/amd: Show SPI settings in bootblock
BUG=b:194919326
TEST=See SPI settings in bootblock

Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: I8ee8981986990240b09414cde8b84d9b109cb5b2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56961
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-08-30 18:54:16 +00:00
Martin Roth e582e710b8 soc/amd/common: Show current SPI speeds and modes
This patch adds code to print the current SPI speeds for each of the 4
different speeds, Normal, Fast-read, Alt-mode, & TPM.  It also displays
the SPI mode and whether or not SPI100 mode is enabled.

BUG=b:194919326
TEST: Display the speed, change speeds, show that new speeds are the
expected values.

Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: I7825a9337474c147b803c85c9af7f9dc24670459
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56960
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-08-30 18:53:56 +00:00
Karthikeyan Ramasubramanian 0032bfa5c5 soc/amd/cezanne/early_fch: Perform early SPI initialization
Add the fch_spi_early_init call in fch_pre_init to perform early SPI
initialization which enables SPI ROM and setting the speed & read modes.

BUG=b:194919326
TEST=Build and boot to OS in Guybrush.

Change-Id: Ibfbe6e16bd6b0dd46c13cecf2a35f0c0b4576b88
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56684
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-30 18:53:34 +00:00
Martin Roth b5b1c5a7da soc/amd/common: Update SPI based on Kconfig & EFS instead of devtree
Get the settings for fast-read and mode from EFS, and reprogram those.
Program Normal reads, Alt-mode, and TPM speeds from Kconfig settings.

BUG=b:195943311
TEST=Boot and see that SPI was set to the correct speed & mode

Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: I8a24f637b2a0061f60a8f736121d224d4c4ba69b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56959
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2021-08-30 18:34:48 +00:00
Felix Held f363ad4acf soc/amd/common: move GPIO register state save struct to gpio_banks.h
The common_i2c_save struct isn't specific to the I2C code and since it
contains the state of the GPIO control & status register and the state
of the GPIO MUX register, move it to include/amdblocks/gpio_banks.h and
rename it to soc_amd_gpio_register_save.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: If7cd47e5a32427d856948e319de8dfad8c928e96
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56778
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2021-08-30 16:30:45 +00:00
Felix Held db3337d929 soc/amd/common/fsp/Makefile: drop strip_quotes call in FSP-M size check
No need to strip the quotes of the FSP-M file path in the size check and
it's always a good idea to not remove the quotes around file paths that
will get passed as parameters to shell programs so that spaces in the
path can't cause malfunction.

TEST=All cases still behave as expected for Mandolin.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Suggested-by: Nico Huber <nico.h@gmx.de>
Change-Id: Ieeea84b5861f9d15b2472208432169dc8e3f0049
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57218
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2021-08-30 13:44:36 +00:00
Cliff Huang 73ed5991bc mb/intel/adlrvp_m: Fix to Enable PCIe x1 Slot
This fix will enable PCIe x1 slot for ADL-M LP4 and LP5 RVPs.
The BDF for this PCIe slot is pci is: 0000:00:1d.0

TEST = show device command:
    $ lspci -s 00:19.0
    expect this:
    00:19.0 Serial bus controller [0c80]: Intel Corporation Device 51c5

Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Change-Id: Ia988fa0b5d8fefe68503b39843aab06c4229b36f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57053
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-30 12:20:28 +00:00
Eric Lai ced18c6777 mb/google/brya/var/felwinter: Update gpio table
Based on latest schematic to update the gpio table.

BUG=b:197308586
BRANCH=None
TEST=emerge-brya coreboot

Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: I0d91199ffd2128a136ea0a33dfe7affa77ae61d4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57190
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-08-30 04:34:15 +00:00
Eric Lai d94c935910 mb/google/brya/var/felwinter: Update device tree
Based on latest shcematic to update the device tree.

BUG=b:197308586
BRANCH=None
TEST=emerge-brya coreboot

Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: I59601571c5e4c2d19738cb333605fb22e1ea0d2e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57167
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-08-30 04:25:46 +00:00
Deepti Deshatty e5221a26d9 mb/google/brya: Enable TCSS
Enable flag SOC_INTEL_COMMON_BLOCK_TCSS.

BUG=b:187385592
TEST=type-C pendrive/Gen-2 SSD detected as Super speed.

Signed-off-by: Deepti Deshatty <deepti.deshatty@intel.com>
Change-Id: Ie3cb8b8836b17fa00ab0089d03fca9f22c4d702e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54090
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-30 04:25:09 +00:00
Frank Wu 91472fe535 mb/google/dedede/var/driblee: Configure thermal sensor setting
According to schematics, TSR2 thermal sensor is not present in driblee.

BUG=b:191732473, b:197180925, b:195868075
BRANCH=keeby
TEST=FW_NAME="driblee" emerge-keeby coreboot

Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Change-Id: I343a6161f71f66b77d23f1fa2f581aaee5eddf1a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57091
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-30 04:09:11 +00:00
Frank Wu f04a912818 mb/google/dedede/var/driblee: Configure audio setting
Update the combination audio CS42L42 and amp. MAX98360.

BUG=b:195619349, b:191732473
BRANCH=keeby
TEST=FW_NAME="driblee" emerge-keeby coreboot

Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Change-Id: I264c680ed5638b71c912253a38c27152a9015d4c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56999
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2021-08-30 04:08:38 +00:00
Felix Held 79f28249cd soc/amd/cezanne/chip: add functionality to power down eMMC interface
Power down the eMMC controller via the AOAC interface when it's not
enabled in the devicetree.

BUG=b:184978118
TEST=On guybrush the unused eMMC controller is disabled in AOAC after
applying this patch. Before this patch it was enabled.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I18f4626a29fdc422218777058341b0eae401bcd4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55537
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2021-08-29 20:58:51 +00:00
Bill XIE a11eca149a superio/nuvoton/nct6776: Correct the definition of NCT6776_GPIOBASE
NCT6776's data sheet does say that the virtual LDN of GPIO base should
be 0x308, and most mainboards using it usually correctly config it in
devicetree.cb under the path 2e.308, but in nct6776.h it used to be
defined as 8 from the beginning (an ancient commit 1e3a22649a, lately
revived in commit f95daa510d), identical to the LDN of WDT, which
eliminates the definition of value 2e.308, and makes related resource
allocations unable to take effect. (in log we can find "PNP: 002e.308
missing read_resources" if 2e.308 is enabled and assigned with
resources)

In this commit, NCT6776_GPIOBASE is set to a value consistent with the
data sheet.

With this commit, resources under 2e.308 of NCT6776 can be allocated
successfully.

Change-Id: I604bad7ab34a8f57262fdec508e5952cf8eabf1c
Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57221
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2021-08-29 16:41:12 +00:00
Mariusz Szafrański f3c84024b1 mainboard/intel/harcuvar: Remove hardcoded lapic 0 from devicetree.cb
This change follows other Intel SoCs common way to support SKUs with
bsp lapic_id != 0 by removing hardcoded lapic 0 from devicetree.cb and
allowing its detection at boottime. It completes support for HCV/DNV
after base SoC patch: commit ba936ce5db
soc/intel/denverton_ns: Ensure CPU device has a valid link

Link: https://mail.coreboot.org/hyperkitty/list/coreboot@coreboot.org/thread/YLMK2FBWWL6RKDNKBVZB3NJDYMEYHED7/
"A different lapic number in devicetree.cb needed for CPU with the same SKU and steping (Intel Atom C3538)."
Change-Id: I88f60f64d2beb2768ec9833de582d7901f456b11
Signed-off-by: Mariusz Szafrański <mariuszx.szafranski@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57158
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: King Sumo <kingsumos@gmail.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2021-08-28 21:27:46 +00:00
Felix Held f8df08213d soc/amd/common/fsp/Makefile: check if CONFIG_FSP_M_FILE is defined
When CONFIG_FSP_M_FILE isn't defined, the parameter of the file-size
call evaluates to an empty string, so the file-size call will run
"cat | wc -c" which will cause make to get stuck in there. Also print a
message when no FSP-M file is specified that the resulting image won't
boot successfully.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I6b02774e2c79d12554fd076aa01bbe972176f372
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57189
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2021-08-28 18:47:05 +00:00
Felix Singer 30bfcaba39 mb/google/{dedede,hatch}: Remove unneeded documentation
This documentation doesn't add any more value. Thus, remove it.

Change-Id: I0402bc736c6cc77d88a836bddce8eadae8ec5d7c
Signed-off-by: Felix Singer <felix.singer@secunet.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57115
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2021-08-28 18:21:57 +00:00
Felix Singer 0dcdb217cf soc/intel/common: Use CHIPSET_LOCKDOWN_COREBOOT by default
Since all mainboards use `CHIPSET_LOCKDOWN_COREBOOT`, make it the
default by changing its enum value to 0 and remove its configuration
from all related devicetrees.

If `common_soc_config.chipset_lockdown` is not configured with
something else in the devicetree, then `CHIPSET_LOCKDOWN_COREBOOT`
is used.

Also, add a release note for the upcoming 4.15 release.

Change-Id: I369f01d3da2e901e2fb57f2c83bd07380f3946a6
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56967
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Tim Crawford <tcrawford@system76.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2021-08-28 18:21:26 +00:00
Casper Chang 621ae7c701 mb/google/brya/variants/primus: update USB 2.0 controller Lane Parameter
Modify USB 2.0 port5 parameter to improve SI diagram measurement.

BUG=b:187992881
TEST= Pass USB 2.0 SI Eye diagram measurement.

Signed-off-by: Casper Chang <casper_chang@wistron.corp-partner.google.com>
Change-Id: I1eff05a7ad6563898744c24f9657e28625319873
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57198
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-08-28 17:44:51 +00:00
Wisley Chen 0d753e5108 mb/google/dedede/var/drawcia: Add fw_config probe for ALC5682-VD/ALC5682-VS
ALC5682-VD/ALC5682-VS use different kernel driver by different hid name.
Update hid name depending on the AUDIO_CODEC_SOURCE field of fw_config.

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

BUG=b:194356991
TEST=ALC5682-VD/ALC5682-VS audio codec can work

Change-Id: I71b824c42c13cc2a8bebe0072de4a65ce238f074
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57118
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-08-28 17:44:34 +00:00
stanley.wu b4481e0bd4 mb/google/dedede/var/boten: Generate SPD ID for supported part
Add supported memory part in the mem_parts_used.txt and generate the
SPD ID for the part. The memory part being added is:
MT53E512M32D1NP-046 WT:B

BUG=b:194223174
BRANCH=dedede
TEST=Build the boten board.

Signed-off-by: stanley.wu <stanley1.wu@lcfc.corp-partner.google.com>
Change-Id: I36fcbf7333fd9e85b28baa64676f8435aca63889
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56941
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-08-28 17:44:15 +00:00
Wisley Chen 54598a6ba5 mb/google/brya/var/anahera: Generate SPD ID for supported parts
Add supported memory parts in mem_parts_used.txt, and generate
SPD id for these parts.

MT53E1G32D2NP-046 WT:A
H9HCNNNBKMMLXR-NEE
K4U6E3S4AA-MGCR
MT53E512M32D2NP-046 WT:E
H9HCNNNCPMMLXR-NEE
K4UBE3D4AA-MGCR
H9HCNNNFAMMLXR-NEE
MT53E2G32D4NQ-046 WT:A
MT53E512M32D1NP-046 WT:B
MT53E1G32D2NP-046 WT:B

BUG=b:197850509
TEST=build pass

Change-Id: Ib7bdab1396138d728ae053c30656a9c80dddaff8
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57195
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-08-28 17:44:03 +00:00
Frank Wu 1693f6e09a mb/google/dedede/var/driblee: Configure I2C ports and touchpad
Update the I2C ports and touchpad based on the schematic.

BUG=b:195622489, b:191732473
BRANCH=keeby
TEST=FW_NAME="driblee" emerge-keeby coreboot

Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Change-Id: I8778ad6564e526e029c46c36c78e38f764e3c6b5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56998
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-28 17:43:27 +00:00
Frank Wu ba1091a0e6 mb/google/dedede/var/driblee: Configure USB port settings
Update the USB port configuration based on driblee schematic.

USB2 [0]: USB Type C Port 0
USB2 [1]: None
USB2 [2]: USB Type A Port 1
USB2 [3]: None
USB2 [4]: None
USB2 [5]: Camera UFC
USB2 [6]: None
USB2 [7]: None

USB3 [0]: USB Type C Port 0 (M/B side)
USB3 [1]: None
USB3 [2]: USB Type A Port 0 (M/B side)
USB3 [3]: None

BUG=b:195622487, b:191732473
BRANCH=keeby
TEST=FW_NAME="driblee" emerge-keeby coreboot

Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Change-Id: Id9f4f8db98cb20db1c3936c65689a847a7802b9a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56997
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-28 17:43:07 +00:00
Martin Roth dd6c7331ac mb/(amd,google): Update SPI Kconfig settings based on devicetree
This takes the devicetree SPI settings and moves them into Kconfig.

BUG=b:195943311
TEST=boot guybrush & majolica and verify spi settings.

Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: Icce1d57761465ae8255e5d9ce8679f3fdcb0ceed
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56885
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-08-28 17:42:22 +00:00
Sumeet Pawnikar f032221bd1 mb/google/brya: Add two sensors for DPTF functionality
Add two thermal sensors for fan and wwan for DPTF based thermal control.

BRANCH=None
BUG=b:181271666
TEST=None

Change-Id: Idc9bd6040c9bb316ec7e314f5e9c937c75cfc95a
Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54724
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Boris Mittelberg <bmbm@google.com>
2021-08-28 17:39:54 +00:00
Bernardo Perez Priego 4b53474d23 mb/intel/adlrvp_m: Enable touchscreen
This will add ACPI information to enable WACOM touchscreen.

TEST=Boot DUT and issue command:
     $ ls -al /sys/bus/i2c/devices
     WACOM PWB-D893 device should be listed and touchscreen should be functional.

Signed-off-by: Bernardo Perez Priego <bernardo.perez.priego@intel.com>
Change-Id: I37c0831485135fda3284dda6b61f4825b7fc51a3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56247
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
2021-08-28 01:24:35 +00:00
Ian Feng c375feecc5 mb/google/dedede/var/corori: Generate RAM ID and SPD file
Add the support RAM parts for Corori.
Here is the ram part number list:

DRAM Part Name                 ID to assign
H9HCNNNBKMMLXR-NEE             0 (0000)
K4U6E3S4AA-MGCR                0 (0000)

lp4x-spd-1.hex # ID = 0(0b0000) Parts = H9HCNNNBKMMLXR-NEE, K4U6E3S4AA-MGCR

BUG=b:196744958
BRANCH=keeby
TEST=emerge-keeby coreboot

Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Change-Id: Ia11b5db145deeea838a8f5949accdb11e13342f2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56988
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-28 01:24:19 +00:00
Ian Feng b26e613bed mb/google/dedede/var/corori: Configure thermal sensor setting
According to schematics, TSR2 thermal sensor is not present in corori.

BUG=b:197281317
BRANCH=keeby
TEST=FW_NAME="corori" emerge-keeby coreboot

Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Change-Id: Id69f9d6ace738ef1e792addd782d05c2d03d2b3a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57110
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-28 01:23:55 +00:00
Ian Feng aed85c0757 mb/google/dedede/var/corori: Configure I2C ports and touchpad
1. Support Elan touchpad.
2. Follow schematic to disable I2C1, I2C2 and I2C3.

BUG=b:197052531
BRANCH=keeby
TEST=FW_NAME="corori" emerge-keeby coreboot

Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Change-Id: Ideef57c275432e21f8580d4c5c937909b168d91f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57031
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-28 01:23:38 +00:00
Ian Feng 611b5e2bb2 mb/google/dedede/var/corori: Configure audio setting
Select the drivers for ALC5682 codec and MAX98360A spk amp

BUG=b:197037090
BRANCH=keeby
TEST=FW_NAME="corori" emerge-keeby coreboot

Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Change-Id: I0659a05fbcc28702d922a23d74885ba65a4254f1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57015
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-28 01:23:13 +00:00
Ian Feng a55f4065c8 mb/google/dedede/var/corori: Configure USB port settings
Follow schematic to modify USB port settings.

USB2 [0]: USB Type C Port 0
USB2 [1]: None
USB2 [2]: USB Type A Port 0
USB2 [3]: None
USB2 [4]: None
USB2 [5]: Camera UFC
USB2 [6]: None
USB2 [7]: Integrated Bluetooth

USB3 [0]: USB Type C Port 0 (M/B side)
USB3 [1]: None
USB3 [2]: USB Type A Port 0 (M/B side)
USB3 [3]: None

BUG=b:196998272
BRANCH=keeby
TEST=FW_NAME="corori" emerge-keeby coreboot

Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Change-Id: I2045b2be9d79bfd394fa4520faa0fb552a704206
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57010
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-28 01:22:58 +00:00
Ian Feng be2858e22e mb/google/dedede/var/corori: Configure GPIO settings
Updated the GPIO pins based on the latest schematic.

BUG=b:196867404
BRANCH=keeby
TEST=FW_NAME=corori emerge-keeby coreboot

Signed-off-by: Ian Feng <ian_feng@compal.corp-partner.google.com>
Change-Id: I683a7da4fcb2e4e0efdb3547b1de15796c6b55e7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57001
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2021-08-28 01:22:43 +00:00
Wisley Chen 20b2d8a52c mb/google/brya: Create anahera variant
Create the anahera 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:197850509
BRANCH=None
TEST=util/abuild/abuild -p none -t google/brya -x -a
make sure the build includes GOOGLE_ANAHERA

Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Change-Id: Id7649d56a8d6f85d12208f7ddaf2f71a7fe98e8c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57187
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-08-28 01:22:16 +00:00
Angel Pons 1f4e78f651 mb/google/butterfly: Put braces around `else` branch
Ensure braces are consistent on all branches of a conditional statement,
as per the coding style.

Tested with BUILD_TIMELESS=1, Google Butterfly remains identical.

Change-Id: I34f3b22486e0f0712bc248477acb43012b21c5ee
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57163
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2021-08-27 20:01:55 +00:00
Felix Held 5bdc7c8850 mb/amd/majolica/Kconfig: add EFS SPI settings
This keeps the default of EFS_SPI_SPEED at 66.66Mhz for the non-EM100
case, but switches the EFS_SPI_READ_MODE setting from Dual IO (1-1-2) to
Quad IO (1-1-4) for the non-EM100 case. This patch adds a special config
for the EM100 emulator case that has limited SPI frequency support.

Tested on Majolica by Martin.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I8996c2bf606ccd21686092beac8d96b22c0b7869
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56815
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-27 18:26:26 +00:00
Angel Pons 2d45322639 broadwell: Drop weak `mainboard_fill_spd_data` definition
Make `mainboard_fill_spd_data` mandatory and adapt mainboards to define
this function accordingly.

Change-Id: Ic18c4c574e8c963bbb41c980f43bdbacc57735af
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55806
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-27 16:04:33 +00:00
Angel Pons 2bc7a6b3d2 soc/intel/broadwell: Move `mainboard_fill_spd_data`
Move the `mainboard_fill_spd_data` function out of romstage, in
preparation to confine `pei_data` usage to as few files as possible.

Change-Id: I6447da4d135d920f9145e817bfb7f9056e09df84
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55805
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-27 16:04:10 +00:00
Angel Pons 887b779c11 Broadwell boards: Do not assign unused SPD addresses
The `pei_data` struct is already zero-initialised.

Change-Id: If539cddc007f32a04389bc3b3b06c43cb5c86e10
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55804
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-27 16:03:50 +00:00
Angel Pons 19f1e9104a mb/google/auron: Refactor memory-down SPD handling
Variants only need to provide the SPD index and whether said index
corresponds to a dual-channel configuration, which can be achieved
without using `pei_data`. Add two functions that return the values
and use them in `spd.c` at mainboard level.

Change-Id: I9bc4527057d4a771883c8cc60da2501516d6fb94
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/55803
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2021-08-27 16:03:32 +00:00
Ariel Fang 3533808a6d mb/google/brya/variants/primus: Enable SaGv support
This patch enables SaGv support for primus.

BUG=b:196286180

Signed-off-by: Ariel Fang <ariel_fang@wistron.corp-partner.google.com>
Change-Id: I00074e348dd6347602c18dcfd231a890153b4685
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57135
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2021-08-27 16:01:20 +00:00
Furquan Shaikh ba936ce5db soc/intel/denverton_ns: Ensure CPU device has a valid link
This change calls `add_more_links()` in `denverton_init_cpus()` if
`dev->link_list` is NULL. This condition can occur if mainboard does
not add any APIC device in the device tree.

Link: https://mail.coreboot.org/hyperkitty/list/coreboot@coreboot.org/thread/YLMK2FBWWL6RKDNKBVZB3NJDYMEYHED7/
"A different lapic number in devicetree.cb needed for CPU with the
same SKU and steping (Intel Atom C3538)."

Change-Id: I6f453901b17f7eff22beed8dbf6995cdc9f9b776
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57152
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: King Sumo <kingsumos@gmail.com>
Reviewed-by: Suresh Bellampalli <suresh.bellampalli@intel.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Mariusz Szafrański <mariuszx.szafranski@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-27 15:58:42 +00:00
V Sowmya c398a204b4 mb/intel/adlrvp: Enable SaGv support
BUG=b:187446498
TEST=Boot and verify memory trains at all the SaGv points through FSP
debug logs.

Signed-off-by: V Sowmya <v.sowmya@intel.com>
Change-Id: I883ae50b07e7b1d5554763fd79079d40b264b721
Reviewed-on: https://review.coreboot.org/c/coreboot/+/54647
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Balaji Manigandan <balaji.manigandan@intel.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
2021-08-27 04:36:33 +00:00
Trevor Wu 1d19432e1e mb/google/cherry: Support audio codec RT1011
Add GPIO "rt1011 reset" and i2c2 initialization for RT1011.
Add CHERRY_USE_RT1011 and CHERRY_USE_RT1019 to Kconfig, so we can
spearate code for the specific codec by config.

Signed-off-by: Trevor Wu <trevor.wu@mediatek.com>
Change-Id: I18939a2a2caae0444ce17f4712764647975121ad
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57157
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-27 02:54:22 +00:00
Yu-Ping Wu 52889c9c9f libpayload: cbgfx: Clear screen by sequential access
Currently clear_screen() calls set_pixel() to set all pixels. However,
the actual order of pixels being set depends on the framebuffer
orientation. With NORMAL orientation, the framebuffer is accessed
sequentially; with LEFT_UP/RIGHT_UP orientation, it is accessed back and
forth, leading to performance drop (>1 second on bugzzy).

Therefore, ensure sequential access to the framebuffer, regardless of
the orientation.

BUG=b:194967458
TEST=emerge-cherry libpayload
BRANCH=dedede

Change-Id: Iecaff5b6abc24ba4b3859cbc44c0d61b2a90b2d9
Signed-off-by: Yu-Ping Wu <yupingso@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57104
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-27 02:53:38 +00:00
Johnny Lin b69d1dea47 Doc/mb/ocp: Update Delta Lake documentation for RAS features
Change-Id: I71b97930f1a1ca4a60f830a90d80af6ca0236c8e
Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/57093
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
2021-08-27 02:51:59 +00:00
Frank Wu 5d797a6b54 mb/google/dedede/var/driblee: Configure GPIO settings
Updated the GPIO pins based on the latest schematic.

BUG=b:191732473, b:195619827
BRANCH=keeby
TEST=FW_NAME=driblee emerge-keeby coreboot

Signed-off-by: Frank Wu <frank_wu@compal.corp-partner.google.com>
Change-Id: I20baeb6b13c8c0a70c7555aa8f7f5557768c0083
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56996
Reviewed-by: Shou-Chieh Hsu <shouchieh@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2021-08-27 02:51:32 +00:00