Commit Graph

15193 Commits

Author SHA1 Message Date
Naresh G Solanki 102efd359b kblrvp: Add support for Hynix memory
Add support for hynix memory variant of RVP3.

Change-Id: Ic1f8630b36eb131b70c5e3b620957d9602da11ee
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17339
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-11 20:16:17 +01:00
Aamir Bohra 6fed46805e mainboard/intel/kblrvp: Add support to read board ID from EC
Add a function to identify an Intel RVP board by querying EC

Change-Id: I21337000827639fb8f22c5ee9bc5d86f1ebe1e74
Signed-off-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-on: https://review.coreboot.org/17283
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Naresh Solanki <naresh.solanki@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-11 20:15:00 +01:00
Vadim Bendebury 673a2663a9 src/vboot: mark factory_initialze_tpm() as static
This function is not used anywhere else in the code.

BRANCH=none
BUG=none
TEST=reef and kevin boards (using tpm1.2 and tpm2.0 respectively)
     build successfully.

Change-Id: Ifcc345ae9c22b25fdcfc2e547e70766021d27e32
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://review.coreboot.org/17387
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
2016-11-11 18:53:33 +01:00
Kyösti Mälkki 39915bc290 intel cache-as-ram: Unify stack setup
No need to have %ebx reserved here.

Change-Id: I9fe9292ddc610079b876019a71c69af5b1bcf2a2
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17357
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-11 18:52:09 +01:00
Kyösti Mälkki a4ffe9dda0 intel post-car: Separate files for setup_stack_and_mtrrs()
Have a common romstage.c file to prepare CAR stack guards.

MTRR setup around cbmem_top() is somewhat northbridge specific,
place stubs under northbridge for platrform that will move
to RELOCATABLE_RAMSTAGE.

Change-Id: I3d4fe4145894e83e5980dc2a7bbb8a91acecb3c6
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15762
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-11 18:43:10 +01:00
Kyösti Mälkki 9b9915284f intel/sandybridge: Use common ACPI S3 recovery
Fix regression, S3 resume not working on sandy/ivy after commit
   9d6f365 ACPI S3: Remove HIGH_MEMORY_SAVE where possible

There is some 20ms delay with ACPI S3 wakeup time due to MTRR setup
being done after the backup copy. Moving to RELOCATABLE_RAMSTAGE fixes
this delay by removing need of this backup entirely.

Change-Id: Ib72ff914f5dfef8611f5f6cf9687495779013b02
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15248
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-11 18:42:07 +01:00
Wisley Chen 5ecc41b0c9 google/snappy: update timing of sdmode toggling
Maxim98357a speaker amp requires BCLK & SFRM to be active
and stable before it is unmuted. If there is a BLCK and no
SFRM, it results in a pop sound.

sdmode_delay property already exists which facilitates this
configuration. This patch updates "sdmode_delay" to avoid
pop sound.

BUG=chrome-os-partner:59034
BRANCH=master
TEST=emerge-snappy coreboot chromeos-bootimage

Change-Id: Ic9095ae6812ba822c760229e69f5b27c6c244cdf
Signed-off-by: Wisley Chen <wisley.chen@quantatw.com>
Reviewed-on: https://review.coreboot.org/17361
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-11 16:14:43 +01:00
Wisley Chen 232d31899b mainboard/google/snappy: Set PL1 override to 12000mW
Snappy is using APL SoC SKU's with 6W TDP max. As Reef,
the energy calculation is wrong with the current VR solution.
Experiments show that SoC TDP max (6W) can be reached
when RAPL PL1 is set to 12W.
Therefore, we've inserted 12W override after reading the fused value (6W)
so that the system can reach the right performance level.

BUG=chrome-os-partner:59034
BRANCH=master
TEST=emerge-snappy coreboot chromeos-bootimage

Change-Id: Idd702077cd05e2b43823542cb804b2d4b42f7116
Signed-off-by: Wisley Chen <wisley.chen@quantatw.com>
Reviewed-on: https://review.coreboot.org/17362
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-11 16:14:24 +01:00
Aaron Durbin 4668ba77ea soc/intel/common/lpss_i2c: simplify API and use common config structure
The apollolake and skylake had duplicate stanzas of code for
initializing the i2c buses. Additionally, they also had very
similar structures for providing settings for the i2c speed
control. Introduce a new struct lpss_i2c_bus_config and
utilize it in both apollolake and skylake thereby removing
the need for SoC-specific structres. The new structure is
used for initializing a bus fully as the lpss i2c API is
simplified in that lpss_i2c_init() is only required to be
called. The struct lpss_i2c_bus_config structure is passed
in for both initializing and filling in the SSDT information.
The formerly exposed functions are made static to reduce the
external API exposure.

BUG=chrome-os-partner:58889

Change-Id: Ib4fa8a7a4de052da75c778a7658741a5a8e0e6b9
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17348
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-11-11 03:11:45 +01:00
Aaron Durbin ed14a4e0df soc/intel/skylake: move i2c voltage config to own variable
In preparation of merging the lpss i2c config structures on
apollolake and skylake move the i2c voltage variable to its
own field. It makes refactoring things easier, and then there's
no reason for a separate SoC specific i2c config structure.

BUG=chrome-os-partner:58889

Change-Id: Ibcc3cba9bac3b5779351b673bc0cc7671d127f24
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17347
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-11-11 03:11:31 +01:00
Furquan Shaikh ce21151a1c mainboard/google/reef: Add digitizer device to devicetree
BUG=chrome-os-partner:56246
BRANCH=None
TEST=Verified kernel is able to talk to the device. Even without the
digitizer, no issues observed with the kernel.

