Commit graph

18,008 commits

Author SHA1 Message Date
Shaunak Saha
ccdea10bcb UPSTREAM: google/reef: Add mainboard SMI handler
This patch adds a mainboard SMI handler file which has
functions to set proper Wake mask before going to sleep
so that system can wake up on lidopen, key press etc.
Also SCI mask is set on boot which will enable timely update
of battery UI on charger connect/disconnect.

BUG = chrome-os-partner:53992
TEST = Reef Platform wakes from S3 on lidopen, key press and also
sysfs entry for AC is updated on charger connect/disconnect.

Change-Id: I8c087994b48223b253dcf1cbb3ed3c3a0f366e36
Original-Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Original-Reviewed-on: https://review.coreboot.org/15615
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360806
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:39:05 -07:00
Harsha Priya
5f9c302b37 UPSTREAM: intel/amenia: Add Maxim98357a support
Adds Maxim98357a support for amenia
using the generic driver in drivers/generic/max98357

BUG=None
BRANCH=None
TEST=None

Change-Id: I333d4e810e42309ac76dd90c19f05cf3e3a518f1
Original-Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Original-Reviewed-on: https://review.coreboot.org/15624
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360805
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:39:03 -07:00
Furquan Shaikh
6e45ce55b1 UPSTREAM: google/reef: Enable touchscreen in ACPI
Add support for ELAN touchscreen on I2C3.

BUG=None
BRANCH=None
TEST=None

Change-Id: Id8b07a3a3fd4beca0d7ce804ba8d6859275c70d9
Original-Signed-off-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-on: https://review.coreboot.org/15499
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360804
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:39:00 -07:00
Harsha Priya
95c2b5d3f8 UPSTREAM: intel/amenia: Update gpio config for audio
This changelist updates gpio config for speaker SDMODE pin.
It disables speaker by default.
Audio kernel is expected to enable this when audio rendering starts.

BUG=None
BRANCH=None
TEST=None

Change-Id: Id33ad29e637bf1fe6b02e8a4b0fd9e220e8983b6
Original-Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Original-Reviewed-on: https://review.coreboot.org/15623
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360803
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:38:58 -07:00
Jonathan Neuschäfer
f78ceddedd UPSTREAM: nb/intel/pineview/northbridge.c: Remove legacy_hole_size_k declaration
BUG=None
BRANCH=None
TEST=None

Change-Id: I7c3973ff325f11a86728e8660c70839776981aa5
Original-Reported-by: GCC 6.1.0
Original-Signed-off-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Original-Reviewed-on: https://review.coreboot.org/15554
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360802
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:38:56 -07:00
Shaunak Saha
7667ce8c84 UPSTREAM: soc/intel/apollolake: add offset of GPIO_TIER1_SCI_EN bit
This patch adds the support for gpio_tier1_sci_en bit which
needs to be set before going to sleep so that when
gpio_tier1_sci_sts bit gets set platform can wake
from S3.

BUG = chrome-os-partner:53992
TEST = Platform wakes from S3 on lidopen,key press.
Tested on Amenia and Reef boards.

Change-Id: I3ba79fa53ca8817149d585fa795a8f427c128dcb
Original-Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Original-Reviewed-on: https://review.coreboot.org/15612
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360801
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:38:53 -07:00
Aaron Durbin
a3913b2758 UPSTREAM: soc/intel/apollolake: work around FSP for gpio interrupt polarity
FSP is currently setting a hard-coded policy for the interrupt
polarity settings. When the mainboard has already set the GPIO
settings up prior to SiliconInit being called that results
in the previous settings being dropped. Work around FSP's
default policy until FSP is fixed.

BUG=chrome-os-partner:54955

Change-Id: Ibbd8c4894d8fbce479aeb73aa775b67df15dae85
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/15649
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360800
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:38:51 -07:00
Aaron Durbin
f7e64d8b39 UPSTREAM: soc/intel/apollolake: set gpio interrupt polarity in ITSS
For APIC routed gpios, set the corresponding interrupt polarity
for the associated IRQ based on the gpio pad's invert setting.
This allows for the APIC redirection entries to match the hardware
active polarity once the double inversion takes place to meet
apollolake interrupt triggering constraints.

BUG=chrome-os-partner:54955

