Commit Graph

21835 Commits

Author SHA1 Message Date
Patrick Rudolph b794a69ce9 nb/intel/sandybridge/raminit: Add Kconfig option for fuses
Add a new Kconfig option to ignore memory fuses that limit the
maximum DRAM frequency to be used. The option is disabled by
default and should only enabled by experienced users as it
might decrease system stability or prevent a successful RAM
training.

Remove conflicting devicetree settings.

Change-Id: I35dd78a02bcaafce8ba522d253c795d7835bacae
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20907
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Nicola Corna <nicola@corna.info>
2017-08-10 16:09:01 +00:00
Patrick Rudolph db27e3384a mb/lenovo/t*00/romstage: Switch to new hybrid driver
Get rid of old hybrid graphics driver and use the new one.

1. Disable IGD and PEG in early romstage.
 The PEG port will get disabled on devices that do not have a
 discrete GPU. The power savings are around ~1Watt.

 The disabled IGD does no longer waste GFX stolen memory.

2. Get rid of PCI driver
 The Nvidia GPU can be handled by the generic PCI driver and allows
 to use the ACPI _ROM generator for Switchable graphics.

3. Settings are stored in devicetree.
 One driver for all Lenovo hybrid graphics capable devices.

4. Add support for Thinker1 GPU power handling.
 Only boards that do use reference design 2012 are known to be
 supported. Needs test on boards that do you use reference design 2013.
 Should reduce idle power consumption when using IGD by ~5Watt.

Tested on Lenovo T430 without DGPU. PEG port is disabled.
Needs test on all devices.

Change-Id: Ibf18b75e8afe2568de8498b39a608dac8db3ba73
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20794
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-10 16:06:26 +00:00
Patrick Rudolph 24680d0902 mb/lenovo/t400: Switch to new hybrid graphics driver
Use new hybrid graphics driver to get device state.
Move remaining code to romstage.c.

Tested on Lenovo T500:
* Linux 4.11.4 on Fedora 25
* Integrated (using NGI)
* Discrete (using VGA OpROM)
* Switchable (using NGI and VGA OpROM), tested with DRI_PRIME

No regressions found.

Change-Id: Iad2eccaab19c71f11308853ba9326d8186e67c93
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20793
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-10 16:06:19 +00:00
Patrick Rudolph d7dcc44eb9 drvs/lenovo/hybrid_graphics: Add new hybrid graphics driver
Introduce a chip_driver that uses devicetree instead of Kconfig.

The new driver has the following advantages:

* No more wasted IGD GFX stolen memory
* Can be used by T500 series
* Is even run on devices that do not have a dGPU installed
* Can disable unused PEG port on devices without dGPU (and save power)
* Use devicetree instead of Kconfig options
* Support for multiple hybrid GPIO active levels
* Support for backlight control GPIO
* Support for _ROM on Optimus capable devices

The driver is split into romstage part and ramstage part.

Every mainboard has to call the driver in romstage to get the requested
GPU state. The mainboard code then has to toggle GPU power or disable
the IGD or PEG port.

The ramstage part does handle the hygrid graphics GPIO, including
optional backlight mux GPIO. Every GPIO can have it's own active level,
as defined in devicetree. Devices are no longer disabled in ramstage.

The existing hybrid graphics driver does the same configuration and
should not interfere with this commit until it has been removed.

Change-Id: Ie467f9a18b35ab3b8a523dbf51c5575db5b374a5
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20792
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-10 16:05:56 +00:00
Arthur Heymans 0c67a66d23 sb/intel/i82801jx: Remove dead code
Setting up default BARs and DMI init code is done in northbridge
code.