Change-Id: I894a5f4cd8f6a51e641a2c8f7b1f682ab76712ae
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17343
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2016-11-10 20:40:35 +01:00
Furquan Shaikh ee019d016d mainboard/google/reef: Tune digitizer I2C frequency to 400kHz
This brings the I2C frequency down to 400kHz which is spec for fast
I2C.

BUG=chrome-os-partner:56246
BRANCH=None
TEST=Verified frequency in kernel.

Change-Id: Ib83c57eec8644903cb9c4b2ab50c94038eb690c1
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17342
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-10 20:40:19 +01:00
Furquan Shaikh 73edd2b7c0 drivers/i2c/wacom: Make the driver more generic
Wacom I2C driver can be used by devices other than
touchscreen. e.g. digitizer. So there is no need to name the driver
with touchscreen specific attributes. Only a separate descriptor name
is required that needs to be set by mainboard correctly.

BUG=chrome-os-partner:56246
BRANCH=None
TEST=Compiles successfully.

Change-Id: I0d32a4adae477373b3f4c5f3abbe188860701194
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17341
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-10 20:40:06 +01:00
Naresh G Solanki 5a08fb2203 intel/kblrvp: Program I/O expander
Program I/O expander connected on I2C bus 4

Change-Id: I1a431f50e7b06446399a7d7cb9490615818147e7
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17338
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-10 20:11:40 +01:00
Furquan Shaikh 2db5bacd90 drivers/intel/fsp2_0: Add support for recovery MRC hash space in TPM
This space is read/updated only in recovery mode.
1. During read phase, verify if the hash of MRC data read from
RECOVERY_MRC_CACHE matches the hash stored in TPM.
2. During update phase, calculate hash of training data returned by MRC
and save it in TPM.

BUG=chrome-os-partner:59355
BRANCH=None
TEST=Verified MRC data hash comparison and update operation on reef.

Change-Id: Ifcbbf1bd22033767625ec55b659e05fa7a7afc16
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17274
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-10 18:10:54 +01:00
Furquan Shaikh b038f41420 vboot: Add support for recovery hash space in TPM
1. Add a new index for recovery hash space in TPM - 0x100b
2. Add helper functions to read/write/lock recovery hash space in TPM
3. Add Kconfig option that can be selected by mainboards that want to
define this space.
4. Lock this new space while jumping from RO to RW.

BUG=chrome-os-partner:59355
BRANCH=None
TEST=Verified use of recovery hash space on reef.

Change-Id: I1cacd54f0a896d0f2af32d4b7c9ae581a918f9bb
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17273
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-10 18:10:42 +01:00
Antonello Dettori 1232666b6f mainboard/thomson/ip1000: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/thomson/ip1000.

Change-Id: Id7b979d2539d4a80609a60464527939c4d449822
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17308
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-10 17:00:59 +01:00
Antonello Dettori c8a5aa5c3a mainboard/supermicro/h8qme_fam10: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/supermicro/h8qme_fam10.

Change-Id: Ia03c205ce498eadf8a34749a6a21fb2d0b29c840
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17306
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-10 17:00:01 +01:00
Antonello Dettori 6fec83a2f9 mainboard/supermicro/h8qgi: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/supermicro/h8qgi.

Change-Id: I6cf123272283edbf89e854e4aa1a15a2d566133e
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17305
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-10 16:59:13 +01:00
Antonello Dettori 0bcd297d93 mainboard/roda/rk9: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/roda/rk9.

Change-Id: I56fec2a2814ee4b91b11f71dbdca1271792cd0e5
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17302
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-10 16:57:06 +01:00
Antonello Dettori 63028fd29d mainboard/roda/rk886ex: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/roda/rk886ex.

Change-Id: I2e88adc444dbbde7a4344829d7bd5a6c9e1f7531
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17301
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-10 16:56:30 +01:00
Antonello Dettori 8493b25357 mainboard/rca/rm4100: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/rcs/rm4100.

Change-Id: I8b242eefe796cd93337177fc694ea42c57c53f08
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17300
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-10 16:55:42 +01:00
Kevin Chiu c4943d86b0 mainboard/google/pyro: Set PL1 override to 12000mW
Pyro is using APL SoC SKU's with 6W TDP max. As Reef,
the energy calculation is wrong with the current VR solution.
Experiments show that SoC TDP max (6W) can be reached
when RAPL PL1 is set to 12W.
Therefore, we've inserted 12W override after reading the fused value (6W)
so that the system can reach the right performance level.

BUG=chrome-os-partner:58112
BRANCH=master
TEST=emerge-pyro coreboot chromeos-bootimage
Change-Id: I6de22d7b2d107f3d26ecfadd4e0904e68318e656
Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/17335
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-10 16:52:16 +01:00
Kevin Chiu 961d6d45a6 google/pyro: Tune i2c frequency to 400 Khz
tune i2c devices clk for pyro:
I2C0: audio da7219
I2C2: TPM H1
I2C3: wacom touchscreen
I2C4: elan touchpad

BUG=chrome-os-partner:58881
BRANCH=master
TEST=emerge-pyro coreboot chromeos-bootimage
Change-Id: If3c92ed260277c27a94d2fcf7883e9441519e40e
Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/17331
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-10 16:50:48 +01:00
Kevin Chiu 49ef5aa99b google/pyro: update timing of sdmode toggling
Maxim98357a speaker amp requires BCLK & SFRM to be active
and stable before it is unmuted. If there is a BLCK and no
SFRM, it results in a pop sound.

sdmode_delay property already exists which facilitates this
configuration. This patch updates "sdmode_delay" to avoid
pop sound.

