Commit Graph

18448 Commits

Author SHA1 Message Date
Martin Roth 4d13307030 vendorcode/amd/pi/00670F00: Remove direct AGESA header includes
Update amdlib to pull in the AGESA headers through agesa_headers.h

BUG=b:66818758
TEST=Build gardenia; Build & boot kahlee

Change-Id: I3a2a2fde9738a9fe7a0b55cb91c29416cdc227a2
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22550
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-22 18:28:49 +00:00
Richard Spiegel 2983c70815 Create SOC description file soc.asl
Request from commit 519680948b (move carrizo_fch.asl code to soc), merge
several includes into a single file in soc directory.

Rename soc_fch.asl to sb_fch.asl. Rename fch.asl to sb_pci0_fch.asl.
Then copy the required section from dsdt.asl into a new soc.asl.

Affected boards: amd/gardenia and google/kahlee.

BUG=b:69368752

Change-Id: I83d850cf9457f7c2c787336823d993ae2e9d28ce
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/22541
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-22 18:28:29 +00:00
Duncan Laurie 2bc6ad3ff1 drivers/i2c/tpm/cr50: Simplify and increase init delay to 30 seconds
The Cr50 i2c driver provides separate entry points for probing and
initialization, but probing function does not really do much.

It also claims and releases locality on every coreboot stage, but
there is no need for this - locality should be definitely claimed
after reset and then it could be retained through the boot process.

On top of that the driver does not properly account for long time it
could take the Cr50 chip to come around to reset processing if TPM
reset request was posted during a lengthy TPM operation.

This patch addresses the issues as follows:

  - tpm_vendor_probe() and tpm_vendor_cleanup() become noops, kept
    around to conform to the expected driver API.
  - tpm_vendor_init() invokes a function to process TPM reset only in
    the first stage using TPM (typically verstage), the function
    checks if locality is claimed and if so - waits for it to be
    released, which indicates that TPM reset processing is over.
  - before claiming locality check if it is already taken, and if so -
    just proceed.

BRANCH=none
BUG=b:65867313, b:68729265
TEST=Verified that reef no longer hangs during EC reboot and
     firmware_Cr50ClearTPMOwner (not yet merged) tests.

Change-Id: Iba8445caf1342e3a5fefcb2664b0759a1a8e84e3
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://review.coreboot.org/22554
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-22 15:18:03 +00:00
Vadim Bendebury 8727e644ea spi/tpm: claim locality just once during boot
All coreboot stages using TPM start with the same sequence: check if
locality is claimed, if so, release it by writing 'active locality'
bit, then try claiming it.

This is actually not a proper procedure: section "5.5.2.3.1 Command
Aborts" of "TCG PC Client Platform TPM Profile (PTP) Specification
Level 00 Revision 00.430 Family 2" lists overwriting active locality
status bit as a means of triggering TPM command abort.

On top of that, none of the coreboot stages releases locality, it is
enough to claim it once when device starts booting.

In fact, locality being active when the device is in verstage is most
likely due to delayed TPM reset processing by the Cr50 TPM: reset is
an asynchronous event, and is processed once current command
processing completes.

The proper procedure is to wait if locality is active until it is
released (which will happen when Cr50 processes reset) and then
proceed to claim it. This needs to happen only during verstage, other
stages using TPM are guaranteed has been claimed earlier.

BRANCH=gru
BUG=b:65867313

TEST=the new autotest triggering EC reset during key generation
     process does not cause boot failures on Fizz device any more.
     Below are times verstage had to wait:

  TPM ready after 3132 ms
  TPM ready after 22120 ms
  TPM ready after 4936 ms
  TPM ready after 6445 ms
  TPM ready after 11798 ms
  TPM ready after 27421 ms
  TPM ready after 4582 ms
  TPM ready after 7532 ms
  TPM ready after 27920 ms
  TPM ready after 3539 ms
  TPM ready after 12557 ms
  TPM ready after 6773 ms
  TPM ready after 1631 ms
  TPM ready after 197 ms
  TPM ready after 24330 ms
  TPM ready after 3241 ms

Change-Id: Iaee04f009bcde03712483e5e03de4a3441ea32b1
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://review.coreboot.org/22489
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-21 23:16:27 +00:00
Vadim Bendebury 0d0408ad4f src/soc/intel/apollolake: move TCO1 disable into bootblock
Cr50 reset processing could take long time, up to 30 s in the worst
case. The TCO watchdog needs to be disabled before Cr50 driver starts,
let's disable it in bootblock.

BRANCH=none
BUG=b:65867313, b:68729265
TEST=verified that resetting the device while keys are being generated
     by the TPM does not cause falling into recovery.

Change-Id: Iaf1f97924590163e45bcac667b6c607503cc8b87
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://review.coreboot.org/22553
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-21 17:53:02 +00:00
Mario Scheithauer f1eb0ea537 arch/x86: Write ACPI DBG2 table only if the device has been enabled
The commit 93bbd41e (soc/intel: Enable ACPI DBG2 table generation)
causes a crash on the mainboard mc_apl1. On this mainboard all internal
SOC UARTs in the devicetree are switched off. As a result, no resources
are allocated to the UARTs. The function find_resource() expects an
existing resource. Otherwise, the CPU will stop. It should therefore not
only be queried whether a device is present, but also whether it is
enabled.

Change-Id: I56ce44ae0cf77916fcb640f79fb8944fe33177cd
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/22552
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-11-21 17:01:01 +00:00
Martin Roth ece69f2123 vendorcode/amd/pi/00670F00: Clean up makefile
- Remove unnecessary cflags, exports, and variables
- Don't include AGESA cflags in the entire build
- Reformat build target

BUG=b:69220826
TEST=Build

Change-Id: I60cb20a3849439cb808f5d3919588853e9c8c734
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22499
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-21 01:38:42 +00:00
John E. Kabat Jr 7057a27a44 soc/amd/stoneyridge: Add ELOG to SMM
1. Add ELOG entries to smihandler.c
2. Add save_state utilities that are needed by southbridge_smi_gsmi

BUG=b:65485690

Change-Id: I458babe1694f042215dd0e1c3277856e340de86f
Signed-off-by: John E. Kabat Jr <john.kabat@scarletltd.com>
Reviewed-on: https://review.coreboot.org/21728
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-21 01:37:03 +00:00
Marshall Dawson 0e022038fc amd/stoneyridge/spi: Fix reads greater than 5 bytes
This corrects a bug in 918c8717 "amd/stoneyridge: Add SPI controller
driver".  Pass a pointer to din to the do_command() function so the
caller's copy is correctly updated.  The bug allowed reads <= 5 bytes
to work correctly (3 bytes consumed in the FIFO by the address) but
overwrote data in the din buffer on larger transfers.

Change-Id: I32b7752f047112849871cafc9ae33c5ea1466ee1
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22519
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-21 01:36:27 +00:00
Richard Spiegel a85f8b94ab soc/amd/common: Remove duplicated #include amd_pci_int_defs.h
Remove <#include amd_pci_int_defs.h> from amd_pci_util.h, as the user
of the functions declared in amd_pci_util.h don't need the contents of
amd_pci_int_defs.h.

BUG=b:62200907

Change-Id: I258d549d3eea3fb8919c0cddbb41dc2bc4738c4e
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/22461
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-21 01:20:16 +00:00
Matt DeVillier 1ad41525ca mb/google: Update/add ChromeOS device marketing names
Commit c09c2a4 [mb/google: Add Chromebook marketing names] added
marketing names for many ChromeOS devices; add some that were left out,
correct some errors, and try to format model names/numbers consistently 
(or as consistently as the manufacturers allow).

Change-Id: Ia13858e2e6ba7d7e025f25fad33e6338250498e5
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/22520
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-21 01:19:15 +00:00
Shelley Chen 9af3f2d63a mainboard/google/fizz: Enable separate MRC cache for recovery mode
Enable separate MRC cache for recovery mode. This requires change in
flash layout to accomodate another region for RECOVERY_MRC_CACHE.

BUG=b:69473883
TEST=Verified following scenarios:
1. Boot into recovery does not destroy normal mode MRC cache.
2. Once recovery MRC cache is populated, all future boots in recovery
mode re-use data from the cache.
3. Forcing recovery mode to retrain memory causes normal mode to retrain
memory as well.

Change-Id: Icdfac3698507d89d98a51cfc3d756a56d2a2d648
Signed-off-by: Shelley Chen <shchen@chromium.org>
Reviewed-on: https://review.coreboot.org/22518
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-20 23:33:00 +00:00
Ege Mihmanli 75b154334d google/gru: Add config for scarlet-derived boards
There is merit in having new boards use the pinouts and controls
in scarlet. This adds a config so new scarlet-derived boards can
easily use scarlet structure without going through every file
and adding new logic.

TEST=Run "emerge-scarlet coreboot"
Signed-off-by: egemih@chromium.org
Change-Id: I5808f93f4563033ce93050e1eedb6eac2b52c3b3
Reviewed-on: https://review.coreboot.org/22517
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-11-20 18:56:45 +00:00
Lijian Zhao 21573e9f4e soc/intel/cannonlake: Add ACPI workaround for EMMC
Two W/A had been added here for EMMC to make it working properly.
1. Enable power gating after D3 entry, disable power gating before D0
entry.
2. Add 50 ms delay to ensure Rcomp calibration done before EMMC out of
D3.

BUG=b:69323943
TEST=Run multiple ACPI S3 cycles on cannonlake u LPDDR4 platform.

Change-Id: Ic6e98264521fb02b911a8c157a7982afa35fe20c
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/22390
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-20 17:13:57 +00:00
Marc Jones afd03d8a28 amd/stoneyridge: Fix SPD files and functions camel case
Remove ugly camel case in the soc/amd/common and Stoney Ridge
SPD files and functions. Update the related mainboards.

Also, remove a unreferenced function prototype, smbus_readSpd().

Change-Id: I51045b6621f0708d61a570acbdcb4e6522baa1ea
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/22483
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-20 16:26:12 +00:00
Lin Huang da6b1bc9e2 include/timer.h: add NSECS_PER_SEC macro
Change-Id: I4367f84be5a4bd635b422b6e7cbdc9aa3ccfbf5c
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-on: https://review.coreboot.org/22466
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-11-19 01:50:13 +00:00
Martin Roth 241391841e vendorcode/amd/pi/00670F00: Remove dependency on amd/include dir
Copy the two headers used by the Stoney BinaryPI implementation into
the 00670F00 directory so that any changes that are made to them don't
affect other platforms.

BUG=b:67299330
TEST=Build

Change-Id: I5d37fac72871f2617c4be45c151741436cbfce96
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22498
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-19 01:44:07 +00:00
Martin Roth 6c623ca565 mb/google/kahlee: Move ec.h into variant include directories
The mainboard directory is included through the PI makefile - most
mainboard directories aren't in the include path at all.  Move the
ec.h file into the baseboard/variant directory that is already in
the include path.

BUG=b:69220826
TEST=Build

Change-Id: I89d361b700c66ba576de724927574fdab9461fc6
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22497
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-19 01:44:00 +00:00
Martin Roth c94021b0ef vendorcode/amd/pi/00670F00: Remove cpuFamilyTranslation.c
The file Proc/CPU/cpuFamilyTranslation.c isn't being included into
the build, so it's obviously not needed.

BUG=b:69220826
TEST=Build

Change-Id: Id244d110b4f15e1d6af6c701f62e2f05d7eb289a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22496
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-19 01:43:40 +00:00
Martin Roth 73a52d212b mainboard/google/kahlee: Remove direct AGESA header includes
All AGESA headers should be included only through agesawrapper.h

I missed this file in the Kahlee cleanup.

BUG=b:66818758
TEST=Build gardenia; Build & boot kahlee

Change-Id: Id9b303cb3cee8088fb5cca5257566c033d28c692
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22495
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-19 01:43:32 +00:00
Martin Roth 1cdb6f2a1d mainboard/google/kahlee: Update memory.c
This fixes some issues with the initial implementation that was copied
from reef.
- The board ID value shouldn't be size_t - it's not a size.
- Kahlee doesn't even need the memory.c file - it uses an SoDIMM.

BUG=b:68293392
TEST=build stoney platforms, boot kahleebo

Change-Id: Ife5660d36912e887edfd0365a9f16c5a172c9c86
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22515
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-19 01:43:04 +00:00
Jonathan Neuschäfer c09c2a4883 mb/google: Add Chromebook marketing names
It's sometimes hard to find the code name of a Chromebook. Add the
marketing names to Kconfig, since they are easily available.

Information (mostly) taken from:
https://www.chromium.org/chromium-os/developer-information-for-chrome-os-devices

