Commit Graph

22738 Commits

Author SHA1 Message Date
Subrata Banik ab9f64d011 soc/intel/cannonlake: Make few more whitespace proper in MCH name
CB:31547 fixes few whitespace error. Here is few more whitespace clean up.

Change-Id: I69c12a5da4feb48b2bc23874332ab341a559f6e6
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/31563
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
2019-02-23 04:45:46 +00:00
Kyösti Mälkki b92853ed56 arch/arm64: Add PCI config support in romstage
Change-Id: I9cc3dc51764f24b986434080f480932dceb8d133
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31307
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-02-22 19:32:36 +00:00
Shelley Chen 26905f70b7 mb/google/hatch: Enable wake from trackpad
For some reason, wake does not currently work from GPP_D21, but IRQs
are working fine from that gpio.  Thus, we have to switch IRQ to
GPP_D21 and wake to GPP_A21, which was previously used for IRQs from
the trackpad.  Additionally, we need to use two gpios for irqs and
wake source at the moment because of b:123967687, where FSP is locking
down PCR and configuring ITSS.  We need to configure the wake source
gpio as inverted and the IRQ gpio as non-inverted until the bug is
resolved.

BUG=b:121212459
BRANCH=None
TEST=run evtest with trackpad
     Use trackpad with ChromeOS UI and make sure it reacts as expected.
     Run powerd_dbus_suspend and press trackpad and make sure DUT
     wakes.

Change-Id: I7b236136befc05c6586d9ba69185ed4b5d385273
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/31533
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-22 19:00:50 +00:00
Patrick Rudolph 71c0a94987 drivers/cavium: Add UART PCI driver
Add UART PCI driver in cavium/common/pci.

Tested on opencellular/elgon.
The UART is still initialized and usable in Linux.

Change-Id: I0fa2f086aba9b4f9c6dba7a35a84ea61c5fa64e4
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/30608
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-02-22 12:25:25 +00:00
Caveh Jalali ab77008395 mb/google/poppy/variants/atlas: move WiFi wake to GPP_B7
The latest rev. of the atlas board moves the WiFi wake source from
WAKE# to GPP_B7.  The original GPP_A0 in the device tree is just
wrong.  This also reconfigures DW1 to the GPP_B group so we can use
GPP_B7 as a wake source.

GPP_B7 is still configured as a no-connect in gpio.c, so this doesn't
actually enable WiFi wake.  We'll follow up with another patch to set
up GPP_B7 properly on boards that support it.

BUG=b:122327852
BRANCH=none
TEST=atlas still boots

Change-Id: I1816500dd0ab6186fd51aa6945faf73d00c152fe
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31211
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-22 11:10:53 +00:00
Joel Kitching d6f71d03f1 vboot: fix STARTS_IN_BOOTBLOCK/_ROMSTAGE logic
Fix up the logic of when to include VBOOT2_WORK symbols on x86,
which are only needed when VBOOT_STARTS_IN_BOOTBLOCK is enabled.

Also correct the value of the __PRE_RAM__ macro in the case that
VBOOT_STARTS_IN_ROMSTAGE is selected.  In this case, DRAM is
already up and verstage should not be considered pre-ram.

BUG=b:124141368, b:124192753
TEST=Build locally for eve
TEST=util/lint/checkpatch.pl -g origin/master..HEAD
TEST=util/abuild/abuild -B -e -y -c 50 -p none -x
TEST=make clean && make test-abuild
BRANCH=none

Change-Id: Ie51e8f93b99ab230f3caeede2a33ec8b443e3d7a
Signed-off-by: Joel Kitching <kitching@google.com>
Reviewed-on: https://review.coreboot.org/c/31541
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-22 11:10:40 +00:00
Lukasz Siudut 180ac500fc mb/ocp/monolake: Fix booting issues
We experienced booting issues during FSP-M phase. Applying fix that was
introduced for wedge100s  - 817994c1be (mb/ocp/wedge100s/romstage:
Workaround broken platform state) - helped and systems started to
boot properly.

Signed-off-by: Lukasz Siudut <lsiudut@fb.com>
Change-Id: Ibfbe9d19c7413098c56d1b6131640097fdf731ab
Reviewed-on: https://review.coreboot.org/c/31435
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-02-22 11:09:04 +00:00
Jeremy Soller 4185de5ff7 soc/intel/cannonlake: Add support for setting FSP-S PcieRpHotPlug from devicetree
Tested on system76 galp3-c

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Change-Id: I3aa8990a335e413628c016007ebabf7142aef80d
Reviewed-on: https://review.coreboot.org/c/31535
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-22 11:08:21 +00:00
Rizwan Qureshi eb503296fc soc/intel/cannonlake: Add ASL function for setting pad mode
Add a function in gpio ASL library to set pad mode.

BUG=b:123350329

Change-Id: I6c683f27ddffc3132001706d1694c71bb5664577
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/c/31444
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-22 11:07:48 +00:00
Julius Werner 7e0dea6317 symbols.h: Add macro to define memlayout region symbols
When <symbols.h> was first introduced, it only declared a handful of
regions and we didn't expect that too many architectures and platforms
would need to add their own later. However, our amount of platforms has
greatly expanded since, and with them the need for more special memory
regions. The amount of code duplication is starting to get unsightly,
and platforms keep defining their own <soc/symbols.h> files that need
this as well.

This patch adds another macro to cut down the definition boilerplate.
Unfortunately, macros cannot define other macros when they're called, so
referring to region sizes as _name_size doesn't work anymore. This patch
replaces the scheme with REGION_SIZE(name).

Not touching the regions in the x86-specific <arch/symbols.h> yet since
they don't follow the standard _region/_eregion naming scheme. They can
be converted later if desired.

Change-Id: I44727d77d1de75882c72a94f29bd7e2c27741dd8
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31539
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-02-22 06:44:02 +00:00
Julius Werner 314b5c370b rockchip/rk3399: Fix BL31 bootmem regions
The BL31 on RK3399 is split into multiple segments... the majority goes
into DRAM, but small parts must be put into SRAM and PMUSRAM. With
CB:31123 only the DRAM part was added to memlayout, so the SRAM parts
will not be correctly marked in bootmem and BL31 loading fails the
selfload check. This patch adds the remaining regions to fix the
problem.

Change-Id: Ia0597216c08512c47361a1dc0beb34d022a8994f
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31538
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ting Shen <phoenixshen@google.com>
2019-02-22 06:43:47 +00:00
Subrata Banik d1dfba4a1a soc/intel/cannonlake: Add whitespace proper in CPU/MCH/IGD name
Change-Id: I33a50e9fc90162c7cb2aa7fbc3887efe9c6ebcde
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/31547
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-02-22 04:17:27 +00:00
Duncan Laurie c98e36fec5 Revert "src/drivers/intel/wifi: Add a W/A for Intel ThP2 9260"
This reverts commit 3afb84a245.

Reason for revert: This is causing issues with the PCIe link
and the system is unable to enter S0ix.  Until it can be fixed
in coreboot revert the change here that is not working properly.

BUG=b:124264120

Change-Id: Ia20da9ab560ca35950b4a916667f51e0f541b382
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31559
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Caveh Jalali <caveh@google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-22 03:00:30 +00:00
Scott Collyer 4323175818 mb/google/hatch: Make EC software sync enabled by default
EC software sync had been disabled because BIOS was not bundling a
useful EC image. This is no longer required. This CL removes that
change so EC software sync is enabled by default.

BUG=b:124208414
BRANCH=None
TEST=Tested with a system that have a different RW image and verified
that this image was overwritten to the one bundled in the BIOS and
that the EC was running its RW image.

Signed-off-by: Scott Collyer <scollyer@chromium.org>
Change-Id: Ic1ffdb62e9fa2cacb3296cb3807082f23e171ab5
Reviewed-on: https://review.coreboot.org/c/31537
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-22 02:57:27 +00:00
Matt DeVillier 460c2c2483 cpu/intel/common: Add newline to set_feature_ctrl_lock() output
Without newline, if IA32_FEATURE_CONTROL already locked, next
console line will be concatenated. If run on a multiple CPUs,
you get multiple lines concatenated.

Change-Id: I5b73ae4cb045973fa3ce07f4d93fda0caadf78eb
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31532
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-02-21 19:30:56 +00:00
jg_poxu 9e21b2dbd7 mediatek/mt8183: Support gpio eh and rsel setting for I2C
The setting of these registers are only for i2c pin.

BUG=b:80501386
BRANCH=none
TEST=Boot correctly on Kukui

Change-Id: I518ca07645fe55aa55e94e4f98178baa0b74a882
Signed-off-by: jg_poxu <jg_poxu@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/30974
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2019-02-21 19:27:44 +00:00
Kyösti Mälkki 187e4c4474 timestamp: Move timestamp_should_run() call
Old location caused spurious error messages when
called from APs, where timestamp_add_now() should
do nothing.