BUG=chrome-os-partner:58112
BRANCH=master
TEST=emerge-pyro coreboot chromeos-bootimage
Change-Id: I5aee41957c9de7a05f962d3ede74efc6998a78fc
Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/17336
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-10 16:48:59 +01:00
Kevin Chiu f5fb219f0f mainboard/google/pyro: Configure PERST pin
Configure GPIO 122 as PERST. This is to assert WiFi PERST
during s0ix entry.

BUG=chrome-os-partner:58112
BRANCH=master
TEST=emerge-pyro coreboot chromeos-bootimage
Change-Id: Id760251a1b037feb62ec43199a145e407b074769
Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/17334
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-10 16:48:22 +01:00
Antonello Dettori 82fcc1afa1 mainboard/kontron/ktqm77: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/kontron/ktqm77.

Change-Id: I47763d1e2bfeee6366ce24b20d874adf7c6f65be
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17299
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
2016-11-10 00:58:40 +01:00
Furquan Shaikh 4b2fed50ed antirollback: Sync TPM space indices with vboot library
BUG=chrome-os-partner:59355
BRANCH=None
TEST=Compiles successfully for reef.

Change-Id: I27f2e10556214598d479e4a84e8949465e7da7d6
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17272
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-10 00:56:19 +01:00
Furquan Shaikh fb81474aa5 TPM: Add TPM driver files to romstage
This driver is required for reading and updating TPM space for recovery
MRC data hash in romstage.

BUG=chrome-os-partner:59355
BRANCH=None
TEST=Compiles successfully for reef.

Change-Id: I8edb7af13285a7a192e3d55fc6a11cfe12654bf9
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17270
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2016-11-10 00:56:04 +01:00
Furquan Shaikh 1220589b4f mainboard/google/reef: Add support for RECOVERY_MRC_CACHE
1. Add RECOVERY_MRC_CACHE region to reef FMAP.
2. Implement helper function for getting event for recovery mode with
memory retraining.
3. Select HAS_RECOVERY_MRC_CACHE.

BUG=chrome-os-partner:59352
BRANCH=None
TEST=Verified recovery mode behavior with and without memory training
request on reef.

Change-Id: I91abc9f8122f1aa3980c6372ab557e56a7a92730
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17243
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-10 00:55:52 +01:00
Furquan Shaikh cab1c01885 mrc: Add support for separate training cache in recovery mode
1. Re-factor MRC cache driver to properly select RW_MRC_CACHE or
RECOVERY_MRC_CACHE based on the boot mode.
 - If normal mode boot, use RW_MRC_CACHE, if available.
 - If recovery mode boot:
    - Retrain memory if RECOVERY_MRC_CACHE not present, or recovery is
    requested explicity with retrain memory request.
    - Use RECOVERY_MRC_CACHE otherwise.
2. Protect RW and RECOVERY mrc caches in recovery and non-recovery boot
modes. Check if both are present under one unified region and protect
that region as a whole. Else try protecting individual regions.
3. Update training data in appropriate cache:
 - Use RW_MRC_CACHE if normal mode.
 - Use RECOVERY_MRC_CACHE if present in recovery mode. Else use
 RW_MRC_CACHE.
4. Add proper debug logs to indicate which training data cache is used
at any point.

BUG=chrome-os-partner:59352
BRANCH=None
TEST=Verified that correct cache is used in both normal and recovery
mode on reef.

Change-Id: Ie79737a1450bd1ff71543e44a5a3e16950e70fb3
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17242
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-10 00:50:23 +01:00
Furquan Shaikh 470852bb08 vboot: Add support for recovery mode with forced memory retraining
1. Add new function vboot_recovery_mode_memory_retrain that indicates if
recovery mode requires memory retraining to be performed.
2. Add helper function get_recovery_mode_retrain_switch to read memory
retrain switch. This is provided as weak function which should be
implemented by mainboard just like {get,clear}_recovery_mode_switch.

BUG=chrome-os-partner:59352
BRANCH=None
TEST=Verified behavior of recovery mode with forced memory retraining on
reef

Change-Id: I46c10fbf25bc100d9f562c36da3ac646c9dae7d1
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17241
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-10 00:44:02 +01:00
Martin Roth 5dc2c1ba8a southbridge/amd: Remove debug echo when building PI
If this information is needed, use make V=1.  That will print the actual
command, not a command that needs to be updated with every addition if
it's going to stay in sync.

Change-Id: I64d33d93c7fad3359d8ef78657bdb86d1fb4d4a1
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/17328
Tested-by: build bot (Jenkins)
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2016-11-10 00:28:09 +01:00
Martin Roth d61b5404dc southbridge/amd: update for amdfwtool size on command line
amdfwtool was getting the ROM size as a #define when it was built.
It has been updated to pass it in as a command line parameter, so
now it can be built just once for abuild as a shared tool.

Update the calls to amdfwtool to pass the ROM size.

All platforms using amdfwtool had the output verified using
a binary compare.