Change-Id: I6cfa3018ca7f5ef351415c4ec6e178ade353f7a7
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/20906
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2017-08-10 16:00:59 +00:00
Arthur Heymans 2a4aadab70 mb/intel/dg43gt: Add mainboard
This mainboard features is an G43 northbridge, ICH10 southbridge and
Winbond W83627dhg SuperI/O. This board is impossible to flash
internally with vendor bios (BIOS region is WP and other regions like
IFD and ME are read only and inaccessible respectively). Due to either
ICH10 or board layout it is also impossible to do ISP, which requires
desoldering flash chip. To make hacking more easy there is an empty
SPI header next to spi flash pads which can be hooked up to a SPI
flash.

What works:
* 2 DDR2 dimms per channel (tested with 1+2G in CH0 and 2+2G in CH1);
* SATA with AHCI
* Integrated GPU with option rom (extracted from a Gigabyte vendor
  bios)
* VGA (on DVI) with NGI if patched to use DVI gmbus port for output
* PCI
* Reboot and S3 resume
* Descriptor mode with ME disable straps and ME region absent (no
  working gbe in this configuration though)
* USB.

What does not work:
* GBE (probably requires working ME);
* Analog on DVI port out is shaking, which is not the case with vendor
  BIOS (setting clockgen on smbus 0x69 like vendor fixes it).
* Booting with ME enabled (needs raminit patches for that)

Not tested:
* Sound;
* All the rest.

Not coreboot related problems:
* Flashing this board with vendor bios is a PITA and requires
  desoldering flash chip;
* In situ programming is not possible.

TESTED with SeaBIOS and Linux 4.10.8

Change-Id: If27280feb7cbf0a88f19fe6a63b1f6dbcf9b60f4
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19256
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-08-10 16:00:55 +00:00
Barnali Sarkar cc22b73c21 soc/intel/common/block: Add CNL, APL and GLK CPU device IDs
Add Cannon lake, Apollo Lake and GLK CPU device IDs in
common Mp Init code.

BUG=none
BRANCH=none
TEST=Build and boot reef

Change-Id: I22694ced0cf900a55a28d1ecaa177cab2ea9a90c
Signed-off-by: Barnali Sarkar <barnali.sarkar@intel.com>
Reviewed-on: https://review.coreboot.org/20896
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-10 15:59:03 +00:00
Hannah Williams 58810c7af5 soc/intel/apollolake: Add file path check
Fixes Coverity Issue: 1372243

Change-Id: Ib7e43b195357c723e1ae51f609a8b07ad984380a
Signed-off-by: Hannah Williams <hannah.williams@intel.com>
Reviewed-on: https://review.coreboot.org/20867
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-10 15:58:23 +00:00
Konstantin Aladyshev d0df1d7c4e SMBIOS: Correct length calculation for empty string table
If all strings in SMBIOS table are empty, smbios_string_table_len
function should return 2, cause every table must end with "\0\0".

Also replace "eos" field type in smbios structures
from char to u8.

Change-Id: Ia3178b0030aa71e1ff11a3fd3d102942f0027eb1
Signed-off-by: Konstantin Aladyshev <aladyshev22@gmail.com>
Reviewed-on: https://review.coreboot.org/20840
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-08-10 15:56:45 +00:00
Arthur Heymans 0722613563 nb/amd_fam10/mct_ddr3: Use common function to compute crc16 checksum
Change-Id: I730a8a150134cc1ef8fb3872728bb0586ac7b210
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19732
Tested-by: Raptor Engineering Automated Test Stand <noreply@raptorengineeringinc.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2017-08-10 15:55:33 +00:00
Martin Roth 4769cc3c0c payloads/external/tianocore: build UEFI payload
Update the existing tianocore payload (which didn't do any more than
adding an elf payload with a specific name) to fetch and build the
UEFI corebootPayloadPackage, using the coreboot toolchain for
compilation. Only checkout the commit when changing commit IDs or if
version is master, instead of every time it builds.

Currently working if patches are merged into the upstream edk2
repository (to be included in a follow-on patch).