Moving the test also makes get_us_from_boot() usable
from APs (assuming cache coherency).

Change-Id: Ice9ece11b15bbe1a58a038cda3d299862e6f822b
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31524
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-21 19:10:45 +00:00
Ronak Kanabar 69a9565339 soc/intel/cannonlake: SoC specific microcode update check
For CFL and WHL, Microcode is being loaded from FIT. Both
supports the PRMRR/SGX feature. If This is supported the FIT
microcode load will set the msr (0x08b) with the Patch id one
less than the id in the microcode binary. This results in
Microcode getting reloaded again in bootblock and ramstage.
Avoid the microcode reload by checking for PRMRR support.
CFL and WHL CPU die are based on KBL CPU so we need to have
this check, where CNL CPU die is not based on KBL CPU so
skip this check for CNL.

BUG=b:124126405
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>

Change-Id: I3311a7413d27044f9c819179e5b0cb9a67b46955
Reviewed-on: https://review.coreboot.org/c/31492
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
2019-02-21 19:10:23 +00:00
Nico Huber 16a41ccaa1 sb/intel/bd82x6x: Fix default IRQ mapping
The default mapping was probably copy-pasted from a random
board and disabled some interrupts (by implicitly clearing
some register bits).

We provide a new default mapping with some reasoning, that
tries to be most compatible (i.e. avoids to use PIRQ E-H
that are not shareable on some boards).

The following functions had their interrupt pin disabled
before:

  o SATA 2 (explicitly, no board seems to enable the device)
  o PCIe Root Port #4, #6-#8 (probably by accident)

PIRQs used before this change: A-D, F and H. After this
change: A-D.

Change-Id: I33f82702ea9c1b9c22ce14f01ee630dbf6203362
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/31498
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-21 19:10:00 +00:00
Elyes HAOUAS 26071aaadf ACPI: Correct asl_compiler_revision value
Change-Id: I91b54b43c8bb5cb17ff86a6d9afa95f265ee49df
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31431
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-02-21 19:07:31 +00:00
Elyes HAOUAS 94ad37619f SMBIOS: Fix bios version
Change-Id: I142f08ed3c2704b8fde6d176f23772f5d6b33e85
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31437
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-02-21 19:07:18 +00:00
Elyes HAOUAS 16d05daffa mb/roda/rk886ex/acpi/superio.asl: Fix copy-paste error on "COMB"
Error spotted using IASL 20190215:
"Object is created temporarily in another method
and cannot be accessed"

Change-Id: I139c5c7b33671e7ed0c04c06fb290e001e57a687
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31528
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-02-21 19:04:02 +00:00
Elyes HAOUAS c55934db61 mb/roda/rk9/acpi/superio.asl: Fix copy-paste error on "COMB"
Error spotted using IASL 20190215:
"Object is created temporarily in another method
and cannot be accessed"

Change-Id: I7da9dcd68f5eec6383de7370bc8ab35f96a90c06
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31526
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-02-21 19:03:55 +00:00
Shelley Chen 3cce7a0311 soc/intel/cannonlake: Add field to identify single channel memory
Variants of Hatch need to accommodate single channel DDR.  Also,
removing const modifier as we'll need to set these fields
incrementally now.  For the single channel configuration, we set
MemorySpdPtr10 to 0.  For the dual channel configuration, we set
MemorySpdPtr10 to MemorySpdPtr00.

BUG=b:123062346, b:122959294
BRANCH=None
TEST=Boot into current boards and ensure that we have 2 channels as expected

Change-Id: Ice22b103664187834e255d1359bfd9b51993b5b6
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/31262
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-21 11:31:19 +00:00
Gaggery Tsai d01a995cd3 src/soc/intel/cannonlake: Add PsysPmax setting
This patch feeds PsysPmax setting to FSP through UPD and adds a
psys_pmax member in chip information so that we can set PsysPmax
through DT. The PsysPmax needs to be set correctly mapping to maximum
system power. Otherwise, system performance would be limited due to
the default PsysPmax setting in FSP is only 21W.

BUG=None
BRANCH=None
TEST=Set psys_pmax to an example value eg 101 in DT && put debug code
     in FSP to print the PsysPmax value before sending to Pcode, ensure
     the setting is correctly programmed.

Change-Id: Ia88ea17bc661a388c5b9bc3e59abc27c9f262977
Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com>
Reviewed-on: https://review.coreboot.org/c/31505
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-21 11:29:46 +00:00
Lijian Zhao 5620b10546 src/soc/intel/cannonlake: Add _DSM methods for LPIT table
This patch adds the _DSM method 5 and 6 for entering and exiting S0ix.
The _DSM method gets injected into DSDT table and called from kernel.

LPIT table is hardcoded in this patch but the proper way to implement
is to use inject_dsdt to make the _DSM methods available for soc's to
implement.

Calling the LPIT table from mainboard here so that with the current
implementation the platforms which do not have lpit support throw
compilation error.

Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Change-Id: Ia908969decf7cf12f505becb4f4a4a9caa7ed6db
Reviewed-on: https://review.coreboot.org/c/31101
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Shaunak Saha <shaunak.saha@intel.corp-partner.google.com>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2019-02-20 23:44:37 +00:00
Patrick Rudolph 0fa793ccb0 sb/intel/i82371eb/fadt: Fix compilation on x86_64
Change-Id: I8997910ff003a4d0c97656cb1e9a4342230ac51a
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/c/31471
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2019-02-20 10:39:17 +00:00
Richard Spiegel 22ba205f70 drivers/spi/spi_flash.c: Avoid static scan false positive
Static scan-build indicates a possible invalid return from function
spi_flash_cmd_erase(). The root cause is because the scan believes it's
possible for offset to be above the end address in the first pass, thus
not setting a value for variable ret. Assign initial value of -1 to
variable ret to make checker happy.

BUG=b:112253891
TEST=build grunt

Change-Id: If548728ff90b755c69143eabff6aeff01e8fd483
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/c/31473
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-20 10:38:22 +00:00
Patrick Rudolph 4d60d96497 walkcbfs: Only compile on x86_32
The current implementation was designed for x86_32, so don't
attempt to compile it on x86_64 until it is fixed.

Fixes compilation error on x86_64.

Change-Id: Ibd87dc2979f6d45a988119c06c5f9e61b3e86171
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/c/31467
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2019-02-20 10:38:05 +00:00
Subrata Banik 71da5fe5e9 drivers/intel/wifi: Add support for Harrison Peak (HrP) 9560 module
Add HrP 9560 module device ID (0x02F0) into device/pci_ids.h file.

TEST=HrP module is getting detected during PCI enumeration

Change-Id: Id0a8a7a8cf7c665bd49f27b1c50d41d26a3274ce
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Signed-off-by: Wonkyu Kim <wonkyu.kim@intel.com>
Reviewed-on: https://review.coreboot.org/c/31475
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-20 04:24:57 +00:00
Kyösti Mälkki 47924a297e sifive/hifive-unleashed: Drop unneeded console_tx_flush()
Every printk() call already does console_tx_flush()
so there should not be anything in transmit buffer
when we return from console_init().

Change-Id: Iff2927c02d2c8031907620a056782bb014f20162
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31369
Reviewed-by: Xiang Wang <wxjstz@126.com>
Reviewed-by: Philipp Hug <philipp@hug.cx>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-20 03:57:33 +00:00
Chris Zhou ba269fd77e mb/google/sarien/variants/sarien: Adjust TP/TS I2C CLK to meet spec
After adjustment on Sarien EVT
Touch Screen CLK (Elan):  389.7 KHz
Touch Screen CLK (Melfas): 377.7 KHz
Touch Pad CLK: 385 KHz

BUG=b:122657195
BRANCH=master
TEST=emerge-sarien coreboot chromeos-bootimage
     measure by scope with sarien.

Signed-off-by: Chris Zhou <chris_zhou@compal.corp-partner.google.com>
Change-Id: I53b60354e5a7a0ace8efb677775c0a9f8779061d
Reviewed-on: https://review.coreboot.org/c/31476
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-20 03:14:26 +00:00
Lijian Zhao 34745f613f soc/intel/common: Add whiskeylake celeron v-0 support
New whiskeylake v-0 stepping have changed the graphics device id from
0x3EA0 to 0x3EA1 for celeron, so declare that in common code. Also the
CPUID was changed from 806EB to 806EC, include that as well.

Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Change-Id: Ief5213a96507124b90f8dd2eeea2f6bf43843dc6
Reviewed-on: https://review.coreboot.org/c/31433
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-19 22:00:40 +00:00
John Su c94631718b mb/google/sarien/variants/sarien: Update GPIO H3 for DVT1
Follow b:123461432#5 to update GPIO H3(CNVI_EN#) for DVT1.
Update setting GPIO H3 to output and low level.

