Commit Graph

20440 Commits

Author SHA1 Message Date
Felix Held 745e58a5ee pnp_device: improve readability
Add comments on the ops handling in pnp_enable_devices function and the
pnp_info struct.

Also remove the negation in the check if an LDN-specific override is used.
This patch doesn't change the logic though.

Change-Id: I3e80dbce1f29ee3e95e3b1d71c9b8479561d5c1a
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/27384
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-07-17 18:06:19 +00:00
Kevin Chiu f17a0df112 soc/amd/stoneyridge: Update ACPI external processor name
update external processor name to match declaration in SSDT.

in SSDT:
Processor (\_PR.P000, 0x00, 0x00000410, 0x06) {}
Processor (\_PR.P001, 0x01, 0x00000000, 0x00) {}

in DSDT:
External (_PR_.CP00, UnknownObj)
External (_PR_.CP01, UnknownObj)

After fix this, ACPI _PSL (Passive List) now can return correct list
of processor objects for thermal passive cooling.

BUG=b:111478152
BRANCH=master
TEST=emerge-grunt coreboot
Change-Id: I78c838608c78eb7b5e3f8d5c67589e082c756201
Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/27495
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-17 18:04:25 +00:00
Philipp Deppenwiese 80961af4b6 security/vboot: Add interface for FSP 2.0 mrc caching
* Move vboot/tpm specific implementation to vboot.
* Only call functions if CONFIG_FSP2_0_USES_TPM_MRC_HASH is set.
* Preparation for software hash function support, no logic changed.

Change-Id: I41a458186c7981adaf3fea8974adec2ca8668f14
Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org>
Reviewed-on: https://review.coreboot.org/24904
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-17 17:40:33 +00:00
p4block 812a839744 Add VBT data for Gigabyte GA-H61-S2PV
Extracted from the stock UEFI using UEFItool & intelvbttool.

Without it, the kernel complains about the missing VBT table.

Additionally, the invalid oprom signature warning given by i915
is also gone.

Change-Id: I1871eca9e9c21531d842289f6624ec44420d9844
Signed-off-by: Pablo Moyano <42.pablo.ms@gmail.com>
Reviewed-on: https://review.coreboot.org/27482
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-07-17 11:40:51 +00:00
Chen, Ping-chung 51962d3f13 mb/google/atlas: Add MIPI camera ASL files
Atlas has one sensor, create a single endpoint to CIO2. Create power
resource for enabling/disabling camera.

BUG=b:111141128
Branch=None
TEST=Testing on Atlas board

Change-Id: Ide0e923bbc34f869dd0227c0a29977645bc5d58d
Signed-off-by: Ping-Chung Chen <ping-chung.chen@intel.com>
Signed-off-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-on: https://review.coreboot.org/27350
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Andy Yeh <andy.yeh@intel.com>
Reviewed-by: Rajmohan Mani <rajmohan.mani@intel.com>
2018-07-17 11:40:10 +00:00
Martin Roth 125506e6fb vendorcode/cavium/include: Make bdk_pop and dpop static
Fix an undefined reference error with GCC 8.1

/cb-
build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/romstage/vendorcode/cavium/bdk
/libbdk-dram/bdk-dram-size.o: In function `bdk_dram_get_size_mbytes':
/home/coreboot/slave-root/workspace/Testing_coreboot/src/vendorcode/cavium/bdk
/libbdk-dram/bdk-dram-size.c:198: undefined reference to `bdk_pop'
/cb-
build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/romstage/vendorcode/cavium/bdk
/libbdk-dram/bdk-dram-test.o: In function `bdk_get_num_cores':
/home/coreboot/slave-
root/workspace/Testing_coreboot/src/vendorcode/cavium/include/bdk/libbdk-hal
/bdk-utils.h:164: undefined reference to `bdk_dpop'
/cb-
build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/romstage/vendorcode/cavium/bdk/libdram
/dram-init-ddr3.o: In function `init_octeon3_ddr3_interface':
/home/coreboot/slave-
root/workspace/Testing_coreboot/src/vendorcode/cavium/bdk/libdram/dram-init-
ddr3.c:7550: undefined reference to `bdk_pop'
/cb-
build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/romstage/vendorcode/cavium/bdk/libdram
/dram-l2c.o: In function `bdk_get_num_cores':
/home/coreboot/slave-
root/workspace/Testing_coreboot/src/vendorcode/cavium/include/bdk/libbdk-hal
/bdk-utils.h:164: undefined reference to `bdk_dpop'
make[1]: *** [src/arch/arm64/Makefile.inc:119: /cb-
build/Testing_coreboot.0/CAVIUM_CN8100_SFF_EVB/cbfs/fallback/romstage.debug]
Error 1

Change-Id: Ifcde5476c6f347c0eac7ca44bac88d3fa4017fb7
Signed-off-by: Martin Roth <gaumless@gmail.com>
Reviewed-on: https://review.coreboot.org/27493
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2018-07-17 11:38:28 +00:00
Patrick Rudolph 780114fb07 cavium/bdk: Poke the watchdog while PCIe init
Prevent a reboot loop due to slow PCIe init.
Poke the watchdog a few times.

Change-Id: I03739d7dbad3072ccf77364fa4caba42c66ac643
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27455
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-17 08:15:10 +00:00
Patrick Rudolph bb11232210 cavium/bdk: Fix reference clock
Swap 100Mhz and 156Mhz reference clock.
Correct values are taken from __bdk_qlm_sff81xx_set_reference().

Tested on Cavium's cn8100_sff_evb.