Change-Id: I0bf4cedec2d6821ae2a04184ebb5cf88979ccee3
Signed-off-by: Martin Roth <martinroth@google.com>
Signed-off-by: Philipp Deppenwiese <zaolin@das-labor.org>
Signed-off-by: Evelyn Huang <evhuang@google.com>
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/15057
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-08-10 15:54:08 +00:00
Martin Roth ed0ee0a83d util/lint: Update license header lint scripts
- Check for original LinuxBIOS header from LANL
- Check for the BSD style license used in x86emu

- Add top level checks for src/cpu and src/vboot
- Add drivers dir check for aspeed, emulation, and sil
- Add mainboard dir check for digitallogic

Change-Id: Ie1ef6a39fd1d184815d22235d43780caedb2ca95
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/19122
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Chris Ching <chingcodes@google.com>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-08-10 15:53:17 +00:00
Martin Roth 7eab2889d1 lint: Update lint-stable-021-coreboot-lowercase
- Exclude .patch files from check
- Exclude 'CorebootBdsLib' path in Tianocore.

Change-Id: I82186f401d267d7594fe1cd88c818c4a7015ba91
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20905
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Evelyn Huang <evhuang@google.com>
2017-08-10 15:50:49 +00:00
Marc Jones 71c1b93924 google/kahlee: Set eMMC slot
Set AGESA SD/eMMc variable to non-removable eMMc.

BUG=b:63891719
BRANCH=none
TEST=Boot eMMC on Kahlee.

Change-Id: I76ed9cec36a9688ebe75db2077f1ece4ab750c16
Signed-off-by: Marc Jones <marcj303@gmail.com>
Reviewed-on: https://review.coreboot.org/20911
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-08-10 15:47:06 +00:00
Paul Menzel 12a3fbdb7e libpayload: Use a static copy of `font_glyph_filled()`
libpayload needs a static copy of the out of line function
`font_glyph_filled()` in every TU that needs it. So make it static
inline.

This fixes a build error by gcc (Debian 7.1.0-12) 7.1.0 from Debian
Sid/unstable. This happens with any libpayload based payload like
coreinfo, nvramcui or tint.

```
[…]
    LPCC       build/coreinfo.elf (LINK)
/src/coreboot/payloads/coreinfo/build/libpayload/bin/../lib/libpayload.a(corebootfb.libc.o): In function `corebootfb_putchar':
/src/coreboot/payloads/libpayload/drivers/video/corebootfb.c:173: undefined reference to `font_glyph_filled'
[…]
```

Change-Id: I931f0f17b33abafdc49aa755a0dad65e28820750
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/20897
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2017-08-10 12:07:13 +00:00
Brandon Breitenstein 60ce6152fd intel/common/block/smm: Update smihandler to handle gpi
Updating the common smihandler to handler gpi events which
originally were going to be left to each soc to handle. After
some more analysis the gpi handler can also be commonized.

Change-Id: I6273fe846587137938bbcffa3a92736b91982574
Signed-off-by: Brandon Breitenstein <brandon.breitenstein@intel.com>
Reviewed-on: https://review.coreboot.org/20917
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-08-09 22:45:54 +00:00
Duncan Laurie 6d5873d7f2 drivers/i2c: Add driver for rt5663 codec
This commit adds a new driver for the RT5663 codec to use instead
of the generic i2c driver.  Since the kernel needs additional
driver-specific device properties we need a BIOS driver that can
provide those properties.

The kernel driver devicetree properties for this codec are at:
linux/Documentation/devicetree/bindings/sound/rt5663.txt

This was tested by booting and verifying the generated SSDT
contains the expected device properties in _DSD.

