Commit Graph

21518 Commits

Author SHA1 Message Date
Jonathan Neuschäfer a6b1b258d2 nb/amd/amdmct: Remove two currently unused tables
This fixes warnings that the new toolchain generates.

Change-Id: I83d2c4c4651a89b443121312a5f36adfc1e4bc48
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/18308
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-24 03:26:51 +01:00
Jonathan Neuschäfer c706eaf068 mb/emulation/*-riscv: Don't select ARCH_BOOTBLOCK_RISCV
It's already selected by SOC_UCB_RISCV.

Change-Id: Ic8a14300cdea2a4ab763b2746434891b72843604
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/18390
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-23 21:41:19 +01:00
Patrick Georgi 96af0afcd7 google/gru: whitespace fix
Follow up to https://review.coreboot.org/#/c/18460/

Change-Id: Ic3aada2acf3051622698e10d2e764050e16480d5
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/18475
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-23 18:51:34 +01:00
William wu ebbdd2882e google/gru: Tuning USB 2.0 PHY0 and PHY1 squelch detection threshold
According to USB 2.0 Spec Table 7-7, the High-speed squelch
detection threshold Min 100mV and Max 150mV, and we set USB
2.0 PHY0 and PHY1 squelch detection threshold to 150mV by
default, so if the amplitude of differential voltage envelope
is < 150 mV, the USB 2.0 PHYs envelope detector will indicate
it as squelch.

On Kevin board, if we connect usb device with Samsung U2 cable,
we can see that the impedance of U2 cable is too big according
to the eye-diagram test report, and this cause serious signal
attenuation at the end of receiver, the amplitude of differential
voltage falls below 150mV.

This patch aims to reduce the PHY0 and PHY1 otg-ports squelch
detection threshold to 125mV (host-ports still use 150mV by
default), this is helpful to increase USB 2.0 PHY compatibility.

BRANCH=gru
BUG=chrome-os-partner:62320
TEST=Plug Samsung U2 cable + SEC P3 HDD 500GB/Galaxy S3 into
Type-C port, check if the USB device can be detected.

Change-Id: Ia0a2d354781c2ac757938409490f7c4eecdffe61
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 7d74311c25762668386061234df0562f84b7203e
Original-Change-Id: Ib20772f8fc2484d34c69f5938818aaa81ded7ed8
Original-Signed-off-by: William wu <wulf@rock-chips.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/431015
Original-Commit-Ready: Caesar Wang <wxt@rock-chips.com>
Original-Tested-by: Inno Park <ih.yoo.park@samsung.com>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/18462
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)
2017-02-23 18:51:21 +01:00
Caesar Wang 8c454aaafa google/gru: update the pwm regulator
As David commented the "Bob and other follow-ons match Gru, Kevin should
be the special case here", and update the calculations value for gru/bob
board.

From the actual tests, some regulator voltage than the actual set of less
than 20mv on bob board. (e.g: little-cpus and Center-logic) Update the
{min, max} regulator voltage for Bob board. Make sure we get the accurate
voltage.

BUG=chrome-os-partner:61497
BRANCH=none
TEST=boot up Bob, measure the voltage for little cpu and C-logic.

Change-Id: Iad881b41d67708776bfb681487cf8cec8518064e
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 25e133815f49018e7496c75077b8559c207350a4
Original-Change-Id: I3098c742c7ec355c88f45bd1d93f878a7976a6b4
Original-Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Original-Signed-off-by: Shasha Zhao <Sarah_Zhao@asus.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/424523
Original-Reviewed-by: David Schneider <dnschneid@chromium.org>
Original-Reviewed-by: Brian Norris <briannorris@chromium.org>
Original-Signed-off-by: Shasha Zhao <Sarah_Zhao@asus.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/430403
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/18460
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-23 18:51:09 +01:00
Sumeet Pawnikar d56fae18dc mb/google/poppy: Enable support for DPTF
This patch adds the DPTF settings specfic to the mainboard and enables
the CPU and other thermal sensors as participant device for poppy.
It enables the DPTF flag in the device tree for poppy. It also includes
the DPTF specific ASL file in the main DSDT definition.

BUG=None
BRANCH=None
TEST=Built for poppy.

Change-Id: If44b01dd3c17fea06681ccf50e8e9f406e642e36
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://review.coreboot.org/17926
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-02-23 18:42:58 +01:00
Kyösti Mälkki 57d4c30e22 lynxpoint bd82x6x: Enable PCI-to-PCI bridge
Once the PCI command register is written the bridge forwards
future IO and memory regions, as programmed in the respective base
and limit registers, to the secondary PCI bus.

It was previously argumented this is copy-paste and never known
to be required for these more recent platforms:
   https://review.coreboot.org/#/c/2706/

Change-Id: Ic8911500a30bc83587af8d4b393b66783fa52e18
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/18330
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-02-23 18:36:24 +01:00
Patrick Georgi a5c029f235 intel/minnow3: follow up with recent changes in master
minnow3 doesn't build right now due to API divergence on master branch.
Follow up with recent changes.

Change-Id: Iee84750292f22aa040127bcbfe523a0b9eaa8176
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/18476
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)
2017-02-23 18:21:12 +01:00
Yidi Lin 57debca234 google/oak: Add initial support for Rowan
Update GPIO controls and mainboard configurations for Rowan.

[pg: use the opportunity to clean-up the gerrit-rebase task list with
the entirely unrelated Ignore-CL-Reviewed-on lines]

BUG=chrome-os-partner:62672
BRANCH=none
TEST=emerge-rowan coreboot

Change-Id: I110fb368b3d9fa9dfb2bf091342dfb511ff7c09c
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: f4252cbe94a7456108aaa522e170bca5dcb1fdd1
Original-Change-Id: I18ebc3ccf4c7d051839d7c50e9b0682ef8f09830
Original-Signed-off-by: Yidi Lin <yidi.lin@mediatek.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/430557
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/341513
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/327003
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/355221
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/354670
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/361360
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/361361
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/361362
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/361363
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/382320
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/405110
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/405130
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/419795
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/424139
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/430293
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/430294
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/430295
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/427820
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/427821
Ignore-CL-Reviewed-on: https://chromium-review.googlesource.com/427822
Reviewed-on: https://review.coreboot.org/18463
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-23 17:41:22 +01:00
Caesar Wang 9e588004f6 google/gru: improve eye diagram for passing the test
The children of Gru should share the benefits. In the real world, Bob can't
pass the eye diagram tests.

BUG=chrome-os-partner:62714
BRANCH=firmware-gru-8785.B
TEST=build coreboot

Change-Id: I2470bbc81acdaf2458d660dca5dc307cc3038f83
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: d0cb3e718a7571f602a00c08a42019851634e7fd
Original-Change-Id: I0ccb48bb52eb770ccc9c8c265b07df46b0308dd3
Original-Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/440745
Original-Reviewed-by: Douglas Anderson <dianders@chromium.org>
Original-Reviewed-by: Julius Werner <jwerner@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/441468
Reviewed-on: https://review.coreboot.org/18461
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-23 17:41:17 +01:00
Rizwan Qureshi c2c8a743d1 soc/intel/skylake: Enable Systemagent IMGU
Camera and Imaging device should be enabled for camera usecase,
FSP provides a UPD to enable/disable the SA IMGU (Imaging Unit)
expose the same as a config option in devicetree.cb

Also remove a redundant assignment for PchCio2Enable.

BUG=None
BRANCH=None
TEST=lspci should list 00:05:00

Change-Id: I4cf7daf41bfaf4dcba414921cac2e7e12bf89f37
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/18365
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-23 17:05:58 +01:00
Paul Kocialkowski 30d4604e5a mt8173: Enable Kconfig options for ChromeOS
This enables some required Kconfig options when CONFIG_CHROMEOS is set.

Change-Id: I290902746c1ea19c8bcb69540e34fde09abb9adf
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/18448
Tested-by: build bot (Jenkins)
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-02-23 17:04:51 +01:00
Paul Kocialkowski 7a543d2ab9 libpayload: Add oak config
This adds an oak libpayload config, that should fit all oak-based
devices such as elm.

Change-Id: Iabb71404ff84029a5976371a353e8c92e781ca1f
Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-on: https://review.coreboot.org/18447
Tested-by: build bot (Jenkins)
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-02-23 17:03:45 +01:00
Arthur Heymans 00954f0815 mb/apple/macbook21: Remove unused cmos parameters
These parameters are probably the result of copying from the Thinkpad
X60 code.

Change-Id: I29763b38618d4b306c37424c5c4b57dfcf69424b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/18290
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-02-23 17:02:53 +01:00
Brenton Dong 6530b6d30d intel/minnow3: Implement and configure GPIO tables
Copy GPIO table implementation from the google/reef board except
with board variant features removed. Also exlcude CrOS GPIO functions.
Remove previous romstage GPIO implementation in brd_gpio.h and romstage.c.

Configure GPIO settings for MinnowBoard 3.

Change-Id: Id2817dcf2f8f196ecd13c810f7f0010a115db566
Signed-off-by: Brenton Dong <brenton.m.dong@intel.com>
Reviewed-on: https://review.coreboot.org/18375
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-22 23:22:13 +01:00
Brenton Dong 97f542efc2 intel/minnow3: Configure memory properly
Set the proper memory configuration for the MinnowBoard 3.  The current
values are copied from intel/leafhill.  Set the proper values for
MinnowBoard 3.

Change-Id: Ie37842f5ce2cabaa892f42ee945c91fe3ace527a
Signed-off-by: Brenton Dong <brenton.m.dong@intel.com>
Reviewed-on: https://review.coreboot.org/18374
Tested-by: build bot (Jenkins)
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-02-22 23:21:37 +01:00
Brenton Dong 35f03d9027 mainboard/intel: Add MinnowBoard 3
This commit adds the initial scaffolding for the MinnowBoard 3
with Apollo Lake silicon.

This mainboard is based on Intel's Leafhill CRB with Apollo Lake
silicon. In a first step, it concerns only a copy of intel/leafhill
directory with name changes. Special adaptations for MinnowBoard 3
mainboard will follow in separate commits.

Change-Id: I7563fe37c89511c7035c5bffc9b034b379cfcaf4
Signed-off-by: Brenton Dong <brenton.m.dong@intel.com>
Reviewed-on: https://review.coreboot.org/18298
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-22 23:21:00 +01:00
Jonathan Neuschäfer b89b2c50c5 commonlib/fsp.h: include sys/types.h for ssize_t
This file reportedly didn't compile on SUSE Linux with gcc 4.3.4:

[...]
>     HOSTCC     cbfstool/fsp_relocate.o
> In file included from coreboot/src/commonlib/fsp_relocate.c:18:
> coreboot/src/commonlib/include/commonlib/fsp.h:26: error:
> expected '=', ',', ';', 'asm' or '__attribute__' before
> 'fsp_component_relocate'
[...]

According to POSIX-2008[1], sys/types.h defines ssize_t, so include it.
This should not break coreboot code (as opposed to utils code), as we
have a sys/types.h in src/include.

[1]: http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html

Change-Id: Id3694dc76c41d800ba09183e4b039b0719ac3d93
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/18417
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-22 22:57:50 +01:00
Paul Menzel bce7e33f23 intel/i945: Fix up whitespace and indentation
Fix up the whitespace issues introduced in commit 39bfc6cb
(nb/i945/raminit.c: Fix dll timings on 945GC).

Change-Id: I3a4152866226401bc51c7fb1752aab541a4c72b0
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/18465
Tested-by: build bot (Jenkins)
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: HAOUAS Elyes <ehaouas@noos.fr>
2017-02-22 22:47:28 +01:00
Arthur Heymans b29e0b70f8 nehalem/Kconfig: Rename TRAINING_CACHE_SIZE to MRC_CACHE_SIZE
This is more consistent with newer Intel targets.

Change-Id: I52ee8d3f0c330a03bd6c18eed08e578dd6ae284b
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/18371
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2017-02-22 22:31:21 +01:00
Arthur Heymans bd9548ba7c nb/intel/nehalem: Clean nehalem.h
Remove unused definitions, prototypes and macros moslty copied from gm45.

Change-Id: I076e204885baec3d40f165785cf4ae4adc9154c5
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/18370
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-02-22 22:30:46 +01:00
Youness Alaoui c61a52a940 purism/librem13: Set system type to laptop
Change-Id: I3ae80f5727e83a1c9210f0d13fa7fc32c5c79085
Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm>
Reviewed-on: https://review.coreboot.org/18412
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins)
2017-02-22 22:26:56 +01:00
Youness Alaoui 02756b8ffb purism/librem13: Fix HDA codec verbs. Use correct codec vendor id
There was a 'typo' where the subsystem id was set instead of the codec
vendor id. This caused the lynxpoint HDA codecs init to fail to find
the proper codecid verbs so codecs were never initialized. That caused
the headphones jack to not work.

Change-Id: I975031643fc42937ecaea2300639b90632543f67
Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm>
Reviewed-on: https://review.coreboot.org/18411
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins)
2017-02-22 22:26:35 +01:00
Youness Alaoui 20ec37b80c purism/librem13: Enable PCIe ports 1 and 2
Change-Id: I1fa72e59866ee4aad34d4b60e499f6e37acc367f
Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm>
Reviewed-on: https://review.coreboot.org/18410
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-02-22 22:25:47 +01:00
Youness Alaoui a462c157f8 purism/librem13: Fix M.2 issues.
The M.2 SSD is on the SATA port 3, which also required the DTLE setting
to be set.
This fixes issues with the M.2 SSD not being detected/stable.

Change-Id: Id39d9ec395a2d9d32be4c079678d0708f08b3935
Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm>
Reviewed-on: https://review.coreboot.org/18409
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-02-22 22:25:24 +01:00
Youness Alaoui 696ebc2dbc Broadwell/Sata: Add support for setting IOBP registers for Ports 2 and 3.
The Broadwell SATA controller supports IOBP registers on ports 0 and 1 but
Browell supports up to 4 ports, so we need to support setting IOBP for
ports 2 and 3 as well.
The magic numbers (IOBP SECRT88 and DTLE) for ports 2 and 3 were only
guessed by looking at ports 0 and 1 and extrapolating from there.
Port 3 has been tested (DTLE setting on Librem 13) and confirmed to work
so we can assume that port 2 and 3 magic numbers are valid, but having
someone confirm them (through non-public documents?) would be great.

Change-Id: I59911cfa677749ceea9a544a99b444722392e72d
Signed-off-by: Youness Alaoui <youness.alaoui@puri.sm>
Reviewed-on: https://review.coreboot.org/18408
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-02-22 22:24:50 +01:00
Martin Roth c0ebe4a751 src/mainboard/digitallogic: Add license headers to all files
Change-Id: I6a1810360b5c3210038670aea6e80312798a63cd
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/18406
Tested-by: build bot (Jenkins)
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-02-22 22:23:23 +01:00
Martin Roth 6add44bd3c src/cpu/x86: Update/Add license headers to all files
Change-Id: I436bf0e7db008ea78e29eaeef10bea101e6c8922
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/18405
Tested-by: build bot (Jenkins)
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-02-22 22:23:11 +01:00
Martin Roth 996cf797e1 src/cpu/intel: Add license headers to all files
Change-Id: I5ba8b186972fb59686dcbe11358cd26408cbaf05
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/18404
Tested-by: build bot (Jenkins)
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-02-22 22:22:59 +01:00
Martin Roth 869532264a src/cpu/amd: Update/Add license headers to all files
Change-Id: I1e0b2b9086db6b3c2f716d9400a83eb60b2ce222
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/18403
Tested-by: build bot (Jenkins)
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-02-22 22:22:49 +01:00
Furquan Shaikh bf4845dd3a arch/x86/acpigen: Provide helper functions for enabling/disabling GPIO
In order to allow GPIOs to be set/clear according to their polarity,
provide helper functions that check for polarity and call set/clear
SoC functions for generating ACPI code.

BUG=None
BRANCH=None
TEST=Verified that the ACPI code generated remains the same as before
for reef.

Change-Id: Ie8bdb9dc18e61a4a658f1447d6f1db0b166d9c12
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/18427
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2017-02-22 22:19:29 +01:00
Furquan Shaikh 5b9b593f2f acpi: Add ACPI_ prefix to IRQ enum and struct names
This is done to avoid any conflicts with same IRQ enums defined by other
drivers.

BUG=None
BRANCH=None
TEST=Compiles successfully

Change-Id: I539831d853286ca45f6c36c3812a6fa9602df24c
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/18444
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-02-22 22:19:19 +01:00
Patrick Georgi eae4926577 google/gru: Fix whitespace
Change-Id: I538c28fb1bc412947ef9df947fa3f6a3312aeb4b
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/18322
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-22 17:03:21 +01:00
Yuji Sasaki 292d4e120e qualcomm/ipq40xx: add vector operation method to SPI
Adding spi_xfer_two_vectors as .xfer_vector for ipq40xx spi_ctrlr.
Commit c2973d196d ("UPSTREAM: spi: Get rid of SPI_ATOMIC_SEQUENCING")
has added a new driver method xfer_vector to support combined write-read
operation within a single CS cycle. The method is wrapped in the
spi_xfer_vector() API. When spi_ctrlr structure does not have
xfer_vector method, API calls write and read operations sequentially.
However the QCA40xx SPI driver has "forced" CS activation-inactivation
in xfer method, so individual operation will break CS after write
operation, making combined write-read cycle broken.
Adding xfer_vector method to spi_ctrlr is a simple fix to prevent this.

BUG=None
BRANCH=none
TEST=built and run on Gale

Change-Id: I2258e563d0793bcacd626f78b8e96b3649a8e4a4
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 88a8824951cef4fe293dfa6e3a1a837ae07b6156
Original-Change-Id: I031e85ce5b847353cb1084f6f68b2af8c6f702e1
Original-Signed-off-by: Yuji Sasaki <sasakiy@google.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/433439
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Kan Yan <kyan@google.com>
Reviewed-on: https://review.coreboot.org/18297
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-22 17:03:09 +01:00
Tobias Diedrich d8a2c1fb17 southbridge/amd: Add LPC bridge acpi path for Family14 and SB800
Adds the necessary plumbing for acpi_device_path() to find the LPC
bridge on the AMD Family14 northbridge with an SB800 southbridge.
This is necessary for TPM support since the acpi path to the LPC bridge
(_SB.PCI0.ISAB) doesn't match the built-in default in tpm.c
(_SB.PCI0.LPCB).

Change-Id: I1ba5865d3531d8a4f41399802d58aacdf95fc604
Signed-off-by: Tobias Diedrich <ranma+coreboot@tdiedrich.de>
Reviewed-on: https://review.coreboot.org/18402
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Tested-by: build bot (Jenkins)
2017-02-22 01:03:23 +01:00
Furquan Shaikh c248044b20 soc/intel/skylake: Fix broken suspend-resume
With recent change (a4b11e5c90: soc/intel/skylake: Perform CPU MP Init
before FSP-S Init) to perform CPU MP init before FSP-S init, suspend
resume is currently broken for all skylake/kabylake boards. All the
skylake/kabylake boards store external stage cache in TSEG, which is
relocated post MP-init. Thus, if FSP loading and initialization is
done after MP-init, then ramstage is not able to:
1. Save FSP component in external stage cache during normal boot, and
2. Load FSP component from external stage cache during resume

In order to fix this, ensure that FSP loading happens separately from
FSP initialization. Add fsp_load callback for pre_mp_init which ensures
that the required FSP component is loaded/saved from/to external stage
cache.

BUG=chrome-os-partner:63114
BRANCH=None
TEST=Verified that 100 cycles of suspend/resume worked fine on poppy.

Change-Id: I5b4deaf936a05b9bccf2f30b949674e2ba993488
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/18414
Tested-by: build bot (Jenkins)
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-02-22 00:40:43 +01:00
Furquan Shaikh f4b20af9d7 drivers/intel/{fsp1_1,fsp2_0}: Provide separate function for fsp load
Add a function to allow FSP component loading separately from silicon
initialization. This enables SoCs that might not have stage cache
available during silicon initialization to load/save components from/to
stage cache before it is relocated or destroyed.

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

Change-Id: Iae77e20568418c29df9f69bd54aa571e153740c9
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/18413
Tested-by: build bot (Jenkins)
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-02-22 00:40:32 +01:00
Elyes HAOUAS 39bfc6cb13 nb/i945/raminit.c: Fix dll timings on 945GC
Values based on vendor bios.
TESTED on ga-945gcm-s2l with 667MHz ddr2.

Change-Id: I2160f0ac73776b20e2cc1ff5bf77ebe98d2c2672
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/17197
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins)
2017-02-22 00:27:03 +01:00
Rizwan Qureshi a04ceaa13d mainboard/google/poppy: Enable Realtek 5663 support
Enable Realtek RT5663 codec i2c device and add required
SSDT parameters.

BUG=chrome-os-partner:62051
BRANCH=None
TEST=With required driver support in kernel verify audio on headset

Change-Id: I9b9eb1e7edca56870f5be0e4fd603c9b0dc7f9de
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/18216
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-21 06:04:45 +01:00
Rizwan Qureshi 7ed1effebc mainboard/google/poppy: Enable Maxim MAX98927 codec
Enable Maxim 98927 codec i2c device and add required
SSDT parameters.

BUG=chrome-os-partner:62051
BRANCH=None
TEST=with required driver support in kernel verify audio on poppy
on-board speakers.

Change-Id: Id731de42d77204d59f32ac4c33a245837d6e2107
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Signed-off-by: Dylan Reid <dgreid@chromium.org>
Reviewed-on: https://review.coreboot.org/18215
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-02-21 06:03:57 +01:00
Rizwan Qureshi 2f5446be4a mainboard/google/poppy: Generate required nhlt table
poppy board uses Maxim 98927 speaker codec and Realtek RT5663
for headset. Select the apropriate NHLT blobs to be packaged in CBFS.
Also, generate the required ACPI NHLT table for codec and the supported
topology in poppy.

BUG=chrome-os-partner:62051
BRANCH=None
TEST=With the required driver support in kernel verify that
the Audio plays on on-board speakers and headset, recording
works from on-board mics and headset mics.

Change-Id: I98c65038b35fe99a661807de0766e6eac2c80eed
Signed-off-by: M Naveen <naveen.m@intel.com>
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/18214
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-02-21 06:03:22 +01:00
Furquan Shaikh 5360c7ef94 drivers/i2c: Use I2C HID driver for wacom devices
Wacom I2C driver does the same thing as I2C HID driver, other than
defining macros for Wacom HID. Instead of maintaining two separate
drivers providing the same functionality, update all wacom devices to
use generic I2C HID driver.

BUG=None
BRANCH=None
TEST=Verified that ACPI nodes for wacom devices are unchanged.

Change-Id: Ibb3226d1f3934f5c3c5d98b939756775d11b792c
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/18401
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-02-20 21:41:34 +01:00
Duncan Laurie 658a6dc78d google/eve: Set touchscreen I2C bus speed to 1MHz
Enable Fast-Plus speed for the touchscreen device so it can
be used at 1MHz instead of 400KHz.

BUG=chrome-os-partner:61277
TEST=manual testing on Eve P1, needs backported kernel patches
to actually make use of any I2C speed other than 400KHz

Change-Id: I3f44ff4a02a02a7b05e69ad54d4c6d60e5878393
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/18397
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2017-02-20 20:51:29 +01:00
Duncan Laurie 5492bfb55c google/eve: Add audio devices
Add the audio devices to Eve mainboard:

- Describe Maxim 98927 speaker amps and RT5663 headphone codec
in ACPI so they can be enumerated by the OS.

- Supply NHLT binaries for MAX98927, RT5663, and DMIC_4CH.

BUG=chrome-os-partner:61009
TEST=manual testing on Eve P1 with updated kernel to ensure that
both speakers and headset are functional.  DMIC support is
is still being worked on and is not yet functional.

Change-Id: I5243e35d159a0ed15c6004e94ba5a50b28cff0a9
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/18398
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins)
2017-02-20 20:51:14 +01:00
Tobias Diedrich cee930a39b lenovo/s230u: Add Thinkpad Twist (S230U)
Created using autoport plus some manual work and copying from G505S to
account for the non-H8 EC.

This model uses the same ENE KB9012 EC as the G505S.

Tested:
- Mainboard variant with 8GB Elpida DDR3
- SeaBIOS payload
- Booting into Linux 4.9.6 with Debian/unstable installed on the
  internal HDD/SDD slot
- Native raminit
- Both native VGA init and option rom VGA init
- Basic TPM functionality (auto-detection and RNG)
- Battery status readout
- Basic ACPI functions (power button event; power-off; reboot)
- thinkpad-acpi hotkey functions
- thinkpad-acpi LED control (red thinkpad LED)
- Suspend to RAM and resume works
- Mini displayport output works

Known issues:
- Patches needed for EC battery support
  https://review.coreboot.org/#/c/18348/
  https://review.coreboot.org/#/c/18349/
- No thermal zone since temperature sensing is not H8-compatible
  and needs to be reverse engineered.

Not tested:
- msata/wwan (probably works)

Signed-off-by: Tobias Diedrich <ranma+coreboot@tdiedrich.de>
Change-Id: I52bc4515277e5c18afbb14a80a9ac788049f485c
Reviewed-on: https://review.coreboot.org/18351
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2017-02-20 18:21:56 +01:00
Furquan Shaikh 97535558f1 mainboard/{google,intel}: Change config option selection
Change config option selection from "config xyz default y" to "select
xyz" if the config option has no dependencies.

BUG=None
BRANCH=None
TEST=Verified that config option selection remains unchanged.

Change-Id: I259ae40623b7f4d5589e2caa0988419ba4fefda4
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/18400
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-02-20 05:08:27 +01:00
Furquan Shaikh abd5d1d35c mainboard/google/reef: Remove config DRIVERS_GENERIC_GPIO_REGULATOR
Since we are not using gpio regulators on reef anymore, remove the
selection from Kconfig as well.

BUG=None
BRANCH=None
TEST=Compiles successfully.

Change-Id: Iae7d88dec3ac476d65b292f97a6ba3add71ce07a
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/18399
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2017-02-20 05:07:28 +01:00
Mario Scheithauer 480eab0da9 siemens/mc_apl1: Set MAC address for all available i210 MACs
This mainboard uses two i210 Ethernet controller. Therfore we enable the
usage of the i210 driver and have to provide a function to search for a
valid MAC address for all i210 devices by using Siemens hwilib.

Change-Id: I36246cdef987fcece15a297ebb2f41561fca1f69
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/18380
Tested-by: build bot (Jenkins)
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-02-20 04:47:53 +01:00
Paul Menzel 2a4a452abc ec/lenovo: Add guards to fix build errors without SMBIOS
Not selecting the Kconfig option `GENERATE_SMBIOS_TABLES` the build
fails with the error below.

```
    CC         ramstage/ec/lenovo/h8/h8.o
src/ec/lenovo/h8/h8.c:201:2: error: unknown field 'get_smbios_strings' specified in initializer
  .get_smbios_strings = h8_smbios_strings,
  ^
src/ec/lenovo/h8/h8.c:201:2: error: initialization from incompatible pointer type [-Werror]
src/ec/lenovo/h8/h8.c:201:2: error: (near initialization for 'h8_dev_ops.read_resources') [-Werror]
cc1: all warnings being treated as errors
```

So add the appropriate preprocessor guards to fix the build error.

Change-Id: I3baed452d422539a805c628a8c4a6a8c2a809317
Signed-off-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-on: https://review.coreboot.org/17770
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2017-02-20 04:46:49 +01:00
Robbie Zhang 18792314d7 arch/x86: add functions to generate random numbers
Using x86 RDRAND instruction, two functions are supplied to
generate a 32bit or 64bit number.

One potential usage is the sealing key generation for SGX.

BUG=chrome-os-partner:62438
BRANCH=NONE
TEST=Tested on Eve to generate a 64bit random number.

Change-Id: I50cbeda4de17ccf2fc5efc1fe04f6b1a31ec268c
Signed-off-by: Robbie Zhang <robbie.zhang@intel.com>
Reviewed-on: https://review.coreboot.org/18362
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-02-20 04:46:10 +01:00