This reverts commit 0529236ed2
(Makefile.inc: Don't share amdfwtool between platforms)

Change-Id: I188b34e08249f2d00bd48957ced750b21f1ec348
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/17327
Tested-by: build bot (Jenkins)
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2016-11-10 00:27:52 +01:00
Furquan Shaikh 2fe70b69c0 Revert "vboot: Add vboot library to romstage"
This reverts commit 21fdd8d0b2.

I meant to abandon the original change and clicked submit instead.

Change-Id: I1db29b62c5c071113d308583f094f77285c9ba1e
Reviewed-on: https://review.coreboot.org/17346
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-10 00:26:37 +01:00
Furquan Shaikh 21fdd8d0b2 vboot: Add vboot library to romstage
This library is needed for calculating sha-256 of recovery mrc data in
romstage.

BUG=chrome-os-partner:59355
BRANCH=None
TEST=Compiles succesfully for reef.

Change-Id: Ie257208c7b3ad07d00e4eb777debf19c42a2fc0c
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17271
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-10 00:07:25 +01:00
Furquan Shaikh 2afc4e7ff7 google/chromeec: Sync ec_commands.h host events with ec codebase
BUG=chrome-os-partner:59352
BRANCH=None
TEST=Compiles successfully for reef

Change-Id: Ibfa5681e16a97e342633104d2aae1fb0402939b8
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/17240
Tested-by: build bot (Jenkins)
Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
2016-11-10 00:07:15 +01:00
Antonello Dettori 9ec1123917 mainboard/kontron/986lcd-m: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/kontron/986lcd-m.

Change-Id: Ib47a4bb3580cb72ee51fb06c6faa6d2d1bd3a80c
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17298
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-10 00:02:07 +01:00
Antonello Dettori cc026798ce southbridge/intel/i82801dx: transition away from device_t
Replace the use of the old device_t definition inside
southbridge/intel/i82801dx.

Change-Id: I32888930d3742432a73dfc0a32c6586186e6757c
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17297
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-09 23:48:14 +01:00
Antonello Dettori 35e30f753f mainboard/jetway/j7f2: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/jetway/j7f2.

Change-Id: I37f59f74ac22fbf6e036cdb0515301e8dec400fb
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17296
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-09 23:48:02 +01:00
Antonello Dettori aa71ee10ec mainboard/iei/pm-lx2-800-r10: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/iei/pm-lx2-800-r10.

Change-Id: I60e5b84141aa4998427c3ecaadf8fce1654b8210
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17295
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-09 23:47:46 +01:00
Antonello Dettori cca5938ede mainboard/ibase/mb899: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/ibase/mb899.

Change-Id: Id5b460090db58e91b2c210d8633a69114a9c7f6b
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17294
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-09 23:47:34 +01:00
Antonello Dettori 771d7eccec mainboard/getac/p470: transition away from device_t
Replace the use of the old device_t definition inside
mainboard/getac/p470.

Change-Id: Ifb81976ed7068f9d51edb0d297cd4a12265c51ec
Signed-off-by: Antonello Dettori <dev@dettori.io>
Reviewed-on: https://review.coreboot.org/17293
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-09 23:47:26 +01:00
Rizwan Qureshi d8bb69a451 soc/intel/skylake: fix memory access beyond array bounds
chip.h has a config array PcieRpClkReqNumber which corresponds
to a FSP UPD parameter, the size is currently set to 20.
However the size of PcieRpClkReqNumber UPD in FSP2.0 is 24,
so memcpy (config buffer to UPD buffer) in chip_fsp20.c will read
beyond the bounds of config array.
Hence set the size of PcieRpClkReqNumber array based on the FSP in use.

Found-by: Coverity Scan #1365385, #1365386

Change-Id: I937f68ef33f218cd7f9ba5cf3baaec162bca3fc8
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/17292
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-09 23:29:43 +01:00
Marshall Dawson 1ec0c00179 amd/cpu: Add details to chip names
Newer AMD families have multiple models within them, each often
requiring unique support.  The chip_name files were starting to
have a lot of duplication.  Specify the model in the name, as well
as the family.

Change-Id: I236b260e2a565e212c486347c4a633eadcdf0042
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/17187
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-09 23:28:52 +01:00
Elyes HAOUAS bb09f285c3 nb/amd/amdmct/mct: Remove commented code
Change-Id: Id0c62cebfceaf083f1bb39514b06b32c55128b85
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/17172
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-09 23:10:00 +01:00
Elyes HAOUAS ec16e9302b mainboard/roda: Use C89 comments style & remove commented code
Change-Id: I4ce2705a8a07d0388bbdb459b63b59fc10a3aa39
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/16929
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-09 23:09:32 +01:00
Elyes HAOUAS 5db945062c nb/intel/i945/early_init.c: Add DDR2-667 detection for 945GC
945G-M4 returns : "unknown max. RAM clock (2)",
however, it supports up to DDR2-667MHz.
i945/raminit.c sdram_capabilities_max_supported_memory_frequency()
function returns 667 for case 2.

Change-Id: I3d54c88af897a71db757d00288f3968ed2c19151
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/17191
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-09 23:09:16 +01:00
Shaunak Saha 40d7a454a2 cpu/intel: Add MSR to support enabling turbo frequency
This patch adds definition FREQ_LIMIT_RATIO MSR. FREQ_LIMIT_RATIO
register allows to determine the ratio limits to be used to limit
frequency.

BUG=chrome-os-partner:58158
BRANCH=None

Change-Id: I50a792accbaab1bff313fd00574814d7dbba1f6b
Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Reviewed-on: https://review.coreboot.org/17211
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-09 21:02:27 +01:00
Kyösti Mälkki f22b26ad86 AMD binaryPI: Delay ACPI S3 backup until ramstage loader
Change-Id: I482cf93fe5dfab95817c87c32aad33df2e0a6439
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15471
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-09 20:53:03 +01:00
Kyösti Mälkki 67b34f8cfd AGESA: Delay ACPI S3 backup until ramstage loader
Change-Id: I59773161f22c1ec6a52050245f9ad3e6cc74a934
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15470
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-09 20:52:40 +01:00
Kyösti Mälkki 9d6f365643 ACPI S3: Remove HIGH_MEMORY_SAVE where possible
Add implementation to use actual requirements of ramstage size
for S3 resume backup in CBMEM. The backup covers complete pages of 4 KiB.

Only the required amount of low memory is backed up when ACPI_TINY_LOWMEM_BACKUP
is selected for the platform. Enable this option for AGESA and binaryPI, other
platforms (without RELOCATABLE_RAMSTAGE) currently keep their romstage ramstack
in low memory for s3 resume path.

Change-Id: Ide7ce013f3727c2928cdb00fbcc7e7e84e859ff1
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15255
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
2016-11-09 20:52:07 +01:00
Aaron Durbin 2c7ad8c8d3 mainboard/google/reef: use common google smbios mainboard version
BUG=chromium:663243

Change-Id: Ic78a6aac11a8e842911245c59e8ced7ed2c4e27a
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17291
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-09 16:52:18 +01:00
Aaron Durbin 15d2a79a1a vendorcode/google: add common smbios mainboard version support
Provide an option to deliver the mainboard smbios version in the
form of 'rev%d' based on the board_id() value.

BUG=chromium:663243

Change-Id: If0a34935f570612da6e0c950fd7e8f0d92b6984f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17290
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
2016-11-09 16:52:06 +01:00
Aaron Durbin 5577a475fc string.h: only guard snprintf() with __ROMCC__
There's no need to keep the snprintf() declaration hidden
for early stages. romcc is the entity that has issues. Therefore,
be explicit about when to guard snprintf().

BUG=chromium:663243

Change-Id: Ib4d0879e52c3f73c6ca61ab75f672f0003fca71f
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17289
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-09 16:51:52 +01:00
Janice Li e19c80b7ee google/pyro: Update WACOM touchscreen ACPI _HID
WACOM request to add a new identifier `WCOMNTN2`,
and use that for the board Pyro with all LCD combinations.

BRANCH=master
BUG=chrome-os-partner:58093
TEST=emerge-pyro vboot_reference coreboot chromeos-bootimage
Signed-off-by: Janice Li <janice.li@quantatw.com>
Change-Id: I95cf357efba958d7e864d2736d324e0aad70e307
Reviewed-on: https://review.coreboot.org/17257
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-09 16:46:10 +01:00
Nico Huber b9cee241b9 ec/acpi: Include ec.c unconditionally in romstage
Dependencies on EC code should be specified at board level and not here.
We can include the file unconditionally in romstage and let the linker
decide if it's needed.

Change-Id: Ie2d1970ac1dd175a9d42651573a88cd866f19cb9
Signed-off-by: Nico Huber <nico.huber@secunet.com>
Reviewed-on: https://review.coreboot.org/17123
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-09 10:05:18 +01:00
Arthur Heymans c5d972d073 Move select UDELAY_LAPIC from nb/gm45/Kconfig to cpu/model_1067x/Kconfig
Change-Id: I51cf4f35bf2ea95c8c19ab885e6308535314b0af
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17153
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-09 00:26:56 +01:00
Arthur Heymans 10141c3006 nb/intel/gm45: Use LAPIC udelay instead of custom version
This change may slow down the raminit by maximum 200usec,
but reuses the lapic udelay definition.

Change-Id: I60a68f8a7911b257c0eecda96f7c5bf302bb51ed
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17152
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-09 00:26:11 +01:00
Arthur Heymans 3cf2d9caf5 mb/lenovo/t400: use socket mPGA478MN instead of BGA945
The T400 features a socket P (mPGA478MN) and could potentially support
model_6fx CPUs.

Change-Id: I24f3356aa213c29011953daed31f46404e7a4d9d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17155
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-08 23:39:50 +01:00
Arthur Heymans 306521b82e cpu/intel/socket_mPGA478MN: Add socket P
This mobile CPU socket supports model_6fx and model_1067x.

Change-Id: Iecd6aae22831de7c3810545f0cb0be9738f96a2d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17154
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)
2016-11-08 23:39:22 +01:00
Arthur Heymans be91398353 mb/gigabyte/ga-945gcm-s2l: add mainboard
Startpoint was Intel d945gclf, which has same chipset and
Gigabyte ga-g41m-es2l which has same Superio.