Change-Id: I312ce7379b361594249f9f26f4e561ebf57347df
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27454
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-17 08:05:26 +00:00
Patrick Rudolph 239e435739 cavium/bdk: Fix possible divide by zero
Fix Coverity CID1393970

Change-Id: I5db6866b8e51eaea201a4c03e59d7d00f4f826e7
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27453
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-07-17 08:05:13 +00:00
Patrick Rudolph 4461613119 cavium/bdk: Fix coverity and remove hardcoded DRAM speed
* Fix CID1393963 (Uninitialized variables)
* Comment in working code
* Remove workaround to limit DDR speed

Change-Id: I96289da43c1018c2fdf9d013ce7f21d7511ba595
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27452
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-17 08:05:01 +00:00
Patrick Rudolph 2531865f13 cavium/bdk: Read DDR freq from memory controller
The BDK config subsystem can't store values in romstage.
Read frequency from DDR memory controller instead from
BDK config.

Fixes memory info showing always 0 MT/s.

Change-Id: Iaee33e57e27ca182f41be923cf950868f66d3638
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27451
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-17 08:04:46 +00:00
Patrick Rudolph 06528d97a9 cavium/bdk: Fix possible buffer overrun
Fix Coverity CID1393975

Change-Id: I275cabf55fba464be7bd4c21dfe5826ea554ac84
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27449
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-07-17 08:04:30 +00:00
Patrick Rudolph de8e68917f bdk: Use Kconfig options instead of getenv()
* Use Kconfig options instead of unusable getenv
* Select CAVIUM_BDK_DDR_TUNE_HW_OFFSETS on CN81XX
* Fix Coverity CID 1393976 (DEADCODE)

Tested on Cavium's cn8100_sff_evb.

Change-Id: Ia16c0161b0e9cf5d06418e46556c0fb45532a5b1
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27448
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-07-17 08:04:21 +00:00
Marc Jones 8247f3df67 mainboard/google/kahlee: Don't default backlight on
Keep the backlight off until it is needed.

BUG=b:72694972
TEST=Backlight turns on at ChromeOS splash screen, not prior.

Change-Id: Ia1aba787734e2976146ecd305dd821f0b326f0db
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/27489
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2018-07-17 01:58:04 +00:00
Marc Jones 290c445911 mainboard/google/kahlee: Enable backlight on resume
BUG=b:72694972
TEST=Backlight turns on ChromeOS resume

Change-Id: I452e2ea94b508b137cf52301df5d2d1ad5c9ab70
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/27488
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-07-17 01:57:49 +00:00
Marc Jones ee03dc2644 mainboard/google/kahlee: Enable backlight in SMI APMC
Enable the backlight in the OS callback to SMI for APMC. This keeps
the backlight off until the OS is ready to display something.

BUG=b:72694972
TEST=Backlight turns on at ChromeOS splash screen

Change-Id: Idf32b1a3d45971883571a829a5c0c1f8563bb1f7
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/27487
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-07-17 01:57:34 +00:00
Marc Jones f3dc659516 mainboard/google/kahlee: Add mainboard resume function
Add the mainboard resume function and __weak variant override.

Change-Id: I808734208bd1ce81428771ea203709b53db56cd3
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/27486
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-07-17 01:54:37 +00:00
David Hendricks fce1d38054 mb/facebook/watson: Update IDPROM region in board.fmd
This updates the IDPROM region along with the unused regions.

Change-Id: If73bb8162d3d0733e3bd8561cd5549f2184db2be
Signed-off-by: David Hendricks <dhendricks@fb.com>
Reviewed-on: https://review.coreboot.org/27505
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-17 01:18:12 +00:00
Marc Jones 85aec31c14 soc/amd/stoneyridge: Add GPIO functions to SMM
GPIO functions are required by the Grunt SMI handler.

Change-Id: Id729139b02c10bdd922b3df298f8f9feb1aff745
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/27485
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-07-16 15:03:59 +00:00
Marc Jones c9ed3ee8d8 soc/amd/stoneyridge: Fix gpio_set function
The gpio_set function was not writing the correct GPIO register
address.

Change-Id: Ib306773ac72505977b606836bbaf3e2067324894
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/27484
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2018-07-16 15:03:40 +00:00
Patrick Rudolph 517c4c1563 soc/cavium: Fix overflow before widen
Fix Coverity CID1393974

Change-Id: I39caea8a248d2f1debfca307f6fb7a2fe3e431b1
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27450
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-07-16 14:41:10 +00:00
Patrick Rudolph cff16b6f9d mb/lenovo/x201: Fix EC SSDT
Move the EC under the LPC PCI device to make sure that the SSDT path
matches the DSDT. Matches the behaviour of all other Lenovo devices.

Change-Id: I9ded7f639866d71d39ea0d5d0c36602d386c177f
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/27481
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Matthias Gazzari <mail@qtux.eu>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2018-07-16 07:44:54 +00:00
Kevin Chiu 8aef4f57f8 google/grunt: fix thermal zone CPU temperature report
there are 3 thermal sensors and index is:
0: 1 Charger
1: 1 SOC
2: 0 CPU

it needs to adjust sensor to index 2 to have correct
CPU temperature.

BUG=b:111284412
BRANCH=master
TEST=emerge-grunt coreboot
Change-Id: I27afb6c5b64b0c39d6db15e6c61ea16a1fda1ca3
Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/27469
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-07-16 07:42:40 +00:00
Simon Glass acad6212c8 mainboard/google/kahlee: Add support for Dediprog em100
This device claims to run at 75MHz with dual read, but it is not always
reliable. Add an option to change the SPI flash speed to 16MHz, to avoid
any problems.