BUG=b:123461432
TEST=Built and tested on sarien system

Change-Id: I6a56df9a7bf75f49133a646312ae5093c2652698
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/31412
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2019-02-18 20:27:37 +00:00
John Su 0790030735 mb/google/sarien/variants/sarien: Update thermal configuration for DPTF
Follow thermal table (b:123383634 comment#1) for EVT1 tunning.

BUG=b:123383634
TEST=Built and tested on sarien system

Change-Id: I22908e4bf39aedb8cf31a9060084f6f36bff56ca
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/31170
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2019-02-18 20:26:37 +00:00
Francois Toguo 993f68ab5a soc/intel: Add mem_rank info in SMBIOS
"mosys memory spd print all" returns incorrect memory ranks info.
This patch and 2 upcomming ones (one in FSP) will address the issue.

BUG=b:122329046
TEST=Boot to OS on Bobba variant of Octopus
BRANCH=octopus

Change-Id: I212215040e4786c258a9c604cc5c2bb62867c842
Signed-off-by: Francois Toguo <francois.toguo.fotso@intel.com>
Reviewed-on: https://review.coreboot.org/c/31235
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-18 20:25:42 +00:00
Nico Huber 6275e34523 soc/intel/skylake: Use real common code for VMX init
Use the common VMX implementation, and set IA32_FEATURE_CONTROL
lock bit per Kconfig *after* SGX is configured (as SGX also sets
bits on the IA32_FEATURE_CONTROL register).

As it is now correctly based on a Kconfig, the `VmxEnable` devicetree
setting vanishes.

Test: build/boot google/[chell,fizz], observe Virtualization enabled
under Windows 10 when VMX enabled and lock bit set.

Change-Id: Iea598cf74ba542a650433719f29cb5c9df700c0f
Signed-off-by: Nico Huber <nico.h@gmx.de>
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/29682
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-18 20:24:50 +00:00
Duncan Laurie cd7873a28a mb/google/sarien: Swap FMAP location for RW_LEGACY and NVRAM
The Intel SOC can only shadow the top 16MB of SPI into memory so
in order to make it easier to access the NVRAM region with memory
mapped interface move it above the much larger RW_LEGACY region.

I tested to confirm that this region can now be read via MMIO
interface and does not need to use the hwseq SPI controller.

Change-Id: Iafacb01eec07beaf474b6a1f2b36a77117e327da
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31436
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Lijian Zhao <lijian.zhao@intel.com>
2019-02-18 20:24:27 +00:00
Roy Mingi Park 2cb7de09b2 mb/google/sarien: Create VR config settings
Create VR settings configuration as per board design.

BUG=N/A
TEST=Build and boot up into sarien platform.

Change-Id: Ic196fd80e5211bd5146158d4d340b52c850a4e62
Signed-off-by: Roy Mingi Park <roy.mingi.park@intel.com>
Reviewed-on: https://review.coreboot.org/c/31404
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2019-02-18 20:23:13 +00:00
Mengqi Guo 23e3013830 mb/google/kahlee: Enable mode change as wake source for S3
This change enables mode change as a wake source for S3.

BUG=b:124132058

Change-Id: I95b1eac800858ab17cdf69bdd3f2c5828516c184
Signed-off-by: Mengqi Guo <mqg@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31429
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-18 20:22:53 +00:00
Martin Roth eb84337344 src/mainboard/kahlee: Remove delan variant
BUG=b:121354442
TEST=None

Change-Id: I348c7106772eecd513baf9abe60ef19008d0ba4d
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/c/31424
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-18 20:22:33 +00:00
Casper Chang d432e367c1 mb/google/sarien/variants/arcada: Update thermal configuration for DPTF
Update dptf for arcada EVT.

BUG=b:123924662
TEST=Built and tested on arcada system

Signed-off-by: Casper Chang <casper_chang@wistron.corp-partner.google.com>
Change-Id: Ieed8021b83776fdb6320ff89b57c8d2747667fd5
Reviewed-on: https://review.coreboot.org/c/31331
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2019-02-18 20:19:38 +00:00
peichao.wang 67100b4147 mb/google/laser: Disable touch screen device that according to SKU ID
We need disable touch screen device on laser SKU ID 6.

BUG=none
TEST=according to sku_id (Laser(convertible): 5, Laser14(clamshell):
6, Laser14(clamshell + touch):7) distinguish whether disable touch
screen device.

Signed-off-by: peichao.wang <peichao.wang@bitland.corp-partner.google.com>
Change-Id: I6953c35a5e8c93d88fe63362156faa351e8ee71f
Reviewed-on: https://review.coreboot.org/c/31428
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-18 03:05:14 +00:00
Elyes HAOUAS 358cbb3a30 SMBIOS: Update BIOS Information (Type 0) to version V3.2.0
Add Extended BIOS ROM Size field.

Change-Id: Iec35c8c66210f0ddc07a2ca6f976a1f8fc53037d
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31416
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-02-15 23:22:41 +00:00
Elyes HAOUAS 1db2346e3f SMBIOS: Add new MEMORY_{TYPE,TECHNOLOGY,OPERATING} macros
Change-Id: I4e466614d0a9e8c89f298594a5785af775b22a95
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31423
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
2019-02-15 23:14:58 +00:00
Elyes HAOUAS 3233cf44ec include/smbios.h: Align values for readability
Change-Id: I362292e95557586e0e24a62a12a9ccc98143ef9c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31422
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2019-02-15 23:13:47 +00:00
Kyösti Mälkki e90b632e97 soc/amd/common: Move PI refcode loader
The moved functions are only about locating and loading
the refcode blobs. Separate them from the actual calls
into the blob. Eventually previous binaryPI blobs should
be unified to share same loader code.

Change-Id: I68885e7f855b195c178e746c8f3f0f49166d0def
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31318
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2019-02-15 17:49:31 +00:00
Sumeet Pawnikar fe1b40b1dd mb/google/hatch: Enable DPTF functionality
Enable DPTF functionality on hatch platform.

Change-Id: If9ef74364616f95b27b73c39fea42d2623d78ae2
Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://review.coreboot.org/c/31276
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-15 16:27:29 +00:00
Elyes HAOUAS a5cc0cfbf5 SMBIOS: Update BMC Interface Type field
Change-Id: I68a8515adf5b29a080f8c5c5b7a96b28bca74676
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31421
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
2019-02-15 16:26:09 +00:00
Richard Spiegel c93d4abb99 soc/amd/stoneyridge: Expand 48MHz for both osc out signals
There are typically two configurable oscillator outputs available on APUs
or FCHs.  Convert the enable function to work with either one.

BUG=b:none.
TEST=Build and boot grunt.

Change-Id: I4b89b1e3b7963472471e34897bdd00176dbdb914
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/c/31386
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2019-02-15 16:24:42 +00:00
Paul Menzel 8ca2af1c0d src: Use macro `ACPI_FADT_LEGACY_FREE`
Replace all instances, where 0 is used by the macro/define
`ACPI_FADT_LEGACY_FREE`.

Change-Id: I226b334620e0cdafc7639c7a76ea3a523ae53a74
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/31289
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
2019-02-15 16:24:02 +00:00
Kane Chen 223ddc298a soc/intel/skylake: Avoid TOL_1V8 being set for GPP_F4 ~ GPP_F11
According to doc 609208, bit 25 TOL_1V8 in GPP_F4 ~ GPP_F11 DW1
should be clear to prevent unexpected I2C behaviors.

BUG=b:124269499
TEST=boot on nami and check bit 25 TOL_1V8 is clear

Change-Id: I419ef3e89104ad3611e96bbe23a582504b45be0c
Signed-off-by: Kane Chen <kane.chen@intel.com>
Reviewed-on: https://review.coreboot.org/c/31368
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-15 16:23:44 +00:00
Roy Mingi Park 1ac2ad0fbe soc/intel/cannonlake: Define VR settings
Define VR settings configuration as per board design.

BUG=N/A
TEST=Build and boot up into sarien platform.

Change-Id: Ic9927943b1f8fab687659fd1d6da0e3988a3aba2
Signed-off-by: Roy Mingi Park <roy.mingi.park@intel.com>
Reviewed-on: https://review.coreboot.org/c/31405
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2019-02-15 16:23:28 +00:00
Karthikeyan Ramasubramanian 783be13495 mb/google/octopus: Fix USB ACPI configuration for CNVi BT module
CNVi Bluetooth module is at port 8 (zero-indexed) and not at port 9. Fix
the device configuration in the devicetree.

BUG=b:123296264
BRANCH=octopus
TEST=Boots to ChromeOS. Checked the SSDT table to ensure that the reset
gpio is exported under the device \_SB_.PCI0.XHCI.RHUB.HS09. Ensured
that the kernel btusb driver is able to find the exported GPIO in the
devices with CNVi BT module.

Change-Id: I302bc87b18a1aaad77bfb73d607ba28b89b79c14
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/31387
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-15 16:23:14 +00:00
Furquan Shaikh dc8679cefe drivers/i2c/max98373: Set default bus speed as I2C_SPEED_FAST
This change sets default bus speed as I2C_SPEED_FAST instead of
I2C_SPEED_STANDARD when board does not provide any speed. This makes
it similar to all other i2c drivers in coreboot.

BUG=b:124403846
BRANCH=nocturne,atlas

Change-Id: I877d837eea2dfebf78ad7d97a32ee2071500625e
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/31407
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2019-02-15 06:38:02 +00:00
Chris Zhou 04de23214e mb/google/sarien: Set ELAN as the default for touch panel
According to request of comment 35, setting ELAN as the default.

BUG=b:122019253
BRANCH=master
TEST=Verify touchscreen on sarien works with this change.

Signed-off-by: Chris Zhou <chris_zhou@compal.corp-partner.google.com>
Change-Id: Iee5e7a21545ca798c0c22f86906acc8e7d81e945
Reviewed-on: https://review.coreboot.org/c/31430
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2019-02-15 03:37:20 +00:00
Chris Zhou 391709154c mb/google/sarien/variants/sarien: Enable Elan touchscreen
Eanble Elan touch for sarien EVT build

BUG=b:119763054
BRANCH=master
TEST=Verify touchscreen on sarien works with this change.

Signed-off-by: Chris Zhou <chris_zhou@compal.corp-partner.google.com>
Change-Id: I790436338705fc9d68f714245e9b9bb518ddb30a
Reviewed-on: https://review.coreboot.org/c/31413
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-15 02:03:35 +00:00
Kyösti Mälkki ccb53e1817 binaryPI: Fix cache coherency use for AP CPUs
The memory between _car_region_start .. _car_region_end has to
be set up as WB in MTRRs for all the cores executing through
bootblock, verstage and romstage. Otherwise global variables may
fail on AP CPUs.

Fixes combination of CBMEM_CONSOLE=y with SQUELCH_EARLY_SMP=n,
which previously did not boot at all for some cases.

Change-Id: I4abcec90c03046e32dafcf97d2f7228ca93c5549
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/c/26115
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-14 15:16:19 +00:00
Peter Lemenkov 9c790a2fdc superio/nsc/pc87417: Use common early_serial
Change-Id: If32fa5970ca7ca634833a0e39da66c1f89ed33fe
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31337
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-02-14 07:54:55 +00:00
Peter Lemenkov 272804ff01 superio/nsc/pc87366: Use common early_serial
Change-Id: I1f03182cd760ea63df78ef3e2b2604c3322b4f3f
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31336
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-02-14 07:54:47 +00:00
Peter Lemenkov 485937fd4f superio/nsc/pc87360: Use common early_serial
Change-Id: Id866c30d676e3c3ff53bfc2547abffce6e9b5e07
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31335
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-02-14 07:54:40 +00:00
Peter Lemenkov 05383287a1 superio/nsc/pc87309: Use common early_serial
Change-Id: If856ec6d5bcf4951d0e09464526239f5a508d4b0
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31334
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-02-14 07:54:31 +00:00
Peter Lemenkov 122457058e superio/nsc/pc87392: Use common early_serial
Change-Id: I9437ee3f8830dc831aacfc62b9dd1943b73b98d4
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31333
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-14 07:54:16 +00:00
Peter Lemenkov e7705f2df1 superio/nsc: Introduce common early_serial
Change-Id: I0860e95258b87f059a3a9c31e382d758403d0428
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31332
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-02-14 07:53:56 +00:00
Furquan Shaikh 32bc1dc531 mb/google/hatch: Bump up the BIOS region to 28MiB
This change bumps up the BIOS region to 28MiB to use the hole
between SI_ALL and SI_BIOS. Since this SPI flash part is 32MiB, only
the top 16MiB actually gets memory mapped. Thus, the change ensures
that only RW_LEGACY lies in the 12MiB that is not memory mapped.

BUG=b:123443737
TEST=Verified that hatch still boots up. Ensured that fmap dump looks
correct.

Change-Id: I5832d2b89c7eedfc270755e2add16131cfbddff4
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/31376
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
2019-02-13 18:46:39 +00:00
Furquan Shaikh 883d821503 mb/google/poppy/var/rammus: Enable mode change wake source for S3/S0ix
This change enables mode change as a wake source for S3 and S0ix.

Change-Id: I2e7f9997776b1e024ea417eb69e6c2ffa8c62580
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/31296
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-02-13 16:47:20 +00:00
Ronak Kanabar 3bb8c244f2 soc/intel/cannonlake: Configure serial debug uart
Set SerialIoDebugUartNumber to CONFIG_UART_FOR_CONSOLE
SerialIoDebugUartNumber UPD use to select UART Number for Debug Purpose
The default value of SerialIoDebugUartNumber is 2 by default it selects UART 2
so it needs to be initialized as per board config

BUG=b:123702398

Change-Id: I91df4bb756e8ea86db112f1cc28687f48b2c0525
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/31375
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-13 13:04:38 +00:00
Duncan Laurie f1690f0ec1 mb/google/sarien: Support multiple touchscreen at same address
The Sarien board may have different touchscreen devices that use the
same I2C slave address but have different requirements such as needing
a special driver or ACPI configuration.

In order to support this the devicetree may be configured with multiple
devices at the same address and at boot time the unused devices will be
disabled.

Because there is no GPIO for selecting the device that is present it can
instead be selected with Kconfig, or by setting a VPD key to the HID of
the touchscreen device that is present.  The default for Sarien devices
is to not enable a touchscreen for the OS.

The touchscreen selection is currently limited to the Sarien variant but
this also adds the touchscreen HID for Arcada to Kconfig so it would not
complain about the key not being set.

BUG=b:122019253
TEST=This was tested on a Sarien board by adding a second entry to the
devicetree at the same address.  Without this change the SSDT is not
loaded by the kernel because of the address conflict.  After this change
no touchscreen is enabled by default, but one can be selected with
Kconfig or by setting the 'touchscreen_hid' VPD key.

Change-Id: I4da12b1de0c551bcd89325fe0d8c66c6ffeb7afc
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31295
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-13 13:04:22 +00:00
John Su c8464748cd mb/google/sarien/variants/sarien: Add GPIO H3 for DVT1
Follow Northbay and intermal project to add GPIO H3(CNVI_EN#) for DVT1.

BUG=b:123461432
TEST=Built and tested on sarien system

Change-Id: I580a6e094d84a7bada534b14c2b65ecf4b9942b0
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/31360
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2019-02-13 13:03:58 +00:00
John Su 025c575750 mb/google/sarien/variants/sarien: Add GPIO H15 for DVT1
Follow b:123342945 to add GPIO H15(BT_RADIO_DIS#) for DVT1.

BUG=b:123342945
TEST=Built and tested on sarien system

Change-Id: I0caf97f6a2a8abf2914667350c76300733ead1b8
Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/31330
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2019-02-13 13:03:53 +00:00
Keith Short e0f3400547 coreboot: check Cr50 PM mode on normal boot
Under some scenarios the key ladder on the Cr50 can get disabled.  If
this state is detected, trigger a reboot of the Cr50 to restore full
TPM functionality.

BUG=b:121463033
BRANCH=none
TEST=Built coreboot on sarien and grunt platforms.
TEST=Ran 'gsctool -a -m disable' and reboot. Verified coreboot sends
VENDOR_CC_IMMEDIATE_RESET command to Cr50 and that the Cr50 resets and
then the platform boots normally.
TEST=Performed Cr50 rollback to 0.0.22 which does not support the
VENDOR_CC_TPM_MODE command, confirmed that platform boots normally and
the coreboot log captures the unsupported command.
Tested-by: Keith Short <keithshort@chromium.org>

Change-Id: I70e012efaf1079d43890e909bc6b5015bef6835a
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31260
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2019-02-13 13:03:33 +00:00
Aamir Bohra 91be00ef1b mb/google/hatch: Configure GPIO pad for non-inversion
This implementation configures GPIO (GPP_A21, GPP_C21, GPP_D16)
pad in non-inversion mode i.e Rx PAD state is not inverted as
it is sent from GPIO to IOAPIC.

BUG=b:123315212
TEST=Tested for below:
     -> Verify touchpad is working fine.
     -> TPM init is successful and boot with fixed boot media.

Change-Id: I6034fd07ccc96a19218d57ef8bb9049c4b963ea5
Signed-off-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-on: https://review.coreboot.org/c/31328
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-02-13 13:03:00 +00:00
Kyösti Mälkki 97b30d8659 cpu/intel/common: Add Nehalem for FSB detection
Change-Id: I194ac9eb6f03e7d3f5c96d6e6491e9ef32da9078
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31339
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-13 13:02:06 +00:00
Kyösti Mälkki 1a8387eaba cpu/intel/common: Split get_ia32_fsb()
It is desireable to not have printk() inside a
function body that can be used for udelay().
This avoids potential infinite recursion.

Change-Id: Ie67fc2a8da8351f22794e4d36c55b887c298e8ca
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31338
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
2019-02-13 13:01:54 +00:00
Arthur Heymans 61e18ebdf1 soc/intel/icelake: Don't use CAR_GLOBAL
All platforms using this code have NO_CAR_GLOBAL_MIGRATION.

Change-Id: Ia210af6ef1a97da67d00036070faa1ceb3ce250b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/30515
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-02-13 13:01:16 +00:00
Arthur Heymans e2286782c3 soc/intel/baytrail: Don't use CAR_GLOBAL
All platforms using this code have NO_CAR_GLOBAL_MIGRATION.

Change-Id: I731bc1c9dec6cb5bbb228b7949a73848cb73eee3
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/30511
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-13 13:01:12 +00:00
Arthur Heymans 7ea4e02de6 soc/intel/broadwell: Don't use CAR_GLOBAL
All platforms using this code have NO_CAR_GLOBAL_MIGRATION.

Change-Id: Idca207b4f05d1844ce6612dbecaad6faeb68725a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/30513
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2019-02-13 13:01:09 +00:00
Arthur Heymans 7e8bad4daa soc/intel/cannonlake: Don't use CAR_GLOBAL
All platforms using this code have NO_CAR_GLOBAL_MIGRATION.

Change-Id: I72effa93e36156ad35b3e45db449d8d0d0cabf06
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/30514
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2019-02-13 13:01:04 +00:00
Uwe Poeche fdd0519761 siemens/mc_apl4: Enable HW SPI TPM on mainboard mc_apl4
This patch enables TPM2 on LPC and adds the needed devicetree entry for
TPM for mc_apl4.

Test=mc_apl4 flashed, booted into Linux and checked via dmesg if TPM is
present

Change-Id: I9af7e1a8623302eca46f5ecd8e498678ccda92ad
Signed-off-by: Uwe Poeche <uwe.poeche@siemens.com>
Reviewed-on: https://review.coreboot.org/c/31344
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-02-13 08:34:49 +00:00
Mario Scheithauer 51579edc60 siemens/mc_apl2: Remove double entry from devicetree
Remove a double entry for LPC device from devicetree.

Change-Id: Ib5b4f760251236d6a8b4aba719666daa97e7813d
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/c/31345
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2019-02-13 08:34:17 +00:00
Philipp Hug b09e5001f3 riscv: Add initial support for 32bit boards
* Adding separate targets for 32bit and 64bit qemu
* Using the riscv64 toolchain for 32bit builds requires setting -m elf32lriscv
* rv32/rv64 is currently configured with ARCH_RISCV_RV32/RV64 and not per stage.
  This should probably be changed later.

TEST=Boots to "Payload not loaded." on 32bit qemu using the following commands:

util/riscv/make-spike-elf.sh build/coreboot.rom build/coreboot.elf
qemu-system-riscv32 -M virt -m 1024M -nographic -kernel build/coreboot.elf

Change-Id: I35e59b459d1770df10b51fe9e77dcc474d7c75a0
Signed-off-by: Philipp Hug <philipp@hug.cx>
Reviewed-on: https://review.coreboot.org/c/31253
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: ron minnich <rminnich@gmail.com>
2019-02-13 04:49:14 +00:00
Nico Huber 540a664045 cpu/x86/mtrr: Fix _FROM_4G_TOP() macro
This macro was unnecessarily complex. Trying to avoid an overflow
for unknown reasons, and instead shifted the result into the sign
bit in C. Using a plain number literal that forces C to use an
adequate integer type seems to be safe. We start with 0xffffffff,
subtract `x` and add 1 again. Turned out to be a common pattern
and can't overflow for any positive 32-bit `x`.

Change-Id: Ibb0c5b88a6e42d3ef2990196a5b99ace90ea8ee8
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/31322
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2019-02-12 22:43:21 +00:00
Arthur Heymans f751aee926 sb/intel/common: Remove CAR_GLOBAL use
We have NO_CAR_GLOBAL_MIGRATION now.

Change-Id: Ic2c90d264d851ab4abeca07f412d43d088ad96dc
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/30506
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-12 22:17:37 +00:00
Arthur Heymans 33ab29fd7c nb/intel/nehalem: Remove CAR_GLOBAL use
We have NO_CAR_GLOBAL_MIGRATION now.

Change-Id: I077f235029e3fe3b1368f028981985895d8b766b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/30505
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-12 22:16:42 +00:00
Nico Huber 4c7eee2744 postcar: Make more use of postcar_frame_add_romcache()
Some similar calls to postcar_frame_add_mtrr() were added in the
meantime or were under review while postcar_frame_add_romcache()
was introduced.

Change-Id: Ia8771dc007c02328bd4784e6b50cada94abba198
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/31320
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-02-12 13:34:16 +00:00
Kyösti Mälkki 4dba4975b4 binaryPI: Drop nested northbridge in devicetree
SPD data needs to remain within same chip -block
with device 0:18.2.

Change-Id: Ic12481b637ee5f5119faec3239b477f613e4e511
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31271
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2019-02-12 13:33:27 +00:00
Seunghwan Kim 5edbea02d4 mb/google/octopus/casta: Tune usb2eye setting
It needs to tune usb2eye setting for these ports:
 USB2[4] - type-c port
 USB2[6] - camera

BUG=b:122878632
BRANCH=octopus
TEST=built and passed usb2eye SI test

Change-Id: Iaa3adaab2f391e95730b141dc0237ca62c459e5a
Signed-off-by: Seunghwan Kim <sh_.kim@samsung.com>
Reviewed-on: https://review.coreboot.org/c/31359
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-12 11:56:10 +00:00
Arthur Heymans 85e9f28461 soc/amd/common: Don't use CAR_GLOBAL
All platforms using this code have NO_CAR_GLOBAL_MIGRATION.

Change-Id: I422d5637caa1b55fa6bad30d25f5e34cbba40851
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/30509
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2019-02-12 05:13:11 +00:00
Kyösti Mälkki a8eb477c2e soc/amd/common: Remove redundant ACPI S3 test
Possible allowance to do wakeup is already evaluated
early in romstage, so these tests are redundant.

Change-Id: I7c7a9ecbfcb82790e477d906a00f9749103b4045
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/27276
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-12 05:02:40 +00:00
Kyösti Mälkki 79cc577ba2 google/kahlee: Remove unneeded HAVE_ACPI_RESUME guard
We leave it to linker garbage collection to drop
unreferenced code and symbols from final object files.
Function declarations and definitions are to be guarded
with preprocessor directives only as a last resort.

Change-Id: Ie8748ccddc8e31569c58deba5d08c98a04326fa8
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31317
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2019-02-12 05:00:55 +00:00
Nico Huber ce1a9289b5 soc/intel/bdw: Remove spurious comment
Change-Id: I45f2ca809a6acfcb80a742d29c045d04888e4d7f
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/31321
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-02-11 23:47:48 +00:00
Kyösti Mälkki 2d8aff3d93 device/pci_ops: Apply some symmetry in headers
To make PCI driver side arch-agnostic, function
declarations have to be in symmetrical header
file locations.

From the driver side, the correct file to include
is now <device/pci_ops.h>

Change-Id: I8076a4867fd7472beaae0a021dcf0d9c7c905871
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31306
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-02-11 20:44:37 +00:00
Kyösti Mälkki 8fd78a653f device/pci_ops: Move common pci_mmio_cfg.h
It is expected that method of accessing PCI configuration
register space via memory-mapped region is arch-agnostic.

Change-Id: Ide6baa00d611953aeb324be0d3561f464395c5eb
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31305
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-02-11 20:40:42 +00:00
Arthur Heymans 06e33226b3 mb/intel/galileo: Drop the FSP1.1 option
This board is EOL and has FSP2.0 support, so drop the older
version.

Change-Id: If5297e87c7a7422e1a129a2d8687fc86a5015a77
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/30946
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-02-11 12:28:52 +00:00
Arthur Heymans b1c57d1beb soc/intel/baytrail: Use non-evict CAR setup
The CAR setup is almost identical to the cpu/intel/non-evict
CAR setup, with the only difference that L2 cache needs to be
separately enabled. Currently this assumes that it is possible
to use a static Kconfig option to cover all CPU's requiring this.

Change-Id: Iae9b584bc0d32a56be2e6e2b2e893897eb448aa5
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/30814
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-02-11 12:28:44 +00:00
Nico Huber c9e33573c1 Revert "cpu/x86/mtrr: Fix sign overflow"
This reverts commit 6bbc8d8050.

The macro is used in assembly where integer suffixes are not portable.

Also, it is unclear how this can overflow as it's already the macros
purpose to avoid the overflow.

Change-Id: I12c9bfe40891ae3afbfda05f60a20b59e2954aed
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/31290
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-02-11 12:27:20 +00:00
Michael Bacarella 8ab1752070 ec/lenovo/h8/Kconfig: increase ps2 kbd timeout from 3000 to 5000ms
On my Thinkpad T420 the default 3000ms SeaBIOS timeout is too short,
it takes nearly 5000ms for my keyboard to become ready.

Timing out before it's ready leads to pretty bad behavior: I cannot use
my keyboard at all to control SeaBIOS, nor the subsequent GRUB instance.
Linux is fine though, possibly because it does its own keyboard init.

Signed-off-by: Michael Bacarella <michael.bacarella@gmail.com>
Change-Id: Id1681bf3921c8b5dc124d4c4e9072f146f84f3a2
Reviewed-on: https://review.coreboot.org/c/31279
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-11 12:24:22 +00:00
Nico Huber 0d25e5ac67 soc/intel/fsp_broadwell_de: Move FSP_DEBUG_LEVEL option here
It is not mentioned in the FSP spec and doesn't seem to be implemented
for any other FSP than the Broadwell-DE one.

Change-Id: I87c758204f1aabf13f47de19fd87c6e1ed67258e
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/31300
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2019-02-11 12:23:54 +00:00
Edward Hill f14445c145 mb/google/kahlee: Use GPIO_10 for EC_SYNC_IRQ
Use AGPIO 10 as the EC sync interrupt for MKBP events for sensor data.

On this platform, interrupts are routed via the GPIO controller so need to be
registered using GpioInt instead of Interrupt.

BUG=b:123750725
BRANCH=grunt
TEST=MKBP events still received (with matching EC and kernel changes)

Change-Id: If499d24511bbaa7054207b7e0b98445723332c4f
Signed-off-by: Edward Hill <ecgh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31278
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Enrico Granata <egranata@chromium.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2019-02-11 12:23:05 +00:00
Peter Lemenkov 8b9768effe amd: Remove unused defines
grep -ER \(FAM10_SCAN_PCI_BUS\|FAM10_ALLOCATE_IO_RANGE\) shows nothing.

Change-Id: Id0d321c80a9a393fcc0d9c2a5a675dba48516160
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31288
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-11 11:57:21 +00:00
Michał Żygowski 7bfdf5be63 src/mainboard/pcengines/apu2/OemCustomize.c: Enable CPB feature
Enable Core Performance Boost feature in automatic mode.
Also enable C6 state which is a dependency for proper CPB operation.

CPB allows to raise single core frequency from 1000MHz to 1400MHz
during high load if other cores idle. The processor has additional
boosted P-states when CPB is enabled, but these are hidden from OS.

TEST: Higher single-core CPU performance is indicated by increased
memory bandwidth as reported by memtest86+.

Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Change-Id: I5e080bfaee06fd13cedf5151d4a598ec212213f2
Reviewed-on: https://review.coreboot.org/c/31229
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-11 11:40:10 +00:00
Kyösti Mälkki 8a41f4b71e device/pci_ops: Move questionable pci_locate() variants
These are defined for __SIMPLE_DEVICE__ when PCI
enumeration has not happened yet. These should not
really try to probe devices other than those on bus 0.

It's hard to track but there maybe cases of southbridge
being located on bus 2 and available for configuration, so
I rather leave the code unchanged. Just move these out of
arch/io.h because they cause build failures if one attempts
to include <arch/pci_ops.h> before <arch/io.h>.

There are two direct copies for ROMCC bootblocks to
avoid inlining them elsewhere.

Change-Id: Ida2919a5d83fe5ea89284ffbd8ead382e4312524
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31304
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2019-02-11 11:34:37 +00:00
Kyösti Mälkki 5b14116a04 device/pci_early.c: Drop some guards
With PCI_DEV() always defined it is no longer
necessary to exclude this code from building.

Change-Id: I58a6348750d240aa6024599f7b1af1449f31e8ac
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31303
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2019-02-11 11:32:20 +00:00
Kyösti Mälkki 371f04811e device/pci: Always define PCI_DEV()
This has uses outside ARCH_x86 and/or __PRE_RAM__.

Change-Id: I2eec674ec5ba4ffe03a20db0f73cf87e5e4b4d0d
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31302
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-02-11 11:31:50 +00:00
Kyösti Mälkki 06ea8f9b9a arch/x86: Drop stale comment
Change-Id: I1ba6dfb502ff053ccf82d2acc5fefbbfe09d647b
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31294
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-10 19:44:54 +00:00
Kyösti Mälkki c043408ec5 nb/via/vx900: Replace pci_mod_configX()
If clr_mask == 0, use pci_or_configX().
If clr_mask != 0, invert mask and use pci_update_configX().

Change-Id: I4ae64e9b635b3759e4cffc4bbdf029411a4e0f42
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31272
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-10 19:44:10 +00:00
Arthur Heymans eeedf83bcd cpu/intel/car/*/cache_as_ram.S: Add brackets around operand
Change-Id: I644c38c9b8383db25a970dc7a5ec8765980298ed
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/31291
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-10 10:53:29 +00:00
Kyösti Mälkki 8da24f156f sb/amd/sb800: Drop comments about pci_locate_device()
Change-Id: I28a32d5c6dee792b6882e7ff45be6339016ad6ef
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31301
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-02-10 10:37:57 +00:00
Kyösti Mälkki c3aa832bc3 arch/x86: Drop some ROMCC remains
Change-Id: I62da8d0461774db8256e82deae0d5fe075f3faed
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31293
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2019-02-10 10:36:16 +00:00
Kyösti Mälkki 19bad30c75 nb/intel/sandybridge: Use pcidev_on_root()
Change-Id: I959dfd1c10bc1ab85c6392e0090b022934468770
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31292
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-10 09:15:13 +00:00
Philipp Hug f813b84486 riscv: Use correct argument in a1 when invoking payload
Fix a bug introduced by:
820dcfceb3
riscv: Simplify payload handling

Put fdt into a1 correctly.

Change-Id: I0dea7b88fde9d9a7365cb366917747d8110b9159
Signed-off-by: Philipp Hug <philipp@hug.cx>
Reviewed-on: https://review.coreboot.org/c/31287
Reviewed-by: ron minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-09 04:06:51 +00:00
Shelley Chen 98ce3f8dad mb/google/hatch: Replace part-specific SPD files with generic ones
Traditionally, we have always allocated 1 DRAM ID per part number.
However, on nami, we have run out of DRAM IDs because we have
supported so many different parts.  We are now adopting the use of
generic SPD files that are feature-based rather than specific to each
part, allowing us to support multiple parts with a single SPD.

The common SPDs were created by taking current SPDs in Nami (which is
using the same DDR4 parts as Hatch) and zeroing out all the
manufacturer information and part names.  Additionally, we zeroed out
bytes 128 (raw card extension, module nominal height), 129 (module
maximum thickness), and 130 (reference raw card used) after verifying
that they are not used in FSP.  We verified with these fields zeroed
out, all nami devices could boot up without errors.  We also verified
on the two Hatch skus that we have (4G 2400, 8G 2666) that the generic
SPDs boot properly.

BUG=b:122959294
BRANCH=None
TEST=Make sure that we can boot up on both 4G Samsung and 8G Hynix DDR4
     devices that we currently have.

Change-Id: I14d9e6b13975b6a65b506e6cd475160711b8f6d4
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/31261
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-08 19:01:32 +00:00
Duncan Laurie fa9c6f13d2 x86/acpi: Use PM_TABLET where appropriate
Instead of having SYSTEM_TYPE_DETACHABLE and SYSTEM_TYPE_TABLET use
PM_MOBILE have them use PM_TABLET instead.

Change-Id: If0ce51e522d36420ecd5b51bdfec6cca11c00333
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31277
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-02-08 11:02:04 +00:00
Arthur Heymans 667108199a cpu/intel/model_1067x: Check for lock bit on IA32_FEATURE_CONTROL
df7aecd "cpu/intel: Configure IA32_FEATURE_CONTROL for alternative
SMRR" introduced a regression because it unconditionally writes to
IA32_FEATURE_CONTROL, which if it is already locked results in an
unhandled exception. The lock bit is already set on a system reboot.

Change-Id: I7d2df9e1b9d767809da7a61ccd877c6c40f132eb
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/31255
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Bill XIE <persmule@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-08 11:01:21 +00:00
Patrick Rudolph a1024ac933 mb/ocp/wedge100s: Fix devicetree
Match devicetree what's present and in use.

Tested on wedge100s:
All PCI devices show up.

Change-Id: I669d059da1876ed669793db8c7eb1b96b481cb4c
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/31228
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-02-08 11:00:45 +00:00
Elyes HAOUAS 8c905a82f5 mb/{asrock,intel,kontron}: Include missing <arch/io.h>
Also includes lines sorted

Change-Id: Idf2b41f471f531b2a9c3e620563e3c658dea4729
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31267
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-08 11:00:01 +00:00
Karthikeyan Ramasubramanian d5c458f98a drivers/gpio_keys: Remove redundant is_wakeup_source flag
"is_wakeup_source" flag is used to indicate if the concerned device can
trigger a wakeup. This flag is redundant with the "wake" GPE event
definition. So remove the redundant flag and use the "wake" GPE event to
mark the wakeup source.

BUG=None
BRANCH=None
TEST=Boot to ChromeOS. Ensure that the device is marked as wakeup-source
in SSDT if wake GPE is configured. Ensure that the system can suspend
and the device acts as a wakeup source

Change-Id: I99237323639df1cb72e3a81bcfed869900a2eefa
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/31258
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-08 10:59:33 +00:00
Peter Lemenkov 498f1cc1f3 mb/*/*/romstage: curly braces after the function definition
See Documentation/coding_style.md, specifically "Placing Braces and
Spaces" section.

Change-Id: Ia6a2f3d3547c16500996260b0ece9ec693f00113
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31268
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2019-02-08 10:58:37 +00:00
Paul Menzel 9e366b4e0b drivers/keyboard: Fix spelling of *interface*
`git grep iterface` shows that these are the only two occurrences.

Change-Id: I838a60c95c5d0fc3dee902f0b72761dd60c36221
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/31286
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-08 10:57:46 +00:00
Elyes HAOUAS 0c152cf1bb src: Remove unused include device/pnp_def.h
Change-Id: Ibb7ce42588510dc5ffb04c950c4c8c64e9a2fa37
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/31238
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2019-02-07 08:53:07 +00:00
Furquan Shaikh a08765d287 mb/google/{hatch,sarien}: Configure GPIOs using cnl_configure_pads
This change uses cnl_configure_pads to configure GPIOs in ramstage so
that cannonlake SoC code can re-configure the GPIOs after FSP-S is
run. This is just adding a workaround until FSP-S is fixed.

BUG=b:123721147
BRANCH=None
TEST=Verified that there are no TPM IRQ timeouts in boot log on hatch.

Change-Id: I9973c6c49154f1225f0ac34a3240a0d19f911f18
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/31251
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2019-02-07 08:52:07 +00:00
Furquan Shaikh 86d2afb86b soc/intel/cannonlake: Configure GPIOs again after FSP-S is done
FSP-S is currently configuring GPIOs that it should not. This results
in issues where mainboard devices don't behave as expected e.g. host
unable to receive TPM interrupts as the pad for the interrupt is
re-configured as something else.

Until FSP-S is fixed, this change adds a workaround by reconfiguring
GPIOs after FSP-S is run.

All mainboards need to call cnl_configure_pads instead of
gpio_configure_pads so that SoC code can maintain a reference to the
GPIO table and use that to re-configure GPIOs after FSP-S is run.

BUG=b:123721147
BRANCH=None
TEST=Verified that there are no TPM IRQ timeouts in boot log on hatch.

Change-Id: I7787aa8f185f633627bcedc7f23504bf4a5250b4
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/31250
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2019-02-07 08:51:53 +00:00
Subrata Banik 6527b1acc7 soc/intel/cannonlake: Add Whiskeylake SoC kconfig
This patch performs below tasks

1. Create SOC_INTEL_COMMON_CANNONLAKE_BASE kconfig.

2. Allow required SoC to select this kconfig to extend CANNONLAKE
SoC support and add incremental changes.

3. Select correct SoC support for hatch, sarien, cflrvps
and whlrvp.

* Hatch is WHL SoC based board
* Sarien is WHL SoC based board
* CFLRVP U/8/11 are CFL SoC based board
* WHLRVP is based on WHL SoC

4. Add correct FSP blobs path for WHL SoC based designs.

Change-Id: I66b63361841f5a16615ddce4225c4f6182eabdb3
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/31133
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-07 04:50:37 +00:00
Arthur Heymans 12431d6eef Makefile.inc: Create a default SMMSTORE region
Change-Id: I7b7b75050e0139ea9a0a4f2ad3c0d69a482fb38b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/30421
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-02-06 18:15:59 +00:00
Furquan Shaikh eaf83489f6 mb/google/hatch: Configure I2C buses
This change enables I2C bus 2, 3 and 4 in devicetree and configures
GPIO pads for the same. It also configures pads for I2C5 as
no-connect.

BUG=b:123711244
TEST=Verified that i2c shows up in "i2cdetect -l" after booting to OS.

Change-Id: Ib4714a670d73228332115415e4393f82802c6475
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/31237
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-06 17:38:00 +00:00
Mathew King 946fa5f941 mb/google/reef: Expand the coreboot RO section
Current coreboot size is not adequate for adding new features.

Note for cros: This change is for merge to ToT only and should not be
cherry-picked into reef's firmware branch.

BUG=chromium:903833
TEST=emerge-reef coreboot

Change-Id: Ie7a25c4638c474e81fb34b57de0dfc1bf393ea67
Signed-off-by: Mathew King <mathewk@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31230
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-06 17:10:11 +00:00
Nico Huber 2bc892cf56 libgfxinit: Add options to limit framebuffer size
Add maximum width and height options and set the default to 2560x1600
(WQXGA). The framebuffer will be scaled up to the displays' native
resolutions. So this should help with tiny fonts on high-DPI displays.

For laptops, reasonable defaults can be set at the mainboard level.

Change-Id: I47fba063629260c3a2854caf7a73f1a1e933d063
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/30585
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-02-06 16:20:44 +00:00
Nico Huber b567977075 Hook up Kconfig Ada spec file
We generate a $(obj)/cb-config.ads once and copy it per stage that uses
it to $(obj)/<stage>/cb-config.ads (to simplify the gnat-bind step). The
Ada package is called `CB.Config`. As there was no `CB` package yet, add
that too.

Change-Id: I963a6517ef4bcf84f2c8e9ae8d24a0d6b971d2b0
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/30584
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-02-06 16:20:35 +00:00
Arthur Heymans 3b0eb602b9 nb/intel/gm45: Use a common romstage
This moves a lot of the common romstage boilerplate code to a common
location, while adding a few mainboard specific hooks.

Another difference is that the settings for enable_igd and enable_peg
are now based on the static devicetree settings.

Change-Id: I30ef7f6962aabde78b5c40e0b53bb85e01c254c1
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/31190
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2019-02-06 11:09:23 +00:00
Arthur Heymans 1bde3124b4 mb/lenovo/x200/gpio.c: Unclutter the code
Some settings don't make sense like specifying input/output on native
ports or high/low on input ports.

Change-Id: Ib37837b9cdb8bb05e2523e0c43cc71fe4fbf243b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/31187
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-06 11:08:52 +00:00
Arthur Heymans e51c951799 mb/roda/rk9: Use common code to set up southbridge GPIO's
Change-Id: I2057bf66435fd9113cdb1eef4c273f66b07a5a79
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/31186
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2019-02-06 11:07:49 +00:00
Arthur Heymans 32a414f64a mb/lenovo/{x200,t400}: Set SMBUS mux using common SB functions
Change-Id: I1e9a165b722006557557058a14e9f5dac78d4538
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/31189
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2019-02-06 11:07:04 +00:00
Arthur Heymans 7f80c0cf07 mb/lenovo/t400: Remove RCBA replay
his either sets unwanted or unnecessary settings.

Also this RCBA replay did not even originate from the T400 as this
code was copied from the Thinkpad x200 code on which this replay was
already removed in 7bcd062 'mb/lenovo/x200: Remove RCBA replay'

Change-Id: Iac6846d43395e342897e03c1ad31387638bcac64
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/31188
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2019-02-06 11:06:26 +00:00
Subrata Banik 838e8375a3 mb/intel/coffeelake_rvp: Select CHROMEOS for CFL-U and WHL-U RVP
This patch ensures to select chromeos kconfig only for required
CFL-U and WHL-U RVPs supported by Intel client team.

TEST=Ensure CONFIG_GBB_FLAG_FORCE_MANUAL_RECOVERY is only selected
for CFL-U and WHL-U boards.

Change-Id: Ib61409402a948f8d5f91130e200c45320ea13d3d
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/31214
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-05 22:35:20 +00:00
Duncan Laurie 4e3141f19a mb/google/sarien: Set system type for the board variants
Select the appropriate system type for the different variants of
the Sarien board.

This will allow the Arcada variant to use the tablet mode feature
of the Intel Virtual Button driver.

Change-Id: I8a829aab012256ec196c8ec0fa298fd2bc77f2e1
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31207
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-05 16:04:03 +00:00
Duncan Laurie 4a2558b6d8 ec/google/wilco: Add virtual button support
Add an ACPI device that is compatible with the Intel Virtual
Button kernel driver for reporting tablet mode state and various
virtual button events that may come from the EC.

This driver is used in Windows and in the Linux kernel at
drivers/platform/x86/intel-vbtn.c

Because of a check in the kernel driver it expects the board to
define the SMBIOS enclosure type as convertible for the check at
driver load time for tablet/laptop and dock/undock to work.

The virtual tablet mode button will proxy the tablet mode state
sent from the Sensor Hub to a SW_TABLET_MODE event in the kernel.

The virtual power button is used during S0ix for the EC to wake
the system with an SCI.  There are separate press and release
events which are sent for completeness, although the kernel driver
will ignore the release event.

BUG=b:73137291
TEST=Test that the power button can wake the system from S0ix.
Also verify that the device is reported as laptop mode at boot.

Change-Id: I0d5dc985a3cfb1d01ff164c4e67f17e6b1cdd619
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31208
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-05 16:03:37 +00:00
Duncan Laurie 8312df4173 Kconfig: Add system type entries for common enclosures
These are more common system types and in some cases it is important
to know when a device is a convertible or a tablet or detachable
instead of just a laptop.

This change will select the appropriate SMBIOS enclosure type based
on the selected system type.

This is important for the Intel Virtual Button driver as it does a
check on the SMBIOS enclosure type and only enables the tablet mode
events if it is set to convertible:
https://patchwork.kernel.org/patch/10236253/

Change-Id: I148ec2329a1dd38ad55c60ba277a514c66376fcc
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/31206
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-02-05 16:03:29 +00:00
Ting Shen dff29e0c65 bootmem: add new memory type for BL31
After CL:31122, we can finally define a memory type specific for BL31,
to make sure BL31 is not loaded on other reserved area.

Change-Id: Idbd9a7fe4b12af23de1519892936d8d88a000e2c
Signed-off-by: Ting Shen <phoenixshen@google.com>
Reviewed-on: https://review.coreboot.org/c/31123
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2019-02-05 13:41:45 +00:00
Matt Delco 4929f43619 arch/x86/acpigen: wrap _PLD in a package
The ACPI spec has an asl example for _PLD in the form:

Name (_PLD, Package (0x01) { ToPLD (PLD_Revision = 0x2) })

When I ported this to acpigen and diffed the results I noticed that
the binary blob was no longer provided within a package.  The ACPI
spec (section 6.1.8 in version 6.2) defines _PLD as "a variable-length
Package containing a list of Buffers".  This commit changes
acpigen_write_pld to use a package (the one existing caller I found
isn't wrapping the result in a package so it doesn't look like
it was intended for the callers of acpigen_write_pld to be responsible
for using a package.

BUG=none
BRANCH=none
TEST=Verified that after this change a package is use and the result
of acpigen matches what was used in the original asl.

Change-Id: Ie2db63c976100109bfe976553e52565fb2d2d9df
Signed-off-by: Matt Delco <delco@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31162
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-05 13:40:53 +00:00
Matt Delco 08258881ed acpi: device: avoid empty property list in acpi_dp_write
If an acpi_dp table has children but no properties then acpi_dp_write()
will write out a properties UUID and package that contains no properties.
The existing function will avoid writing out a UUID and empty package
when no children exist, but it seems to assume that properties will
always be used.  With this change properties are handled in a manner
akin to children so that a UUID and package are only written if
properties exist.

BUG=none
BRANCH=none
TEST=Confirmed that prior to this change a UUID and empty package was
present for a device that had children but no properties.  Verified that
after this change the UUID and empty package are no longer present but
the child UUID and package are still present.

Change-Id: I6f5597713a1e91ca26b409f36b3ff9eb90a010af
Signed-off-by: Matt Delco <delco@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31161
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-05 13:40:31 +00:00
Ivy Jian 4bbe8df1dc mb/google/hatch: Add keyboard backlight support
This change adds keyboard backlight feature for Hatch platform.

BUG=b:122799544
BRANCH=none
TEST=keyboard backlight works when EC reports correct info.

Change-Id: I29273122f061e0e442f6629351ef3670535c0507
Signed-off-by: Ivy Jian <ivy_jian@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/31175
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-05 13:38:03 +00:00
Kyösti Mälkki f30123b739 intel/quark: Fix COMMONLIB_STORAGE in CAR
The allocation is not required before romstage,
so it can be just another CAR_GLOBAL instead of
polluting the linker script.

Change-Id: I0738a655f6cc924fbed92ea630f85406e3f58c0b
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/c/31191
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-05 13:37:38 +00:00
Keith Short cc68c01bec src/soc/intel/common: Clear GPIO driver ownership when not requested
The default state of the HOSTSW_OWN register in the PCH is zero, which
configures GPIO pins for ACPI ownership.  The board variabt GPIO tables
can request specific pins to be configured for GPIO driver ownership.
This change sets the HOSTSW_OWN ownership bit when requested and
explicitly clears the ownership bit if not requested.

BUG=b:120884290
BRANCH=none
TEST=Build coreboot on sarien.  Verified UEFI to coreboot transition
boots successfully.

Change-Id: Ia82539dbbbc7cf5dfb9223902d563cafec1a73e5
Signed-off-by: Keith Short <keithshort@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31209
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-05 13:27:49 +00:00
Nico Huber aa4d9b94fd soc/intel/apl: Call mca_configure() on cold boots only
By APL BIOS Spec, we must not do this on warm boots.

The TODO comment seems stale and copied over. So the actual
requirements for SGX are unknown and we add a guard for that
case.

Change-Id: I09b4a2fe22267d7318951aac20a3ea566403492e
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/31200
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-05 13:27:22 +00:00
Nico Huber 53229425c7 soc/intel/cpulib: Add debug message to mca_configure()
Change-Id: Idfe93e454cc0ce0d8e06e23beaddee2f11f5eedd
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/c/31199
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2019-02-05 13:26:29 +00:00
Caveh Jalali 5aba3a2c06 mb/google/poppy/variants/atlas: config GPP_D1 as no-connect
This reconfigures the GPP_D1 GPIO pin as a no-connect.  It really
doesn't go anywhere today or on previous revs of the board.

BUG=b:110614620
BRANCH=none
TEST=atlas still boots

Change-Id: Iea53cf909f8f060c4e0f14e8b4ad579b838b7caa
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31210
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-05 13:25:56 +00:00
Caveh Jalali 8b400b8c64 Revert "mb/google/poppy/variant/atlas: I2C: run trackpad at 1MHz"
This reverts commit 7696290004.

We're seeing trackpad problems on some units with the I2C bus running
at 1MHz but not at 400KHz.  So, revert back to 400KHz until we
understand how to make 1MHz operation more robust.

BUG=b:123650686

Change-Id: Ifb06afece9eee0c153240d35e6c3001f5b74f310
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31212
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2019-02-05 13:25:43 +00:00
Hung-Te Lin 06fff376a6 mb/google/kukui: Add default HWID for Chrome OS
The default value for Chrome OS HWID should be different.
Calculated as HWID v1.

BUG=b:123336677
BRANCH=kukui
TEST=build and boots properly.

Change-Id: I39c640562c1c3b117292b8abacd36a4a9c2fa6c6
Signed-off-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-on: https://review.coreboot.org/c/31088
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: You-Cheng Syu <youcheng@google.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2019-02-05 13:25:30 +00:00
Patrick Rudolph 6bbc8d8050 cpu/x86/mtrr: Fix sign overflow
Use unsigned long to prevent sign overflow.
Fixes wrong MTRRs settings on x86_64 romstage.

Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Change-Id: I71b61a45becc17bf60a619e4131864c82a16b0d1
Reviewed-on: https://review.coreboot.org/c/30502
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2019-02-05 13:24:30 +00:00
Thomas Heijligen 8d010db58e mb/emulation/qemu-i440fx: use e820 in romstage
Use memory map from fw_cfg e820 map to find cbmem_top in romstage to
avoid conflicts with CMOS option table. Keep qemu_gwt_memory_size() as
fallback.

Change-Id: I6465085020125fc790257f09eb157030c6ceabcb
Signed-off-by: Thomas Heijligen <thomas.heijligen@secunet.com>
Reviewed-on: https://review.coreboot.org/c/30850
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2019-02-05 11:03:08 +00:00