Commit graph

20728 commits

Author SHA1 Message Date
Arthur Heymans
0145b20054 UPSTREAM: nb/pineview/raminit: Don't do Jedec init on resume from S3
This is not needed.

BUG=none
BRANCH=none
TEST=none

Change-Id: I437db7d3f171d24909c0f0c3d59ee324c8e170b0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: d2ca9d12dc
Original-Change-Id: Id19a00c1546b7a71d90aa8c7e43e6efde1e9fbbc
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/19425
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/488282
2017-04-26 13:37:02 -07:00
Pratik Prajapati
b16846308c UPSTREAM: mma: Make MMA blobs path SOC specific
MMA blobs are SOC specific (not board). So far MMA
is supported by big cores (SKL and KBL).

BUG=none
BRANCH=none
TEST=none

Change-Id: I511652c7f5492f52ff2446bfc214d92ed79c1e7c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ebb7994263
Original-Change-Id: I922789a2a12d55360624dd6de15ab9f0bb5f0acf
Original-Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Reviewed-on: https://review.coreboot.org/19260
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/488281
2017-04-26 13:37:02 -07:00
Marc Jones
e18948a266 UPSTREAM: amd/pi/hudson: Add TPM decode to SPI function
Add a function to send the TPM decode to the SPI interface.
Enables use of SPI TPMs on Hudson mainboards.

BUG=none
BRANCH=none
TEST=none

Change-Id: I7ae140e18c3e0a3c43e72dcb899ee8bd68beb945
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6fcaaef614
Original-Change-Id: I0e85ed92163e38eca6a55456708ab322d6a90d4c
Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19402
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://chromium-review.googlesource.com/488060
2017-04-26 13:37:01 -07:00
Marshall Dawson
b19d694a02 UPSTREAM: amd/pi/hudson: Clean up whitespace in header files
Change spaces to tabs and do general whitespace cleanup.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ia4732dca1545b784de5c839e074eb9122ff2b7e0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: c1f32336e6
Original-Change-Id: I4a4ecd42f91c9c6015a4f065b7386b17523ac6d9
Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19401
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://chromium-review.googlesource.com/488059
2017-04-26 13:37:01 -07:00
Marc Jones
fca7413a8a UPSTREAM: amd/pi/hudson: Move ACPI IO registers
Move the ACPI IO registers from 0x800 to 0x600 to avoid the
IO space required by the Google EC, also at 0x800.

This shouldn't have any conflicts on other AMD systems.

BUG=none
BRANCH=none
TEST=none

Change-Id: Iae32c2450667da500771d9aada2e121da0c467a4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: e7394ca903
Original-Change-Id: Iac7388c15e899277fd506fb37965164488358335
Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19171
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/488058
2017-04-26 13:37:00 -07:00
Marc Jones
37e7c5e1ad UPSTREAM: amd/pi/hudson: Add LPC IO decode enable function
Add a function to enable LPC IO decode AKA WideIO.
This can enable up to 3 regions, which may be 512 or 16
bytes wide.

BUG=none
BRANCH=none
TEST=none