What works and is tested:
* PCI slot;
* PCIe x16 slot with GPU (RADEON HD 2600 XT) and ADD2 DVI card;
* onboard VGA output (only textmode implemented) with native graphic init;
* 533, 800, 1067MHz FSB CPU (1333MHz is unsupported by the chipset);
* serial output during and after boot.

What does not work:
* resume from suspend (does not work for d945gclf either).

Quirks:
* The Realtek ethernet card requires a reset which currently also
  hardcodes a MAC adress.

This board was only tested with the SeaBIOS payload due to flash size
constraints (512KB) and with GNU/Linux.

Change-Id: I0ff9f193105facc1b276a791790e27eb4c275085
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17033
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-08 23:38:58 +01:00
Andrey Petrov 4c5b31e567 soc/intel/apollolake: Provide chipset value for ifdtool
Change-Id: I99454a9fca3b677a389bcaf7693ff4e18415c9ad
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/17259
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-08 23:12:21 +01:00
Andrey Petrov c4d0f526d4 southbridge/intel: Set chipset in ifdtool invocations
Since IFD format is floating, ifdtool needs to be parameterized with a
chipset it is dealing with. Add -p <chipset> argument to ifdtool
invocations if chipset provides it.

Change-Id: I4fd1783b5d994617912aedcf17adc2a98c97227b
Signed-off-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-on: https://review.coreboot.org/17258
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-08 23:11:45 +01:00
Arthur Heymans 8a3514d0ae nb/x4x/raminit.c: Improve crossclock table cosmetics
Change-Id: I3f692c55fdff99aa9eb41eaaea79a41ac93be590
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/17170
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-08 22:48:48 +01:00
Naresh G Solanki 1d04d16b08 vboot: Wrap line in comment longer than 80 characters
Fix comment greater than 80 columns.

Change-Id: Ie0be96868e8a99f79781c6bafc8991a955f37ffa
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17265
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-08 22:48:20 +01:00
Naresh G Solanki 647d39f2c7 intel/kblrvp: Update mainboard configuration
Update devicetree.cb as per RVP3 mainboard.