Change-Id: I69c395b6f861946d4774a4206cf8f5f721c6f5f4
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/15648
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360729
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:38:49 -07:00
Aaron Durbin
8d4f36f436 UPSTREAM: soc/intel/apollolake: add initial ITSS support
The interrupt and timer subsystem (ITSS) sits between the APIC
and the other logic blocks. It only supports positive polarity
events, but there's a polarity inversion setting for each IRQ such
that it can pass the signal on to the APIC according to the
expected APIC redirection entry values. This support is needed
in order for the platform/board to set the expected interrupt
polarity into the APIC for gpio signals.

BUG=chrome-os-partner:54955

Change-Id: I50ea1b7c4a7601e760878af515518cc0e808c0d1
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/15647
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360728
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:38:46 -07:00
Aaron Durbin
83a72e84c8 UPSTREAM: mainboard/intel/amenia: use new gpio interrupt macros
Utilize the new interrupt macros in order to specify correct
polarity of the gpio interupts. Some of the interrupts were
working by catching the opposite edge of the asserted interrupt.

BUG=chrome-os-partner:54977

Change-Id: I55bee2c4363cfdbf340a4d5b3574b34152e0069c
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/15646
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360727
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:38:44 -07:00
Aaron Durbin
e406ecbdb0 UPSTREAM: mainboard/google/reef: use new gpio interrupt macros
Utilize the new interrupt macros in order to specify correct
polarity of the gpio interupts. Some of the interrupts were
working by catching the opposite edge of the asserted interrupt.

BUG=chrome-os-partner:54977

BUG=None
BRANCH=None
TEST=None

Change-Id: Iee33c0a949be0a11147afad8a10a0caf6590ff7b
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/15645
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360726
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:38:42 -07:00
Aaron Durbin
96823161c2 UPSTREAM: soc/intel/apollolake: provide gpio _HIGH/_LOW macros
Internally, apollolake routes its interrupts as active high.
This includes SCI, SMI, and ACPI. Therefore, provide helper
macros such that the user can describe an interrupt's active
high/low polarity more easily. It helps for readability when
one is comparing gpio configuration next to APIC configuration
in different files. Additionally, the gpio APIC macros always
use a LEVEL trigger in order to let the APIC handle the
filtering of the IRQ on its own end.

BUG=chrome-os-partner:54977

BUG=None
BRANCH=None
TEST=None

Change-Id: Id8fdcd98f0920936cd2b1a687fd8fa07bce9a614
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/15644
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360725
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:38:40 -07:00
Jagadish Krishnamoorthy
2f848fe446 UPSTREAM: intel/amenia: Disable unused PCIe ports
Disable PCIe A0, A1, A2, A3, B1 ports.
Enable B0 port which is used for wifi.

BUG=chrome-os-partner:54288
BRANCH=None
TEST=lspci should show only PCIe B0 device

BUG=None
BRANCH=None
TEST=None

Change-Id: I266d6eb7ddd56888f6b07b59681c2d9f0a6c0a9e
Original-Signed-off-by: Jagadish Krishnamoorthy <jagadish.krishnamoorthy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/15599
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360724
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:38:37 -07:00
Kyösti Mälkki
3e6637cc29 UPSTREAM: FSP1_0 does not support HAVE_ACPI_RESUME
FSP1_0 places romstage ram stack at fixed location of
RAMTOP in low memory before returning to coreboot proper.
There is no possibility of making a complete backup of
RAMBASE..RAMTOP region and currently such backup is not
even attempted.

As a conclusion, S3 resume would always cause OS memory
corruption.

BUG=None
BRANCH=None
TEST=None

Change-Id: I5b9dd4069082e022b01b0d6a9ad5dec28a06e8b0
Original-Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/15576
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360723
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-15 08:38:35 -07:00
YH Huang
f40cc9a22c mt8173: elm: initialize touchscreen reset gpio
In order to save power in S3, we remove reset gpio setting in kernel.
We still need to initialize touchscreen ic.
Do it by pulling low reset gpio for 500us and then pulling high
in firmware.

BRANCH=none
BUG=chrome-os-partner:55170
TEST=build on elm.

Change-Id: If2ac815c4fd5c5ae15443348a49eb31449b724b1
Signed-off-by: YH Huang <yh.huang@mediatek.com>
Reviewed-on: https://chromium-review.googlesource.com/360312
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Yidi Lin <yidi.lin@mediatek.com>
Reviewed-by: Johnny Chuang <johnny.chuang@emc.com.tw>
2016-07-14 21:29:45 -07:00
Vadim Bendebury
83a4c8ff68 gru: implement hw reset function
Asserting this GPIO will send a signal to the EC to trigger a reset
for the AP and the CR50.