Unknown boards (unreleased, etc.):
* Fizz
* Foster
* Nasher, Coral
* Purin
* Rotor
* Rowan
* Scarlet, Nefario
* Soraka
* Urara
* Veyron_Rialto

Baseboards:
* Glados
* Gru
* Jecht
* Kahlee
* Nyan
* Oak
* Poppy
* Rambi
* Zoombini

White label boards:
* Enguarde
* Heli
* Relm, Wizpig

TODO: How does this interact with the board_status code?

Change-Id: I20a36e23bd3eea8c526a0b3b53cd676cebf9cd86
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/22404
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2017-11-17 21:33:25 +00:00
Richard Spiegel a800bdb298 Move amd/stoneyridge/include/amd_pci_int_defs.h to include/soc/
Move src/soc/amd/stoneyridge/include/amd_pci_int_defs.h to
src/soc/amd/stoneyridge/include/soc/.

After much discussion, src/soc/amd/stoneyridge/include/soc is probably
the best location. It was found that there are other common code that
include headers from this folder.

BUG=b:62200907

Change-Id: I69e0a54e5d64ae28919871c687a0177786b789c8
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/22460
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2017-11-17 20:31:14 +00:00
Marshall Dawson 209ea1459b amd/gardenia: Add defines in OemCustomize.c
Add a #define for MB_DIMM_SLOTS and verify it doesn't exceed the max
supported for the device.  AGESA's DRAM procedures follow the BKDG and
may vary depending on the number of slots on the motherboard.  DIMM
numbering and ordering is also affected by this value.

Replace hardcoded integers with defined values for DIMM slots and
number of channels.

Change-Id: I81aa0165660e7627f1d977ac40479700cff8b80b
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/21854
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-17 20:28:43 +00:00
Bora Guvendik a778237948 soc/intel/cannonlake: fix gpio pin numbers
Update pin numbers to match kernel cannonlake pinctrl driver.

TEST=boot to OS

Change-Id: Id65736db03200fd434dd9292ce081727abd6832b
Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-on: https://review.coreboot.org/22477
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-17 19:39:52 +00:00
Shaunak Saha c6518b2712 soc/intel/cannonlake: Add cpu.asl file
This patch adds the cpu.asl file in cnl. We are only defining
the PNOT method here in this patch as this is needed by the
ec/google/chromeec/acpi/ec.asl file for the AC methods.

TEST= code compiles and boots when we include the ec.asl file.

Change-Id: Id93012833fac116d4d7514aa2d0b8493d2f666a9
Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Reviewed-on: https://review.coreboot.org/22365
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>
2017-11-17 18:46:24 +00:00
Marshall Dawson 91b80416b7 amd/stoneyridge: Enable SMI trap on SlpTyp
Program PMx08 to support SMIs when software writes the SlpTyp bit in
the Pm1Control register.  The southbridge needs to send the SMI message
prior to the completion response of the I/O cycle.  Also, disable
sending the STPCLK message before the completion response.

Disable the SlpTyp functionality, then enable the SMI source.

BUG=b:65595850

Change-Id: I8db0df36b285ad26c8c9e62c3857fb6580c35229
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/21752
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-17 17:40:51 +00:00
Marshall Dawson 081851a9e4 amd/stoneyridge: Add SlpTyp SMI handler
When an SMI occurs due to SlpType, interpret the type of request being
made.  If it's S3 or higher, flush the cache and disable further SMIs.
Reenable SlpTyp functionality in the ACPI logic and reissue the cycle.

BUG=b:65595850

Change-Id: I88d413cdbfc2daf44e8d1142c6532f7034795ead
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/21751
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-17 17:40:16 +00:00
Marshall Dawson 918c8717b2 amd/stoneyridge: Add SPI controller driver
Add more definitions for the controller registers and fields.  Add
source that is adapted from hudson and updated for Stoney Ridge.

This was tested with follow-on patches that write S3 data to flash.

BUG=b:68992021

Change-Id: I61d64cfdb4fce11c068113680da7ba6a199d6893
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22408
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2017-11-17 17:39:25 +00:00
Kevin Keijzer 6d941bad78 mb/lenovo/t400/blc.c: Add LTN154P2-L05 to whitelist
TESTED on Lenovo T500

Change-Id: I5546641cb34264e29ccb3398dd68f6144dafe524
Signed-off-by: Kevin Keijzer <kevin@quietlife.nl>
Reviewed-on: https://review.coreboot.org/22367
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-11-17 15:06:15 +00:00
Kevin Keijzer 15af281744 mb/lenovo/t400: Add LTN154X3-L02 to list of known displays
TESTED on Lenovo T500

Change-Id: I9c9fef82ca4af99c7d4813e0ab0e315fde93b972
Signed-off-by: Kevin Keijzer <kevin@quietlife.nl>
Reviewed-on: https://review.coreboot.org/22475
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-11-17 11:32:16 +00:00
Martin Roth 690afa1f8c vendorcode/amd/pi/00670F00: Get rid of filecodes, replace filecode.h
coreboot doesn't need AGESA's version of Filecode.h.  Some of the files
that have been copied from AGESA include the header, so we can't get rid
of it completely yet.
- Remove includes from files that weren't copied from the AGESA source.
- Remove FILECODE definitions from coreboot source.

BUG=B:69220826
TEST=Build Gardenia; Build & boot Kahlee.

Change-Id: If16feafc12dedeb90363826b62ea7513e54277f4
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22438
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-11-16 15:27:43 +00:00
Martin Roth 744104e24d vendorcode/amd/pi: Create stoney version of amdlib
Copy the vendorcode/amd/pi/Lib directory into 00670F00 directory and
update the 00670F00 Makefile to use it instead of using the common
version.

This allows changes to stoney without affecting the rest of the AMD
binary PI platforms.

BUG=b:67299330
TEST=Build Gardenia; Build & boot kahlee

Change-Id: I2fe4303f882938e9d917a3001476213f49426455
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22437
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-16 15:27:36 +00:00
Martin Roth 059988dbe4 vendorcode/amd/pi: Split stoney PI into its own Makefile
- Copy vendorcode/amd/pi makefile to 00670F00 directory
- Remove all stoney references from the vendorcode/amd/pi makefile
- Remove all non-stoney references from 00670F00 Makefile
- Remove directories that don't exist from 00670F00 Makefile
-- Proc/CPU/Feature
-- Proc/Fch/Kern
-- Proc/Fch/Kern/KernImc

BUG=b:67299330
TEST=Build Gardenia; Build & boot kahlee

Change-Id: I34690cfc3b1c4508d25d7cf062fcb9aea5945634
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22436
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-16 15:25:56 +00:00
Shelley Chen 85eb0311d2 drivers/spi/tpm: Poll TPM_VALID bit until valid
In case the TPM is doing a long crypto operation the initial probe
could be very delayed.  Rather than end up in recovery make the delay
long enough to accommodate the (current) long crypto times. This would
add a maximum of 30 seconds to boot time.

Mirroring changes done on i2c side in CL:756918

BUG=b:65867313, b:68729265
BRANCH=None
TEST=Make sure fizz boots up

Change-Id: Ie944bfb6fe33d6e9ee794439165716ab624be491
Signed-off-by: Shelley Chen <shchen@chromium.org>
Reviewed-on: https://review.coreboot.org/22370
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-16 06:06:45 +00:00
Marc Jones 067031e0e1 variants/kahlee: Add thermal ASL
Connect the EC thermal to Kahlee and Grunt thermal ASL. Intialize GNVS
thermal values in the mainboard finalize.

BUG=b:67999819

Change-Id: I89159a5fd3c639e511139b8c5948b6a4ee19aaa3
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/22400
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-11-15 18:19:31 +00:00
Marc Jones c8999a7c43 google/kahlee: Get power plug notification from the EC
Set the EC SCI reporting mask to include the power plug reporting.

BUG=b:65637324
TEST=Check power_supply_info on AC/DC.

Change-Id: I58814fc495081ffe8e47162da0fa4fbeba49d67b
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/22459
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-15 18:19:23 +00:00
Richard Spiegel 519680948b mb/{amd/gardenia,google/kahlee}: move carrizo_fch.asl code to soc
Code within carrizo_fch should be SOC specific instead of board specific.

BUG=b:64034810

Change-Id: I5de2020411794bfcd3730789f62af9c9834a018b
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/22455
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-15 16:47:06 +00:00
Subrata Banik bffff54e09 soc/intel/skylake: Make use of common CSE code for skylake
TEST=Ensures global reset could able to reset system.

Change-Id: I11ce1812a5a0aa2da6b414555374460d606e220e
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/22395
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-15 16:44:36 +00:00
Subrata Banik 4a722f5e2f soc/intel/common: Use HOST_CSR to get circular Buffer Depth
As per CSME BWG section 3.4.4.
The Circular Buffer Depth can find by checking B0:D22:F0
MMIO_HOST_CSR register.

TEST=Build and boot eve/soraka/reef/cnl-rvp

Change-Id: I1d3c09077e040b5c32b3c8be867a07f392ea4e1c
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/22444
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-15 16:44:29 +00:00
Subrata Banik 5c08c73dd1 soc/intel/common: Add HECI message retry count
Send/Receive HECI message with 5 retry count in order
to avoid HECI message failure.

TEST=Build and boot eve/soraka/reef/cnl-rvp

Change-Id: I76662f8080fe312caa77c83d1660faeee0bdbe7e
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/22443
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-15 16:44:05 +00:00
Duncan Laurie 93bbd41ea8 soc/intel: Enable ACPI DBG2 table generation
Enable the ACPI DBG2 table generation for Intel boards.  This is
a Microsoft defined ACPI extension that allows an OS to know what
the debug port is on a system when it is not enabled by the
firmware, so it does not show up in the coreboot tables and
cannot be easily found by a payload.

broadwell: Use byte access device, set up only when enabled since
it relies on the port being put in byte access mode and using
this serial port for debug was not standard in this generation.

skylake: Enable for the configured debug port.  Skylake uses
intelblocks for UART but not ACPI.

common: Enable for the configured debug port.  This affects
apollolake and cannonlake.

Tested by compiling for apollolake/broadwell, tested by reading
the DBG2 ACPI table on kabylake board and using IASL to dump:

    [000h 0000   4]                    Signature : "DBG2"
    [004h 0004   4]                 Table Length : 00000061
    [008h 0008   1]                     Revision : 00
    [009h 0009   1]                     Checksum : 3B
    [00Ah 0010   6]                       Oem ID : "CORE  "
    [010h 0016   8]                 Oem Table ID : "COREBOOT"
    [018h 0024   4]                 Oem Revision : 00000000
    [01Ch 0028   4]              Asl Compiler ID : "CORE"
    [020h 0032   4]        Asl Compiler Revision : 00000000

    [024h 0036   4]                  Info Offset : 0000002C
    [028h 0040   4]                   Info Count : 00000001

    [02Ch 0044   1]                     Revision : 00
    [02Dh 0045   2]                       Length : 0035
    [02Fh 0047   1]               Register Count : 01
    [030h 0048   2]              Namepath Length : 000F
    [032h 0050   2]              Namepath Offset : 0026
    [034h 0052   2]              OEM Data Length : 0000
    [036h 0054   2]              OEM Data Offset : 0000
    [038h 0056   2]                    Port Type : 8000
    [03Ah 0058   2]                 Port Subtype : 0000
    [03Ch 0060   2]                     Reserved : 0000
    [03Eh 0062   2]          Base Address Offset : 0016
    [040h 0064   2]          Address Size Offset : 0022

    [042h 0066  12]        Base Address Register : [Generic Address Structure]
    [042h 0066   1]                     Space ID : 00 [SystemMemory]
    [043h 0067   1]                    Bit Width : 00
    [044h 0068   1]                   Bit Offset : 00
    [045h 0069   1]         Encoded Access Width : 03 [DWord Access:32]
    [046h 0070   8]                      Address : 00000000FE034000

    [04Eh 0078   4]                 Address Size : 00001000

    [052h 0082  15]                     Namepath : "\_SB.PCI0.UAR2"

Change-Id: If34a3d2252896e0b0f762136760ab981afc12a2f
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/22453
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-15 16:07:21 +00:00
Duncan Laurie e4a36c7b52 arch/x86/acpi: Add support for writing ACPI DBG2 table
Add a function to create an ACPI DBG2 table, which is a Microsoft
ACPI extension for providing a description of the available debug
interface on a board.

A convenience function is provided for creating a DBG2 table with
a 16550 UART based on a PCI device.

This is tested by generating a device and verifying it with iasl:

[000h 0000   4]                    Signature : "DBG2"
[004h 0004   4]                 Table Length : 00000061
[008h 0008   1]                     Revision : 00
[009h 0009   1]                     Checksum : 3B
[00Ah 0010   6]                       Oem ID : "CORE  "
[010h 0016   8]                 Oem Table ID : "COREBOOT"
[018h 0024   4]                 Oem Revision : 00000000
[01Ch 0028   4]              Asl Compiler ID : "CORE"
[020h 0032   4]        Asl Compiler Revision : 00000000

[024h 0036   4]                  Info Offset : 0000002C
[028h 0040   4]                   Info Count : 00000001

[02Ch 0044   1]                     Revision : 00
[02Dh 0045   2]                       Length : 0035
[02Fh 0047   1]               Register Count : 01
[030h 0048   2]              Namepath Length : 000F
[032h 0050   2]              Namepath Offset : 0026
[034h 0052   2]              OEM Data Length : 0000
[036h 0054   2]              OEM Data Offset : 0000
[038h 0056   2]                    Port Type : 8000
[03Ah 0058   2]                 Port Subtype : 0000
[03Ch 0060   2]                     Reserved : 0000
[03Eh 0062   2]          Base Address Offset : 0016
[040h 0064   2]          Address Size Offset : 0022

[042h 0066  12]        Base Address Register : [Generic Address Structure]
[042h 0066   1]                     Space ID : 00 [SystemMemory]
[043h 0067   1]                    Bit Width : 00
[044h 0068   1]                   Bit Offset : 00
[045h 0069   1]         Encoded Access Width : 03 [DWord Access:32]
[046h 0070   8]                      Address : 00000000FE034000

[04Eh 0078   4]                 Address Size : 00001000

[052h 0082  15]                     Namepath : "\_SB.PCI0.UAR2"

Raw Table Data: Length 97 (0x61)

  0000: 44 42 47 32 61 00 00 00 00 3B 43 4F 52 45 20 20  // DBG2a....;CORE
  0010: 43 4F 52 45 42 4F 4F 54 00 00 00 00 43 4F 52 45  // COREBOOT....CORE
  0020: 00 00 00 00 2C 00 00 00 01 00 00 00 00 35 00 01  // ....,........5..
  0030: 0F 00 26 00 00 00 00 00 00 80 00 00 00 00 16 00  // ..&.............
  0040: 22 00 00 00 00 03 00 40 03 FE 00 00 00 00 00 10  // "......@........
  0050: 00 00 5C 5F 53 42 2E 50 43 49 30 2E 55 41 52 32  // ..\_SB.PCI0.UAR2
  0060: 00                                               // .

Change-Id: I55aa3f24776b2f8aa38d7da117f422d8b8ec5479
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/22452
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-15 16:07:14 +00:00
Vaibhav Shankar 8f20044c77 soc/intel/cannonlake: Fix and clean up xhci ACPI code
During S3 cycling, system entered S3 only once and falied to
enter S3 the second time. The system gets stuck at this point
and we have to do a cold reboot to restore the system.

Since XHCI IP is able to power gate during kernel freeze/suspend,
this patch removes unnecessary device gating from ASL. This helps
in continuous cycling of S3.

BUG=b:69115421
TEST=run powerd_dbus_suspend multiple times and check if
the system enters and resumes from S3.

Change-Id: Id459631ea2d32feea4b8f658fd34fa25945f909e
Signed-off-by: Vaibhav Shankar <vaibhav.shankar@intel.com>
Reviewed-on: https://review.coreboot.org/22389
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-15 05:56:33 +00:00
Aaron Durbin f0349023a2 device: further untangle device_t from struct device
This further allows compilation units to be re-used without
having to add macro guards because of declarations not being
around in the __SIMPLE_DEVICE__ case. These declarations are for
functions that operate on struct device. struct device is a known
type so just expose the functions using the correct type. Also,
DEVTREE_CONST is empty while in ramstage so there's no reason
to separate the declarations. Lastly, fix up device_util.c to
use the proper types. It's only compiled in ramstage and it only
operates on struct device.

Change-Id: I306e0ad220cdab738cb727dda4a93bdec77c5521
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22420
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-15 05:19:42 +00:00
Cheng-Yi Chiang 09ab15798a mb/google/eve: Add DSP calibration clock name/rate for RT5514
Add a property for DSP calibration clock name and rate such that
RT5514 codec driver can control ssp1_mclk for DSP clock calibration.

BUG=b:67763576
TEST=boot on eve check RT5514 codec driver can get this device
     property.

Change-Id: Icf9695ef67efb2bb073e39b2ece02d57f0460a0c
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Original-Change-Id: Ie204dda81a099f23beb20be71380a8494a9bee31
Original-Reviewed-on: https://chromium-review.googlesource.com/756261
Original-Reviewed-by: Dylan Reid <dgreid@chromium.org>
Original-Reviewed-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/22451
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-14 21:21:48 +00:00
Duncan Laurie 37da8846fa mb/google/eve: Set DSP SPI clock to 12MHz
To enable faster download of hotword data set the SPI clock to the
Realtek 5514 DSP chip to 12MHz instead of the default 1MHz.

BUG=b:67763576, b:66161281
TEST=cras_test_client --listen /tmp/rec.raw, trigger hotword, and check
the samples using hexdump or cras_test_client --playback_f /tmp/rec.raw

Change-Id: I92710eae25613a8202c63888b86a269803c40fe6
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Signed-off-by: Cheng-Yi Chiang <cychiang@chromium.org>
Original-Change-Id: I7e50d755a90d739b6dec155228351c3974b2f3b9
Original-Reviewed-on: https://chromium-review.googlesource.com/686675
Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-by: Chinyue Chen <chinyue@chromium.org>
Original-Reviewed-by: Duncan Laurie <dlaurie@google.com>
Original-Tested-by: Chinyue Chen <chinyue@chromium.org>
Original-Commit-Queue: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/22450
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-14 21:21:44 +00:00
Duncan Laurie d60b4930bb mb/google/eve: Enable VMX
This feature was enabled at the kernel level, but that is triggering an
issue where FSP expects it to be disabled so it forces a cold reboot on
every warm reboot.  Since we want this enabled anyway just set it this
way in the BIOS so it matches what the kernel expects.

BUG=b:68666100
TEST=pass firmware_FWtries on Eve with R63 OS image

Change-Id: I294e34d25406365d591da06ce4c931b710cfbbaa
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Change-Id: I964d3d30392d130e808f37a661f2c89ec926cf58
Original-Signed-off-by: Duncan Laurie <dlaurie@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/749733
Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/22449
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: Furquan Shaikh <furquan@google.com>
2017-11-14 21:21:40 +00:00
Duncan Laurie bfd17e3421 mb/google/eve: Tune I2C4 hold times
Tune PCH I2C4 hold times to ensure the frequency is always <400KHz.

BUG=b:67029862
TEST=boot on eve and measure I2C4 at Tp262 to be 385KHz

Change-Id: Ie93c5c40bc74069b285f6c3ee311f1bd7cefcaf1
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Change-Id: Iceabc806a17b9e6a144a4f6288c6cca790d03950
Original-Signed-off-by: Duncan Laurie <dlaurie@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/739841
Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/22448
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: Furquan Shaikh <furquan@google.com>
2017-11-14 21:21:37 +00:00
Furquan Shaikh ebd67c23ed mb/google/eve: Enable AER and LTR
AER and LTR must be enabled individually on ports that need it,
in this case it should be enabled for WiFi and NVMe.

BUG=b:65457528
TEST=Wifi team verified that the performance is better with these changes.

Change-Id: I0d688fe07a1f3117c1ca617c2ce78e0d024a3510
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Change-Id: Ib059517fa782ccc18ba5ef1f76058a1898b7bf7a
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/671211
Original-Reviewed-by: Rajneesh Bhardwaj <rajneesh.bhardwaj@intel.com>
Original-Reviewed-by: Duncan Laurie <dlaurie@google.com>
Original-Commit-Queue: Duncan Laurie <dlaurie@google.com>
Original-Tested-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/22447
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-14 21:21:33 +00:00
Duncan Laurie f8e4eb84e5 mb/google/eve: Use rt5663 driver and set properties
Use the rt5663 driver and provide values for the offsets which are
needed for providing manual values to compensate the DC offset for
L and R channels between headphone and headset.

BUG=b:62712227
TEST=build and boot on eve and ensure rt5663 is functional.

Change-Id: I88113616e4b7c79cff840168b7c54ae754dfa75f
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Change-Id: Ica4090636c1ff29f0298114e62c9cc6fe167a425
Original-Signed-off-by: Duncan Laurie <dlaurie@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/611606
Original-Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-by: Hsinyu Chao <hychao@chromium.org>
Reviewed-on: https://review.coreboot.org/22446
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-14 21:21:29 +00:00
Duncan Laurie 477942e253 mb/google/eve: Remove ACPI control of touchscreen power
Change the touchscreen power control back to coreboot instead of
under the ACPI _ON/_OFF methods, and switch the TOUCHSCREEN_STOP_L
pin back to an output.

This reverts previous changes to touchscreen GPIOs that were made
to get back to a known good/working state.  Having ACPI control these
pins was resulting in a small percentage of touchscreen not being
discovered at boot.  This platform is not intending to use S0ix so
the ACPI control is not needed.

BUG=b:63718744
TEST=manual testing on Eve devices.

Change-Id: I3fd64a435a053da1558ef736fe7baceee3c8f3a0
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Change-Id: Ia1e2ae7ca2a8b668c60fbda2aa50373e580646b2
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/572692
Original-Reviewed-by: Duncan Laurie <dlaurie@google.com>
Original-Commit-Queue: Duncan Laurie <dlaurie@google.com>
Original-Tested-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/22445
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-14 21:21:27 +00:00
Martin Roth 4cd93b3b7f mb/amd/gardenia: Remove direct AGESA header includes
All AGESA headers should be included only through agesawrapper.h

BUG=b:66818758
TEST=Build gardenia

Change-Id: I3c9ae7a435fadabf577f1f65ad4a6aa6234e9a29
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/21717
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-14 21:00:38 +00:00
Martin Roth 78b05dfbb2 soc/amd/stoneyridge: Remove direct AGESA header includes
All AGESA headers should be included only through agesawrapper.h

BUG=b:66818758
TEST=Build gardenia; Build & boot kahlee

Change-Id: Iadc516e11148048ed9bf43c7a46827793245027a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/21716
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-14 21:00:18 +00:00
Martin Roth b2c0d08a4e soc/amd/common: Remove direct AGESA header includes
All AGESA headers should be included only through agesawrapper.h

BUG=b:66818758
TEST=Build gardenia; Build & boot kahlee

Change-Id: I94140235f46a627dda99540af8619aeca3f4f157
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/21715
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-14 21:00:02 +00:00
Martin Roth b564eae5e1 mb/google/kahlee: Remove direct AGESA header includes
All Stoney AGESA headers should be included only through agesawrapper.h

BUG=b:66818758
TEST=Build and boot tested

Change-Id: I642f5caf8a37ae4042c32fec3a92e0995193cb7a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/21714
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-14 20:59:36 +00:00
Martin Roth d6ccf4eaa9 AMD Stoney Ridge: Add agesa_headers.h
- Create header files for the stoneyridge PI that pulls in AGESA pi
headers and encloses them in #pragma pack push/pop to keep the
'#pragma pack(1)' in Porting.h from leaking.
- Add that header to agesawrapper.h, replacing AGESA.h and Porting.h

Following patches will update the coreboot code to use only
agesawrapper.h to pull in the AGESA headers.

BUG=b:66818758
TEST=Build tested

Change-Id: Ib7d76811c1270ec7ef71266d84f3960919b792d4
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/21713
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-14 20:59:14 +00:00
Patrick Rudolph 112ae4860f ec/lenovo/h8/acpi/ec: Add registers
Add register HPPI and GSTS.
Add method WLSW that is used by thinkpad_acpi kernel module.
Seperate method by an empty newline.

Change-Id: I5a125047fad0e08cd9256bc53c3f5a7db7e56e7d
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20987
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2017-11-14 17:44:03 +00:00
Marshall Dawson 28f30a138a amd/common/spi: Update flash driver usage
Fix how the SPI driver is accessed in spi_SaveS3info.  This code has
been unused to date.

Change-Id: Ie2b97c13079fd049f6e02f3ff8fa630ed880343f
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22406
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-14 17:27:36 +00:00
Marshall Dawson f5e057c885 soc/amd/stoneyridge: Load SMU fimware using PSP
Add the ability to locate the SMRAM-based SMU firmware early and
call the PSP library to load it prior to DRAM initialization.  This
is currently placed in bootblock to ensure the blob is loaded
before any reset occurs.