* Enable & configure PCIE ports,
* Enable & configure USB ports,
* Enable SSIC for WWAN,
* Disable unused I2C ports,
* Disable deep S5,
* Disable HDA,
* Update VR config,

Updated gpio.h to disable pull down for SoC power button.

Change-Id: I235a1d44dabef16ded2aaad13aef36ca57f37c8e
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17247
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-08 22:47:40 +01:00
Kyösti Mälkki f338fa1f31 intel/e7501: Remove unused northbridge code
No boards left in the tree for this northbridge.

Change-Id: Id45da11b9d78cbd6bd50acb5a3c6c3c270f9020e
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17281
Tested-by: build bot (Jenkins)
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-08 19:47:08 +01:00
Kyösti Mälkki 8160a2f63d intel post-car: Split legacy sockets
Move old sockets to use romstage_legacy.c, these are ones
using intel/car/cache_as_ram.inc.

These will not be converted to RELOCATABLE_RAMSTAGE as boards
are candidates for getting dropped from the tree anyways.

Change-Id: I2616b4edee53446f1875711291e9dfed2911e2fb
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17280
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-08 19:46:25 +01:00
Kyösti Mälkki 19652e6f40 quick_ram_check: Remove reference to RAMBASE
Change-Id: Ieb8f11690fb0e9b287d866be56010bb9adefd21d
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15239
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-08 19:16:41 +01:00
Kyösti Mälkki 2bad1e7f49 intel car: Remove references to DCACHE_RAM_ROMSTACK_SIZE
Not referenced in code.

Change-Id: Iea91f4418eb122fb647ec0f4f42cb786e8eadf23
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/17268
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-08 19:16:24 +01:00
Naresh G Solanki 76679d1e96 mainboard/intel/kblrvp: Remove unused code in dptf.asl
Remove unused code from dptf.asl

Change-Id: Icaa675fd1052367457d6e50d51d567e7db02fd42
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17249
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 21:16:20 +01:00
Naresh G Solanki b006a3fe53 mainboard/intel/kblrvp: Configure usb over current pin & cdclock
Configure overcurrent pins for various usb ports.
Configure CdClock to 3.

Change-Id: I57f1feb7e03c5bc7b125ea7e0735481fee91b6f6
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17251
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 20:54:19 +01:00
Naresh G Solanki 2413cf3dd1 mainboard/intel/kblrvp: Enable Build with ChromeOS
Enable building with ChromeOS support.

Change-Id: I9fbb7422be205b304253478a70e334a63afab71f
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17250
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 20:54:06 +01:00
Naresh G Solanki dd397f0971 mainboard/intel/kblrvp: Add Chrome EC switch
Add Chrome EC switch to enable building with/without Chrome EC.

Change-Id: Iaa8102cba0a454a24149d29f044a2284cd29e28b
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17248
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 20:53:54 +01:00
Sumeet Pawnikar bc6a389049 intel/kunimitsu: Update DPTF settings
After tuning the temperature values for optimal performance,
this patch updates few DPTF settings for Kunimitsu board.

BUG=None
BRANCH=None
TEST=Built and booted on Kunimitsu boards. Verified these
updated DPTF settings with different workloads.

Change-Id: Ic1c319262d80cc5cb29a8630af213822308f8bed
Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/350223
Reviewed-on: https://review.coreboot.org/17069
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-07 20:43:47 +01:00
Sumeet Pawnikar 94f50dee63 google/lars: Update DPTF settings
After tuning the temperature values for optimal performance,
this patch updates few DPTF settings for lars boards.

BUG=chrome-os-partner:51025
BRANCH=firmware-glados-7820.B
TEST=Built and booted on lars DVT boards. Verified these
updated DPTF settings with different workloads.

Change-Id: I4c040526c31c3263ed3a9b4cccff3b7a021cfcdb
Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/338877
Reviewed-on: https://review.coreboot.org/17068
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-07 20:43:00 +01:00
Sumeet Pawnikar bc41ddd44e soc/intel/skylake: Add _ACx methods for TSR0 sensor for fan control
This patch updates below info,
[1] Delete the DPTF_CPU_ACTIVE_AC* values because these are not
being used. Hence, removing unnecessary defines.
[2] Add new DPTF_TSR0_ACTIVE_AC* temperature trip points for TSR0
external thermal sensor. These trip points are being used by _ACx
methods to control the fan speed on Skylake-U fan based Lars and
Kunimitsu platforms.
[3] Follow up patches are using DPTF_CPU_ACTIVE_AC* temperature trip
points in board specific acpi/dptf.asl (for lars, kunimitsu, etc) to
control the fan speed as per the CPU temperature trip points.
[4] Newly added _ACx methods for thermal sensor TSR0 in this patch
has nothing to do with DPTF_CPU_ACTIVE_AC*.

We can control fan speed using various different thermal sensors.
In this patch, we have added new _ACx methods for TSR0 thermal sensor.
We run the fan at different speeds to cool down the system at different
TSR0 temperatures.

Similarly, we considered CPU sensor temperature values and ran the fan
at different speeds to cool down the system.

BUG=chrome-os-partner:51025
BRANCH=firmware-glados-7820.B
TEST=Built and booted on kunimitsu and lars EVT boards.
Verified these _ACx methods with _ART table on these boards
with different workloads.

Change-Id: Ia7b81e03da936c4a0f69057e43f18efd7c3b9f17
Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/332368
Reviewed-on: https://review.coreboot.org/17067
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 20:41:36 +01:00
Duncan Laurie a87170b166 lpss_i2c: Increase transaction timeout
When doing long transcations on an I2C bus at standard speed we saw
that long transactions could go over the 4ms limit while waiting for
it to complete on the bus.

