Commit graph

13,488 commits

Author SHA1 Message Date
Aaron Durbin
ea854c8334 UPSTREAM: mainboard/google/reef: add first pass of full pad configuration
This is an initial stab of configuring the reef pads.

Change-Id: I8d8060745af6fbada268c6c6f3492b985ddf9eb8
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/14831
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
Original-Reviewed-by: Duncan Laurie <dlaurie@google.com>
(cherry-picked from commit 451b1e0b9d)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346520
Reviewed-by: Aaron Durbin <adurbin@google.com>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:04:27 +00:00
Paul Kocialkowski
9305f44240 UPSTREAM: vboot: Call verification_should_run directly in the if statement
Using a dedicated variable is slightly less readable and makes the code
less consistent, given that other test functions are called directly in
the if statements.

Change-Id: If52b2a4268acb1e2187574d15cc73a0c1d5fe9bb
Original-Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
Original-Reviewed-on: https://review.coreboot.org/14817
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
(cherry-picked from commit 1811768c64)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346519
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:04:24 +00:00
Duncan Laurie
1d4da5d984 UPSTREAM: acpigen: Add functions to generate _STA() and _PRW()
Add helper functions for generating some common objects:

acpigen_write_STA(status) will generate a status method that will
indicate the device status as provided:
  Method (_STA) { Return (status) }

Full status byte configuration is possible and macros are provided for
the common status bytes used for generated code:
ACPI_STATUS_DEVICE_ALL_OFF = 0x0
ACPI_STATUS_DEVICE_ALL_ON  = 0xF