Add similar functionality in ramstage for SMU FW2 to the hook already
in place for running AmdInitEnv.  Rename the hook to make more sense.

This patch was tested using a pre-released PSP bootloader on a
google/kahlee system.

Leave the option unused until the bootloader is ready.

BUG=b:66339938

Change-Id: Iedf768e54a7c3b3e7cf07e266a6906923c0fad42
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22058
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-14 17:27:23 +00:00
Marshall Dawson 6350b8789f amd/stoneyridge: Add generic IMC sleep and wakeup
Hudson code, the basis for soc//stoneyridge southbridge, has typically
contained direct calls to vendorcode/amd//ImcLib.c.  In an effort to
keep #include files clean in other stoneyridge files, put the new calls
into imc.c.

Change-Id: I830d5431635ac4acaf3c3c974cb452847dc147cd
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22407
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2017-11-14 17:18:05 +00:00
Marshall Dawson 5e2e74f981 amd/stoneyridge: Replace BIT(n) in southbridge
Use more descriptive #define values for the ACPI features and
register decoding.

Change-Id: Iaaf9f9bd5761001bc4bfe6b64a6c72b1f04844bd
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22427
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-11-14 17:17:06 +00:00
Marshall Dawson 7465b9dc8d amd/stoneyridge: Define bits for AcpiConfig
Add defintions for PMx74.

Change-Id: Id9483be9032abe6fbd5a6ec2af6bb8869a4ab766
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22426
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-11-14 17:16:31 +00:00
Martin Roth dffd280b55 mb/google/kahlee: Add getter function for GPIO array
Instead of getting the address of the GPIO function with an extern,
add a getter function and make the GPIO arrays static.

TEST=Build Grunt; Build & boot Kahlee
BUG=b:69164070

Change-Id: I3defcb66696459b915d7d4f43234d5c08ab7d417
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22435
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-13 20:21:22 +00:00
Martin Roth b77bc6f5e7 mb/google/kahlee: Remove mainboard.h
mainboard.h only had a single function definition.  Move it into
baseboard/variants.h and get rid of the file.

TEST=Build grunt/kahlee
BUG=b:69164070

Change-Id: I6b7d50d5c949733d77c42b4daf56ed1f97ed6954
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22434
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-13 20:19:53 +00:00
Martin Roth fa3aff0906 mainboard/google/kahlee: Add Grunt variant framework
Update common files and add files for grunt to the variant directory.

BUG=b:68293392
TEST=Build only

Change-Id: I7b80e470058872d6613e66e64c8dd1494942e9b9
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22186
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-13 20:19:43 +00:00
Martin Roth ac35e622c2 mainboard/google/kahlee: Add baseboard framework
BUG=b:68293392
TEST=Build only

Change-Id: Ie4d039b4da10a992fc9dd2b0221fd4a1644aae6a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22373
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-13 20:19:38 +00:00
Lijian Zhao e1f4d790e4 soc/intel/common: Add error print in common i2c
Print error message when using common i2c without default clock defined.

TEST=Do not define default clock in Kconfig, compile will stop for
assertion.

Change-Id: I803f97698b3928e6b64df0010e71a6ded1400f87
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/22405
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
2017-11-13 17:39:53 +00:00
Lijian Zhao f3885618d9 soc/intel/cannonlake: Define default LPSS clock
Default LPSS clock need to be defined for SOC.

TEST=Turn on COMMON_I2C_DEBUG, add I2C clock entry and check I2C
programing properly during coreboot.

Change-Id: I2c6b9bb23950b09f6f05e3ef762ccb1a260efc5f
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/22403
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-13 17:39:41 +00:00
Marc Jones 290a59284e soc/amd/stoneyridge: Add CPU PPKG ASL
Add PPKG Method for processor passive thermal control list.

BUG=b:67999819

Change-Id: I5d84832af06f64c923485926e4e0c73c65a2b0b2
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/22399
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-11-13 17:36:51 +00:00
Marc Jones 31c8cdda73 soc/amd/stoneyridge: Add GNVS variables for thermal control
BUG=b:67999819

Change-Id: I78db830c14092f5e918657e62bf38ab7124b1646
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/22398
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-11-13 17:36:37 +00:00
Marc Jones cc7aba7cb1 amd/gardenia: Add globalnvs.asl
Stoney Ridge ASL uses global NVS for sharing data between ACPI and SMM.

Change-Id: I8f497870844da1f56ff5c3b126d5613be36a9bfb
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/22425
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-11-13 17:36:27 +00:00
Marshall Dawson 3e4e4c5f88 soc/amd/stoneyridge: Fix DRAM clear check
Explicitly add #include files to romstage.c to ensure sizes of the
devicetree structures are correct. The AMD support headers have an
open #pragma pack(1) which causes structure sizes to change based on
include ordering in different compilation units. More concretely, this
fixes a bug where dev->chip_info is incorrectly detected as 0.

Also shorten a printk string to bring the source line within 80 columns.

Change-Id: I1ed51cdbb8df387a453de6cb944b90538dac4431
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22424
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-13 17:21:56 +00:00
Matt DeVillier c4f9f4bdae google/chell: add missing SPD hex files
Several SPD hex files for chell were missing from upstream coreboot
(as compared to the Chromium tree/branch), which resulted in the
incorrect type and amount of RAM being reported on chell boards
with > 4GB RAM.  Add these missing files and their Makefile entries.

TEST: boot google/chell m7/16GB config and observe correct RAM
type and amount reported via dmidecode and cbmem console log.

Change-Id: I37d708c96e754b438e40fc413420aa64bf234c29
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/22402
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-13 16:52:43 +00:00
Lijian Zhao 8e3b5e849c intel/fsp: Update cannonlake FSP header
Update cannonlake FSP header to revision 7.x.11.43. Following changes
had been made:
1.Remove Minimum control ration from FSPM UPD.
2.Add Intersil VR command option in FSPS UPD.
3.Add minimum and maxiam ring ratio override.

TEST=None

Change-Id: I63c990e5766370a82dc1c044bcf744612229a605
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/22416
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-11 21:08:56 +00:00
Martin Roth 16995fb7ea vendorcode/amd/pi/00670f00: Set ModuleIdentifier to be 8 bytes
ModuleIdentifier must be 8 bytes.   Every other location else that uses
this value explicityly defines it as 8 bytes.  If it's initialized here
to less than 8 bytes, it gets passed to those other locations with
garbage at the end and fails to load the AGESA binary.

TEST=Build & boot Kahlee
BUG=B:69165234

Change-Id: I11fc90748f49782e2b16ee5326aee17cfe92d0bc
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22430
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-11 21:08:18 +00:00
Subrata Banik 15129b4db4 soc/intel/apollolake: Make use of Intel SPI common block
TEST=Build and boot reef

Change-Id: I1bb22ef1737b9e35892294ec0d66df39c546d72e
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/22364
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-11 18:20:12 +00:00
Subrata Banik c0ec28642f soc/intel/apollolake: Add support for SPI device
Provide a translation table to convert SPI device structure
into SPI bus number and vice versa.

Change-Id: I4c8b23c7d6f289927cd7545f3875ee4352603afa
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/22363
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-11 18:20:06 +00:00
Subrata Banik 5a283ef65c soc/intel/cannonlake: Make use of Intel SPI common block
TEST=Build and boot RVP

Change-Id: I5ff9867f08e43016a797b1b3719053df0c382174
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/22362
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-11 18:19:58 +00:00
Subrata Banik cca50852fe soc/intel/skylake: Make use of Intel SPI common block
TEST=Build and boot soraka/eve

Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Change-Id: I10de3ff75a3b063c4c46471e380bbbe2630c35f3
Reviewed-on: https://review.coreboot.org/22361
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-11 18:19:39 +00:00
Subrata Banik 09564fce55 soc/intel/{cannonlake,skylake}: Add _soc_ prefix in spi soc routine
This ensures that function callback into the SoC code.

Change-Id: Idc16d315ba25d17a2ab537fcdf0c2b51c8802a67
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/22392
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-11 18:19:31 +00:00
Subrata Banik 6c4b5916fc soc/intel/common/block: Add Intel common SPI support
SOC need to select specific macros need to compile
common SPI code.

Change-Id: I82f7d1852d12ca37f386b64a613a676753da959c
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/22360
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-11 18:19:15 +00:00
Marshall Dawson f79b636088 google/kahlee: Use devicetree register values for UMA
Set the UMA memory size to 128 MiB. This value was empirically tested
by AMD as the lowest value one could use.

BUG=b:64927639

TEST=default, and 64, 128, 256, 384MB non-legacy configurations.

Change-Id: I2bc808d8b402c3eb16a1a5962f3fa9d6b224cf52
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/21335
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-10 22:01:28 +00:00
Aaron Durbin 36dbf1d74a soc/amd/stoneyridge: Add UMA settings to devicetree
Add three settings for the UMA configuration to correspond with
definitions in AGESA.h.
 * UMA off, Auto, or size specified
 * Size (if specified above)
 * Legacy vs. non-legacy (if Auto)

BUG=b:64927639

Change-Id: I38b6603f365fdc1f1f615794365476f749e58be7
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/21334
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-11-10 22:01:22 +00:00
Marshall Dawson bf131b2616 amd/stoneyridge: Implement vboot_platform_is_resuming
Change-Id: I23882ad8cd93fbc25acd8a07eca6a78b6bafc191
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22414
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-10 19:18:10 +00:00
Marshall Dawson 0756880b80 amd/stoneyridge: Add function to find Pm1EvtBlk base
The AcpiPm1EvtBlk base I/O address is configured in PMx60.  Add a
helper function to read this.  The register is not lockable so it
shouldn't be assumed to be at its original address.

Change-Id: I91ebfb454c2d2ae561e658d903f33bfb34e1ad6f
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22413
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-10 19:17:42 +00:00
Marshall Dawson c5ada65620 amd/stoneyridge: Remove dead southbridge definitions
The revision level is not checked.  This was probably left over from
trying to determine hudson variants.

Remove the unused SMI command port values.  This was missed in:
  e9b862e amd/stoneyridge: Use generic SMM command port values

Change-Id: I91d8051372f4e238d390dd445d0bf06d06683a66
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22412
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-10 19:17:10 +00:00
Marshall Dawson 870fe79e64 amd/stoneyridge: Add more ACPI register definitions
Change-Id: I62a840499deed895cf474f1bfce1f399c970e589
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22411
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-10 19:17:06 +00:00
Marshall Dawson f9592ccef0 amd/stoneyridge: Use the new generic acpi_sleep_from_pm1
Unhardcode the acpi_get_sleep_type() function and rely on the new
function in arch/acpi.h.

Change-Id: Icd49c44fae43effb9f082db354abd327cad9f1ad
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22410
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2017-11-10 19:16:32 +00:00
Marshall Dawson 68592c34e3 amd/stoneyridge: Select AMD common sleep states
Change-Id: I2097293a1e843839bdc814345b1ec6437a6a0656
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22409
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-10 19:16:28 +00:00
Marshall Dawson 6139a5c6ad arch/x86: Add common AMD ACPI hardware definitions
Match the corresonding Intel definitions for the ACPI register
definitions.

Change-Id: Ib804f4544d04fe08fefa493d75e0375de7cf9348
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/21883
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2017-11-10 19:15:38 +00:00
Richard Spiegel 77fee09509 soc/amd/stoneyridge: Use uint8_t as type for SPD address
SPD address is currenty int. It should be uint8_t.

BUG=b:62200225

Change-Id: Ia11c5994c41849ba01ecae3cee6fa97c527134d0
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/22300
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-11-10 19:11:38 +00:00
Richard Spiegel cd04e31c8b soc/amd/stoneyridge: Simplify and fix SMBUS code
Solve issues left from Change-Id Ib88a868e654ad127be70ecc506f6b90b784f8d1b
Unify code: smbus.c to have the actual execution code, sm.c and smbus_spd.c
call functions within smbus.c.

Fix some functions that wrongly use SMBHSTCTRL as the register for the
data being transfered. The correct register is SMBHSTDAT0.

Include file smbus.h should only be used by sm.c, smbus.c and smbus_spd.c.

BUG=b:62200225

Change-Id: Ibd55560c95b6752652a4f255b04198e7a4e77d05
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/21887
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2017-11-10 19:11:12 +00:00
Marshall Dawson 3f6c400310 google/kahlee: Add defines in OemCustomize.c
Add a #define for MB_DIMM_SLOTS and verify it doesn't exceed the max
supported for the device.  AGESA's DRAM procedures follow the BKDG and
may vary depending on the number of slots on the motherboard.  DIMM
numbering and ordering is also affected by this value.