BUG=b:111363976
TEST=manually try to get my em100 running (it doesn't yet)

Change-Id: I78d3d32c467aac82c72d31c773bfb0f69808aed4
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://review.coreboot.org/27466
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-07-16 07:41:51 +00:00
Simon Glass 46255f7ee4 Kconfig: Make the EM100 config option common
This applied to AMD devices as well as Intel, although the mechanism is
different. Move the option to a common place.

BUG=b:111363976
TEST=USE=em100-mode emerge-reef coreboot
See that a message appears:
 * Enabling em100 mode (slow SPI flash)

Change-Id: Iea437bdf42e7bc49b1d28c812bfc6128e3eb68bd
Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-on: https://review.coreboot.org/27467
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-07-16 07:41:14 +00:00
Ivy Jian 457253cdc6 mb/google/poppy/variants/nami: Use Pantheon VBT
Add new Pantheon sku-id for loading vbt-pantheon.bin

BUG=b:78663963
BRANCH=firmware-nami-10775.B
TEST=Boots to OS and display comes up.
Check the board specific vbt binary loaded.

Change-Id: I1ee156372754ac0e77caae5959a9ca9884de95f4
Signed-off-by: Ivy Jian <ivy_jian@compal.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/27432
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-13 16:30:33 +00:00
Pratik Prajapati 7fd1e4b9b1 intel/wifi: Add WGDS ACPI method for Geo Aware SAR
To comply with all relevant bodies throughout the world, SAR settings
take into account the lowest common denominator Tx power settings. This
setup may lead to non-optimal performance when the user location is in a
country that may allow higher power setting. The purpose of Wireless Geo
Delta Settings (WGDS) is to provide offset settings for FCC, Europe,
Japan and Rest of the world. These offsets would be added (by Intel wifi
driver) to the base SAR Tx Power as defined in WRDS and EWRD

BUG=b:65155728
BRANCH=none
TEST=WGDS ACPI table gets created as expected.

Change-Id: I4f602e3f95ff3545db6cc6e428beb9a36abd9296
Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://review.coreboot.org/21098
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-07-13 10:42:04 +00:00
Martin Roth 8919ac726b mainboard/google/kahlee: Add more 3 SPD files
BUG=b:111195311
TEST=Build grunt, verify SPDs are present

Change-Id: Ief5ed5c3ca1d96b36926f1fc84c344a8d66dcda5
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/27437
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-13 03:08:37 +00:00
Ricky Liang 8d0fd5d7d3 mainboard/google/nocturne: Update GPIO_FCAM_PWR_EN
The FCAM_PWR_EN gpio should be GPP_B4 according to the latest board
schematics.

Change-Id: Id926bd224b3392d8a61b6d8ae0509053afaa5b9e
Signed-off-by: Ricky Liang <jcliang@chromium.org>
Reviewed-on: https://review.coreboot.org/27433
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Tomasz Figa <tfiga@google.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2018-07-12 17:28:38 +00:00
Patrick Rudolph ded0c77d48 Coverity: Fix CID1393976
Cast to u64 to prevent possible integer overflow.

Change-Id: I5c7d25278db54523242314cba6c85ac2f7a6c1f3
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27447
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-07-12 15:22:06 +00:00
Patrick Rudolph f4d81e0385 Coverity: Fix CID1393978
Fix a typo.
Only memcpy into target buffer if pointer is not NULL.

Change-Id: I1aa4b2ce1843e53ab6ed2224eaa928fc79ea3b83
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27446
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-07-12 15:21:36 +00:00
Patrick Rudolph 679d624fae Coverity: Fix CID1393979
Fix resource leak in dt_set_bin_prop_by_path().

Change-Id: I1c4d7e01b25847a2091ad90d2d70711beae55905
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/27445
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2018-07-12 15:21:10 +00:00
Xiang Wang 3ec008bf40 riscv: add include/arch/smp/ directory
Replicate directory layout from x86 for SMP.

Change-Id: I27aee55f24d96ba9e7d8f2e6653f6c9c5e85c66a
Signed-off-by: Xiang Wang <wxjstz@126.com>
Reviewed-on: https://review.coreboot.org/27355
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-12 11:53:30 +00:00
Pratik Prajapati 6e3cc8855b soc/intel/skylake: add a space in printing ME FPF status
This is cosmetic change

Before:
ME: Power Management Event  : Clean global reset
ME: Progress Phase State    : Unknown phase: 0x08 state: 0x10
ME: Power Down Mitigation   : NO
ME: FPF status               : fused

After:
ME: Power Management Event  : Clean Moff->Mx wake
ME: Progress Phase State    : Unknown phase: 0x08 state: 0x10
ME: Power Down Mitigation   : NO
ME: FPF status              : fused

Change-Id: I15c02045d0f94fdb3f4a028585cad488d4ac9aa6
Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Reviewed-on: https://review.coreboot.org/27246
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-07-12 11:53:18 +00:00
Elyes HAOUAS a4fc7bef7f nb/i945/raminit: Correct C0DRAMW & C1DRAMW for 4 DIMMs
Change-Id: Ib1f999447b37a1524d589552ea2eec640c2a2c7e
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/18387
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-07-12 11:52:52 +00:00
Frans Hendriks 34510c377e soc/intel/braswell/acpi/dptf/thermal.asl: Make Thermal event optional
Currently thermal event support can not be disabled at board level.
Define and dependent code are placed in same file.

Move define of HAVE_THERM_EVENT_HANDLER to mainboard file.

Change-Id: Icb532e5bc7fd171ee2921f9a4b9b2150ba9f05c5
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/27415
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-12 11:52:23 +00:00
Furquan Shaikh a353d054ae mb/google/octopus/variants/yorp: Enable TBMC device
This change enables tablet mode ACPI device for yorp.

BUG=b:111264961
CQ-DEPEND=CL:1132686

Change-Id: I81140b84a1adb5b21f1656fd89d953331e538f01
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/27431
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Jett Rink <jettrink@google.com>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
2018-07-12 00:39:59 +00:00
Furquan Shaikh 13367490b0 mb/google/octopus: Enable TBMC device only for phaser
Enabling of TBMC device on AP side requires corresponding support on the
EC side as well. Since not all octopus variants have tablet mode support
enabled, this change enables TBMC device only for phaser.

BUG=b:111264961

Change-Id: I1ce181baa8ebaff0a9d767e97ddc256eef9789e8
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/27429
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Jett Rink <jettrink@google.com>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
2018-07-12 00:39:51 +00:00
Furquan Shaikh 4d98916721 mb/google/octopus/variants/bip: Enable EC SW sync
This change enables EC SW sync for bip by removing GBB flag selection
for disabling SW sync.

BUG=b:110523189
TEST=Verified that EC SW sync works fine on bip.

Change-Id: Iff8ee67fd682530a4fa82643cd1d00a645b347a3
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/27428
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Justin TerAvest <teravest@chromium.org>
2018-07-12 00:39:44 +00:00
li feng 3130a93bfa skylake: Remove "IshEnable"
Remove "IshEnable" from soc_intel_skylake_config since it's not
used anymore.

Enable/disable ISH by checking if ISH device is turned on or not.

Refer to https://review.coreboot.org/#/c/coreboot/+/26485/.

BUG=b:79244403
BRANCH=none
TEST=Built.

Change-Id: I4d2889af118659852431c87cb516fd19b577efc5
Signed-off-by: li feng <li1.feng@intel.com>
Reviewed-on: https://review.coreboot.org/26521
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-07-11 10:48:12 +00:00
li feng 0738d2a00d mainboard/google/poppy/variants/atlas: config ISH in mainboard side
To enable ISH device on atlas board, change "device pci 13.0 off end" to
"device pci 13.0 on end" in file
mainboard/google/poppy/variants/atlas/devicetree.cb. "IshEnable" is
not needed.

Config atlas board specific ISH setting in devicetree.cb.
Dynamically load gpio setting for ISH enabled/disabled cases.

BUG=b:79244403
BRANCH=none
TEST=Verified on Atlas board with ISH rework. ISH log showed on console.

Change-Id: I8269a85cd2ab7917bfc0e7d63d988e0e678d0bf2
Signed-off-by: li feng <li1.feng@intel.com>
Reviewed-on: https://review.coreboot.org/26486
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-07-11 10:47:53 +00:00
Weiyi Lu 60e1fcb07f mediatek/mt8183: add PLL and clock init support
Add PLL and clock init code.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui. Checked with frequency meter in SOC.

Change-Id: I1f561f66bcf12de6a95c2f64eecd9508bd9bb26c
Signed-off-by: Weiyi Lu <weiyi.lu@mediatek.com>
Reviewed-on: https://review.coreboot.org/27031
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2018-07-11 10:47:09 +00:00
Tristan Shieh 17180af69a mediatek: Share PLL code among similar SOCs
Refactor PLL code which will be reused among similar SOCs.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Elm

Change-Id: I11f044fbef93d4f5f4388368c510958d2b0ae66c
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/27305
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-11 10:46:45 +00:00
Tristan Shieh bb684e0c8d google/kukui: Update MMU table in romstage and ramstage
In order to get better performance, map dram as cached after dram ready
in romstage.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui. Need a futher check after dram
     calibration code ready.

Change-Id: Ie541fe08ee1d5b260abbabc0a5c18fb04e602b9c
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/27304
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-11 10:46:25 +00:00
Tristan Shieh 0eb92dfbc7 mediatek/mt8183: Add MMU operation support
Enable MMU in bootblock for performance, link common code to provide
mtk_mmu_after_dram() to update MMU table in romstage after dram ready,
implement mtk_soc_disable_l2c_sram(), and call
mtk_mmu_disable_l2c_sram() to turn off L2C sram in ramstage.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui.

Change-Id: I4e35f8276ca23de7fd13da3515b9f48d944ead32
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/27303
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2018-07-11 10:46:09 +00:00
Tristan Shieh c645a5aac4 mediatek: Share MMU operation code among similar SOCs
Refactor MMU operation code which will be reused among similar SOCs.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Elm

Change-Id: Id8173da0a02e57e863263fcd89c91a9c089e8a0f
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/27349
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2018-07-11 10:45:48 +00:00
Martin Roth 1a26a30a7f mainboard/google/kahlee: Update existing SPD files
Add an extra space after 8th value on each line to make it easier
to count the values.
Update the empty spd to remove two random 0x80 values.

BUG=None
TEST=None

Change-Id: If330dbf0c133f65aedddc58ecb351a80b0e45a05
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/27423
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-11 10:45:19 +00:00
Martin Roth cef673759e mainboard/google/kahlee: Add additional SPDs for variants
BUG=b:111079089, b:80375243
TEST=Build grunt, verify that SPDs are included.

Change-Id: Idb03a3fa0842f7f89bb8c66dedbb8a0b293569be
Signed-off-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/27422
Reviewed-by: Daniel Kurtz <djkurtz@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-11 10:45:11 +00:00
Xiang Wang 387417be03 riscv: add support to check ISA extension
Add support to check ISA extension for RISC-V.

Change-Id: I5982fb32ed1dd435059edc6aa0373bffa899e160
Signed-off-by: Xiang Wang <wxjstz@126.com>
Reviewed-on: https://review.coreboot.org/27410
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-by: Philipp Hug <philipp@hug.cx>
2018-07-11 10:44:08 +00:00
Michał Żygowski 654a45d2ad src/sb/amd/pi/hudson/sd.c: disable SDR50 tuning and set correct clock freq in SD2.0 mode
According to BKDG for AMD Family 16h Models 30h-3Fh Processors
SDR50 tuning should be disabled in 0xA8 register.

Also fix clock frequency setting in 0xA4 for stepping >= A1
which caused reduced performance of SD cards transfer speed
even by half.

Change-Id: I80ca754b0c89e08aa90ff885467c7486a3efb999
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Signed-off-by: Piotr Król <piotr.krol@3mdeb.com>
Reviewed-on: https://review.coreboot.org/27359
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-10 09:53:22 +00:00
Patrick Rudolph 88f81af1ef soc/cavium: Add secondary CPU support
Change-Id: I07428161615bcd3d03a3eea0df2dd813e08c8f66
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25752
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2018-07-10 07:07:09 +00:00
Patrick Rudolph ae15fec0b8 soc/cavium/cn81xx: Set cntfrq_el0
Set cntfrq_el0 to provide correct timer frequency.

Change-Id: I4b6d0b0cf646a066fc5a51552a1891eccbd91e5e
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25450
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-10 07:05:27 +00:00
Patrick Rudolph bbfeb586a6 mb/cavium/cn8100_sff_evb: Be verbose
Print some useful information about the board.

Change-Id: I0acac7a29290bc2eb9f4283317165fa0cf1b24e1
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25449
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-10 07:04:40 +00:00
Patrick Rudolph d0dcf877e4 soc/cavium: Clean uart code
* Only init UART_FOR_CONSOLE
* Allow UART init with zero baudrate.
* Init UART0..3 on Cavium's cn8100_sff_evb to fix kernel panic.

Tested on CN8100_SFF_EVB.

Change-Id: I1043b30318ec6210e2dd6b7ac313a41171d37f55
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25448
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2018-07-10 07:03:56 +00:00
Patrick Rudolph 06c7d64be9 soc/cavium: Enable MMU
* Configure and enable MMU.
* Cover the whole I/O space.
* A minimum of 512KB TTB space is required.
* Use secure mem attribute as firmware is running in ARM TZ region.

Tested on Cavium SoC.

Change-Id: I969446da62b4cc7adf9393fab69ff84ebf49220d
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/25371
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2018-07-10 07:03:29 +00:00
David Hendricks 8cbd569f74 cavium: Add CN81xx SoC and eval board support
This adds Cavium CN81xx SoC and SFF EVB files.

Code is based off of Cavium's Octeon-TX SDK:
https://github.com/Cavium-Open-Source-Distributions/OCTEON-TX-SDK

BDK coreboot differences:
bootblock:
- Get rid of BDK header
- Add Kconfig for link address
- Move CAR setup code into assembly
- Move unaligned memory access enable into assembly
- Implement custom bootblock entry function
- Add CLIB and CSIB blobs

romstage:
- Use minimal DRAM init only

devicetree:
- Convert FTD to static C file containing key value pairs

Tested on CN81xx:
- Boots to payload
- Tested with GNU/Linux 4.16.3
- All hardware is usable (after applying additional commits)

Implemented in future commits:
- Vboot integration
- MMU suuport
- L2 Cache handling
- ATF from external repo
- Devicetree patching
- Extended DRAM testing
- UART init

Not working:
- Booting a payload
- Booting upstream ATF

TODO:
- Configuration straps

Change-Id: I47b4412d29203b45aee49bfa026c1d86ef7ce688
Signed-off-by: David Hendricks <dhendricks@fb.com>
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/23037
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2018-07-10 07:01:57 +00:00
Elyes HAOUAS 251279c537 src/southbridge: Use "foo *bar" instead of "foo* bar"
Change-Id: I72d50615d77b91529810e8f590fa56f3c6f7546c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27409
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-09 09:31:54 +00:00
Elyes HAOUAS 39303d5d49 src/soc: Use "foo *bar" instead of "foo* bar"
Change-Id: I21680354f33916b7b4d913f51a842b5d6c2ecef3
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27408
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-09 09:31:10 +00:00
Elyes HAOUAS fd051dc018 src/northbridge: Use "foo *bar" instead of "foo* bar"
Change-Id: Iaf86a0c91da089b486bd39518e5c8216163bf8ec
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27407
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-07-09 09:29:53 +00:00
Elyes HAOUAS 95bca33efa src/mb: Use "foo *bar" instead of "foo* bar"
Change-Id: Iedc2e48349e40e94863c8080d11e11dbe6084c9d
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27406
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-07-09 09:29:00 +00:00
Elyes HAOUAS c92f5f218f src/{ec,include,lib}: Use "foo *bar" instead of "foo* bar"
Change-Id: I447aaa1850b7e8b514a8c4c04bf5b426d3d1cd0a
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27405
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-09 09:28:35 +00:00
Elyes HAOUAS b0b0c8c60a src/{device,drivers}: Use "foo *bar" instead of "foo* bar"
Change-Id: Ic1c9b1edd8d3206a68854107ddcbc5c51cb487c3
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27404
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-09 09:27:34 +00:00
Elyes HAOUAS 6c9737b1ac src/{arch,commonlib,cpu}: Use "foo *bar" instead of "foo* bar"
Change-Id: I8e4118c5c5d70719ad7dc5f9ff9f86d93fa498ac
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26942
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2018-07-09 09:26:18 +00:00
li feng 2106638ec2 soc/intel/skylake: config ISH in SOC side
Config ISH in SOC side by checking if ISH device is turned on.

"IshEnable" is not needed anymore since ISH device on/off will tell
if ISH should be enabled or not. "IshEnable" will be removed from chip.h
in separate CL.

Atlas board specific ISH setting is needed, which is committed in
separate CL.

BUG=b:79244403
BRANCH=none
TEST=Verified on Atlas board with ISH rework. ISH log showed on console.

Change-Id: I3fc8648b3e6551497617ef1ebd2889245cdd31c3
Signed-off-by: li feng <li1.feng@intel.com>
Reviewed-on: https://review.coreboot.org/26485
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-07-09 09:24:42 +00:00
Patrick Rudolph f1114d8918 ec/lenovo/h8/acpi: Add BDC interface
* Add SSDT generator to add dynamic ACPI code.
* Implement GBDC and SBDC for thinkpad_acpi kernel module.
Required for BDC power control from userspace.

Tested on Lenovo T430:
The bluetooth module is detected and can be powercycled using network manager.

Change-Id: Ida825196650966194a883945896a038b0790fe45
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20985
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-09 09:19:59 +00:00
Felix Held 01d2e46ddb superio: move files to match the common naming scheme
Change-Id: I1a8fc34aaaf42514c8af97ab155ff2712e7a5448
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/23009
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-06 16:47:21 +00:00
Martin Roth 842253b242 src: Add missing license headers
These two files were added before I was able to get the updated linter
committed.  Updated/Add the headers so the stable header lint check
can be updated.

Change-Id: I464ddecb5eebe8c5b907f3dcfeab1b06501af6ab
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/27362
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2018-07-06 15:30:59 +00:00
Xiang Wang 8889e0106d riscv: use __riscv_atomic to check support A extension
GCC pre-defined some macros for detecting ISA extensions.
We should use these macros to detect ISA features.

Change-Id: I5782cdd1bf64b0161c58d789f46389dccfe44475
Signed-off-by: XiangWang <wxjstz@126.com>
Reviewed-on: https://review.coreboot.org/27300
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
2018-07-06 13:07:08 +00:00
Kevin Chiu 12f0b4c80e google/grunt: Update Raydium TS device ACPI nodes
change I2C irq to EDGE trigger

BUG=b:110962003
BRANCH=master
TEST=emerge-grunt coreboot
     Raydium TS is working.
Change-Id: Iff3acf4199d23b29dff209ec1c03a731679c6cbe
Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/27327
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-06 13:02:24 +00:00
Justin TerAvest 3419bf639d mb/google/octopus: Enable tablet mode
This change configures ACPI to properly route notifications from the EC
for tablet mode events to userspace. Relevant EC config changes are at:
  https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/1125261

BUG=b:111078678
TEST=With EC change, tablet mode detected by evtest and powerd

Change-Id: Ifbc318186b195534f647f062544de4968aa87401
Signed-off-by: Justin TerAvest <teravest@chromium.org>
Reviewed-on: https://review.coreboot.org/27346
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jett Rink <jettrink@google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-07-06 13:02:07 +00:00
Patrick Rudolph f81f62a6c1 ec/lenovo/h8/acpi: Move ACPI HKEY device to new file
Move the APCI HKEY device to a new file and include it.
The follow-up commits will extend it and this way it remains readable.

Change-Id: Ie59b59e5a4148807125c71a362161026f685a97e
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/22463
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2018-07-06 13:00:52 +00:00
Vincent Palatin 29b258ccc0 mb/google/poppy/variants/nocturne: fix FPMCU IRQ sensitivity
the FPMCU_INT_L on GPP_C11 is active low but the kernel irq handler is
defined as IRQF_TRIGGER_LOW, so do not invert it twice.

BRANCH=poppy
BUG=b:78613978
TEST=On Nocturne, the 'cros_ec' IRQ count in /proc/interrupts does not
increment wildly.

Change-Id: I56c13c797b133dd22669a2299bcd16ef14eed335
Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
Reviewed-on: https://review.coreboot.org/27221
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-07-06 13:00:20 +00:00
Elyes HAOUAS a5a124c188 mb/intel/d945gclf/romstage.c: Remove unneeded includes
Change-Id: I3bdb93e51cabbfc14fe992ccdb6556e344e03c2f
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27345
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2018-07-06 12:59:11 +00:00
Elyes HAOUAS ece7d0cfea mb/ibase/mb899: Remove unneeded includes
Change-Id: Iee237206f309409be64307d2daee044da52a05e1
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27344
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2018-07-06 12:59:05 +00:00
Gwendal Grignou 145ef87b32 google: Use proper ACPI ID for Semtech chips: STH
Change-Id: I85cd567a923cccd2504f351aae276b5f0d9db4de
Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Reviewed-on: https://review.coreboot.org/27347
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt Delco <delco@google.com>
Reviewed-by: Seunghwan Kim <sh_.kim@samsung.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-07-06 12:58:20 +00:00
David Hendricks 7d48ac5c7d soc/cavium: Integrate BDK files into coreboot
* Make it compile.
* Fix whitespace errors.
* Fix printf formats.
* Add missing headers includes
* Guard headers with ifdefs

Compile DRAM init code in romstage.
Compile QLM, PCIe, RNG, PHY, GPIO, MDIO init code in ramstage.

Change-Id: I0a93219a14bfb6ebe41103a825d5032b11e7f2c6
Signed-off-by: David Hendricks <dhendricks@fb.com>
Reviewed-on: https://review.coreboot.org/25089
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-03 15:53:32 +00:00
Kevin Chiu d837e66007 soc/amd/stoneyridge: correct GPIO emission error in ACPI
It can not emit byte data without BytePrefix.

design to:
Or (Local5, GPIO_PIN_OUT, Local5)

error due to GPIO_PIN_OUT is 0x40 but 0x40 encoding means
nothing in AML spec.
so it will include next emitted string in Or:
Or (Local5, Local5, \_SB.GPW2)

fix:
Store (0x40, Local0)
Or (Local5, Local0, Local5)

BUG=b:110962003

BRANCH=master
TEST=emerge-grunt coreboot
     extract SSDT then check ACPI syntax is correct
Change-Id: I7a0704112b77105826de87b14a38ed2f665224d5
Signed-off-by: Kevin Chiu <Kevin.Chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/27306
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-07-03 14:19:34 +00:00
Michał Żygowski 0be6cee817 mb/pcengines/apu1: use generic SPD
Clean up leftovers of old SPD generation and utilize
common procedure to produce SPD binary.

Change-Id: I4e48817c03b4372887bc0ea14209736ae2b4e48f
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/27301
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-03 11:07:13 +00:00
Elyes HAOUAS be6958ede4 drivers/pc80/vga: Fix coding style
Change-Id: I0452407d1346ca8ead2638e2a31269931ea5d12e
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/26328
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-07-03 11:04:35 +00:00
Arthur Heymans 4f2b558aad mb/intel/dg43gt: Expose some SIO devices via ACPI
Change-Id: I0df578b98c5b346caa6f6df5fdabda28788e6b66
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/27298
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-07-03 09:24:18 +00:00
Arthur Heymans ab96ce6659 mb/intel/dg41wv: Expose some SIO devices via ACPI
Change-Id: Ia658c117434c3fae45bbbe6c472ca58ba4f1a117
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/27120
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2018-07-03 09:24:13 +00:00
Furquan Shaikh 9efe426cc4 ec/google/chromeec: Remove keyboard initialization
Since none of the boards using chromeec select DRIVERS_PS2_KEYBOARD
now, there is no need to call pc_keyboard_init anymore. This change
gets rid of the call and adds an error message in case any mainboard
using chromeec tries to select this config.

BUG=b:110024487

Change-Id: Ia0b56abe0a5990e527277eaf3397e00dccda3e50
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/27293
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2018-07-03 04:05:21 +00:00
Furquan Shaikh 26475572a7 mb/intel/glkrvp: Get rid of DRIVERS_PS2_KEYBOARD selection
Until now, chromeec was doing keyboard initialization for the boards
that have DRIVERS_PS2_KEYBOARD selected. However, coreboot does not
leave the keyboard controller in a default reset state. This could
result in payloads or OS failing to probe the controller as there
could be stale data buffered in the controller during the handoff.

Since the boards using chromeec already perform keyboard
initialization in payload, there is no need to initialize the
keyboard in coreboot too. This change gets rid of DRIVERS_PS2_KEYBOARD
selection from all google mainboards using chromeec.

BUG=b:110024487

Change-Id: I9af48e648231c18f98d0cc1ddd178b8d00082b0a
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/27292
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-07-03 04:05:06 +00:00
Furquan Shaikh 54c2cc1b29 mb/google/*: Remove selection of DRIVERS_PS2_KEYBOARD
Until now, chromeec was doing keyboard initialization for the boards
that have DRIVERS_PS2_KEYBOARD selected. However, coreboot does not
leave the keyboard controller in a default reset state. This could
result in payloads or OS failing to probe the controller as there
could be stale data buffered in the controller during the handoff.

Since the boards using chromeec already perform keyboard
initialization in payload, there is no need to initialize the keyboard
in coreboot too. This change gets rid of DRIVERS_PS2_KEYBOARD
selection from all google mainboards using chromeec.

BUG=b:110024487
TEST=Keyboard works fine after booting to OS even if user hits keys
during BIOS to OS handoff.

Change-Id: I1f49b060eb005c0f2b86f9d68d6758954eeb3cf0
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/27291
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-03 04:04:52 +00:00
Patrick Georgi 3d76725c41 arch/x86: add SMM caller
Useful for debugging or for cases where we need to enter SMM.
Probably should be moved to commonlib or libpayload.

Change-Id: I7a9cc626dae9a7751034615ef409eebc6035f5c3
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/25193
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-07-02 16:34:54 +00:00
Elyes HAOUAS e3e3f4f4ed src: Get rid of unneeded whitespace
Change-Id: I3873cc8ff82cb043e4867a6fe8c1f253ab18714a
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27295
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-02 07:39:51 +00:00
Elyes HAOUAS 21b71ce66b src/nb: Fix non-local header treated as local
Change-Id: I8174d7b40008cfe4fba10fde4670682aac0ad078
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27131
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-02 07:39:16 +00:00
Elyes HAOUAS 10b65dcfc7 src/sb: Fix non-local header treated as local
Remove some unneeded includes.

Change-Id: I4b9bcb74b6441db9e44fe471b9cd789e42e7093a
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27130
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-02 07:39:01 +00:00
Elyes HAOUAS 4ad1446b83 src/mb: Fix non-local header treated as local
Also remove some unnedded includes.

Change-Id: I036208a111d009620d8354fa9c97688eb4e872ad
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/27129
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-02 07:38:32 +00:00
Nico Rikken eafb31be30 mb/lenovo/t400: Change CMOS value name to Dual Graphics
To uniform the naming of the 'Dual Graphics' mode amongst the ThinkPads that
support it, the T400 CMOS value needs a change. This was the outcome of a
discussion on another patch: https://review.coreboot.org/#/c/coreboot/+/23040/

This might cause breakage for automated NVRAM configuration scripts, and
manuals. I only found one manual using the previous 'Switchable' option:
https://libreboot.org/docs/install/r400_external.html#a-note-about-gpus

Change-Id: I2e4d8bafbae5de97c78dab118f75fdefff1d7c37
Signed-off-by: Nico Rikken <nico@nicorikken.eu>
Reviewed-on: https://review.coreboot.org/27158
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2018-07-02 07:35:44 +00:00
Raul E Rangel 9abc3fe970 stoneyridge: Enable legacy IO
Legacy IO enables access to RTC IO 0x70-0x73. This is needed for CMOS to
function correctly.

BUG=b:110817463
TEST=ran firmware_CorruptFwSigB on grunt

Change-Id: I533226ba764f567e348577d7fcf6ebe43336609a
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://review.coreboot.org/27268
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2018-07-02 07:35:20 +00:00
Raul E Rangel 5b05823388 stoneyridge: Enable IO CF9 in bootblock
If IO CF9 is not enabled, hard_reset() won't do anything in bootblock or
verstage.

BUG=b:110817463
TEST=built on grunt and made sure that hard_reset() reboots.

Change-Id: I5f091077a17db3dfe5b8e8367163312db6828360
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://review.coreboot.org/27267
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-02 07:35:00 +00:00
Furquan Shaikh 118fb60b3a ec/google/chromeec: Remove notify for power button
None of the mainboards using Chrome EC set SCI mask for power
button. Thus, the EC will never generate SCI for power button
events. This change removes the Notify call for power button as part
of clean up for getting rid of the power button device in coreboot.

BUG=b:110913245

Change-Id: I86c72fd82f1a0e6d5693ebbcd58e2aea808f8817
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/27271
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2018-07-02 07:31:26 +00:00
Tristan Shieh 85c34750cf mediatek/mt8183: Add mtcmos init support
Using common mtcmos code to power on audio and display modules in SOC.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Kukui. Passes the status check at the end of
     mtcmos_power_on()

Change-Id: I41f16ba36432a8bbc47793cec2979753c9f84b43
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/27030
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2018-07-02 07:30:56 +00:00
Tristan Shieh 5da002980b mediatek: Move mtcmos code to a common directory
Move mtcmos code which can be reused into a common directory under
soc/mediatek.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Elm

Change-Id: I92b138890424b4f4a68cdb00bf2326eef9cd87b7
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/27029
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2018-07-02 07:30:37 +00:00
Tristan Shieh 0423a2bd1a mediatek: Share mtcmos code among similar SOCs
Refactor mtcmos code which will be reused among similar SOCs.

BUG=b:80501386
BRANCH=none
TEST=Boots correctly on Elm

Change-Id: Ibfd0a90f6eba3ed2e74a3fd54279c7645aa41774
Signed-off-by: Tristan Shieh <tristan.shieh@mediatek.com>
Reviewed-on: https://review.coreboot.org/27028
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Kocialkowski <contact@paulk.fr>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2018-07-02 07:30:18 +00:00
Kyösti Mälkki 2fc1a37c04 soc/amd/common: Change create_struct return value
Old return value was not used, and function body
has die() in case of errors in allocation.

Change-Id: I89b0e9c927d395ac6d27201e0b3a8658e9585187
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/27261
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Garrett Kirkendall <garrett.kirkendall@amd.corp-partner.google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2018-07-02 07:29:22 +00:00
Kyösti Mälkki 108fb8a37e soc/amd/common: Fix agesawrapper CreateStruct calls
When AllocationMethod == ByHost, buffer has to be
provided by caller.

Improve code symmetry, the named parameter is now
always pointer to the struct.

Change-Id: I2085f7d5d63ef96f4bd9d5194af099634c402820
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/27112
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Garrett Kirkendall <garrett.kirkendall@amd.corp-partner.google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2018-07-02 07:28:04 +00:00
Lijian Zhao 58f68e80ec mainboard/google/nocturne: Enable IPU3
Enable Image Processing Unit and CIO2 device that constitute IPU3.

BUG=None
TEST=Build and boot up into Nocturne platform and check with lspci.

Change-Id: Ic2edf5ec7bde5c55ce1b13cf7b680094a9fffc6a
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-on: https://review.coreboot.org/27124
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-07-02 07:27:31 +00:00
Lijian Zhao e78af97349 mainboard/google/nocturne: Set camera power sequence
To make image sensor working, the intended power sequence need to
applied.

BUG=NONE
TEST=NONE

Change-Id: I4833c0e303174b297c1d193495e08e55d294a717
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Signed-off-by: Rajmohan Mani <rajmohan.mani@intel.com>
Signed-off-by: Tomasz Figa <tfiga@chromium.org>
Reviewed-on: https://review.coreboot.org/27094
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2018-07-02 07:27:21 +00:00