acpigen_write_PRW() will generate a Power Resoruce for Wake that describes
the GPE that will wake a particular device:
  Name (_PRW, Package (2) { wake, level }

Change-Id: I10277f0f3820d272d3975abf34b9a8de577782e5
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/14795
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
(cherry-picked from commit abe2de8854)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346518
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:04:20 +00:00
Duncan Laurie
3d58e44a85 UPSTREAM: acpigen: Add an abstracted integer output method
In order to produce smaller AML and not rely on the caller to size the
output type appropriately add a helper function that will output an
appropriately sized integer.

To complete this also add helper functions for outputting the single
OpCode for Zero and One and Ones.

And finally add "name" variants of the helpers that will output a
complete sequence like "Name (_UID, Zero)".

Change-Id: I7ee4bc0a6347d15b8d49df357845a8bc2e517407
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/14794
Original-Tested-by: build bot (Jenkins)
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
(cherry-picked from commit f7c3876c28)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346517
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:04:16 +00:00
Duncan Laurie
dd49d21b0e UPSTREAM: acpigen: Add helper functions for strings
Add helper function to emit a string into the SSDT AML bytestream with a
NULL terminator.  Also add a helper function to emit the string OpCode
followed by the string itself.

acpigen_emit_string(string)  /* Raw string output */
acpigen_write_string(string) /* OpCode followed by raw string */

Change-Id: I4a3a8728066e0c41d7ad6429fad983e6ae6962fe
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/14793
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
(cherry-picked from commit 56b69aa9c7)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346516
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:04:13 +00:00
Duncan Laurie
3750dd9dcf UPSTREAM: acpigen: Add helpers for word/dword output
Add helpers for writing word and dword values in acpigen and use them
throughout the file to clean things up:

acpigen_emit_word - write raw word
acpigen_emit_dword - write raw dword
acpigen_write_word - write word opcode and value

Change-Id: Ia758d4dd25d0ae5b31be7d51b33866dddd96a473
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/14792
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
(cherry-picked from commit 9ccae7558d)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346515
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:04:08 +00:00
Duncan Laurie
6569491402 UPSTREAM: sconfig: Add a new generic device type
Add support for a basic generic device in the devicetree to bind to a
device that does not have a specific bus, but may need to be described
in tables for the operating system.  For instance some chips may have
various GPIO connections that need described but do not fall under any
other device.

In order to support this export the basic 'scan_static_bus()' that can
be used in a device_operations->scan_bus() method to scan for the generic
devices.

It has been possible to get a semi-generic device by using a fake PNP
device, but that isn't really appropriate for many devices.

Also Re-generate the shipped files for sconfig.  Use flex 2.6.0 to avoid
everything being rewritten.  Clean up the local paths that leak into the
generated configs.

Change-Id: If45a5b18825bdb2cf1e4ba4297ee426cbd1678e3
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/14789
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-by: Leroy P Leahy <leroy.p.leahy@intel.com>
(cherry-picked from commit 4650f5baff)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346514
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:04:05 +00:00
Duncan Laurie
3b78558264 UPSTREAM: sconfig: Add 10bit addressing mode to i2c device type
Use the second token for an i2c device entry in devicetree.cb to
indicate if it should use 10-bit addressing or 7-bit.  The default if
not provided is to use 7-bit addressing, but it can be changed to
10-bit addressing with the .1 suffix.  For example:

chip drivers/i2c/generic
  device i2c 3a.1 on end
end

Change-Id: I1d81a7e154fbc040def4d99ad07966fac242a472
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/14788
Original-Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
(cherry-picked from commit b7ce5fe311)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346513
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:04:02 +00:00
Aaron Durbin
b868b262a3 UPSTREAM: mainboard/google: add reef reference board
This adds the initial scaffolding for the reef reference board.
One big thing missing is the GPIO configuration.

Change-Id: I8e2d275df296bb397bb33dbd0c66fc87c82ff10f
Original-Signed-off-by: Aaron Durbni <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/14798
Original-Reviewed-by: Duncan Laurie <dlaurie@google.com>
Original-Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
(cherry-picked from commit e065bb43d7)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346510
Reviewed-by: Aaron Durbin <adurbin@google.com>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:03:52 +00:00
Aaron Durbin
5ec4774bca UPSTREAM: soc/intel/apollolake: provide common LPDDR4 memory init
Instead of having the mainboards duplicate logic surrounding
LPDDR4 initialization provide helpers to do the heavy lifting.
It also handles the quirks of the FSP configuration which allows
the mainboard porting to focus on the schematic/design.

Change-Id: I686eb3097c33399a3b94af89237f7fe1b2d34c2f
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/14790
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
(cherry-picked from commit fc2e7413b3)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346469
Reviewed-by: Aaron Durbin <adurbin@google.com>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:03:49 +00:00
Stefan Reinauer
ed3bef3263 UPSTREAM: vendorcode/intel/fsp1_0: Don't break GCC strict aliasing
Change-Id: I6b345670db7df652b8b712b721dfe2905373e0d5
Original-Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Original-Reviewed-on: https://review.coreboot.org/14630
Original-Reviewed-by: Leroy P Leahy <leroy.p.leahy@intel.com>
Original-Reviewed-by: York Yang <york.yang@intel.com>
(cherry-picked from commit 0b4db13994)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346468
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:03:47 +00:00
Stefan Reinauer
5e748eb8f6 UPSTREAM: HobLib: Don't break GCC strict aliasing
Change-Id: I1bd33e423b0fcb69597e001b61c6ea916f5fe44a
Original-Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Original-Reviewed-on: https://review.coreboot.org/14622
Original-Reviewed-by: Leroy P Leahy <leroy.p.leahy@intel.com>
(cherry-picked from commit 1eaf58be2c)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346467
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:03:44 +00:00
Kyösti Mälkki
5be1ff3136 UPSTREAM: AMD fam14: Blacklist Intel Centrino n6235 from PCIe ASPM
PCI device ID of this mini-PCI-e WLAN card is 8086:088e.

With this card inserted on pcengines/apu1 mini-PCI-e slot J17,
system halts late in ramstage, in agesawrapper AMD_INIT_MID.

Offending operation is enabling PCIe ASPM L0s and L1 for the card.
That is, writing PCIe capability block Link Control [1:0] = 11b
in the card's configuration space. AGESA already has a blacklist
for the purpose of masking such unstable ASPM implementations.

Change-Id: I9623699c4ee68e5cdc244b87faf92303b01c4823
Original-Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Original-Reviewed-on: https://review.coreboot.org/8496
Original-Reviewed-by: WANG Siyuan <wangsiyuanbuaa@gmail.com>
Original-Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
(cherry-picked from commit a53977e232)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346466
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:03:40 +00:00
Aaron Durbin
7ffa3c72e6 UPSTREAM: soc/intel/apollolake: implement common gpio API
In order for apollolake mainboards to utilize the common GPIO API
it actually needs to be implemented.

Change-Id: I41de8d5d9f3c39e7e796eae73b01cb29e9c01347
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/14797
Original-Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
(cherry-picked from commit fc6a9f2c20)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346463
Reviewed-by: Aaron Durbin <adurbin@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:03:30 +00:00
Aaron Durbin
bc586d42f4 UPSTREAM: ec/google/chromeec: don't guard function declarations
In order to allow using the same C source to be compiled
for multiple stages (with #if/#endif guards) one needs the
necessary function delcarations. Therefore, remove the
guards.

Change-Id: Iea94d456451c5d3db8b8b339e81163b3b3fed3ed
Original-Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/14796
Original-Reviewed-by: Duncan Laurie <dlaurie@google.com>
Original-Reviewed-by: Furquan Shaikh <furquan@google.com>
(cherry-picked from commit c10ac755f0)
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346462
Reviewed-by: Aaron Durbin <adurbin@google.com>
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Tested-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Stefan Reinauer <reinauer@google.com>
2016-05-20 20:03:26 +00:00
jongpil19.jung
ba5d476613 Kevin/Gru : Update Board ID table.
Add board id table as kevin/gru configuration.

BUG=chrome-os-partner:53519
BRANCH=chromeos-2016.02
TEST=check boot on Kevin board.

Change-Id: Ib69ed9dad8e1a9e08717545c6be19a90e0298c43
Signed-off-by: jongpil19.jung <jongpil19.jung@samsung.com>
Reviewed-on: https://chromium-review.googlesource.com/345736
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346460
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Martin Roth <martinroth@chromium.org>
Trybot-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
2016-05-20 18:31:52 +00:00
Shunqian Zheng
4e654e30e4 rockchip: gru: update the hynix lpddr3 config to run at 928MHz
Update the DDR config and DRAM driver to allow running at up to
928MHz. Kevin config/clock rate are not being changed, but Gru now
runs at 928 MHz.

BRANCH=none
BUG=chrome-os-partner:51537
TEST=booted Kevin and Gru to Linux prompt. Ran stressapptest for 10 min on Gru,

Change-Id: I5e1d6d1025f10203da8f11afc3bbdf95f133c586
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/343984
Reviewed-by: Stephen Barber <smbarber@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346299
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Martin Roth <martinroth@chromium.org>
Trybot-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
2016-05-20 18:31:48 +00:00
Lin Huang
10351d5c7d rockchip: gru: enable eDP display
This patch enable eDP display by,
o. set HPD pinmux, backligh, vdd for eDP
o. set vop mode
o. enable VGA configs for edid

BRANCH=none
BUG=chrome-os-partner:51537
TEST=the dev screen shown on kevin board

Change-Id: Id7006619b5be638b286a5402d892a5361ac1e430
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/340026
Reviewed-by: Shunqian Zheng <zhengsq@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/346296
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Martin Roth <martinroth@chromium.org>
Trybot-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
2016-05-20 18:31:37 +00:00
Shunqian Zheng
dba28f7b7e rockchip: rk3399: initialize display for eDP
This patch add functions to init display. To setup display,
initialize the eDP and read EDID, basing on which we then
set the clock for VOP, and finally enable VOP and backlight.

For a mainboard, it should set the vop_id, vop_mode and
framebuffer_bits_per_pixel in devicetree.cb.

For VOP_MODE_AUTO_DETECT, it will try eDP first and then
HDMI(which is not supported yet).

BRANCH=none
BUG=chrome-os-partner:51537
TEST=test with the other patch

Change-Id: Ic32d0a251cb8e08aa5f0b15b2c06c4e02c08a761
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/342336
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Shunqian Zheng <zhengsq@rock-chips.com>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346295
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Martin Roth <martinroth@chromium.org>
Trybot-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
2016-05-20 18:31:33 +00:00
Shunqian Zheng
d3b45f6b05 rockchip: rk3399: enable sdhci clk for emmc
If booting from sdcard/usb, kernel can't recognize the
/dev/mmcblk0.
Before kernel find it's root cause, we add this workaround
patch to enable clk for emmc.

BRANCH=none
BUG=chrome-os-partner:52873
TEST=boot from sdcard and check the /dev/mmcblk0 exists

Change-Id: I88a9cc2e3ea5a56aadfdbd94ef910daaf92a7eb7
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/341632
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346294
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Martin Roth <martinroth@chromium.org>
Trybot-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
2016-05-20 18:31:28 +00:00
Lin Huang
18a39cb054 rockchip: rk3399: configure emmc clk
Select aclk_emmc and clk_emmc source from GPLL, and both to 198MHz,
that is GPLL(594MHz) divided by 3.

BRANCH=none
BUG=chrome-os-partner:51537
TEST=boot kevin rev1 to chromeos prompt from both emmc and sdcard
TEST=LoadKernel faster, more than twice as I measured manually.

Change-Id: Id22815b302af3204e0e5537af99c1577b09b0877
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/339152
Commit-Ready: Vadim Bendebury <vbendeb@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346293
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Martin Roth <martinroth@chromium.org>
Trybot-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
2016-05-20 18:31:23 +00:00
Gwendal Grignou
e10ec4cd30 ec/google/chromeec/acpi: Add MKBP support
Allow EC to send an interrupt using ACPI SMI when a MKBP event
is available. This will be used by the sensor stack.

Update all ACPI branch except those without sensors with:
for i in $(find . -name ec.h -exec grep -l MAINBOARD_EC_SCI_EVENTS {} \+
| cut -d '/' -f 2 | grep -v -e cyan -e lars); do
  echo $i
  cd $i
  git diff ../lars/ec.h | patch -p 5
  cd -
done

BUG=b:27849483
BRANCH=none
TEST=Compile on Samus. Tested in Cyan branch.

Change-Id: I56c46ee17baee109b9b778982ab35542084cbd69
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/342364
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/346292
Reviewed-by: Stefan Reinauer <reinauer@google.com>
Commit-Queue: Martin Roth <martinroth@chromium.org>
Trybot-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
2016-05-20 18:31:18 +00:00
Patrick Georgi
4f0b6fd10a build system: really disable building CrEC when not needed
Enable users to set the EC_EXTERNAL_FIRMWARE config flag, and actively
ignore anything related to EC firmware board names if enabled.

BUG=none
BRANCH=none
CQ-DEPEND=CL:344540
TEST=emerge-samus coreboot works

Change-Id: I39c3038d059ec3d7710b864061fcf83b8d6d4d13
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://chromium-review.googlesource.com/345584
Reviewed-by: Aaron Durbin <adurbin@google.com>
Commit-Queue: Martin Roth <martinroth@chromium.org>
Trybot-Ready: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
2016-05-20 17:02:14 +00:00
Vadim Bendebury
a6e2cc4745 rk3399: set proper configuration of SDMMC interface
For proper interface operation the drive strength on all pins is set
to 8 mA and all pull ups/pull downs disabled, this matches the current
kernel configuration.

BRANCH=none
BUG=chrome-os-partner:53257
TEST=it is possible to boot Chrome OS on Gru from various micro SD
     cards which were failing to boot before.

Change-Id: I5180537d3ceb74a9a2f7b3982ca94d3e2daf0369
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/344491
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2016-05-12 15:48:04 -06:00
Vadim Bendebury
ccab797a80 rk3399: add GPIO register definitions for SDMMC0
The code needs to be able to set drive strength for the pins used for
SDMMC0 interface. This patch adds the definitions for the two
registers, as per page 378 of the RK3399 TRM Part 1.

Instead of calculation of the reserved range size just use known
offsets of the registers included in the structure.

BRANCH=none
BUG=chrome-os-partner:53257
TEST=with the upcoming driver change it is possible to boot chrome OS
     on Gru from various micro SD cards which were failing before.

Change-Id: Ibe7584e77b446435ab1264dcf8fc8bfe0c50438e
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/344490
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2016-05-12 15:47:53 -06:00
Vadim Bendebury
5d4e3a8aa4 gru: set correct gpio for SD card detect
The only outlier at this time is Kevin rev 0, treat it specially, the
rest of the targets use the same GPIO.

BRANCH=none
BUG=none
TEST=gru still boots off SD card just fine

Change-Id: Ic5183f08dd1119f9588f243bd9e9c080d84687f9
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/344151
Reviewed-by: Patrick Georgi <pgeorgi@chromium.org>
2016-05-12 15:47:42 -06:00
Lin Huang
4cecbcaaf4 Gru: support 4GB sdram on gru
now we use 4GB sdram on gru board, enable it.

BRANCH=none
BUG=chrome-os-partner:51537
TEST=boot from kevin board

Change-Id: I26f77ff4ad9b2aa35ab5ff50f23984796f4f06bc
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/342585
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2016-05-12 15:47:28 -06:00
Lin Huang
766308c89e rockchip: rk3399: improve sdram driver
improve rk3399 sdram drvier, so we can support DDR3,
and check the cs training result, so we make sdram
work more stable.

BRANCH=none
BUG=chrome-os-partner:51537
TEST=boot from kevin, do memtester in kernel and pass

Change-Id: Id385f1343804a829b6589f89f4cfbb6565d41417
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/342664
Commit-Ready: Patrick Georgi <pgeorgi@chromium.org>
2016-05-12 15:47:15 -06:00
Shunqian Zheng
ccc87c469d rockchip: rk3399: add tsadc driver
This patch configures clock for tsadc and then
makes it in automatic mode to generate TSHUT when
CPU temperature is higer than 120 degree Celsius.

BRANCH=none
BUG=chrome-os-partner:52382,chrome-os-partner:51537
TEST=Set a lower tshut threshold(45C), run coreboot and check
     that coreboot reboot again and again.

Change-Id: Iffe54d3b09080d0f1ff31e8b3020d69510f07c95
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/342797
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Shelley Chen <shchen@chromium.org>
2016-05-12 15:46:47 -06:00
Shunqian Zheng
609345b8d3 rockchip: revert the common tsadc header
The tsadc of rk3288 and rk3399 are similar but not enough
to share the same common driver, and we also decide to add a
polarity setting for mainboards on rk3399 tsadc header.
So we'd better split the tsadc header for each SoC.

BRANCH=none
BUG=chrome-os-partner:51537
TEST=build veyron_jerry

Change-Id: I629599f9e30d863cabf764e1372c38f0f39d5480
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/342796
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
2016-05-12 15:45:58 -06:00
Shunqian Zheng
1f1cae7470 rockchip: rk3399: add routines to set vop clocks
Let vop aclk sources from CPLL, and vop dclk from NPLL.

The dclk freq is decided by the edid mode pixel_clock which
may require high accuracy like 252750KHz. The pll_para_config()
can calculate the dividers for PLL to output desired clock.

BRANCH=none
BUG=chrome-os-partner:51537
TEST=check display with the other patches

Change-Id: Icef58f87041905961772b69c6b8170d5a866a531
Signed-off-by: Lin Huang <hl@rock-chips.com>
Signed-off-by: Shunqian Zheng <zhengsq@rock-chips.com>
Reviewed-on: https://chromium-review.googlesource.com/342335
Tested-by: Vadim Bendebury <vbendeb@chromium.org>
Reviewed-by: Vadim Bendebury <vbendeb@google.com>
2016-05-12 15:45:47 -06:00
Kan Yan
789a70342a Gale board: Moving TPM setup function to verstage.c
TPM should be only be reset once in verstage.

BUG=chrome-os-partner:51096
TEST=Depthcharge no longer show TPM error.
BRANCH=None
Signed-off-by: Kan Yan <kyan@google.com>

Change-Id: I52ee6f2c2953e95d617d16f75c8831ecf4f014f9
Reviewed-on: https://chromium-review.googlesource.com/343537
Commit-Ready: Kan Yan <kyan@google.com>
Tested-by: Kan Yan <kyan@google.com>
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2016-05-12 15:45:03 -06:00
Aaron Durbin
c3ee3f6d7e soc/intel/apollolake: use common FADT infrastructure
Instead of having the mainboards duplicate the same boilerplate
code utilize the common FADT infrastructure to reduce duplication.

Change-Id: If824619fd619433974e588050a933d2c19b97ec8
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/14779
Tested-by: build bot (Jenkins)
Reviewed-by: Duncan Laurie <dlaurie@google.com>
Reviewed-by: Andrey Petrov <andrey.petrov@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2016-05-12 20:06:06 +02:00
Kyösti Mälkki
d867b7d87c AGESA vendorcode: Drop alternate image dispatcher
Not used as we link AGESA into same romstage and ramstage ELF.

Change-Id: Ia427b9c0cc88b870de75df14bba4ca337a28adff
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/14395
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-12 11:38:18 +02:00
Kyösti Mälkki
898c47c5dc AGESA f12: Build as libagesa.a
Change-Id: If48fffee1441b6bb012a8d99abb794f7a35efcf6
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/14412
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-12 11:37:51 +02:00
Kyösti Mälkki
788e736b4f AGESA f16kb: Build as libagesa.a
Change-Id: I9faeda508694f950f1b025765e2ac63bc91747fa
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/14411
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-12 11:37:31 +02:00
Alexandru Gagniuc
717dccc3ee soc/apollolake: Handle non-standard ACPI BAR in PMC device
The ACPI BAR (BAR2 - offset 0x20) is not PCI compliant. That means
that probing may not work. In that case, a resource still needs to be
created for the BAR.

BONUS: We now avoid the need to declare the MMIO resources as fixed.

Change-Id: I52fd2d2718ac8013067aaa450c5eb31e00738ab9
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc@intel.com>
Reviewed-on: https://review.coreboot.org/14634
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-12 04:54:30 +02:00
Alexandru Gagniuc
c364019486 soc/intel/apollolake: Write LB_FRAMEBUFFER table when appropriate
FSP does not itself write the LB_FRAMEBUFFER entry, so that needs to
be done in platform code.

Change-Id: Ia8311da9b9a603ea9b333ea873fc26d11e182332
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc@intel.com>
Reviewed-on: https://review.coreboot.org/14764
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-12 04:54:05 +02:00
Alexandru Gagniuc
810caa9949 soc/intel/common/mrc_cache: Don't assume FMAP is tied to CHROMEOS
The old code only checked for an RW_MRC_CACHE region when
CONFIG_CHROMEOS was selected. This assumption is not necessarily true,
as one can have FMAP without a CHROMEOS build. As a result, always
search FMAP first before falling back on CBFS for locating the MRC
cache region.
The old logic where CHROMEOS builds would fail when RW_MRC_CACHE was
not found is preserved, such that behavior does not change.

Change-Id: I3596ef3235eff661af055968ea641f3e9671cdcd
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc@intel.com>
Reviewed-on: https://review.coreboot.org/14757
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-12 04:53:38 +02:00
Alexandru Gagniuc
010225c777 drivers/intel/fsp2_0: Add timestamps around all calls to the blob
Change-Id: I384cef0f5b4b71dbd7ad6d1d508e7c6395bf3f2d
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc@intel.com>
Reviewed-on: https://review.coreboot.org/14759
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2016-05-12 04:53:11 +02:00
Alexandru Gagniuc
e22f536bf8 soc/apollolake/uart.c: Do not NOOP .set_resources() and friends
When SOC_UART_DEBUG was not set, the boot would hang somwhere in
ramstage, as evidenced by POST codes reported from the EC. This was
traced to the .set_resources and .enable_resources members of the UART
PCI driver being set to NOOP.
Although the exact mechanism of failure is not known, this change
eliminates the hang.

Change-Id: Ic2f3d56a964ec890ebfa1e1a7770f1ae2eb22281
Signed-off-by: Alexandru Gagniuc <alexandrux.gagniuc@intel.com>
Reviewed-on: https://review.coreboot.org/14771
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-12 04:01:58 +02:00
Freddy Paul
74d06f2554 intel/amenia: Enable touchscreen in ACPI
Add support for Elan touchscreen on I2C3 for amenia

BUG=None
TEST=Boot to Chromium OS and verify if touchscreen is working.

Change-Id: Ic75bef0e5878bd5b8c0d727400679663d9f591e3
Signed-off-by: Freddy Paul <freddy.paul@intel.com>
Reviewed-on: https://review.coreboot.org/14768
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2016-05-12 04:01:36 +02:00
Aaron Durbin
fbb3e6c108 ec/google/chromeec: provide way to query ioport range
In order to provide other stages access to the ioport range
required by the ChromeEC provide google_chromeec_ioport_range()
function to fill in the details. Currently, the ioport range is
only consumed by the LPC implemenation. Also allow ec_lpc.c to be built
for the bootblock stage.

Change-Id: I6c181b42e80e71fe07e8fa90df783107287f16ad
Signed-off-by: Aaron Durbin  <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/14769
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
2016-05-11 21:33:17 +02:00
Aaron Durbin
bf1e481944 lib: remove FLASHMAP_OFFSET config variable
The FLASHMAP_OFFSET config variable is used in lib/fmap.c, however
the fmdtool creates a fmap_config.h with a FMAP_OFFSET #define.
Those 2 values are not consistent. Therefore, remove the Kconfig
variable and defer to the #define generated by fmdtool.

Change-Id: Ib4ecbc429e142b3e250106eea59fea1caa222917
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/14765
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Leroy P Leahy <leroy.p.leahy@intel.com>
2016-05-11 21:32:44 +02:00
Stefan Reinauer
044e4b5745 soc/samsung: Don't compile in unused uart divider tables
Change-Id: I58b2c3c52444d9a755d05529992507086a423f1a
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/14620
Tested-by: build bot (Jenkins)
Reviewed-by: David Hendricks <dhendrix@chromium.org>
2016-05-11 21:21:41 +02:00
Lee Leahy
3716f3957b soc/intel/quark/include/soc: Update the Intel license
Remove the phrase "which accompanies this distribution" from the license.
Re-format the license to fit in 80 columns.

TEST=Build and run on Galileo Gen2

Change-Id: I8d893cf1270b95b27eab7142b276ebfce24ec2ea
Signed-off-by: Lee Leahy <leroy.p.leahy@intel.com>
Reviewed-on: https://review.coreboot.org/14774
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2016-05-11 19:19:26 +02:00
Furquan Shaikh
b0c2fe0554 cbfstool/fsp: Rename fsp1_1_relocate
FSP 2.0 uses the same relocate logic as FSP 1.1. Thus, rename
fsp1_1_relocate to more generic fsp_component_relocate that can be
used by cbfstool to relocate either FSP 1.1 or FSP 2.0
components. Allow FSP1.1 driver to still call fsp1_1_relocate which
acts as a wrapper for fsp_component_relocate.

Change-Id: I14a6efde4d86a340663422aff5ee82175362d1b0
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/14749
Tested-by: build bot (Jenkins)
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2016-05-11 18:38:28 +02:00
Furquan Shaikh
61c1a05c07 util/cbfstool: Allow xip/non-xip relocation for FSP component
Currently, convert_fsp assumes that the component is always XIP. This
is no longer true with FSP 2.0 and Apollolake platform. Thus, add the
option -y|--xip for FSP which will allow the caller to mention whether
the FSP component being added is XIP or not. Add this option to
Makefiles of current FSP drivers (fsp1_0 and fsp1_1).

Change-Id: I1e41d0902bb32afaf116bb457dd9265a5bcd8779
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/14748
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins)
2016-05-11 18:38:13 +02:00
Lin Huang
03f50720df arch/arm64: add FRAMEBUFFER region macros to memlayout
BRANCH=none
BUG=chrome-os-partner:51537
TEST=build pass

Change-Id: Id3dd3a553370eada1e79708dc71afc2d94d6ce93
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Original-Commit-Id: 0949b0d9ec12eff7edb3d7de738833f29507c332
Original-Change-Id: I8052f86d4d846e5d544911c5b9e323285083fb5c
Original-Signed-off-by: Lin Huang <hl@rock-chips.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/340024
Original-Commit-Ready: Vadim Bendebury <vbendeb@google.com>
Original-Tested-by: Shunqian Zheng <zhengsq@rock-chips.com>
Original-Reviewed-by: Vadim Bendebury <vbendeb@google.com>
Reviewed-on: https://review.coreboot.org/14747
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2016-05-10 23:47:57 +02:00
Patrick Georgi
5f4f36116d qualcomm/ipq40xx: drop comment
The origin of UART config is less interesting than having the config be
correct.

Change-Id: I834e3a54105a8fd7d62f388e4a9ad0992ecec807
Signed-off-by: Patrick Georgi <pgeorgi@chromium.org>
Reviewed-on: https://review.coreboot.org/14767
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins)
2016-05-10 23:47:26 +02:00