Replace hardcoded integers with defined values for DIMM slots and
number of channels.

Change-Id: I4f7336da80b4e3d7f351502a63de0652e9ff5395
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/21853
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-10 18:23:11 +00:00
Marshall Dawson 4af2342673 google/kahlee: Move DRAM clear override to devicetree
Kahlee needs to keep its DRAM contents after a reset. Move this
override out of the OemCustomize.c file to a devicetree register
setting.

Change-Id: I3196cb8b94bec64e8ce59e4285cf8d97f442bd3d
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/21858
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-10 18:23:01 +00:00
Richard Spiegel 67c2a7b487 soc/amd/common: Add DRAM clear option to northbridge.c
AmdInitPost() can be instructed to clear DRAM after a reset or to
preserve it. Use SetMemParams() to tell AGESA which action to take.

Note that any overrides from OemPostParams (OemCustomize.c) are not
affected by this change.

Change-Id: Ie18e7a265b6e0a00c0cc8912db6361087f772d2d
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/21856
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-10 18:22:53 +00:00
Subrata Banik 185988234d soc/intel/cannonlake: Remove structure variable initialization with 0
Variable without an initializer will default to 0 hence no
need of an explicit initialization.

Change-Id: I208d5e475600b102cd3d972919b170c10c790b32
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/22417
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-10 16:38:05 +00:00
Subrata Banik 05e06cd0be soc/intel/common: Fix CSE common code to accomodate Skylake/Kabylake
This patch ensures Skylake/Kabylake soc can make use of common
CSE code in order to perform global reset using HECI interface.

TEST=Build and boot on soraka/eve/reef/cnl-rvp

Change-Id: I49b89be8106a19cde1eb9b488ac660637537ad71
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/22394
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-10 16:37:38 +00:00
Subrata Banik 330dc10cfd soc/intel/apollolake: Include HECI BAR0 address inside iomap.h
This ensures HECI1_BASE_ADDRESS macro is coming from respective
SoC dirctory and not hardcoded inside common cse code. As per
firmware specification HECI1_BASE_ADDRESS might be different
between different socs.

Change-Id: I502b5b41b449bb07f14f07435bf311bbd4f943b6
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/22393
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-10 16:37:32 +00:00
Richard Spiegel cb01efcda1 src/soc/amd/stoneyridge/southbridge.h: Fix prototypes
Some prototypes types don't match the actual function type, though there's
no error message due to the types being alias. For clarity, types should
match between prototypes and actual functions.

BUG=b:68007655

Change-Id: I9573a68f7153dbbad2fc6551d5dab000760c871e
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/22288
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-11-10 16:30:53 +00:00
Ben Chan eeb475c5c8 mainboard/google/coral: power off EN_PP3300_DX_LTE_SOC when entering S5
On Astronaunt, after the system enters the S5 power state, there is a
10-second timeout before the system transitions the power state from S5
to G3. The EN_PP3300_DX_LTE_SOC signal, which is controlled by GPIO_78
on the APL platform, remains on during that period. If the system is
powered back on before going to G3, the built-in modem won't go through
a power cycle as EN_PP3300_DX_LTE_SOC is never de-asserted.

Keeping the modem, and indirectly the SIM, powered during a quick system
power cycle may sometimes be undesirable. For instance, we would like a
SIM with PIN lock enabled to require unlocking each time the system is
powered on. After the SIM receives a PIN, it may remain unlocked until
its next power cycle.

Also, it is often desirable to power cycle the modem when the system
goes through a power cycle. For instance, a user may power cycle the
system to recover a wedged modem.

BUG=b:68365029
TEST=Tested the following on an Astronaunt device:
1. Verify that the modem is powered on after the system boots from cold.
2. Suspend the system to S0ix. Verify that the modem remains powered on
   when the system is in S0ix. After the system goes back to S0, verify
   that the SIM with PIN lock enabled doesn't request unlocking, and the
   modem can quickly reconnect to a network.
3. Configure the system to suspend to S3 instead of S0ix, and then
   repeat (2).
4. Perform a quick system power cycle, verify that the modem is powered
   cycle and the SIM with PIN lock enabled requests unlocking.

Change-Id: Ie60776d5d9ebc6a69aa9e360bd882f455265dfa2
Signed-off-by: Ben Chan <benchan@chromium.org>
Reviewed-on: https://review.coreboot.org/22415
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-11-10 09:49:18 +00:00
Aaron Durbin 6f1e8d24af device: untangle device_t from struct device some more
This further allows compilation units to be re-used without
having to add macro guards because of declarations not being
around in the __SIMPLE_DEVICE__ case. These declarations are for
functions that operate on struct device. struct device is a known
type so just expose the functions using the correct type. Also,
DEVTREE_CONST is empty while in ramstage so there's no reason
to separate the declarations. They compile regardless of stage.

Change-Id: Idd4180437d30e7dfaa9f735416c108841e43129f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22397
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
2017-11-10 06:33:28 +00:00
Richard Spiegel 7a39e02cfd soc/amd/stoneyridge: Fix and clean lpc.c
Rename set_lpc_resource to set_child_resource. Fix EC child resource not
recognized as already set. Remove code that's not needed.

BUG=b:62200877

Change-Id: I6e2bf9f8214b5f660084ccd622e3fe2c0cba7656
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/22093
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2017-11-09 21:49:26 +00:00
Nick Vaccaro 8fc694ff25 mainboard/google/zoombini: add dptf.asl and gpio.h
Add dptf.asl (copied from reef) to baseboard variant includes,
instruct zoombini variant to use the baseboard's dptf.asl,
instruct zoombini variant to use the baseboard's gpio.h.

BUG=b:64395641
BRANCH=None
TEST=Verify "./util/abuild/abuild -p none -t google/zoombini -x
-a" compiles successfully.

Change-Id: I9aa37f5afc35dab372917a4c84ff3121ec569546
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/22381
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-09 19:12:19 +00:00
Richard Spiegel 3e4aeec5f4 src/soc/amd/stoneyridge/southbridge.h: Remove unused prototypes
Remove unused s3_resume_init_data prototype from southbridge,h

BUG=b:68007655

Change-Id: If022f873813070aac6cc9090c2212178a4e66354
Signed-off-by: Richard Spiegel <richard.spiegel@silverbackltd.com>
Reviewed-on: https://review.coreboot.org/22376
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-09 19:11:26 +00:00
Duncan Laurie 469af7b1d7 drivers/i2c/tpm/cr50: Increase init delay to 30 seconds
In case the TPM is doing a long crypto operation the initial probe
could be very delayed.  Rather than end up in recovery make the delay
long enough to accommodate the (current) long crypto times.

BUG=b:65867313, b:68729265
TEST=Verified that Soraka no longer hangs during EC reboot test.

Change-Id: I3bccff70e001dfc065c24be8ad34ef239a144db1
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/22379
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-09 19:05:32 +00:00
Nick Vaccaro 605c2dc251 mainboard/google/zoombini: fix EC_SCI_GPI gpio define
Change EC_SCI_GPI to GPE0_ESPI.

BUG=b:69011806
BRANCH=master
TEST=none

Change-Id: I5d07bc0ef295d776635ff3a585c8de9028bd3f6a
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/22380
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-09 19:04:23 +00:00
Furquan Shaikh d37107e130 mb/google/{poppy,nautilus,soraka}: Disable deep S3
Poppy and variants won't be using deep S3. This change disables deep
S3 option in devicetree.

BUG=b:69053636

Change-Id: I5fb4a6a0e4216a3648b5ed888f6dc6618f1a9fc4
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/22378
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-09 19:02:03 +00:00
Gaggery Tsai 2ecf3f8cb9 mb/google/fizz: Enable NIC leds
This patch enables customized NIC leds as follows:

	Green	Orange (Amber)
100M	off	blinking
1000M	on	blinking

BUG=b:65437780, b:68284778
TEST=Make sure the registers are programmed as expected and observe the
     LEDs are behaving as expected. Perform suspend/resume test and the
     LEDs are still working as expected.

Change-Id: I9bb1367a4c742c2755d620e14ee6dfe70ee7f34b
Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com>
Reviewed-on: https://review.coreboot.org/22293
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-09 18:39:12 +00:00
Martin Roth e0a6ee8880 mainboard/google/kahlee: Move usb_oc.asl into variant/acpi
This compares to the acpi directory in other variants.

BUG=b:68293392
TEST=Build and boot kahlee

Change-Id: I05d402995b280d6f020bc2575063dbffefa30670
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22372
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-09 18:19:11 +00:00
Martin Roth 95afc46382 mainboard/google/kahlee: Define MEM_CONFIG3 for Kahlee variant
Even though this GPIO isn't used for Kahlee, it needs to be defined
so that the weak version of the variant_board_id() function can
compile.

BUG=b:68293392
TEST=Build and boot kahlee

Change-Id: Ia8daf70fbafe02ec37c6b5eb8421cdb11de3be8b
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22371
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-09 17:23:24 +00:00
Marshall Dawson 07132a4c32 amd/stoneyridge: Add PSP definitions southbridge and iomap
Define the PSP's BAR3 and BAR3 enable bit.  Define a default base
address for BAR3.

Change-Id: I59a0ec59b7c6bbc6468b3096ec8d025832349f44
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22250
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-08 21:59:14 +00:00
Marshall Dawson 5f0520a909 amd/stoneyridge: Add SMU firmware blobs to cbfs
Stoney Ridge supports two different sets of SMU firmware, one for
either fanless OPNs and one for fanned.

Add a Kconfig mechanism to select the proper set and add the blobs
into cbfs.

BUG=b:66339938

Change-Id: I8510823e2232b74ec6fe001cc28953f53b2aa520
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22057
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-08 21:59:08 +00:00
Marshall Dawson 596ecec009 soc/amd/common/psp: Add command to load fw blobs
An upcoming PSP firmware change will allow coreboot to load the two
SMU firmware blobs (one runs in SRAM and the other in DRAM).  The
traditional method is for the PSP to control most of the process,
e.g. loading the SRAM version prior to releasing the x86 reset.

Add a new command that can instruct the PSP to load a firmware blob
from a location in the flash.

The definition for commands 19 and 1a differ from others in that they
do not use a command/response buffer.  Instead, the PSP will look in
the command/response pointer registers directly for the blob's
address.

BUG=b:66339938

Change-Id: I8431af341930f45ac74f471628b4dc4ede7735f4
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22056
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-08 21:58:59 +00:00
Marshall Dawson 154239aff1 amd/stoneyridge: Remove fixme.c
Move the two functions in fixme.c to places where they make more sense.
Coincidentally fix the todo in amd_initcpuio() and use bsp_topmem()
instead of explicitely reading the MSR.

BUG=b:62241048

Change-Id: Ica80b92f48788314ad290ccf72e6847fb6d039c3
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22297
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-08 19:24:49 +00:00
Marshall Dawson 22bb2bee60 amd/stoneyridge: Remove amdlib functions from fixme.c
Convert functionality to use coreboot-centric functions and defined
values.  This change should have no functional effect.

BUG=b:62241048

Change-Id: I87b258f3187db4247b291c848b5f0366d3303c75
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22248
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-08 19:24:28 +00:00
Marshall Dawson 2d69d75749 amd/stoneyridge: Add northbridge register macros
Add helpers for determining the D18F1 offset for MMIO base and limit,
and I/O base/limit registers.

Change-Id: I3f61bff00b8f3ada3e1bbfb163e1f223708bd47d
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22339
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-08 19:23:49 +00:00
Shelley Chen b838256a51 google/fizz: add VBOOT_PHYSICAL_REC_SWITCH config
Now that recovery button has been enabled through cr50,
we can add VBOOT_PHYSICAL_REC_SWITCH config and treat
the recovery button like on any other chromebox.

BUG=b:37751915, b:63893483
BRANCH=None
TEST=With DUT in normal mode, boot into recovery, press ctrl+d
     followed by pressing the recovery button.  Should successfully
     boot into dev mode.
CQ-DEPEND=CL:737477

Change-Id: I72fb42508083295e317dd06900796dc0cda753f6
Signed-off-by: Shelley Chen <shchen@chromium.org>
Reviewed-on: https://review.coreboot.org/22368
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-08 16:26:26 +00:00
Naveen Manohar 5bcb23ebbb mb/google/poppy/variants/nautilus: Enable Dialog DA7219 support
Enable Dialog DA7219 codec i2c device and add required SSDT parameters

BUG=b:68686020
TEST=With req'd driver support in kernel v4.4 verify audio on headset