Scope (\_SB.PCI0.I2C4)
{
    Device (RT53)
    {
        Name (_HID, "10EC5663")
        Name (_UID, Zero)
        Name (_DDN, "Realtek RT5663 Codec")
        Method (_STA, 0, NotSerialized)
        {
            Return (0x0F)
        }
        Name (_CRS, ResourceTemplate ()
        {
            I2cSerialBus (0x0013, ControllerInitiated, 0x00061A80,
                AddressingMode7Bit, "\\_SB.PCI0.I2C4",
                0x00, ResourceConsumer)
            GpioInt (Edge, ActiveBoth, Exclusive, PullDefault, 0x0000,
                "\\_SB.PCI0.GPIO", 0x00, ResourceConsumer)
                {
                    0x0051
                }
        })
        Name (_DSD, Package (0x02)
        {
            ToUUID ("daffd814-6eba-4d8c-8a91-bc9bbf4aa301")
            Package (0x05)
            {
                Package (0x02)
                {
                    "irq-gpios",
                    Package (0x04)
                    {
                        \_SB.PCI0.I2C4.RT53,
                        Zero,
                        Zero,
                        Zero
                    }
                },
                Package (0x02)
                {
                    "realtek,dc_offset_l_manual",
                    0x00FFD160
                },
                Package (0x02)
                {
                    "realtek,dc_offset_r_manual",
                    0x00FFD1C0
                },
                Package (0x02)
                {
                    "realtek,dc_offset_l_manual_mic",
                    0x00FF8A10
                },
                Package (0x02)
                {
                    "realtek,dc_offset_r_manual_mic",
                    0x00FF8AB0
                }
            }
        })
    }
}

Change-Id: I3425fcbe13c9a5987fc91086d283a86db55c0819
Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-on: https://review.coreboot.org/20904
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-08-09 22:05:46 +00:00
Aaron Durbin 46e293ddff soc/intel/common: smi handler fix comilation error
The device_t type is used in smihandler.h, but the header
is not including a header which provides that type. Fix
that by #includeing <device/device.h>

Change-Id: I89af949b088bf569d330f2ea74b1b8ae97e1ed52
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20933
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-08-09 20:46:32 +00:00
Lijian Zhao aa3d78d5e6 soc/intel/cannonlake: Add ramstage SystemAgent support
Revere memory resource within SA, also perform necessary routine for
initialization during ramstage.

Change-Id: Ibaa7334b0d94fedc87e707a136c9537e2e6f57cb
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Reviewed-on: https://review.coreboot.org/20914
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-08-09 20:06:27 +00:00
Alexander Couzens de0326b96c mb/lenovo/x1_carbon_gen1: add missing '+' in spd/Makefile
Each line of spd config overwriting the slot 0 instead
of appending it.

Change-Id: I0124aa34f1d4fcb30810fb7eef03d4828a7ac430
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
Tested-on: lenovo x1 carbon gen 1 with elpida 8GB
Fixes: e9787ff61f ("mb/lenovo/x1_carbon_gen1: Add 4GiB SPD index 2")
Reviewed-on: https://review.coreboot.org/20918
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-08-09 19:49:56 +00:00
Brandon Breitenstein 9cbf3b12f5 common/block/smm: Update SMM common code for io trap handling
Add smm common code for io trap handling. This feature is
mainly used by big core intel platforms. Commonizing io trap
handling will make bring up of big core platforms more
seamless.

Change-Id: I83bcf22107291ea181b347fac40d57d7ea138de1
Signed-off-by: Brandon Breitenstein <brandon.breitenstein@intel.com>
Reviewed-on: https://review.coreboot.org/20848
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-08-09 18:40:28 +00:00
Aaron Durbin 8304d6fcbe util/lint: provide option to skip newline check
The newline lint check takes forever as it checks every file
in the git repo -- not just the files changed. To add insult to
injury these checks are performed on every commit. Allow one to
skip this check by setting the LINT_SKIP_NEWLINE_CHECK environment
variable.

Change-Id: I1cd5c50627b73d68b0da2fcb2d9546eb874a7959
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20903
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-08-09 17:47:23 +00:00
Aaron Durbin c30d913f1f device/pci: untangle struct device and device_t
This patch uses struct device explicitly for the ramstage functions
as that's the actual type it's working on. Additionally, the
declarations for types and functions are fully exposed so that
compliation units don't have to guard certain functions from use
because it's being compiled for multiple stages.