Increase this so we can use standard speed for testing and debug in
firmware.  (as there is no way to force standard speed in the kernel)

BUG=chrome-os-partner:58666
TEST=boot eve board with cr50 TPM and I2C bus at 100khz

Change-Id: I2987ae6a5aa024b373eb088767194c70b0918b6f
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/17213
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-07 20:40:48 +01:00
Duncan Laurie 2f3736e7ac soc/intel/{sky,apollo}lake: Wait until GPE is clear when reading
When reading+clearing a GPE for use as an interrupt we need to
re-read the status register and keep setting the clear bit until
it actually reads back clear.  Also add a 1ms timeout in case the
status never clears.

This is needed if a device sends a longer interrupt pulse and it
is still asserted when the "ISR" goes to clear the status.

BUG=chrome-os-partner:59299
TEST=test cr50 TPM with 20us pulse to ensure it can successfully
communicate with the TPM and does not get confused due to seeing
interrupts that it should not.

Change-Id: I384f484a1728038d3a355586146deee089b22dd9
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/17212
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-07 20:39:02 +01:00
Duncan Laurie ed4fa099d9 drivers/i2c/tpm/cr50: Increase IRQ timeout
Increase the IRQ timeout to prevent issues if there is a delay
in the TPM responding to a command.  Split the no-IRQ case out
so it doesn't suffer unnecessarily.

BUG=chrome-os-partner:59191
TEST=suspend/resume testing on eve board

Change-Id: I1ea7859bc7a056a450b2b0ee32153ae43ee8699f
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/17204
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-11-07 20:38:45 +01:00
Marc Jones a84fa908e2 southbridge/amd: Update Kconfig and makefiles for 00670F00
Add Stoney specific code subtree and fix Makefles and Kconfig files.
Author: Charles Marslett <charles@scarlettechnologies.com>

Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Tested-by: Marshall Dawson <marshalldawson3rd@gmail.com>
(cherry picked from commit c3a469d11e4676b3b63d11a30955113291d00ec8)

Change-Id: Ic4d97a3745f7fc5a637ae6da17a9009b9757136e
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/17217
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 20:37:42 +01:00
Marshall Dawson 6580408a7e amd/pi/hudson: Move audio to northbridge
Carrizo (00660F01), Merlin Falcon (00660F01), and Stoney Ridge (00670F00)
locate the HD audio controller on the northbridge root complex at 9.2
instead of the FCH.  This duplicates the existing ASL into the northbridge
directories and reports the correct address.

Original-Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Reviewed-by: Marc Jones <marcj303@gmail.com>
(cherry picked from commit f68206c2b42c90076efd968a99f4d3a49e403438)

Change-Id: I6d42bb40ad58c7f35e8c88ff27ebd327d656c021
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/17216
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 20:37:21 +01:00
Marc Jones 21e5dd8a85 vendorcode/amd: Update Kconfig and makefiles for 00670F00
Add Stoney specific code subtree and fix Makefles and Kconfig files.
Original-Author: Charles Marslett <charles@scarlettechnologies.com>

Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Tested-by: Marshall Dawson <marshalldawson3rd@gmail.com>
(cherry picked from commit 51a187a3d08a425ef0cc141a7ddc49a70ac931b1)

Change-Id: I13c6b08c780e7bd2abd0fabbde1a89686132f65c
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/17196
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 20:36:55 +01:00
Marshall Dawson f3093883f7 vendorcode/amd: Modify 0067F00 for binaryPI
Make changes to the vendorcode files that allow them to work
with the binaryPI.  This fixes various compile issues and
establishes a common calling convention between coreboot and
AGESA.

Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
(cherry picked from commit f7ea2785d70bd6813b5b4d315b064802251d9557)

Change-Id: Ie36228476a9dbd7b83f95828ca9c7252cecd8ec8
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/17195
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 20:36:34 +01:00
Marshall Dawson a040065130 vendorcode/amd: Copy 00670F00 files from PI package
Make exact copies of the AGESA files from the Stoney PI package
replacing existing versions.  Change the license text and fix
up misc. whitespace.

This will facilitate the review of binaryPI changes in the
vendorcode directory.

Original-Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Reviewed-by: Marc Jones <marcj303@gmail.com>
(cherry picked from commit 1097249585ab76fab59dcfbf8e7a419f34fcfcb6)

Change-Id: I9951df58aeab2d533efc0a837ce35f343ff28d7c
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/17194
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 20:36:13 +01:00
Marc Jones 9ef6e52353 vendorcode/amd: Copy 00660F01 directory to 00670F00
Prepare for new 00670FF00 support.

Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Tested-by: Marshall Dawson <marshalldawson3rd@gmail.com>
(cherry picked from commit ca53cac5c847c55e56ad6f5feb382c04f33ae77a)

Change-Id: Ib48b1611bf70ec302c50f6e07bd2b3d9b09e0a24
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/17193
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 20:35:49 +01:00
Naresh G Solanki 8535c66873 arch/x86/acpigen: Add OperationRegion & Field method
Add acpigen_write_opregion that generates ACPI AML code for OperationRegion,
region name, region space, region length & region size are inputs.

Add acpigen_write_field that generates ACPI AML code for Field.
Operation region name & field list are inputs.

Change-Id: I578834217d39aa3b0d409eb8ba4b5f7a31969fa8
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17113
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
2016-11-07 20:35:12 +01:00
Marshall Dawson 463f46eb61 pci_ids.h: Correct recent AMD ID names
Adjust the names to match AMD's convention for family and model.
This patch is relevant for:
 Trinity & Richland: Family 15h Models 00h-0Fh
 Carrizo: Family 15h Models 60h-6Fh
 Mullins & Steppe Eagle: Family 16h Models 30h-3Fh