Change-Id: Ic815c929f29bec0d26a2981e9933b752c2d84c70
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Signed-off-by: Shruthi Sudhakar <shruthi.sudhakar@intel.com>
Reviewed-on: https://review.coreboot.org/22264
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-07 23:37:38 +00:00
Naveen Manohar 351059a0b4 mb/google/poppy/variants/nautilus: add nhlt support
Nautilus board uses Dialog da7219 headset codec,
Select the appropriate NHLT blob to be packaged in CBFS.
Also generate the required ACPI NHLT table for codec
and the supported topology in nautilus.
Removes unwanted DMIC blob pick for nautilus

BUG=b:68686020
TEST=With the required driver support in kernel verify that
the Audio plays on headset and recording on headset mic

Change-Id: I104889f54da1de38854bcb72aabbc88b739d6c09
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Reviewed-on: https://review.coreboot.org/22325
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-07 23:37:19 +00:00
Naveen Manohar 83670c5176 soc/intel/kabylake: Add Dialog da7219 NHLT blob support
Add APIs and required parameters for creating Dialog da7219 SSP
endpoints in NHLT table.

The use of a NHLT table is required to make audio work
on the kabylake SoCs employing the internal DSP. The table
describes the audio endpoints (render vs capture) along with
their supported formats.

BUG=b:68686020
TEST=check that NHLT table for da7219 is created properly

Change-Id: I57b88873f1c59c8aadf8eec3c80a9d95165a2cc3
Signed-off-by: Naveen Manohar <naveen.m@intel.com>
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/22324
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-07 23:37:01 +00:00
Lijian Zhao a5b88e442b intel/cannonlake_rvp: Clean up GPIO programming
Since we move from cannonlake U DDR 4 platform to cannonlake U LPDDR4
platform, it is also critical to revisit the GPIO settings as they are
different. Remove unused GPIO setting for old platform, and clean up the
native function definition. PAD_CFG_NF can only select NF1,NF2 ..., set
to GPIO mode is illegal.

TEST=Boot up in chromeos successfully.

Change-Id: I0022b791bd8459ea2afdcd0241b603ce81408785
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/22326
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
2017-11-07 21:05:27 +00:00
Shaunak Saha d038d53a33 src/mainboard/intel/glkrvp: Fix Lid switch support
SCI trigger logic had to be inverted.
This patch enables the system to wake up from S3 when lid is opened
when the system is in suspend state.We are trying to match what a
external EC card running ChromeEC FW is sending on the signal.

TEST = Verified that system wakes up from S3 on toggling lid switch
back to open state.

Change-Id: Ib42a38088ee028eddc6769921b0552c569da25a9
Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Reviewed-on: https://review.coreboot.org/22117
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Schander <coreboot@mimoja.de>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-07 20:28:21 +00:00
Lann Martin b879ad9dfb mainboard/google/kahlee: Add MAINBOARD_FAMILY
BUG=b:68865273

Change-Id: Ia2e9b10035e9dd502a563cdf8324ea8ea1922db3
Signed-off-by: Lann Martin <lannm@chromium.org>
Reviewed-on: https://review.coreboot.org/22359
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-11-07 12:35:10 +00:00
Mario Scheithauer 7ab5dcd5c8 siemens/mc_apl1: Select CONFIG_NC_FPGA_NOTIFY_CB_READY
For internal measurements this mainboard needs a marking inside the NC
FPGA when coreboot is ready and payload has been loaded.

Change-Id: I37908b21e2a077dec7fa99b0db6d1fd9b6878341
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/22356
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-11-07 12:34:13 +00:00
Mario Scheithauer a39aedec9d src: Fix all Siemens copyrights
Some Siemens copyright entries incorrectly contain a dot at the end of
the line. This is fixed with this patch.

Change-Id: I8d98f9a7caad65f7d14c3c2a0de67cb636340116
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/22355
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-11-07 12:33:51 +00:00
Julien Viard de Galbert 66c210ae37 mainboard/intel/harcuvar: update to set the HSIO lines configuration
Change-Id: Ifc3423ff983fb631edcab087d04742937b25ef86
Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net>
Reviewed-on: https://review.coreboot.org/22310
Reviewed-by: FEI WANG <wangfei.jimei@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-07 12:33:18 +00:00
Julien Viard de Galbert f528195bdf soc/intel/denverton_ns: re-factor HSIO configuration
The main goal is to allow configuring the HSIO lines from the mainboard code.
Also share the code for both romstage and ramstage.
Remove explicit dependency on the harcuvar mainboard.

Change-Id: Iec65472207309eae878d14eef5bc644b80fdbb1d
Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net>
Reviewed-on: https://review.coreboot.org/22309
Reviewed-by: FEI WANG <wangfei.jimei@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-07 12:32:53 +00:00
Patrick Rudolph 6a81184058 device/device_util: Add string for DEVICE_PATH_NONE
Add string for DEVICE_PATH_NONE in dev_path. The enum DEVICE_PATH_NONE
can be translated to string and shouldn't be translated by
"Unknown device path type: 0".

Makes console output a lot prettier and readable.

Note: DEVICE_PATH_NONE is used on dummy devices for hotpluggable slots.

Change-Id: I08d471d8217f966e80daefe2d9971e357defde62
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/22272
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-11-07 12:32:13 +00:00
Jonathan Neuschäfer 67b3268fac RISC-V boards: Stop using the config string
RISC-V is moving towards OpenFirmware-derived device trees, and the old
functions to read the config string don't work anymore. Use dummy values
for the memory base and size until we can query the device tree.

Change-Id: Ice13feae4da2085ee56bac4ac2864268da18d8fe
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/21690
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2017-11-07 12:31:00 +00:00
Jonathan Neuschäfer 5a6e389747 arch/riscv: Use a separate trap stack
This is the lazy solution, as explained in the comment, but it works for
now.

Change-Id: I46e18b6d633280d6409e42462500fbe7c6823b4d
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/21689
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2017-11-07 12:30:38 +00:00
Jonathan Neuschäfer c90f1d7be0 arch/riscv: gettimer: Don't use the config string
Accessing the config string doesn't work anymore on current versions of
spike. Thus return dummy pointers until we have a better solution.

Change-Id: I684fc51dc0916f2235e57e36b913d363e1cb02b1
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/21687
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2017-11-07 12:30:07 +00:00
Jonathan Neuschäfer 140a827daa arch/riscv: Drop mret workaround
Our toolchain can compile mret now, and once the encoding changes, we'll
have to adjust the code anyway.

Change-Id: Ic37a849f65195006fa15d74f651a8aa9a9da5b5c
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/21762
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2017-11-07 12:29:27 +00:00
Jonathan Neuschäfer 92f0513a0c arch/riscv: mprv_read_*: Mark result as earlyclobber
This fixes a case of mstatus corruption, where GCC generated code that
used the same register for the mprv bit and the result.

GCC inline assembly register modifiers are documented here:
https://gcc.gnu.org/onlinedocs/gcc/Modifiers.html

Change-Id: I2c563d171892c2e22ac96b34663aa3965553ceb3
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/21688
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2017-11-07 12:29:08 +00:00
Jonathan Neuschäfer 0c42cd3240 arch/riscv: Fix return type of mprv_read_u64
Change-Id: I3dc12feefe5f0762e27d2ad0234371e91313c847
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/21929
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2017-11-07 12:28:37 +00:00
Patrick Rudolph 3dbd28470b lib/ramtest: Add comment
Add a comment about the tested RAM region size.

Change-Id: I29e99a06777bd21a65aa67049ceede4fd8adb603
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/22199
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Maximilian Schander <coreboot@mimoja.de>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2017-11-07 12:28:20 +00:00
Bill XIE 54f45c684c ec/lenovo/h8: Clear EC output queue before enablement
Sometimes (observed on Thinkpad T400s during cold boot) a few (only one
observed) garbage bytes may detained in the output queue of EC after power
up, and they should be cleared otherwise later communications will be
disrupted.

Change-Id: Id1733f7350232d0b10ac0d1bc912b62e7fa4da75
Signed-off-by: Bill XIE <persmule@gmail.com>
Reviewed-on: https://review.coreboot.org/22181
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Schander <coreboot@mimoja.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2017-11-07 12:26:51 +00:00
Bill XIE eb4ded6925 ec/acpi: add mechanisms to clear EC output queue
EC's output could be considered as a queue, and sometimes (observed on
Thinkpad T400s during cold boot) a few (only one observed) garbage bytes
may detained in such queue after power up. Those garbage bytes should be
checked and discarded first before real interactions, otherwise they may
disrupt the interaction during EC's enablement, causing a locked rfkill.

Change-Id: Iee031306c02f5211a4512c6b4ec90f7f0db196ae
Signed-off-by: Bill XIE <persmule@gmail.com>
Reviewed-on: https://review.coreboot.org/22180
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2017-11-07 12:26:42 +00:00
Julien Viard de Galbert c467334620 Microcode: add dependency to header files
When using microcode header and updating the header (due to a new
release of microcode during early development) the build system
doesn't detect the header change. This commit fixes this by adding
the appropriate dependency.

Change-Id: I4211a3e39f67da727ef7cddbbee6d8c4718dee4a
Signed-off-by: Julien Viard de Galbert <jviarddegalbert@online.net>
Reviewed-on: https://review.coreboot.org/22307
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-11-07 12:16:58 +00:00
Hal Martin 399d35fee0 cpu/intel: Add Intel FCBGA1023 socket support
This socket is used by 2nd and 3rd generation mobile SKUs from 2011-2013.

select SSE2 per review suggestion

Change-Id: I9306a3364ae15530c99ca3379cfa2057c5879681
Signed-off-by: Hal Martin <hal.martin@gmail.com>
Reviewed-on: https://review.coreboot.org/22209
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-11-07 04:39:14 +00:00
Marshall Dawson 3727708aef soc/amd/common/psp: Require PSP PCI definition in SOC
Remove the definition for the PSP PCI device from the common PSP
code.  Any APU using this source should have its own definitions,
and this allows for the device to move within the config space.

Change-Id: Ie41dfa348b04f655640b4259b1aa518376655251
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/22249
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-06 22:21:50 +00:00
Julius Werner 1ab8c01050 gru: Fix and export SPK_PA_EN GPIO for Scarlet
On older Grus, GPIO0_A2 was an audio voltage rail enable line. On
Scarlet, we instead moved the audio codec enable (previously on
GPIO1_A2) there. Unfortunately the code still had some hardcoded
leftovers that were overlooked in the initial port and make our speakers
smell weird.

This patch fixes the incorrect GPIO settings and adds the speaker enable
pin to the GPIOs passed through the coreboot table, so that depthcharge
doesn't have to keep its own definition of the pin which may go out of
sync.

Change-Id: I1ac70ee47ebf04b8b92ff17a46cbf5d839421a61
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/22323
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Schneider <dnschneid@chromium.org>
Reviewed-by: Alexandru Stan <amstan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-11-06 20:47:50 +00:00
Bora Guvendik b202a01acd intel/cannonlake_rvp: enable CNVi bluetooth
Enable USB2 port 10 for CNVi bluetooth.

TEST=Boot to OS, verify bluetooth functionality.

Change-Id: I5f2390c149bf0de911efac09f54ccd641f51bbcd
Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-on: https://review.coreboot.org/22290
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Pratikkumar V Prajapati <pratikkumar.v.prajapati@intel.com>
2017-11-06 18:21:20 +00:00
Aaron Durbin 4239a1671c soc/amd/stoneyridge: consolidate addresses in iomap.h
Take the existing scattered around address space defines
and put them in iomap.h.

Change-Id: I78aa1370b05d3e2f90d43f754076b81734cccf7f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22319
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-11-06 16:11:23 +00:00
Aaron Durbin 733ad92c65 soc/amd/stoneyridge: start header file for iomap
Create a new header file, iomap.h, which serves as a single
place for providing the address space definitions. Remove
the amd_defs.h file that had a single define in it.

Change-Id: I1b1aaa8c5d60d670c272ac7131faeb6b3edc1968
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22318
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-06 16:10:45 +00:00
ren kuo 6d53c6bc6a mainboard/google/coral: Override VBT selection for astronaut
Current VBT setting for T8 is only 1ms which is under Innolux
N116BCA-EA1 panel's spec.

Modify T8 to 100ms.
(Innolux's panel's spec requires T8 needs to be greater than 80ms)

CQ-DEPEND=CL:*496012
BUG=b:67756548
BRANCH=master
TEST=emerge-coral depthcharge coreboot chromeos-bootimage
     Run on DUT and check panel sequence meets spec.