Change-Id: I8db23ed400a59073e1e66522d020a5928f71f3a6
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20902
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2017-08-09 17:47:18 +00:00
Nico Huber e9787ff61f mb/lenovo/x1_carbon_gen1: Add 4GiB SPD index 2
Change-Id: I218fd48c8e29563ef089d60ebde7bc36ac8ab189
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/20887
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
2017-08-08 18:19:54 +00:00
Sumeet Pawnikar 86b9467c0e soc/intel: Remove ACPI notification for fan speed change
In _FSL ACPI notification 0x83 was incorrectly being sent to DPTF.
When there should be no notification on fan speed change.

Change-Id: I66efa7a7feb911a458829a54dbd0afefabd42394
Signed-off-by: Sumeet Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://review.coreboot.org/20875
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-08-08 18:19:04 +00:00
Caveh Jalali 0068a9f579 add __must_check to */compiler.h
the __must_check function attribute is pretty much straight from the
linux kernel - used to encourage callers to consume function return
values.

Change-Id: I1812d957b745d6bebe2a8d34a9c4862316aa8530
Signed-off-by: Caveh Jalali <caveh@google.com>
Reviewed-on: https://review.coreboot.org/20881
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-08 18:18:03 +00:00
Shaunak Saha 93cdc8bbc2 soc/intel/apollolake: Use common PMC for apollolake
With this patch apollolake uses the common PMC util
code.No regression observed on a APL platform.

Change-Id: I322a25a8b608d7fe98bec626c6696e723357a9d2
Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Reviewed-on: https://review.coreboot.org/19375
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-08 17:15:43 +00:00
Shaunak Saha 83e9823aec soc/intel/common: Use common PMC for SMM
Change-Id: I067b99415e882a24970140280d3b223eb1301e2d
Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Reviewed-on: https://review.coreboot.org/20307
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: Aaron Durbin <adurbin@chromium.org>
2017-08-08 17:15:33 +00:00
Shaunak Saha 9dffbdd9c5 soc/intel/common/block: Add Intel PMC support
PMC util code is very similar accross different intel SOC's.
This patch is an effort to move those code in common place
so that it can be shared accross different intel platforms
instead of duplicating for each platform. This patch adds
pmclib.c file which contains the pmc utility functions
common accross SOC's. The config for common PMC is
SOC_INTEL_COMMON_BLOCK_PMC which can be defined in SOC's
Kconfig file in order to use the common PMC util code.

Change-Id: Ic3d96fc23a98c30e8ea0969a7be09d217eeaa889
Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Reviewed-on: https://review.coreboot.org/19349
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-08 16:38:50 +00:00
Naresh G Solanki 2991f3c48f soc/intel/skylake: Log wakes caused by PME on internal bus and PCIE RP
Internal PME is detected when bit PME_B0_STS is set. Following devices
causes internal PME.
- Integrated LAN
- HD Audio/Audio DSP
- SATA
- XHCI ('USB3')
- ME Maskable Host Wake

In SPT, PCIEXPWAK_STS bit isn't getting set due to known bug.
So scan all PCIe RP for PME status bit & update event log accordingly.

BUG=b:36992859
TEST=Build for Soraka, Verify resume due to PME on root port is logged
in elog.

Change-Id: I879a7c332e62ab598942b29d31bad84619b35ea7
Signed-off-by: Naresh G Solanki <naresh.solanki@intel.com>
Reviewed-on: https://review.coreboot.org/20532
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-08 15:25:27 +00:00
Werner Zeh 85227a27fb rx6110sa: Make sure that VLF bit will be cleared
Ensure that the VLF bit will be cleared after a power loss event even if
the stopwatch has expired before the code to clear the bit is reached.