BRANCH=none
BUG=chrome-os-partner:55252
TEST=the device now reboots when it needs to switch between different
     boot modes instead of hanging with "failed to reboot" message.

Change-Id: Idfd20977cf3682bd8933f89e8eec53005e55864e
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360238
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2016-07-14 18:31:01 -07:00
Aaron Durbin
b93e833ad4 UPSTREAM: lib/selfboot: clear BSS segments
For some reason the self loader wasn't clearing segments
marked as BSS type. Other segments which weren't fully
written by the file-backed content were being cleared up
to the indicated memsize. Treat segments marked BSS
similarly by clearing their content.

Change-Id: I9296c11a89455a02e5dd18bba13d4911517c04f6
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/15603
Tested-by: build bot (Jenkins)
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/360210
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-07-12 22:34:52 -07:00
Aaron Durbin
17a2cde801 UPSTREAM: lib/selfboot: remove duplicate prog_set_area()
There were two successive calls to prog_set_area() which
duplicated the same logic. Remove the unnecessary redundancy.

Change-Id: I594577f8e7e78d403e7a5656f78e784e98c2c859
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/15602
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/360209
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-07-12 22:34:50 -07:00
Aaron Durbin
eef80a946e UPSTREAM: lib/selfboot: don't open code linked list operations
The list insertion operations were open coded at each location.
Add helper functions which provide the semantics needed by
the selfboot code in a single place.

Change-Id: Ic757255e01934b499def839131c257bde9d0cc93
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/15601
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/360208
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-07-12 22:34:47 -07:00
Martin Roth
03e25d1c69 UPSTREAM: Documentation: Fix doxygen errors
Change-Id: I195fd3a9c7fc07c35913342d2041e1ffef110466
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15549
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/360207
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-07-12 22:34:45 -07:00
Jonathan Neuschäfer
fe7d228a09 UPSTREAM: spike-riscv: Remove HTIF related code
The HTIF is deprecated and the newest RISC-V binutils don't know the
mtohost/mfromhost CSRs anymore.

The SBI implementation still needs to be restructured.

Change-Id: I13f01e45b714f1bd919e27b84aff8db772504b1f
Signed-off-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/15289
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
Tested-by: build bot (Jenkins)
Reviewed-on: https://chromium-review.googlesource.com/360206
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-07-12 22:34:43 -07:00
Shaunak Saha
e5927c486b UPSTREAM: google/reef: Add GPE routing settings
This patch sets the devicetree for gpe0_dw configuration
and also configures the GPIO lines for SCI. EC_SCI_GPI
is configured to proper value.

BUG = chrome-os-partner:53438
TEST = Toggle pch_sci_l from ec console using gpioset command
       and see that the sci counter increases in /sys/firmware/acpi/interrupt
       and also 9 in /proc/interrupt

Change-Id: If258bece12768edb1e612c982514ce95c756c438
Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Reviewed-on: https://review.coreboot.org/15556
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360205
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-07-12 22:34:40 -07:00
Shaunak Saha
f648d5536c UPSTREAM: intel/amenia: Add GPE routing settings
This patch sets the devicetree for gpe0_dw configuration
and also configures the GPIO lines for SCI. EC_SCI_GPI
is configured to proper value.

BUG = chrome-os-partner:53438
TEST = Toggle pch_sci_l from ec console using gpioset command
       and see that the sci counter increases in /sys/firmware/acpi/interrupt
       and also 9 in /proc/interrupt

Change-Id: I3ae9ef7c6a3c8688bcb6cb4c73f5618e7cde342c
Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Reviewed-on: https://review.coreboot.org/15325
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360204
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-07-12 22:34:38 -07:00
Shaunak Saha
9e0d929666 UPSTREAM: soc/intel/apollolake: Add handler for SCI
This patch adds the handler to enable bit for gpio_tier1_sci_en.
gpio_tier1_sci_en enables the setting of the GPIO_TIER1_SCI_STS
bit to generate a wake event and/or an SCI or SMI#. We are setting
the bit for gpio_tier1_sci_en from the ASL code as OS clears this bit
if set from BIOS. As per ACPI spec _GPE is defined as the Named
Object  that evaluates to either an integer or a package. If _GPE
evaluates to an integer, the value is the bit assignment of the SCI
interrupt within the GPEx_STS register of a GPE block described in
the FADT that the embedded controller will trigger. FADT right now
has no mechanism to acheive the same.