Change-Id: I580567decfccd78366c37181255015ac2cd76493
Signed-off-by: Ren Kuo <Ren.Kuo@quantatw.com>
Reviewed-on: https://review.coreboot.org/22306
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ren Kuo <ren.kuo@quantatw.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-11-06 13:55:46 +00:00
Patrick Rudolph 0709dc0468 ec/lenovo/h8/acpi/thermal: Add ACPI fan control
Disengage the fan 10 degree below passive threshold as the automatic EC fan
control does not disengage the FAN even when CPU starts melting ...

* Add EC registers FAND and FANA.
* Add ACPI methods _AC0 and _AL0.
* Add fan device and PowerResource for fan control.

Tested on Lenovo T430:
* The fan disengages at 80°C and keeps running at full speed until temperature
  drops below 80°C.
* Fan can be disengaged using sysfs:
  /sys/devics/virtual/thermal/cooling_device0/cur_state
Tested on Lenovo T500:
* The fan disengages at 80°C and keeps running at full speed until temperature
  drops below 80°C.
* Fan cannot be disengaged using sysfs, but the current state can be read:
  /sys/devics/virtual/thermal/cooling_device0/cur_state

Change-Id: I075ff5c69676927db1c5e731294e18796884f97e
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/21227
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-04 19:10:29 +00:00
Patrick Rudolph 3ab13a8691 ec/lenovo/h8/acpi/thermal: Add support for passive cooling
The ACPI spec requires _TSP, _TC1, _TC2 and _PSL for passive cooling.
_TSP already has been added in a previous commit.
Copy the coefficients used on google devices to activate the feature.

Tested on Lenovo T430:
 The CPU is throttled once the passive threshold has been reached.
Tested on Lenovo T500:
 The CPU is throttled once the passive threshold has been reached.

Change-Id: I922923a9029de77158988ac254bab4aad9536935
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/21223
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Vasya Boytsov <vasiliy.boytsov@phystech.edu>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-11-04 17:23:19 +00:00
Nico Huber 8b59b31514 cpu/intel/speedstep: Emit PPKG object for first package
Tested on Lenovo Thinkpad T500.

Change-Id: I89f1ab4be338841463fb95ac75d794103380d16f
Signed-off-by: Nico Huber <nico.h@gmx.de>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/21325
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-04 17:23:11 +00:00
Nico Huber 4d211ac08d arch/x86/acpigen: Add function to write a CPU package
Emits a list of CPU cores, e.g.

  Name (PPKG, Package (2) { \_PR.CP00, \_PR.CP01 })

Tested on Lenovo Thinkpad T500.

Change-Id: I10e9ebad84343d1fb282b3fbb28f5f014f664f14
Signed-off-by: Nico Huber <nico.h@gmx.de>
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/21324
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-04 17:23:06 +00:00
Aaron Durbin b2b2015be0 mainboard/google/kahlee: remove unused FILECODE macro
From what I can tell FILECODE isn't used at all in this file.
Remove it.

Change-Id: Ie88140e63a4917f470f42119c1fe4e8c7d2584ca
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22317
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-11-04 02:59:32 +00:00
Aaron Durbin 3173d4444f soc/amd/stoneyridge: don't open code known literals
We have macros for register addresses. Use it for MMIO_CONF_BASE
instead of duplicating a literal again.

Change-Id: I2250ea990bafa234fd5fea48d2690edcfc4982b9
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22316
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-11-04 02:58:57 +00:00
Aaron Durbin 174abc5180 soc/amd/stoneyridge: fix incorrect constants in macros
Hex constants need '0x' prefix. Clearly these weren't being used,
but they should be fixed properly.

Change-Id: I43ab90500b6d5bc31db7ebd1c675d651c8971b87
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22315
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-11-04 02:58:48 +00:00
Aaron Durbin 426dc8e827 soc/amd/stoneyridge: remove superfluous NULL field initialization
By definition in C, fields that are not explicitly initialized will
be zero'd out. Therefore, remove the redundant struture field
initialization.

Change-Id: I1b3b2ddf6d2a763e65861a7bcebc6b7cd96691c2
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22314
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-11-04 02:58:41 +00:00
Aaron Durbin 8dd4006161 soc/amd/common: remove superfluous NULL initializers on globals
Global variables that are unitialized in C programs reside
in the .bss section. By definition, this section is cleared
to 0. Therefore, remove the explicit NULL initialization because
it's completely unnecessary.

Change-Id: I9e7a5a1e2110aa48a5497ab7e2b06676dd557763
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22313
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-11-04 02:58:35 +00:00
Aaron Durbin e3f7d44d3b soc/amd/common: remove use of LibAmdMemFill()
memset() exists for a reason. There's 0 reason to duplicate the
functionality but add extraneous parameters that do nothing. This
is just poor coding practices. Remove LibAmdMemFill() usage.

BUG=b:62240746

Change-Id: I18028b38421efa9c4c7c0412a04479638cc9218b
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/22312
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2017-11-04 02:58:28 +00:00
Lijian Zhao 7b2d1ae299 soc/intel/cannonlake: Add DSP support
Add dsp driver support for cannonalake, especially the scan_bus function
of Audio controller required.

TEST=N/A

Change-Id: I573fecedbd4d6619112765c3f2f8baccabeb5ac5
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/22233
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
2017-11-04 00:44:03 +00:00
Lijian Zhao 9bb684a0ec soc/intel/cannonlake: Install common i2c
Add common i2c support for cannonlake.

TEST=N/A

Change-Id: I5c60b0579f9e6050308896dcb13dda0bbb724d2b
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/22238
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-04 00:42:00 +00:00
Shaunak Saha f08ed7d790 src/mainboard/glkrvp: Fix ec_in_rw and wp
Change-Id: I513b26d39973d9714b531d1ab0755c66d19eb332
Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Reviewed-on: https://review.coreboot.org/22195
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-04 00:40:38 +00:00
Hannah Williams 96939ae694 soc/intel/apollolake: Fix nhlt blobs path for GLK
Change-Id: Iabea32654918575c952857145ee6edb165899baf
Signed-off-by: Hannah Williams <hannah.williams@intel.com>
Reviewed-on: https://review.coreboot.org/22277
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: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-04 00:38:25 +00:00
Aaron Durbin b1aa6114b1 cpu: assume SSE if SSE2 is selected
If the SSE2 Kconfig option is selected also select SSE.