Change-Id: Ib2cfdabf4cd4df834395d6a102c6ae70568e71db
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/20893
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
2017-08-08 12:55:47 +00:00
Patrick Rudolph 189909ea76 mb/lenovo/l520/Kconfig: Remove hybrid graphics driver support
The schematics isn't available for the board, but other L*00 series boards
seem to use a different, compared to T*00 series, GPIO layout.

As it has never been tested, remove the broken driver.

Change-Id: I4bfa02fdbc5da5b556010c2f300faaf6dc845b80
Signed-off-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-on: https://review.coreboot.org/20798
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-08 12:24:47 +00:00
Arthur Heymans b0ac01b4c2 mb/intel/d510mo: Configure clockgen
Configuring the clockgen like vendor bios fixes the issue where the
display wobbles from left to right on the analog VGA output.

Note: This seems to be common issue/requirement on Intel devices from
that generation (also happens on dg43gt).

TESTED on Intel D510MO.

Change-Id: I08449f0b8b90a1781e6dec91140bf219ea07aaf9
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19595
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-08-08 10:11:55 +00:00
Stefan Reinauer 2f0d4efa20 buildgcc: Fix libelf 64bit detection
Taken from crosstool-ng and and re-applied to 0.8.13

Change-Id: I43ad23b66ec10915cc68be8c395825f4f9161725
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20800
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
2017-08-07 21:47:23 +00:00
Stefan Reinauer dcce8bef0e buildgcc: Update to gdb 8.0 and expat 2.2.1
Among other improvements, the new GDB has a new GDB/CLI
command to erase flash memory and a few Python scripting
enhancements.

Change-Id: Ie3852d5bc74617d3e05509e19bbd1caa281da3e0
Signed-off-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-on: https://review.coreboot.org/20799
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Martin Roth <martinroth@google.com>
2017-08-07 21:47:17 +00:00
Hannah Williams 2cfdde7346 soc/intel/braswell: Fix SPI write after FLOCKDN is set
The SPI controller initialization in finalize_chipset was failing
because FSP was setting FLOCKDN before finalize_chipset was called.
Hence move finalize_chipset to get called from BS_POST_DEVICE so that it is
called before FSP notify function-Ready To Boot state.

TEST: run flashrom with -VVV and observe supported opcodes and SPI
flash chip are reported correctly, and write/erase operations succeeed.

Original-Change-Id: I3c0297f3f2258cf77cf00db367f11ff4d1d9dc77
Original-Signed-off-by: Hannah Williams <hannah.williams@intel.com>
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>

Change-Id: I690fb4bf9e78bb58811c704179ba8b8f25ce95cc
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/20891
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-07 20:03:02 +00:00
Lijian Zhao e88fa490a5 soc/intel/cannonlake: Add memory map support
Calculate the top of ram from output of Fsp reserved memory range.