Change-Id: I1e1bd3f5c89a5e6bea2d1858569a9d30e6da78fe
Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Reviewed-on: https://review.coreboot.org/15578
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/360203
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-07-12 22:34:36 -07:00
Martin Roth
5ccd39f1ad UPSTREAM: payloads/iPXE: Fix PXE Kconfig question
As reported by Andrew Engelbrecht on the coreboot mailing list, there
was an issue when selecting the pxe rom file:

When using "make menuconfig", if "add pxe rom" is selected, then
the field below to set to the path of the pxe rom, the "add pxe rom"
option gets disabled.

This problem seems to be due to the use of the 'optional' Kconfig
keyword, so this section of the Kconfig is rewitten here to remove that
keyword and fix the issue.

Change-Id: I51680cb746160cb853c8679ac64e2d37989cb574
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15555
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/360202
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-07-12 22:34:33 -07:00
Martin Roth
40d4b55f67 UPSTREAM: kconfig: add olddefconfig target to help
olddefconfig is used to expand the miniconfig files with all the default
values removed by the 'savedefconfig' target.

Change-Id: Ic9c62f4c334919e8be478d30099819b90891670a
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/15319
Tested-by: build bot (Jenkins)
Reviewed-by: Jonathan Neuschfer <j.neuschaefer@gmx.net>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/360201
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-07-12 22:34:31 -07:00
Lee Leahy
6c8701245c UPSTREAM: soc/intel/quark: Set CBMEM top from HW register
Properly obtain the top of memory address from the hardware registers
set by FSP.

TEST=Build and run on Galileo Gen2

Change-Id: I7681d32112408b8358b4dad67f8d69581c7dde2e
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/15594
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/360200
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-07-12 22:34:29 -07:00
Lee Leahy
5a546dc6e8 UPSTREAM: soc/intel/quark: Add host bridge access support
Add host bridge register access routines and macros.

TEST=Build and run on Galileo Gen2

Change-Id: I52eb6a68e99533fbb69c0ae1e6d581e4c4fab9d2
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/15593
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://chromium-review.googlesource.com/359609
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-07-12 22:34:26 -07:00
Elyes HAOUAS
b90d59a944 UPSTREAM: SPD: Add CAS latency 2
CAS latency = 2 support added for DDR2.

Change-Id: I08d72a61c27ff0eab19e500a2f547a5e946de2f0
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/15439
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/359608
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-07-12 22:34:24 -07:00
Lin Huang
626ab15bb4 rockchip: rk3399: extend romstage range
rk3399 sdram size is 192K, there still some space do not use now,
we need more romstage space to include sdram config, so extend
romstage range.

BRANCH=none
BUG=chrome-os-partner:54871
TEST=run "stressapptest -M 1024 -s 1000" on kevin board and pass

Change-Id: Ib5aa1e1b942cde8d9476773f5a84ac70bb830c80
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/359092
Reviewed-by: Julius Werner <jwerner@chromium.org>
2016-07-11 21:27:55 -07:00
Lin Huang
d29bc581ef rockchip: rk3399: set kevin rev3 pwm regulator initial value to 0.95v
kevin rev3 pwm regulator ripple still not great, especially for
center logic, for supporting sdram 800MHz stable, raise up it to
0.95v.

BRANCH=none
BUG=chrome-os-partner:54871
TEST=run "stressapptest -M 1024 -s 1000" on kevin board and pass

Change-Id: Ideec9c3ab2f919af732719ed2f6a702068d99c8f
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/359130
Commit-Ready: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2016-07-11 21:27:53 -07:00
Kyösti Mälkki
94b9185ac3 UPSTREAM: intel post-car: Consolidate choose_top_of_stack()
Change-Id: I2c49d68ea9a8f52737b6064bc4fa703bdb1af1df
Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15463
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359544
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-07-11 21:27:25 -07:00
Kyösti Mälkki
7a841823ef UPSTREAM: AMD k8 fam10: Drop excessive spinlock initialization
If CAR migration operations unintentionally set the lock,
BSP would have got stuck on printk() calls above already.

Change-Id: I35155ebcb00475a0964fc639ee74ad2755127740
Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15589
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-on: https://chromium-review.googlesource.com/359543
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-07-11 21:27:22 -07:00
Kyösti Mälkki
097983ef07 UPSTREAM: Romstage spinlocks require EARLY_CBMEM_INIT
The lock stores need to migrate from CAR to CBMEM.