Change-Id: I613b84ed438fb70269d789c9901f1928b5500757
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-on: https://review.coreboot.org/17169
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: Martin Roth <martinroth@google.com>
2016-11-07 20:15:44 +01:00
Sathyanarayana Nujella 50198c1178 mainboard/google/reef: update DMIC related pins configuration
CLK_B1(GPIO_80) and DATA_2(GPIO_83) pins needs to be
configured as native mode to use them for DMIC record
on other potential DMIC's.

DMIC blobs configure the clocks. For stereo & quad channel
record, both CLK_A1 and CLK_B1 are enabled.
For mono channel record, only CLK_A1 is enabled.

BUG=chrome-os-partner:56918
BRANCH=None
TEST=During DMIC record, check CLK_B1 and DATA_2 lines

Change-Id: I838009b85190de5360d593238e48c9593c1dc43a
Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Reviewed-on: https://review.coreboot.org/17199
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-07 20:15:13 +01:00
Lijian Zhao 37742f6870 soc/intel/apollolake: Add pmc_ipc device support
A dedicated pmc_ipc DSDT entry is required for pmc_ipc kernel driver.
The ACPI mode entry includes resources for PMC_IPC1, SRAM, ACPI IO and
Punit Mailbox.

BRANCH=None
BUG=chrome-os-partner:57364
TEST=Boot up into OS successfully and check with dmesg to see the
driver has been loaded successfully without errors.

Change-Id: Ib0a300febe1e7fc1796bfeca1a04493f932640e1
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/17181
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2016-11-07 20:14:32 +01:00
Subrata Banik cb8849b686 soc/intel/skylake: Fix SATA booting to OS issue
SATA device remains unrecognized if connected at Port 2.

Port control and Status register (PCS) is by default set by
hardware to the disabled state as a result of an initial
power on reset. OS read PCS register during boot causes
disabling of SATA ports and can't detect any devices.

BRANCH=none
BUG=chrome-os-partner:59335
TEST=Build and boot SKL from SATA device connected at Port 2.

Change-Id: I4866ca44567f5024edaca2d48098af5b4c67a7ac
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/17229
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-11-07 20:11:43 +01:00
Naresh G Solanki 3d44d69f93 vboot: Disable vboot verification when Chrome EC disabled
When Chrome EC is disabled, vboot hash is not available during S3 resume
Hence disable vboot verification when Chrome EC is not available.

Change-Id: I665f5f0e2e53da7b735de30443d323572d8a1a9c
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17246
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 19:49:48 +01:00
Naresh G Solanki 8d353afe08 soc/intel/skylake: Avoid use of variable Local0 in TEVT in thermal.asl
Avoid use of Local0 variable in TEVT acpi method.
If mainboard doesn't expose any thermal sensor, then warning is
generated for variable Local0 not been used.

Change-Id: I0634961a01144e41a8480c8c6ed8b7fdd358e768
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17245
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 19:49:34 +01:00
Naresh G Solanki 50bb67eea0 soc/intel/skylake: Add device id for PCH-Y
Add device id for PCH-Y used in Kaby Lake RVP3 board.

Change-Id: I9235265cf88e4d044e7216f53e6da7021fb68238
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/17244
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2016-11-07 19:20:21 +01:00
Jonathan Neuschäfer 99f2f113ec riscv: Unify SBI call implementations under arch/riscv/
Note that currently, traps are only handled by the trap handler
installed in the bootblock. The romstage and ramstage don't override it.

TEST=Booted emulation/spike-qemu and lowrisc/nexys4ddr with a linux
     payload. It worked as much as before (Linux didn't boot, but it
     made some successful SBI calls)

Change-Id: Icce96ab3f41ae0f34bd86e30f9ff17c30317854e
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/17057
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-11-07 16:47:49 +01:00
Jonathan Neuschäfer 7ca9b8ae50 mb/lowrisc/nexys4ddr: Actually fix the UART clock setup
Ron's code calculated the DLL and DLM registers of the 8250 UART, but
that's the job of the UART driver. uart_input_clock_divider isn't needed
anymore because the default value of 16 works.

As a bonus, the baud rate can now be selected in Kconfig, instead of
being hardcoded at 115200.

TEST=Booted the board at 9600 and 115200 baud.

Change-Id: I3d5e49568b798a6a6d944db1161def7d0a2d3b48
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/17188
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2016-11-07 16:47:11 +01:00
Aaron Durbin 7d9068fe0b soc/intel/common: log event when MRC cache is updated
Log when the MRC cache is attempted to be updated with status
of success or failure. Just one slot is supported currently
which is deemed 'normal'. This is because there are more slots
anticipated in the future.

BUG=chrome-os-partner:59395

Change-Id: I0f81458325697aff9924cc359a4173e0d35da5da
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17231
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
2016-11-06 18:14:29 +01:00
Aaron Durbin d5be4e3d7e elog: add sources to reflect full event type namespace usage
Some events were added in other places, but coreboot's
elog namespace wasn't updated. As such there's a collision
with the thermtrip event. This change at least updates the
elog information to reflect potential event type uage.

BUG=chrome-os-partner:59395

Change-Id: Ib82e2b65ef7d34e260b7d7450174aee7537b69f6
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17230
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
2016-11-06 18:13:53 +01:00
Aaron Durbin d9b1050dfb elog: fix default elog_add_event_raw() declaration
When CONFIG_ELOG isn't used default empty inline functions are
provided, however the elog_add_event_raw() had the wrong type
signature. Fix that.

BUG=chrome-os-partner:59395

Change-Id: Iaee68440bbafc1e91c88a7b03e283fc3e72de0a3
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/17232
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
2016-11-06 18:13:30 +01:00