Change-Id: I0dcc8f737c5811c9010cc4a20ea0126ab3f90f14
Signed-off-by: Lijian Zhao <lijian.zhao@intel.com>
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://review.coreboot.org/20533
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2017-08-07 17:53:13 +00:00
Arthur Heymans 8da2286885 nb/intel/*/gma.c: Use macros for GMBUS numbers
Change-Id: I885b6bd9f5be6b4e3696a530016123a3e81c4b10
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/20889
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2017-08-07 14:34:31 +00:00
Kyösti Mälkki 6aea6f7a6b usbdebug: Force EHCI to D0 state
When resuming from ACPI S3 suspend, EHCI controller
may be in D3 power-management state. Bring it to D0
early so it is functional for console.

NOTE: D3hot->D0 transition was observed to reset
previous programming of PCI_COMMAND register.

Change-Id: Id177ce61926beb057fe67ba42a306d8e565d2657
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20827
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>
2017-08-07 12:36:35 +00:00
Kyösti Mälkki 6683e409d3 usbdebug: Refactor early enable
Always sanity check for EHCI class device and move
PCI function power enablement up.

Change-Id: I1eebe813fbb420738af2d572178213fc660f392a
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20826
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2017-08-07 12:35:42 +00:00
Kyösti Mälkki d1a0c57708 usbdebug: Consolidate EHCI_BAR setup
There is assumption of static EHCI_BAR_INDEX, try to
clean it up by bringing BAR programming at one spot.

Change-Id: Ie16090536ac5470c24720a54813015250ae2d0dd
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20825
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-08-07 12:35:33 +00:00
Kyösti Mälkki ab1d2ac626 usbdebug: Remove redundant setup
Taking ownership is handled with DBGP_OWNER within
usbdebug driver code.

Change-Id: Ia5da10d385cda1b4968f812967ea8a54d7e3c974
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/20824
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Guckian <david.guckian@intel.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2017-08-07 12:34:54 +00:00
Arthur Heymans d4ce1ded01 sb/intel/i82801jx: Add romstage smbus and i2c block operations
Change-Id: I76bf1ed392d3d18059792106fc482d2259a3f084
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/20880
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-08-07 06:59:09 +00:00
Arthur Heymans ad29ec351e sb/intel/i82801gx: Implement smbus block r/w functions
Uses common hardware access functions to make smbus block read and
write available in romstage.

Those are needed to reconfigure the clockgen on smbus offset 0x69,
which is sometimes needed for things like CPU C-states or analog
display out to work properly.

Change-Id: I0a06178d2474ce65972de157cb437b42f3354da0
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19594
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Damien Zammit <damien@zamaudio.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-08-06 23:26:37 +00:00
Arthur Heymans 16fe79048f sb/intel/*: Use common SMBus functions
All Intel southbridges implement the same SMBus functions.
This patch replaces all these similar and mostly identical
implementations with a common file.

This also makes i2c block read available to all those southbridges.
If the northbridge has to read a lot of SPD bytes sequentially, using
this function can reduce the time being spent to read SPD five-fold.

Change-Id: I93bb186e04e8c32dff04fc1abe4b5ecbc4c9c962
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/19258
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
2017-08-06 23:26:15 +00:00
Arthur Heymans 12d010306b sio/smsc/kbc1100: Fix some style issues
This fixes indentation and whitespaces before opening parentheses.

Change-Id: I8940f712c0161419ee0c383b7bc9eb581967366e
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/20852
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>
2017-08-06 23:21:27 +00:00
Lin Huang 7c5eb073e7 rockchip: gpio: Correct rk3399 pmu gpio pull setting
Starting with RK3399, PMUGPIO pull registers use the same write mask
format as normal GRF registers, so they need to use RK_CLRSETBITS()
rather than clrsetbits_le32().

BRANCH=None
BUG=None
TEST=boot from scarlet

Change-Id: Ibe391273d58ab35df993e149187d67497fcf2acc
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-on: https://review.coreboot.org/20871
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-08-06 23:21:02 +00:00
Lin Huang 589474fec7 rockchip: gpio: add gpio_pull argument in gpio_input_irq() function
some gpio irq need to set input pull initialization status
to guarantee to get the right irq trigger. let's add this argument
in gpio_input_irq() function

BRANCH=None
BUG=None
TEST=boot from bob

Change-Id: I9b8e6497f07146dafdb447a6ea10d039a2a2fa33
Signed-off-by: Lin Huang <hl@rock-chips.com>
Reviewed-on: https://review.coreboot.org/20866
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2017-08-06 23:20:49 +00:00
Martin Roth 5cb2263004 util/scripts: Add script to update submodules
Change-Id: I4e238b539f06ce4031e0e99d26943d226a3c2556
Signed-off-by: Martin Roth <martinroth@google.com>
Reviewed-on: https://review.coreboot.org/20703
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2017-08-04 15:33:03 +00:00
Furquan Shaikh f3bf7d0fb7 soc/intel/common: Add lpss.c to ramstage
BUG=b:64030366

Change-Id: I7e05d65ebb3b6499451242521ffc61fc4c952830
Signed-off-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/20850
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2017-08-04 15:29:40 +00:00