Change-Id: I3cffd14bdfc57d5588d0f24afe00e0f9891bfe5a
Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15588
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359542
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-07-11 21:27:20 -07:00
Kyösti Mälkki
a21cb18e4b UPSTREAM: AMD k8 fam10: Fix romstage handoff
It is not possible for cbmem_add() to complete succesfully before
cbmem_recovery() is called. Adding more tables on S3 resume path
is also not possible.

Change-Id: Ic14857eeef2932562acee4a36f59c22ff4ca1a84
Signed-off-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/15472
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359541
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
2016-07-11 21:27:18 -07:00
Damien Zammit
4b5d2e5e14 UPSTREAM: nb/intel/x4x: Fix underclocking of 800MHz DDR2 RAM
Previously, any 800MHz DIMMs were being slowed to 667MHz
for no reason other than there was a bug in the maximum
frequency detection code for the MCH.

Change-Id: Id6c6c88c4a40631f6caf52f536a939a43cb3faf1
Signed-off-by: Damien Zammit <damien@zamaudio.com>
Reviewed-on: https://review.coreboot.org/15257
Tested-by: build bot (Jenkins)
Reviewed-by: Kysti Mlkki <kyosti.malkki@gmail.com>
Reviewed-on: https://chromium-review.googlesource.com/359540
Commit-Ready: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-07-11 21:27:15 -07:00
Daisuke Nojiri
201a82311b Increase RO coreboot size on flash
Bitmap images will be moved to CBFS from GBB. This patch adjust the flash
map accordingly for rambi, samus, peppy, parrot, falco, panther, auron,
strago.

BUG=chromium:622501
BRANCH=tot
TEST=emerge-{samus,falco} chromeos-bootimage
CQ-DEPEND=CL:354710,CL:355100

Change-Id: I0b82285186540aa27757e312e7bd02957f9962ec
Signed-off-by: Daisuke Nojiri <dnojiri@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/355040
2016-07-11 10:23:07 -07:00
Derek Basehore
3e93461b96 rockchip/rk3399: Remove empty function in sdram.c
This removes an empty function for sdram training. If it's needed
later, we can always add it back.

BRANCH=none
BUG=none
TEST=build and boot firmware for kevin/gru

Change-Id: I6bf77d2f81719c68cd78722c3fe9ae547ea1e79c
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/354164
Reviewed-by: Martin Roth <martinroth@chromium.org>
2016-07-09 01:40:26 -07:00
Derek Basehore
e0342e5c01 rockchip/rk3399: Change copy_to_reg arg type
This changes the src arg for copy_to_reg to a const u32 * instead of a
u32 * in sdram.c.

BRANCH=none
BUG=none
TEST=emerge-gru coreboot

Change-Id: I362727f1dbe6726bf3240f9219c394786162a1a0
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/354163
Reviewed-by: Martin Roth <martinroth@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-09 01:40:23 -07:00
Derek Basehore
5c17449fcd rockchip/rk3399: Directly access variables in sdram.c
This simplifies some of the code with better variable declaractions
which removes a lot of line continuations. Instead of declaring a
pointer to the container of the needed struct or array, this retrieves
a pointer to the struct or array instead.

BRANCH=none
BUG=none
TEST=check that gru and kevin still build and boot properly followed
by running "stressapptest -M 1024 -s 1000" and making sure it passes

Change-Id: If4e386d4029f17d811fa3ce83e5be89e661a7b11
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/354162
Reviewed-by: Martin Roth <martinroth@chromium.org>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
2016-07-09 01:40:21 -07:00
Derek Basehore
a79bbbc83d rockchip/rk3399: cleanup variables in dram_all_config
This removes a variable that was only used once and makes variable
declarations consistent by moving those only used in one block of code
into that block.

BRANCH=none
BUG=none
TEST=on kevin/gru, run "stressapptest -M 1024 -s 3600"

Change-Id: Id0ff0c45189c292ab40e1c4aa27929fb7780e864
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/355667
Reviewed-by: Martin Roth <martinroth@chromium.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-09 01:40:19 -07:00
Derek Basehore
b7d1135c65 rockchip/rk3399: add/remove local variables to sdram_init
This adds two local variables for dramtype and ddr_freq to sdram_init
since those two values are commonly used in the function. It also
removes a variable that is just used once and directly uses the value
for a function call instead.

BRANCH=none
BUG=none
TEST=on kevin/gru, run "stressapptest -M 1024 -s 3600" and check that
it passes