Change-Id: Id7b09a5df91744b8a0cdcf86a3d80d28880db3d0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f962aa52d6
Original-Change-Id: I2bed3a99180188101e00b4431d634227e488cbda
Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19160
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/488057
2017-04-26 13:37:00 -07:00
Julius Werner
47e4e4acd2 UPSTREAM: cbmem_console: Document known reimpementations of console structure/API
It turns out that there are quite a few other projects that can access
the CBMEM console by now. If we ever want to make another structural or
behavioral change to it, we need to know where these implementations are
so we can make sure they're all getting updated. Let's try to build a
comprehensive list in the file that should be the source of truth for
all (coreboot's own implementation).

BUG=none
BRANCH=none
TEST=none

Change-Id: Iae97ac8306e640fde6bd2300f62b7fcaf960eea0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: a915cea289
Original-Change-Id: Ia3d6a87230f5bfdde9d812bc7154e22880c1377a
Original-Signed-off-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19439
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/488056
2017-04-26 13:36:59 -07:00
Marc Jones
f20fc4add0 UPSTREAM: amd/pi/hudson: Add GPIO get function
Add a basic GPIO get function.

Note that GPIO set, ACPI/GPE, and other features should come
in future commits. Future changes to be modeled on the other soc/
gpio functions.

BUG=none
BRANCH=none
TEST=none

Change-Id: I816c7a6f50d25ef70ae7c87a2642d746d09b6f6d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: dae95f0dfe
Original-Change-Id: I8f681865715ab947b525320a6f9fc63af1334b59
Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19159
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/488055
2017-04-26 13:36:59 -07:00
Marc Jones
5ca8085598 UPSTREAM: AMD Geode: Move conflicting mainboard_romstage_entry()
The silicon specific mainboard_romstage_entry() in amd/cpu/car.h,
which is used by all AMD silicon car code, caused a conflict.
Move the silicon specific defines to silicon header files. Also,
no longer include car.h in the romstage file.

BUG=none
BRANCH=none
TEST=none

Change-Id: I1b0d54a7697be3c985693020078200705f08d1b9
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 4aad421e81
Original-Change-Id: Icfc759c4c93c8dfff76f5ef9a1a985dd704cfe94
Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18769
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/488054
2017-04-26 13:36:58 -07:00
Paul Menzel
d518302167 UPSTREAM: soc/intel: Unify timestamp.inc
These files are actually indentical, but unfortunately, the formatting
was changed without caring for the already present files. Fix that. Use
the license formatting where less lines are used.

The next step is to put that in a common location.

BUG=none
BRANCH=none
TEST=none

Change-Id: I7b8ec432871845f5ae16f43508f8e922ada35e16
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: d06c51895e
Original-Change-Id: Iecb263b9d321a33e64988b315220893df2e0045c
Original-Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-on: https://review.coreboot.org/19423
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/488053
2017-04-26 13:36:58 -07:00
Arthur Heymans
8f45ae2d95 UPSTREAM: util/ectool: Dump ram by default
According to the comment above the default should dump the EC ram,
though is never reached since the variable 'write_addr' is not 0, but
initialized at -1.

Also removes brackets around one line statement below if to make
checkpatch.pl happy.

BUG=none
BRANCH=none
TEST=none

Change-Id: I6e055b5ad1c2bbd62ac450a9c38267fd92fc884e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 878c2de41b
Original-Change-Id: I390996b253f2f20682cd9ab2d4f560de6eccfc57
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/19152
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://chromium-review.googlesource.com/488052
2017-04-26 13:36:57 -07:00
Arthur Heymans
bc016f2465 UPSTREAM: util/ectool: Fix timeout on sending EC command
When setting output to verbose, it incorrectly reports that it times
out on every command.

TESTED on Thinkpad X60.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ibff3a5d8b073ab5fb40d5fbfda2137a725574e02
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 2873a4aea4
Original-Change-Id: I24f05f0c165462d5ba2604c7e2fe139400683275
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/19151
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-on: https://chromium-review.googlesource.com/488051
2017-04-26 13:36:57 -07:00
Furquan Shaikh
2224a1b1d1 UPSTREAM: soc/intel/skylake: Fix the PCI ID for SATA controller
Update the PCI ID for SATA controller on Kaby Lake.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ia02d511dbff84520c61337d58077d7f297fb2a6e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: c0dbdf4c90
Original-Change-Id: Id0b5e0366e04fbac6a57a15407f33f390a2a1856
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19395
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/488050
2017-04-26 13:36:56 -07:00
Aaron Durbin
87920c4469 UPSTREAM: soc/intel/skylake: use postcar stage for fsp 2.0
Utilize the postcar stage for tearing down CAR and initializing
the MTRRs once ram is up. This flow is consistent with apollolake
and allows CAR_GLOBAL variables to be directly accessed and no
need for migrating CAR_GLOBAL variables as romstage doesn't
run with and without CAR being available.

BUG=none
BRANCH=none
TEST=none

Change-Id: I78458fefac96d714eeacc3832a2c4818d2fcd016
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 79f0741f81
Original-Change-Id: I76de447710ae1d405886eb9420dc4064aa26eccc
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19335
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/488049
2017-04-26 13:36:56 -07:00
Aaron Durbin
4a1b2c85b4 UPSTREAM: device: allow devicetree accesses in postcar stage
BUG=none
BRANCH=none
TEST=none

Change-Id: Ia320e823322143757ec731c91bc283472069bc23
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 5e88c3b18a
Original-Change-Id: Ib6f8ee937c4f3d8e2c0ff3851a819077fa499ccc
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19334
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/488048
2017-04-26 13:36:56 -07:00
Aaron Durbin
6b37867b3e UPSTREAM: lib: provide clearer devicetree semantics
The devicetree data structures have been available in more than just
ramstage and romstage. In order to provide clearer and consistent
semantics two new macros are provided:

1. DEVTREE_EARLY which is true when !ENV_RAMSTAGE
2. DEVTREE_CONST as a replacment for ROMSTAGE_CONST

The ROMSTAGE_CONST attribute is used in the source code to mark
the devicetree data structures as const in early stages even though
it's not just romstage. Therefore, rename the attribute to
DEVTREE_CONST as that's the actual usage. The only place where the
usage was not devicetree related is console_loglevel, but the same
name was used for consistency. Any stage that is not ramstage has
the const C attribute applied when DEVTREE_CONST is used.

BUG=none
BRANCH=none
TEST=none

Change-Id: If0409e8e9d6a203254a9f9b749de5cab70dfc842
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: e4d7abc0d4
Original-Change-Id: Ibd51c2628dc8f68e0896974f7e4e7c8588d333ed
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19333
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/488047
2017-04-26 13:36:55 -07:00
Aaron Durbin
cf446f8a18 UPSTREAM: console: rework log level to not be reliant on ROMSTAGE_CONST
The console log level variable doesn't really rely on ROMSTAGE_CONST
proper. Instead, the mutability of the variable is based on the current
implementation of ROMSTAGE_CONST (__PRE_RAM__). As such directly
use that logic for the code. In addition, refactor the code to let
the compiler and linker optimize out accesses instead of using
the pre-processor.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ie38d062b92b9bcd7bf7faf88a9495c52c0d5488d
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 4003950881
Original-Change-Id: I44bcc409266ef52b9be29f75efde73a6707a53f4
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19438
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/488046
2017-04-26 13:36:55 -07:00
Aaron Durbin
5f4dc25899 UPSTREAM: Makefile.inc: ensure cbfs-files-processor-struct has correct ccopts
The ramstage-c-ccopts variable needs to be double dereferenced
for the cbfs-files-processor-struct handler so all the ccopts
are included since the ramstage-c-ccopts is fully constructed
later by another function. Without this not all the flags
are present on the command line.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ic3d0b9f7ddf2cd0d3b542bd35a2d7e209a77c364
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 42bcd13c75
Original-Change-Id: I5425b3c1f23d767c61f654dd287584403f85d719
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19380
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/488045
2017-04-26 13:36:54 -07:00
Marc Jones
b63ae3a265 UPSTREAM: mainboard/amd/gardenia: Remove PMxEE write on S4 resume
Delete the write to PM register 0xee.  This register is not
listed in the current BKDG and S4 is not currently supported
on this APU.

NDA document #47517 "A55/.../A85X fusion Controller Hub Register
Reference Guide" provides some clues on the intent of this write.
This register has always been observed to power on with a value
of 0x08 so the write has no effect.

This should be revisited again when SMI and PSP fully implement
the support required for S3.

BUG=none
BRANCH=none
TEST=none

Change-Id: I7c01148c21a07b51848f59e85161cb30450fa7a2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 7e438af995
Original-Change-Id: I35e6c5f7ad1de7f51b018543d2f7ce82182f11e4
Original-Signed-off-by: Marc Jones <marcj303@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/18494
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/486780
2017-04-26 09:21:03 -07:00
Marshall Dawson
3caa405926 UPSTREAM: arch/x86: Add read64 and write64 functions
Create new functions similar to read and write of other sizes.

BUG=none
BRANCH=none
TEST=none

Change-Id: I02df458e0af93e614768636ead2ab693ccbca90a
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: efd077ac52
Original-Change-Id: I35a08c498f25227233604c65c45b73b1c44fae1f
Original-Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19394
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/486779
2017-04-26 09:21:03 -07:00
Lee Leahy
73b98792c7 UPSTREAM: drivers/storage: Add SD/MMC/eMMC driver based upon depthcharge
The SD/MMC support is broken into several pieces.  There are three main
data structures:
* sdhci_ctrlr - This is SDHCI controller specific and defined in
  include/device/sdhci.h
* sd_mmc_ctrlr - This contains generic controller management data and
  defined in include/device/sd_mmc_ctrlr.h
* storage_media - This contains the flash storage device management data
  and is defined in include/device/storage.h

The SD/MMC driver consists of several components:
* SDHCI controller code
  * bouncebuf.c
  * bouncebuf.h
  * pci_sdhci.c
  * sdhci.c
  * sdhci.h
  * sdhci_adma.c
  * sdhci_display.c
* Flash storage device support
  * mmc.c
  * mmc.h
  * sd.c
  * sd_mmc.c
  * sd_mmc.h
  * storage.c
  * storage.h
  * storage_erase.c
  * storage_write.c

Kconfig values enable various portions of the controller and storage
drivers to be built to reduce the overall size of what is included in
the final image.

Full read/write/erase operations are provided for those platforms which
want to take advantage.  It is also possible to build the driver to
perform initialization only.  By default, this driver is not included in
any platform, platforms must specifically select DRIVERS_STORAGE to add
the SD/MMC support.

After this patch is reviewed and merged, there are some additional
patches:
* Common CAR storage area - Use a predefined region of CAR to pass data
  structures between bootblock through to romstage.  This allows early
  stages to preform the SD/MMC device initialization and later stages
  to use the SD/MMC device without further initialization.  The example
  code initializes the SD/MMC device in bootblock and uses the SD/MMC
  device in romstage without further initialization.
* CBMEM ID - Add a CBMEM ID value for the data structures so that they
  may be passed from romstage to ramstage and eventually the payload.
  The example uses the SD/MMC device in ramstage without further
  initialization.
* Move the SD/MMC driver into commonlib
* Have libpayload build the SD/MMC driver from commonlib.  The intent
  is to pass the controller state to libpayload so that the SD/MMC
  device can be used without further initialization.
* On some platforms, have depthcharge use the commonlib SD/MMC driver

History:

Copy the SD/MMC driver from depthcharge revision eb583fa8 into coreboot
and make the following changes:

* Removed #include "config.h" from mmc.c, allow the lint tests to pass.
* Move include files from drivers/storage into include/device.
* Rename mmc.h to storage.h.
* Add the Kconfig and Makefile and make edits to get the code to build.
* Add support to initialize a PCI controller.
* Fix formatting issues detected by checkpatch.
* Fix data flow issues detected by checkpatch.
* Add the missing voltage (MMC_VDD_35_36) into the voltage mask.
* Rename the macros mmc_debug, mmc_trace and mmc_error to sd_mmc_*.
* Replace printf with sd_mmc_error.
* Add sdhc_debug, sdhc_trace and sd_error macros.
* Add Kconfig values to enable storage device debugging and tracing.
* Add tracing and debug support to the SDHCI driver.
* Allow SOC to override more controller features.
* Split out ADMA support.
* Move 1V8 support into SOC routine.
* Move HS400 support into SOC routine.
* Rework clock handling.
* Change all controller references to use ctrlr.
* Update the voltage handling.
* Update modes of operation.
* Move DMA fields into MmcCtrlr.
* Update bus width support.
* Change MMC_TIMING_* to BUS_TIMING_*.
* Rename MMC_MODE_ to DRVR_CAP.
* Move quirks into ctrlr->caps.
* Associate removeable with the controller.
* Statically allocate MmcMedia.
* Replace the SdhciHost structure with the MmcCtrlr structure.
* Split the code to support other SD/MMC controllers.
* Split out erase and write support.
* Update the code to be more consistent with the coreboot coding style.
* Only expose calling APIs.
* Divide up mmc.c into 4 modules: MMC, SD, storage card, common code.
* Update debug and error messages.
* Add partition support.
* Display clock frequencies once in MHz.
* Remove mmc_send_cmd, use ctrlr->send_cmd instead.
* Handle error from sd_send_op_cond.
* Allow mainboard to control delays around CMD 0.
* Support command logging.
* Mainboard may set delay after SD/MMC command.
* Display serial number with sd_mmc_trace.
* Remove cmd set parameter from mmc_switch.
* Display errors for timeout and comm errors.
* Add LED support.
* Move 64bit DMA flag into ctrlr->caps.
* Rework PIO transfer routine.
* Add HS200 bus tuning.
* Add support for HS400.
* Use same format for HS400, HS200 and HS52.
* Reduce storage_media structure size
* Add routine to update code pointers
* Add display of storage setup
* Display controller setup

TEST=Build and run on Reef and Galileo Gen2

Change-Id: I2666347879066a8920494feced97e6bb7218d757
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: eef40eb2a9
Original-Change-Id: I9b5f9db1e27833e4ce4a97ad4f5ef3a46f64f2a2
Original-Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/19208
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://chromium-review.googlesource.com/486775
2017-04-26 09:21:02 -07:00
Lee Leahy
5bc6365069 UPSTREAM: include: Add xmalloc, xzmalloc and dma routines
Add a Kconfig value to indicate coreboot builds.

Add prototypes and definitions for:
* dma_coherent
* dma_malloc
* xmalloc
* xzmalloc

Move prototype for memset into stdlib.h from string.h to eliminate build
breaks.

TEST=Build and test on Galileo Gen2

Change-Id: I43d69466a55f18f179b56bd9cd9d5ff8ea058ad8
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: bb70c40f2e
Original-Change-Id: Ib2eb2ca143b0538bdd1863e628af4c1948bc0f8c
Original-Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/19207
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://chromium-review.googlesource.com/486774
2017-04-26 09:21:02 -07:00
Arthur Heymans
44db218ff8 UPSTREAM: nb/intel/pineview: Select RELOCATABLE_RAMSTAGE
BUG=none
BRANCH=none
TEST=none

Change-Id: I79f75fb1110663a97e0327201a48c335a2840391
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f6cf3a8f0d
Original-Change-Id: Id1b7b98b4fba745ac0d55638b6a5cceba3c329ef
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/19415
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/486763
2017-04-26 09:21:02 -07:00
Arthur Heymans
d4d5c409ac UPSTREAM: nb/intel/pineview: Move to early cbmem
TESTED on D510MO.

BUG=none
BRANCH=none
TEST=none

Change-Id: Id6cedc371d097e818e366dffee313a46b769c7c7
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 62e784bd8a
Original-Change-Id: I05aa40df0d2a090fcf734416669e9e1bbff094e4
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/19414
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/486762
2017-04-26 09:21:01 -07:00
Arthur Heymans
80d6c89cd2 UPSTREAM: nb/pineview/raminit: Fix raminit failing on hot reset path
For raminit to succeed on a hot reset the following things are
prevented from running:
* Clearing self refresh
* Setting memory frequency
* programming sdram dll timings
* programming rcomp

TESTED on Intel d510mo.

BUG=none
BRANCH=none
TEST=none

Change-Id: I3c561f2bcffeb7e76159c529049c7aaeb7143a13
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 00fd3ff507
Original-Change-Id: I8f7e5c2958df29a96cdf856ade2f4f33707ad362
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/19337
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/486761
2017-04-26 09:21:01 -07:00
Arthur Heymans
fbd5bfaf84 UPSTREAM: mb/intel/d510mo/Kconfig: Don't override CBFS_SIZE
There is no need to override CBFS_SIZE since there is no additional
firmware needed on the flash.

Also due to it having a description CBFS_SIZE was displayed twice in
menuconfig, which is fixed by this.

BUG=none
BRANCH=none
TEST=none

Change-Id: I14d3948338e1cf4b644bcd915f21d7a62ef13730
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 5e1194567f
Original-Change-Id: I1a8e2e458ac4d420f3fd4628c2805b6d4e2ee529
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/19331
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/486760
2017-04-26 09:21:00 -07:00
Iru Cai
91caeb1409 UPSTREAM: mb/lenovo/x230: Enable libgfxinit
Tested on X230 with an external screen connected to every one of the
DP ports (miniDP on mainboard, two DP ports on dock), the GRUB payload
can display on both the external screen and the internal LVDS screen.

This is a copy-paste of I8e02c8003ff745d05ee272c59377174847f5219c.

BUG=none
BRANCH=none
TEST=none

Change-Id: If193f6fa4d997e04d8b18a602dd5904e6c6abbfc
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 166eaca9d8
Original-Change-Id: I8f270d558668c1fe41bcdcc7d6d2aa7f053c85b6
Original-Signed-off-by: Iru Cai <mytbk920423@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19412
Original-Reviewed-by: Nico Huber <nico.h@gmx.de>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/486759
2017-04-26 09:21:00 -07:00
Naresh G Solanki
bd1e45b8ac UPSTREAM: mb/google/fizz: Set lid status as open
Lid switch is not available.
Hence report lid state as always open.

BUG=none
BRANCH=none
TEST=none

Change-Id: I64d1c491e583bbdc3e48e1d87b39eb2043b3e71e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f3a117908c
Original-Change-Id: Ia9c82c3ad323912bad51cf55ed80a37b3110b1ef
Original-Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Original-Reviewed-on: https://review.coreboot.org/19219
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://chromium-review.googlesource.com/486758
2017-04-26 09:20:59 -07:00
Naresh G Solanki
c72ecffd91 UPSTREAM: mb/google/fizz: Configure PCI root port
Configure PCI root port as per schematic.

BUG=none
BRANCH=none
TEST=none

Change-Id: I4326f042301faec79829751ade357d14baf6e72c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 561f7fcf67
Original-Change-Id: I10ef682e8c54e22f328db5105d4da39c72ac2bed
Original-Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Original-Reviewed-on: https://review.coreboot.org/19390
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/486757
2017-04-26 09:20:59 -07:00
Naresh G Solanki
5c14faf405 UPSTREAM: soc/intel/skylake: Add ID's for Kabylake-R
Add CPUID, IGD, MCH & LPC ID of Kabylake-R.

BUG=none
BRANCH=none
TEST=none

Change-Id: I1d5711070569906400cc3a2ed87405e1c21cdccb
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f8f682b024
Original-Change-Id: I5ee7b3a2616f71137bba83c071288dbda2acde3d
Original-Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Original-Reviewed-on: https://review.coreboot.org/19218
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Balaji Manigandan <balaji.manigandan@intel.com>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/486756
2017-04-26 09:20:58 -07:00
Furquan Shaikh
8c830461bb UPSTREAM: drivers/spi/spiconsole: Fix broken spiconsole driver
Use spi_setup_slave to fill up the spi_slave structure with
pointer to spi_ctrlr structure which can then be used to perform all
spi operations.

BUG=none
BRANCH=none
TEST=none

Change-Id: I5b6a8bdfdb2340abdebe17cfcc52346f7fcb7f9f
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 9e49b0a2c5
Original-Change-Id: I2804ed1e85402426a654352e1ceaf0993546cd8b
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19385
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/486755
2017-04-26 09:20:58 -07:00
Furquan Shaikh
c19decc23c UPSTREAM: commonlib/helpers: Add helper macro for member_size
member_size macro provides the size of a structure member.

BUG=none
BRANCH=none
TEST=none

Change-Id: I8758427d742045c018d49d928a9a8cb80f014eb0
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 10d1fde575
Original-Change-Id: I53e9c9bf70b3ebed0d15e8258111b17e50667a74
Original-Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19384
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/486754
2017-04-26 09:20:57 -07:00
Patrick Rudolph
9b57633130 UPSTREAM: drivers/i2c/tpm: Hide ACPI on unsupported platforms
Depend on I2C_TPM to prevent showing the menu entry on systems
that do not have an I2C TPM installed.

BUG=none
BRANCH=none
TEST=none

Change-Id: Idb9e04bb8e16bcba294403cd718eecb2504547ab
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 4d74836488
Original-Change-Id: I7cd647c9c7e9721eab96ab64b844a882f156ee68
Original-Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-on: https://review.coreboot.org/19374
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/486753
2017-04-26 09:20:57 -07:00
Paul Menzel
ab5f1c19ac UPSTREAM: console: Make snprintf available in all stages
BUG=none
BRANCH=none
TEST=none

Change-Id: I7d4bcca6bc4ae01190e60874570c73cb29f435d2
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8941158d19
Original-Change-Id: If5e255c75e7774393ef7e4febef84d97a1a3a118
Original-Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Original-Reviewed-on: https://review.coreboot.org/19366
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/486752
2017-04-26 09:20:56 -07:00
Martin Roth
4d3d353c47 UPSTREAM: util/lint: Don't run checkpatch on the documentation
BUG=none
BRANCH=none
TEST=none

Change-Id: Ia4f66233046dedd21e2bc5bf48ca7d7d514612b4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 2a063beb71
Original-Change-Id: Ib95a7c9c64c481af7dcf1074ffc0fc76dc6b6ff9
Original-Signed-off-by: Martin Roth <gaumless@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/19144
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/486751
2017-04-26 09:20:56 -07:00
Shelley Chen
b8d77b5ab4 UPSTREAM: google/fizz: Configure memory
Read DRAM SPD and populate MemorySpdPtr fields
in UPD data structure for FSP.

BUG=b:36490168, b:35775024
BRANCH=None
TEST=./util/abuild/abuild -p none -t google/fizz -x -a
     We are currently working on bringup and have no
     hardware to test on yet.

Change-Id: I668d51f613176b5d46b71830c169c317abc4b1d8
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 031c818633
Original-Change-Id: I191cc6bf1fd8aa461855c538b48fd39e3ffd7848
Original-Signed-off-by: Shelley Chen <shchen@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19205
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/486750
2017-04-26 09:20:55 -07:00
Nico Huber
fd517514a1 UPSTREAM: mb/sapphire/pureplatinumh61: Update GMA config
This board was added while the latest libgfxinit changes were in review.
Update to make it compile again and sanitize the port list.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ia0cfaad77bdda3b09771a4d7184f1fdb0f58f4af
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b7f28700f4
Original-Change-Id: I81b96e225945a8f8e47b64cefea91eb2747675ca
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/19353
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Nicola Corna <nicola@corna.info>
Reviewed-on: https://chromium-review.googlesource.com/486749
2017-04-26 09:20:55 -07:00
Patrick Rudolph
a86e69ee31 UPSTREAM: *.asl: Remove obsolete reference to TPM ASL file
TPM ACPI entries are automatically generated, and the old static
TPM ASL file is obsolete. Remove the reference to this obsolete
static and empty ASL file.

Delete src/drivers/pc80/tpm/acpi/tpm.asl.

BUG=none
BRANCH=none
TEST=none

Change-Id: Ied3d7e52f9a905e10b07a65b501e7ba5e0a950fa
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 5b4d2cfc73
Original-Change-Id: I6163e6d59c53117ecbbbb0a6838101abb468de36
Original-Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Original-Reviewed-on: https://review.coreboot.org/19291
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://chromium-review.googlesource.com/486748
2017-04-26 09:20:54 -07:00
Pratik Prajapati
0f9cd9a37a UPSTREAM: mma: update mma setup script for v2.1018
MMA blobs internal version 2.1018 adds more tests.
This patch updates the script to accommodate that
change. MMA blobs are part of chrome private
repository.

BUG=none
BRANCH=none
TEST=none

Change-Id: I66ea2a64c0ef268cd624909413123dc06a0d06ae
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 0bb611d125
Original-Change-Id: Iff660fdfdfcd7acc3820c5550740276be6213877
Original-Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Original-Reviewed-on: https://review.coreboot.org/19259
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/486747
2017-04-26 09:20:54 -07:00
Aaron Durbin
505979f88a UPSTREAM: drivers/i2c/tpm: use iobuf library for marshaling commands
Use the iobuf API instead of relying on own buffer management. It
also provides consistency between marshaling and unmarshaling code
paths for propagating return values instead of overloading the values
of existing variables.

BUG=b:36598499

Change-Id: I8506c943385242ce91f72e2d2d61ad931eb0e221
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: ee049fa802
Original-Change-Id: Iec0bbff1312e8e6ec616d1528db8667f32e682c9
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19063
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/486745
2017-04-26 09:20:53 -07:00
Aaron Durbin
361e26401e UPSTREAM: commonlib: add input and output buffer helpers
Introduce ibuf and obuf structures for helping manage memory buffers.
The ibuf, an input buffer, can be read from and the obuf, an output
buffer, can be written to. Helper functions are provided for serializing
values in different endian formats. This library is provided to for
common buffer management routines such that the same code doesn't
have to re-written in different and less consistent forms.

BUG=b:36598499

Change-Id: I9856477b54d636504443e278850de42e9a199ac6
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 88b26b845c
Original-Change-Id: I5247237f68b658906ec6916bbbb286d57d6df5ee
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19062
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/486744
2017-04-26 09:20:53 -07:00
Martin Roth
73f4be7dcc UPSTREAM: util/blobtool: Update blobtool.y
- Refactor the spec & setter file reads into a separate function.
- Make sure files can actually be opened before reading from them.
- Check all malloced variables.
- Set functions with no declatations as static.
- Update blobtool.tab.c_shipped to the latest version.

BUG=none
BRANCH=none
TEST=none

Change-Id: Idd95683db15a82debb705f1b722ac94fcb57ee8e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6338189d0e
Original-Change-Id: Ie97fff84493a06f48d8673d388c3882028d048ca
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/19231
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/486743
2017-04-26 07:17:30 -07:00
Martin Roth
037f6d1809 UPSTREAM: util/blobtool: clean up blobtool.l a bit
- Rewrite STRING and COMMENT expressions to remove need for CHARS.
- Clean up regular expressions - get rid of unnecessary expressions.
- Remove extra newline from the end of the file.

- Clean up stripquotes() function
-- Remove unnecessary backslashes in '\"'
-- Check malloc for failure
-- Remove unnecessary assignment of 0 to the end of the new string,
snprintf will take care of it.

- Update blobtool.lex.c_shipped to the new version.

BUG=none
BRANCH=none
TEST=none

Change-Id: I57e90fbbd56ad24c36e3a4ea1b4ffb05bc6fd5ec
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 6d189cc47b
Original-Change-Id: I002962cfae0816ed3c7a5811dfb1b8b48fdc5729
Original-Signed-off-by: Martin Roth <martinroth@google.com>
Original-Reviewed-on: https://review.coreboot.org/19230
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/486742
2017-04-26 07:17:29 -07:00
Arthur Heymans
73153c1c5f UPSTREAM: nb/intel/pineview/raminit: Fix CONFIG_DEBUG_RAM_SETUP=y not compiling
The function decode_spd uses undeclared variables and an incorrectly
initialized array.

BUG=none
BRANCH=none
TEST=none

Change-Id: I896b374368ecc4e217297402ac98d93a059bf4c3
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 097d753980
Original-Change-Id: Ib45a8b2946c04c270e29524675b1f09d491d282b
Original-Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Original-Reviewed-on: https://review.coreboot.org/19336
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Philippe Mathieu-Daud <philippe.mathieu.daude@gmail.com>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/486741
2017-04-26 07:17:29 -07:00
Nico Huber
f41c4aae13 UPSTREAM: mb/lenovo/t420: Enable libgfxinit
In the single GPU configuration, the T420 has an LVDS port, one DP++
and one VGA port connected to the IGD. Docking solutions feature up to
two additional DP/DVI-D ports, also directly connected to the IGD.
This makes the list of ports to probe pretty long (takes about 70ms
if nothing but LVDS is connected). We could save about 20~30ms if we'd
limit the ports in case we are not docked or have a discrete GPU.

BUG=none
BRANCH=none
TEST=none

Change-Id: I0962250265865c84a3a61aaa52e3c0681bdb9bdc
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 8795feb644
Original-Change-Id: I8e02c8003ff745d05ee272c59377174847f5219c
Original-Signed-off-by: Nico Huber <nico.h@gmx.de>
Original-Reviewed-on: https://review.coreboot.org/19378
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://chromium-review.googlesource.com/486740
2017-04-26 07:17:28 -07:00
Duncan Laurie
d6e5536286 UPSTREAM: mainboard/google/eve: Set touchpad IRQ to level triggered
This commit changes the interrupt configuration for the touchpad to be
level triggered so it matches what the device is actually using.

When the system wakes from suspend by way of touchpad interrupt, or
there is touchpad input while in suspend that does not wake the device
(when the device is in tablet mode) the interrupt edge is not seen by
the AP so the driver does not handle the event and the touchpad keeps
the interrupt asserted and does not send further interrupts.  The end
result is a non-functional touchpad after resume until it is reset or
the driver is reloaded.

This happens because the touchpad is actually treating the interrupt as
level triggered and expects the kernel driver to read a data packet over
I2C before it will de-assert the pending interrupt.

BUG=b:35774857
BRANCH=none
TEST=Test that the system can reliably wake from suspend by touchpad
event via the EC and continue to have a functional touchpad after resume.

Change-Id: I96e049744416f0e5ac10568be23992945d190723
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: b86ccbbeab
Original-Change-Id: Iaf7c04d9bc9d945bdcc196dff54c92a2a68368f3
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/19382
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/486739
2017-04-26 07:17:28 -07:00
Daniel Kurtz
292d728ba5 UPSTREAM: google/oak: Enable dual DSI for rowan and the BOE 8-lane MIPI/DSI panel
Unlike other oak derivatives, Rowan uses an 8-lane BOE tv097qxm-nu0
MIPI/DSI panel that requires dual DSI support.

Rework oak display initialization to special case Rowan, which uses a
provided edid struct for its panel, special panel backlight sequencing
and needs to configure mtk_ddp and mtk_dsi to use dual dsi mode.

BRANCH=none
BUG=b:35774871
TEST=Boot Rowan in developer mode and see output on the panel

Change-Id: I136ba5bd1ab12c4ad92995e066fc6d6cf54d0898
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-on: https://review.coreboot.org/19389
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/482745
2017-04-25 05:52:33 -07:00
Jitao Shi
5971343b2e UPSTREAM: mediatek/mt8173: Add support for Dual DSI output
The MT817x display output pipeline can be configured to drive an 8-lane
MIPI/DSI panel using "dual DSI" mode.  For the "dual DSI" video data path,
the UFO block is configured to reorder the data stream into left and right
halves which are then sent by the SPLIT1 block to the DSI0 and DSI1
respectively.  The DSI0 and DSI1 outputs are then synchronously clocked at
half the nominal data rate by their respective MIPI_TX0/MIPI_TX1 phys.

Also, update the call sites in oak mainboard to avoid build breakage.

BRANCH=none
BUG=b:35774871
TEST=Boot Rowan in developer mode and see output on the panel

Change-Id: Id47dfd7d9e98689b54398fc8d9142336b41dc29f
Signed-off-by: Jitao Shi <jitao.shi@mediatek.com>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-on: https://review.coreboot.org/19361
Tested-by: build bot (Jenkins)
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/439027
2017-04-25 05:52:33 -07:00
Daniel Kurtz
b7474c107f UPSTREAM: google/oak: Use edid_set_framebuffer_bits_per_pixel
This helper function was introduced so that mainboards don't need
to manually fill in these struct edid fields.

BRANCH=none
BUG=b:35774871
TEST=Boot Rowan in developer mode and see output on the panel

Change-Id: Ic9404a786a28b314b710e037dcae776be4b584ca
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-on: https://review.coreboot.org/19388
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/482744
2017-04-25 05:52:32 -07:00
Vadim Bendebury
a4b41d9962 UPSTREAM: google/oak: Support cr50 over I2C on rowan
This patch enables TPM2 using cr50 over I2C for the Rowan board, and
adds an mt8173 specific TPM IRQ polling function. The function relies on
the appropriate EINT input configured to trigger the ready status on
the rising edge.

The cr50 TPM is on I2C address 0x50.

The cr50 interrupt GPIO is also made available for use by depthcharge
via the coreboot tables.

BRANCH=none
BUG=b:36786804
TEST=Boot rowan w/ serial enabled, verify coreboot and depthcharge are
 configured to use IRQ flow control when talking to the Cr50 TPM.

Change-Id: If6cdd0e39e4ac86538f27f322c55c329179ee084
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Signed-off-by: Daniel Kurtz <djkurtz@chromium.org>
Reviewed-on: https://review.coreboot.org/19364
Tested-by: build bot (Jenkins)
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/442306
2017-04-25 05:52:32 -07:00