Change-Id: I6ccba57d5ae13b8066f2f744cd739282ffd4fe73
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20245
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2017-11-04 00:34:20 +00:00
Jonathan Neuschäfer 0781cbe1d3 sb and soc: Enforce correct offset of member "chromeos" in global_nvs_t
The padding has recently been broken in commit 90ebf96df5
("soc/intel/skylake: Add GNVS variables and include SGX ASL") and fixed
again in commit af88398887 ("soc/intel/skylake: Fix broken GNVS offset
for chromeos").  Avoid this bug in the future.

Change-Id: I1bf3027bba239c8747ad26a3130a7e047d3b8c94
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/22229
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-11-04 00:33:26 +00:00
Jonathan Neuschäfer 7bd4715a70 commonlib/helpers.h: Include stddef.h
The definition of offsetof() uses size_t, which is declared in stddef.h,
according to POSIX. Include stddef.h directly to avoid relying on
implicit inclusion.

Change-Id: I221be02c332de55c9fcf7d86673709ed43dd5c3c
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/22230
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Schander <coreboot@mimoja.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-11-04 00:32:13 +00:00
Lijian Zhao ebd7c44d7b soc/intel/skylake: Update coding style for i2c
From comment from https://review.coreboot.org/#/c/22238/, the coding
style need to be update.

TEST=N/A

Change-Id: Id022648951c0f11216aa32f422b5095476f82f8c
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/22278
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-04 00:30:38 +00:00
Philipp Deppenwiese 86fd88407b include: Deactivate timestamp_get if kconfig option not set
If CONFIG_COLLECT_TIMESTAMPS not set all timestamp
functions should be deactivated by using a pre-processor
statement.

Change-Id: I8ac63ba7e4485e26dc35fb5a68b1811f6df2f91d
Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org>
Reviewed-on: https://review.coreboot.org/22147
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-04 00:28:57 +00:00
Keith Hui 6b06abb461 asus/p2b: Move to EARLY_CBMEM_INIT
Change-Id: I0bf4d6318ade6e931db4f8b1af08db1f9f93c313
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/22228
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-11-04 00:28:28 +00:00
Lijian Zhao 44e2abf38f soc/intel/apollolake: Move to common dsp driver
Move dsp driver implementation to common dsp driver.

TEST=Boot up and check dsp driver loaded or not in OS.

Change-Id: Ia2be1c9f18e0e110600bd56a0b6cb8d40ca5e01f
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/22234
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-04 00:27:24 +00:00
Lijian Zhao 7b6a8cec9b soc/intel/common: Add common dsp driver
Audio DSP pci driver can be common across different platforms.

TEST=N/A.

Change-Id: Ia9206657864b8795799dc71af54996017c1eec57
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/22232
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
2017-11-04 00:26:54 +00:00
Bora Guvendik af36f1d525 mainboard/intel/cannonlake_rvp: enable SD card
Set SCS SD enable FSP parameter and set card detect
gpio information.

Change-Id: Ic99466c0d2d59070418d765442ff6d217023803b
Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-on: https://review.coreboot.org/21603
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-03 23:59:52 +00:00
Paul Menzel 1812311645 southbridge: Remove trailing space in `dump_south()` output
Change-Id: I4df9f8ce1058a2bb219508d0c8d04e153d37131c
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/5179
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-11-03 23:54:41 +00:00
Divya Chellap 8fcd559ef9 soraka: update pad reset config of WLAN_PE_RST to RSMRST
In skylake based platforms, setting GPIO pad reset config
to DEEP will reset the gpio configuration across warm reset,
set it to RSMRST to preserve the configuration across warm resets.
Also, moving the configuration from early to late as appropriate.

BUG=b:64386481
BRANCH=none
TEST= WiFi functionality across S3, DeepS3, S0ix and warm/cold reboot.

Change-Id: I38940b7c7d71e60bf0e51d6978a00be148ad61bc
Signed-off-by: Divya Chellap <divya.chellappa@intel.com>
Reviewed-on: https://review.coreboot.org/22174
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-03 22:00:20 +00:00
Matt DeVillier e3d8471a78 google/reks: override USB2 Phy settings on BSW D-Stepping SOC
Adapted from Chromium commit 12ad5b5: Reks : override USB2 Phy settings...

Base on Intel recommendation, override following
settings for USB2 port 1/2/3 on BSW D-stepping SOC.

1. Set USB[1] register for right side to 7321
2. Set USB[2] register for left side to 7021
3. Set USB[3] register for CCD to 7021

Original-Change-Id: I04240a010e875f29c47f4fea83ff918f180b0273
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: Keith Tzeng <keith.tzeng@quantatw.com>

Change-Id: Iabd6312576e9897315c4e4dbf19341380d9d1414
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/22269
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-03 21:57:52 +00:00
Matt DeVillier 158170b0a8 google/reks: override RX ODT limit, RAM geometry if needed
Adapted from Chromium commit 6ee6f3d: Reks: To set the RX ODT limit...

Override RX ODT and DRAM geometry for Micron part MT52L256M32D1PF-107.
Use get_ramid() to determine if override is necessary.

Original-Change-Id: I41f3aba030a00152e1217533ef953338ac396605
Original-Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Original-Reviewed-by: Kane Chen <kane.chen@intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: Keith Tzeng <keith.tzeng@quantatw.com>

Change-Id: Iea8c3c67e5afb21285dc15ad665474ad5f192423
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/22268
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-03 21:57:04 +00:00
Martin Roth 42ac307330 vendorcode/amd/pi/00670F00: remove unused headers
These header files are not used, so remove them.

BUG=b:68812513
TEST=Build

Change-Id: Ib43fc544186f7b46ecf9b318b9edcf008f2d08dc
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22298
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-03 21:54:39 +00:00
Marshall Dawson 5bb0d75566 amd/stoneyridge: Clarify SPD structure in chip.h
Add #define values and clarify the spdAddrLookup array.

Change-Id: I39b9913a2fd52f9105e4a771f651a8d9649202e6
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/21852
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-11-03 18:40:26 +00:00
Werner Zeh f1f67c3b75 siemens/nc_fpga: Set FW_DONE bit before jumping to payload
Once coreboot is ready and payload has been loaded a bit inside the NC
FPGA needs to be set to notify this event. As there are NC FPGAs with
different PCI device IDs save the BAR0 address in a global variable once
the driver evaluates this address. It can then be used to access the
register from the boot state machine callback without the need of searching
for all possible PCI devices again.

As this driver is only used at ramstage there is no need of using
CAR_GLOBAL for the global variable. Use a Kconfig switch to make this
feature selectable from mainboard as not every mainboard may have a FPGA
with that capability.

Change-Id: I9cd09e7051edde30d144a7e020b84bb549e9e8b9
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/22138
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-03 16:20:15 +00:00
Nico Huber b31119a348 nb/intel/gm45: Enable LAPIC monotonic timer
Change-Id: I9f96561120d0feb44c5edd9e7241bc3456b31e5f
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/22221
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-11-03 16:19:27 +00:00
Paul Menzel 8890dccb23 soc/mediatek/mt8173: Remove cast of `NULL*` to `void *`
`NULL` already has that type in coreboot.

```
src/include/stddef.h:#define NULL ((void *)0)
```

Change-Id: I73aeaef178be8779020c436732952aa732e90c46
Reported-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/22296
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-11-03 16:03:30 +00:00
Keith Hui b9c1a4e8d9 sb/intel/i82371eb: Consolidate bootblock.c logic
The southbridge bootblock entry point bootblock_southbridge_init()
just calls i82371eb_enable_rom() which does all the work. Move all
that code into bootblock_southbridge_init() and drop the second
function.

Plus combine the 3 lines that set 3 bits in XBCS into one.

Change-Id: I07a5a28c91da9586e3bdaaf4521cba3f53a5cc01
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/21468
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2017-11-03 15:24:24 +00:00
Paul Menzel 427feecbf0 google/kahlee/acpi: Serialize method _CRS
ASL+ Optimizing Compiler/Disassembler version 20170831 shows the remark
below.

```
dsdt.aml     87:  Method (_CRS, 0x0, NotSerialized)
Remark   2120 -             ^ Control Method should be made Serialized \
        (due to creation of named objects within)
```

So, serialize the method.

Fixes: commit 4a51ea8470 (google/kahlee: Add ASL for Elan touchpad)
Change-Id: I664f493318cbfd80d91565c0d29ec918278c4906
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/21901
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-11-03 15:23:52 +00:00
Paul Menzel 8eed67b3ab drivers/intel/fsp2_0/hob_verify: Correct conversion specifier
Use the correct conversion specifier for `size_t` to fix the error
below.

```
src/drivers/intel/fsp2_0/hob_verify.c:31:4: error: format '%lx' expects \
        argument of type 'long unsigned int', but argument 4 has type \
        'size_t {aka unsigned int}' [-Werror=format=]
    "FSP_BOOTLOADER_TOLUM_SIZE: 0x%08llx < 0x%08lx\n",
    ^
    range_entry_size(&tolum), cbmem_overhead_size());
                              ~~~~~~~~~~~~~~~~~~~~~
```

Found-by: gcc (Debian 7.2.0-8) 7.2.0

Change-Id: I4631672211095f9934925e9bd230ccbf63c736af
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/22131
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-11-03 15:23:06 +00:00
Paul Menzel 11015342b4 soc/intel/quark/spi: Correct conversion specifier
Use the correct conversion specifier for `size_t` to fix the error
below.

```
from src/soc/intel/quark/spi.c:18:
src/soc/intel/quark/spi.c: In function 'xfer':
src/soc/intel/quark/spi.c:107:20: error: format '%ld' expects argument \
   of type 'long int', but argument 3 has type 'unsigned int' \
   [-Werror=format=]
   printk(BIOS_ERR, "bytesin > %ld\n", sizeof(ctrlr->data));
                    ^
```

Found-by: gcc (Debian 7.2.0-8) 7.2.0
Change-Id: I3974d116e85715086a2bd5533a80a20c4cc43303
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/22130
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-11-03 15:22:06 +00:00
Paul Menzel 0187380875 arch/x86/gdt: Move variable assignment down
The Clang Static Analyzer warns about an unused assignment, when
building the image for the Lenovo X60.

```
src/arch/x86/gdt.c:39:6: warning: Value stored to 'num_gdt_bytes' \
        during its initialization is never read
        u16 num_gdt_bytes = (uintptr_t)&gdt_end - (uintptr_t)&gdt;
            ^~~~~~~~~~~~~   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
```

If `CONFIG_RELOCATABLE_RAMSTAGE` is selected, the function returns
before the assignment is used. So, move the assignment below the if
statement.

Change-Id: Ibcb8bce743d8cb3625647804816fb97f937dc429
Found-by: clang version 4.0.1-6 (tags/RELEASE_401/final), Debian Sid/unstable
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/21957
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-11-03 15:20:15 +00:00
Martin Roth d540d740b6 mainboard/google/kahlee: Prepare for variants
Move files that are particularly specific to the mainboard into the
variant directory.  Files that only have small areas of mainboard
specific pieces use #if to separate between the boards.

Add memory.c to split out the variant board id into a weak function.
Add baseboard/gpio.h to satisfy the build - this will be updated in the
next commit.

BUG=b:68293392

Change-Id: I7c1beb45f571f2547f3b5b0d7ec78923d0cec761
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/22185
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-03 15:19:05 +00:00
Paul Menzel fa7d2a07fe soc/intel/common/block/lpc: Make integer literal unsigned long
```
    CC         romstage/soc/intel/common/block/*/lpc_lib.o
src/soc/intel/common/block/lpc/lpc_lib.c:91:17: warning: The result of the '<<' expression is undefined
                alignment = 1 << (log2_ceil(window_size));
                            ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Change-Id: I9bf2283e23ca7739a7e5b0993d9b6034ea28fb78
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/22201
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-11-03 07:54:01 +00:00
Paul Menzel 64e83409a1 soc/intel/common/block: Make integer literal unsigned long
Fix the warning below by making the integer literal unsigned.

```
    CC         bootblock/soc/intel/common/block/*/lpc_lib.o
src/soc/intel/common/block/lpc/lpc_lib.c:91:17: warning: The result of the \
'<<' expression is undefined
                alignment = 1 << (log2_ceil(window_size));
                            ~~^~~~~~~~~~~~~~~~~~~~~~~~~~~
```

Found-by: Clang static analyzer scan-build
          (clang version 4.0.1-6 (tags/RELEASE_401/final))
Fixes: e237f8b7 (soc/apollolake/lpc: Open I/O to LPC based on resource allocation)

Change-Id: I094fb469f020f3c1fae936e304b4458858842a8e
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/22198
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-11-03 07:52:52 +00:00
Paul Menzel b843c5e3f3 lib/reg_script.c: Remove unused assignment
Fix the warning below.

```
    CC         bootblock/lib/reg_script.o
src/lib/reg_script.c:375:11: warning: Value stored to 'value' during its \
initialization is never read
        uint64_t value = msr.hi;
                 ^~~~~   ~~~~~~
```

Found-by: Clang static analyzer scan-build
          (clang version 4.0.1-6 (tags/RELEASE_401/final))
Fixes: fd461e39 (regscript: Add support for MSR type)
Change-Id: I218e45d12f2f00e2ad4cfe5410029f407b57568d
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/22197
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-11-03 07:51:56 +00:00
Paul Menzel 57ea9b41e7 soc/mediatek/mt8173/Kconfig: Use plural of *message*
Change-Id: I07e70f7e4b3c1244559b834a91ac143cd36f75bd
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/22282
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-11-03 07:42:07 +00:00
Paul Menzel 0d0be39bb9 soc/mediatek/mt8173: Remove unneeded header inclusion
Change-Id: If2135ca74de5e9336349bdb0e034f484b7e3dd26
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/22281
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-11-03 07:41:24 +00:00
Paul Menzel 22db82d91d soc/mediatek/mt8173: Fix typo in debug message
Change-Id: I431a23129af8744f51edfee450f3c6e5cb0f3898
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/22280
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-11-03 07:41:00 +00:00
Paul Menzel 454cfa00b9 soc/mediatek/mt8173: Correct multi-line comment format
Make the format of two multi-line comments compliant with the coding
style.

Change-Id: I8bc7b1eb175957b76ca19acdcb29b06ae86429b4
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/22279
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-11-03 07:40:55 +00:00
Mario Scheithauer 545593d62c soc/intel/apollolake: Add APL CPU device ID
Add Apollo Lake CPU device ID for E0 stepping.

Change-Id: I28fa222cd28b783d22c347cdbbd769e66bf10c30
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/22149
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-03 07:14:20 +00:00
Mario Scheithauer ee2dae2f17 siemens/mc_apl1: Enable I2C0 with 100kHz
The default setting for I2Cx is 400kHz. On this mainboard there is a
device on I2C0 which requires a lower clock rate to work correctly. For
this reason we set the frequency to 100kHz.

Change-Id: I637a58a0c89ead55ca1176d6aecdfaba5897d64f
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/22140
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-11-03 07:12:08 +00:00
Mario Scheithauer dda58a2a3c siemens/mc_apl1: Set coreboot ready LED
This mainboard has its own coreboot ready LED. The LED is switched on
via GPIO CNV_RGI_DT.

Change-Id: I179d013746c1334337dc9e6b7f09ac54eff0cd77
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/22136
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-11-03 07:11:55 +00:00
Mario Scheithauer d958300590 siemens/mc_apl1: Add legacy IRQ routing for PCI devices
On this mainboard there are PCI devices, which are connected to the PCIe
root port via a PCIe-2-PCI bridge. One of the devices only supports
legacy interrupt routing. For this reason we have to adjust the PIR6
register (0x314c) which is responsible for PCIe device 13h and 14h. This
means that the interrupt routing will also be the same for both PCIe
devices. The bridge is connected to PCIe root port 4 (Device 14.0).

The following routing is required:
INTA#->PIRQB#, INTB#->PIRQC#, INTC#->PIRQD#, INTD#->PIRQA#

Change-Id: I5464c9a2669773bc1e6cd4b4d29d1be838dbfa27
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/22139
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-11-03 07:11:47 +00:00
Mario Scheithauer d0e51330ed soc/intel/apollolake: Set CPU to Max Non-Turbo Ratio
If the Running Average Power Limits (RAPL) feature is disabled, the CPU
should be set to the Max Non-Turbo Ratio. RAPL is switched off by
CONFIG_APL_SKIP_SET_POWER_LIMITS. Furthermore, a frequency change should
be prevented by disabling Enhanced Intel Speedstep Technology (EIST). So
the CPU should run with constant frequency with this setting.

Change-Id: I67020f7e75700255629294fd9bcf67ee01765a01
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/22148
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-03 07:11:37 +00:00
Chris Wang 36e40e40a7 google/nautilus: enable elan touchpad support
add elan touchpad in devicetree.

BRANCH=master
BUG=b:66462881
TEST=emerge-nautilus coreboot

Change-Id: I30e6797ef06351690ff0b5c78ea76918547167a7
Signed-off-by: Chris Wang <chriswang@ami.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/22187
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: shkim <sh_.kim@samsung.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-11-03 05:32:41 +00:00
Chris Wang cb25974f5a google/nautilus: Update GPIO table
Update GPIO settings to meet nautilus's schematic design.

BRANCH=master
BUG=b:66462881
TEST=emerge-nautilus coreboot

Change-Id: I11930df62130431764702371a3ba84949a65ba30
Signed-off-by: Chris Wang <chriswang@ami.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/22183
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: shkim <sh_.kim@samsung.com>
2017-11-03 05:32:33 +00:00
Chris Wang cf24da4c53 google/nautilus: add spd data by ram id
update with nautilus memory spds.

RAM_ID = 0 => K4E8E324EB-EGCF
RAM_ID = 1 => K4E6E304EB-EGCF
RAM_ID = 2 => K4EBE304EB-EGCG

BRANCH=master
BUG=b:66462881
TEST=emerge-nautilus coreboot

Change-Id: I29d8a76b170aee64bb0125276df0e4709012daba
Signed-off-by: Chris Wang <chriswang@ami.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/22175
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: shkim <sh_.kim@samsung.com>
2017-11-03 05:32:27 +00:00
Tim Chen 5473c1a947 mainboard/google/coral: Override VBT selection for santa
Current VBT setting for T8 is only 1ms which is under Innolux N116BCA-EA1
panel's spec.

Modify T8 to 100ms.
(Innolux's panel's spec requires T8 needs to be greater than 80ms)

BUG=b:67756548
BRANCH=master
TEST=emerge-coral depthcharge coreboot chromeos-bootimage
     Run on DUT and check panel sequence meets spec.
CQ-DEPEND=CL:*493633

Change-Id: I7934b0f6d40b15796c55d360995c5eb0c5049222
Signed-off-by: Tim Chen <Tim-Chen@quantatw.com>
Reviewed-on: https://review.coreboot.org/22294
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-11-02 15:57:48 +00:00