Change-Id: I4e1a1a4a8848d0eab07475a336c24bda90b2c9f8
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/355666
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-07-09 01:40:16 -07:00
Lee Leahy
4dfaac71f1 UPSTREAM: soc/intel/quark: Pass in the memory initialization parameters
Specify the memory initialization parameters in
mainboard/intel/galileo/devicetree.cb. Pass these values into FSP to
initialize memory.

TEST=Build and run on Galileo Gen2

BUG=None
BRANCH=None
TEST=None

Change-Id: I83ee196f5fb825118a3a74b61f73f3728a1a1dc6
Original-Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/15260
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359317
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-07-09 01:40:13 -07:00
Lee Leahy
4b65a4333f UPSTREAM: mainboard/intel/galileo: Gen1 - Set correct I2C scripts
Switch the I2C scripts to properly match the I2C address selection for
the Galileo Gen1 board.

TEST=Build an run on Galileo Gen1

BUG=None
BRANCH=None
TEST=None

Change-Id: I9fc8b59a3a719abb474c99a83e0d538794626da9
Original-Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/15258
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359316
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-07-09 01:40:11 -07:00
Lee Leahy
024de611e6 UPSTREAM: Documentation/Intel: Add feature documentation table
Add table containing feature documentation:
* Feature name with link to specification or documentation
* Linux utility name with link to utility documentation
* EDK-II utility name with link to utility documentation

BUG=None
BRANCH=None
TEST=None

Change-Id: Ie33d8563320697c12b34974286bffcadf92c016e
Original-Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/15256
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359315
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-07-09 01:40:09 -07:00
Lee Leahy
b40baa0e84 UPSTREAM: Documentation: Add index.html
Add the initial index.html file. The web server is currently not
converting .md files into html. Instead they are being downloaded in
their raw .md file format. Use the index.html file to enable the
web server to find and process the file.

TEST=None

BUG=None
BRANCH=None
TEST=None

Change-Id: I27334ccacdb34b56946a9061132acf2808d32175
Original-Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/15218
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359314
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-07-09 01:40:06 -07:00
Lee Leahy
5f29ea3dfa UPSTREAM: soc/intel/quark: Remove use of PDAT.bin file
Remove the unused Kconfig values which specify the PDAT file, its
location and inclusion into the coreboot file system. Remove the code
in romstage which locates the pdat.bin file.

TEST=Build and run on Galileo Gen2

BUG=None
BRANCH=None
TEST=None

Change-Id: I397aa22ada6c073c60485a735d6e2cb42bfd40ab
Original-Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Original-Reviewed-on: https://review.coreboot.org/15205
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Martin Roth <martinroth@google.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359313
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-07-09 01:40:04 -07:00
Harsha Priya
0f1b1029ae UPSTREAM: soc/intel/apollolake: Include gpio_defs header
Add the gpio_defs.h reference in chip.h to enable
reef and amenia devicetree.cb to use the definitions from gpio_defs.h.

BUG=None
BRANCH=None
TEST=None

Change-Id: I333d4e810e42309ac76dd90c19f05cf3e3a517b1
Original-Signed-off-by: Sathyanarayana Nujella <sathyanarayana.nujella@intel.com>
Original-Reviewed-on: https://review.coreboot.org/15550
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359312
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-07-09 01:40:02 -07:00
Duncan Laurie
48534884e0 UPSTREAM: mainboard/google/reef: Use device driver for DA7219 configuration
Use the device driver for DA7219 device configuration in the SSDT and
remove the static copy in the DSDT.

Tested on reef to ensure that the generated SSDT contents are
equivalent to the current DSDT contents.

BUG=None
BRANCH=None
TEST=None

Change-Id: I288eb05d0cb3f5310c4dca4aa1eab5a029f216af
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/15539
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359311
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-07-09 01:39:59 -07:00
Duncan Laurie
89ab7a8583 UPSTREAM: drivers/i2c/da7219: Add driver for generating device in SSDT
Add a device driver to generate the device and required properties
into the SSDT.

This driver uses the ACPI Device Property interface to generate the
required parameters into the _DSD table format expected by the kernel.

This was tested on the reef mainboard to ensure that the SSDT contained
the equivalent parameters that are provided by the current DSDT object.

BUG=None
BRANCH=None
TEST=None

Change-Id: Ia809e953932a7e127352a7ef193974d95e511565
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/15538
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/359310
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
2016-07-09 01:39:57 -07:00