Commit Graph

34820 Commits

Author SHA1 Message Date
Peichao Wang 712311f56e soc/amd/common/block/gpio: add API for gpio override table
This function adds support for gpio_configure_pads_with_override
which:
1. Takes as input two GPIO tables -- base config table and override
config table
2. Configures each pad in base config by first checking if there is a
config available for the pad in override config table. If yes, then
uses the one from override config table. Else, uses the base config to
configure the pad.

BUG=b:153456574
TEST=Build and boot dalboz
BRANCH=none

Signed-off-by: peichao.wang <peichao.wang@bitland.corp-partner.google.com>
Change-Id: I07bfe82827d1f7aea9fcc96574d6deab9e91d503
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2153423
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Commit-Queue: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41576
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-21 22:34:06 +00:00
Rob Barnes 30ce0f383f util/amdfwtool: Fix MAX_PSP_ENTRIES value
Had to increase MAX_PSP_ENTRIES to accommodate the 16 APCBs we have
the ability to add.

BUG=b:150862063
TEST=Boot Trembyle
BRANCH=None

Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: I64eccfa28839768788f53327caf187a564842162
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2090323
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41580
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-21 22:30:27 +00:00
Raul E Rangel 6de79b9a1d soc/amd/picasso/chip.c: Generate ACPI nodes for PCI Bridge A and B
This node is required so we can add child ACPI nodes.

BUG=b:147042464
TEST=Boot trembyle and confirm Bus A has a firmware node
$ cat /sys/bus/pci/devices/0000\:00\:08.1/firmware_node/path
\_SB_.PCI0.PBRA

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I18144a69ed28a913bc9a2523d69edf84a1402e7e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41546
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2020-05-21 22:28:26 +00:00
Furquan Shaikh 5df9a04640 soc/amd/picasso/pci_devs: Update pci_devs.h with correct values
This is a squash of the following commits. The original values were
wrong, and had confusing naming.

soc/amd/picasso: Get rid of *_DEVID from pci_devs.h

Signed-off-by: Furquan Shaikh <furquan@google.com>
Original-Change-Id: I203449499840bf0a6df8bd879fb7d2e75a16b284
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2153714

src/amd/picasso: Update PCI bridge devices

Orignal-Change-Id: I1fa9d52ce113eacdc5c9ba31ab46b6428a7d6ca9
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>

Zork: Reorganizing ACPI and adding PCI bridge configs

Signed-off-by: Pranay Shoroff <pshoroff@google.com>
Original-Change-Id: I1e2095567525f302dfd0bce8e39001250523180b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2063536

soc/amd/picasso: Fix soc_acpi_name() to use devfn instead of devid

Signed-off-by: Furquan Shaikh <furquan@google.com>
Original-Change-Id: I2486e7e0059e0528f53d5a158c9328636563fe93
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2153712

BUG=b:147042464
TEST=Build trembyle and boot to OS

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I91bf7f9edcddf03027f8fdcaadf4e290ece10df5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41542
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2020-05-21 22:28:04 +00:00
Yu-Hsuan Hsu 4732f23a1f ec/google/chromeec/acpi: Add CROS EC CODEC device
This is currently used by trembyle. Add it in a common location so other
boards can use it.

BUG=b:147200751
BRANCH=none
TEST=Able to get ec codec on trembyle

Change-Id: Ie21cd813b0e3129f1c61d2de199532b25d3c70fa
Signed-off-by: Yu-Hsuan Hsu <yuhsuan@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2000271
Reviewed-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-by: Martin Roth <martinroth@chromium.org>
Commit-Queue: Martin Roth <martinroth@chromium.org>
Tested-by: Martin Roth <martinroth@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41575
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-21 21:33:20 +00:00
Raul E Rangel 77f6627a19 ec/google/chromeec/i2c_tunnel: Fix missing const
This was missed in the refactor.

BUG=b:157140753
TEST=Built trembyle

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I150e0b8a806042ef8001805eaefbce71dc1be0e6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41574
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-21 21:30:26 +00:00
Angel Pons 3abd206d4f nb/intel/sandybridge: Use the new IOSAV struct API
Now that we have created the IOSAV API, we can put it to good use.
Drop all the helper macros and replace them with struct constructs.

Tested with BUILD_TIMELESS=1, ASUS P8Z77-V LX2 remains unchanged.

Change-Id: Ib366e364df11c9bb240cdfbce418540ec715c634
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41003
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-21 18:28:54 +00:00
Angel Pons 38d901e88d nb/intel/sandybridge: Drop unused parameters
We now use a static variable to handle the sequence length.

Tested on Asus P8Z77-V LX2, still boots.

Change-Id: Id3115c14336ea128264bd3945a99c52b9796d115
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40984
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-05-21 18:28:35 +00:00
Angel Pons d5b780c5b1 nb/intel/sandybridge: Redefine IOSAV_SUBSEQUENCE
Instead of directly writing values to the IOSAV registers, use a struct
and some helper functions to provide a cleaner interface for the IOSAV.
Having IOSAV_SUBSEQUENCE refer to a static function is weird, but we
will remove this macro in a follow-up that does not change the binary.

Tested on Asus P8Z77-V LX2, still boots.

Change-Id: I73f13c18a739c5586a7415966f9017c2335fdfd1
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40980
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-05-21 18:28:18 +00:00
Angel Pons 2be5900087 nb/intel/sandybridge: Truncate IOSAV subseq gaps
We set bit 15 of IOSAV_n_SUBSEQ_CTRL three times, but it is reserved.
Since this bitfield is five bits wide, manually truncate the values so
that bit 15 does not get set.

Tested on Asus P8Z77-V LX2, still boots.

Change-Id: Ib61b026b016b0d22e164f8817158ec5093f6bb9e
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40981
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-05-21 18:28:01 +00:00
Angel Pons e7afcd5391 nb/intel/sandybridge: Replace macros with functions
Turn `iosav_run_queue` and `iosav_run_once` into functions. Inlining
them does not have any effect, as the resulting binary is identical.

Tested on Asus P8Z77-V LX2, still boots.

Change-Id: I7844814eeedad9b1d24f833a77c90902fa926bfe
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40983
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2020-05-21 18:27:48 +00:00
Angel Pons ad70400519 nb/intel/sandybridge: Refactor IOSAV_RUN_ONCE
Turn it into a macro that looks like a function, and add another, more
generic `iosav_run_queue` that covers all current use-cases. They will
be replaced with functions in a follow-up to preserve reproducibility.

Tested with BUILD_TIMELESS=1, ASUS P8Z77-V LX2 remains unchanged.

Change-Id: I07b260b5fb111c1408ff75316dc0735a9e642ac9
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40982
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
2020-05-21 18:27:34 +00:00
Angel Pons b631d07494 nb/intel/sandybridge: Refactor IOSAV_SUBSEQUENCE again
To replace the register writes with assignments to struct fields, we
would need to have the values as parameters of a single macro. So,
split the raw value of `IOSAV_n_SP_CMD_CTRL_ch` in two parts. Note that
the single command that sets bit 17 is likely wrong, but it will be
fixed after refactoring. For now, we'll treat it as part of `ranksel`.

Move the parameters of `ADDR_UPDATE` into the top-level IOSAV macro.
Hopefully, this will be enough to replace the underlying implementation.

Line length limits are not for review. Breaking the lines unnecessarily
complicates search and replace operations, and wil be taken care of in
subsequent commits.

Tested with BUILD_TIMELESS=1, ASUS P8Z77-V LX2 remains unchanged.

Change-Id: I404edbd5d90ddc2a6993f39f552480d1ef24e153
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40978
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-05-21 18:27:13 +00:00
Raul E Rangel 7ed04e460d vc/amd/fsp/picasso: Rename the fsp_ddi and fsp_pcie descriptors
This change was missed when I ported over fsp_params.c.

BUG=b:157140753
TEST=Boot trembyle to OS

Fixes: 89e51e6178 ("soc/amd/picasso: Allow mainboard to provide pci ddi descriptors")
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Icdb6aebe5a3be7174170bdf37a1f379f02dcc5a5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41579
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2020-05-21 14:42:51 +00:00
Marshall Dawson b768723c72 soc/amd/picasso: Add APOB NV back for non-S3
New information indicates the PSP expects the APOB NV region
populated for all types of boot, and this is not a feature only
used for S3.  Switch over to using the MRC_CACHE flash region.

Remove the Kconfig symbols for the APOB_NV base and size.  Override
the MRC_CACHE_SETTINGS_CACHE_SIZE to ensure the default maintains the
minimum required size.  Use the generated (or mainboard-specified)
fmap.fmd file as an input for amdfwtool and properly match the
flash region.

Change the original naming for the APOB destination, which matched the
PSP spec's field name, to PSP_APOB_DESTINATION.  This should be more
intuitive for a source code reader.  The APOB address is the location
in DRAM where the PSP puts its output block.

BUG=b:147042464, b:153675914
TEST=Boot trembyle

Original-Change-Id: Ia5ba8646deec2bd282df930f471738723063eef8
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2080375
Original-Change-Id: I972d66f1817f86ff0b689f011c0c44c3fe7c8ef7
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/coreboot/+/2053312
Signed-off-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Change-Id: I4550766ece462b65a6bfe6f1b747343e08e53fe5
Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38703
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-05-21 14:41:03 +00:00
Felix Held 368873ced3 soc/amd/picasso/soc_util: change return type of soc_is_*
All callers just check for zero/non-zero.

Change-Id: I795763ce882d879d12c97b71e7a0b35423378c36
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41559
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2020-05-21 14:39:46 +00:00
Felix Held 5640cfdc92 soc/amd/picasso/include/soc_util: add include guards
Change-Id: I2de16eaa88baace28afa30345b7762353a48ab87
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41558
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-21 14:39:16 +00:00
Felix Held 5b01f2bf0c soc/amd/picasso/southbridge: add missing soc/i2c.h include
soc/i2c.h gets included indirectly via chip.h and removing the chip.h
in 73716d0e92 broke the build. chip.h got
added back, but including soc/i2c.h directly fixes the underlying issue.

Change-Id: Ic84f7b6b4447b7c335a51dc604daf8924851e555
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41557
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-05-21 14:38:34 +00:00
Duncan Laurie 10f55a2c9d soc/intel/tigerlake: Make audio devices scan the bus
The audio devices are currently set to enable static devices at their
own level, but in order to supported nested SoundWire devices these
drivers must instead use scan_static_bus.  Without this change the
device tree code will not look at children of these devices.

After this change the audio device can have nested devices:

device pci 1f.3 on
  chip drivers/intel/soundwire
    device generic 0 on end
  end
end

BUG=b:146482091

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: Ibb716fbd9ffdc45f2c4bbe5e81f420ec2b13483c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40886
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-05-21 08:04:27 +00:00
Duncan Laurie 08a942fd32 acpi/device: Add a helper function to write SoundWire _ADR
This change adds a help function to write a SoundWire ACPI address
object that conforms to the SoundWire DisCo Specification Version 1.0

The SoundWire address structure is defined in include/device/soundwire.h
and provides the properties that are used to form the _ADR object.

BUG=b:146482091

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: I6efbf52ce20b53f96d69efe2bf004b98dbe06552
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40885
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-21 08:04:12 +00:00
Duncan Laurie e8189b7426 acpi/soundwire: Add functions to generate SoundWire properties
This change uses the previously added SoundWire definitions to provide
functions that generate ACPI Device Properties for SoundWire
controllers and codecs.

A SoundWire controller driver should populate
`struct soundwire_controller` and pass it to
soundwire_gen_controller().  This will add all of the defined master
links provided by the controller.

A SoundWire codec driver should populate the necessary members in
struct soundwire_codec and pass it to soundwire_gen_codec().
Several properties are optional and depend on whether the codec itself
supports certain features and behaviors.

The goal of this interface is to handle all of the properties defined
in the SoundWire Discovery and Configuration Specification Version
1.0 so that controller and codec drivers do not need to all have code
for writing standard properties.

Both of these functions also provide a callback method for adding
custom properties that are not defined by the SoundWire DisCo
Specification.  These properties may be required by OS drivers but are
outside of the scope of the SoundWire specification itself.

This code is tested with controller, codec, and mainboard
implementations in subsequent commits.

BUG=b:146482091

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: Ib185eaacf3c4914087497ed65479a772c155502b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40884
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-05-21 08:04:02 +00:00
Bill XIE ebf1932f23 mb/lenovo/x230: Turn X230 into a variant
Other variants would be added later.

Change-Id: Ic6af14f0aa7a6f7378048f3c38d5713c18950366
Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41509
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-21 03:05:38 +00:00
Bill XIE cfd78b1500 Revert "mainboard/lenovo/x230: Add ThinkPad x230s as a variant"
This reverts commit 6b95507ec5, in order
to recommit and review it again.

Change-Id: Id4ddf99200f77016a48d02a8421d080cea492aae
Signed-off-by: Bill XIE <persmule@hardenedlinux.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41504
Reviewed-by: Alexander Couzens <lynxis@fe80.eu>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-21 02:50:08 +00:00
Julius Werner 238b10a5f7 google/trogdor: Fix ram_code and sku_id strappings
I'm not quite sure what happened when we first added the code for
Trogdor strappings but something clearly seems to be wrong. First of
all, on newer schematics the RAM_ID_1 pin is actually pin 19, not pin
91. It only used to be 91 on rev0. Whether that was an intentional
change or someone just swapped the digits on accident at some point,
we're not quite sure anymore, but it seems to be 19 going forward so
that is what we should be programming. (ram_code wasn't used for
anything on Trogdor rev0 so we don't care about adding
backwards-compatibility for that.)

The sku_id pins are also somewhat out of whack: first of all, a new
SKU_ID_2 pin was added for rev1 that wasn't there on rev0. Second,
SKU_ID_0 is not GPIO_114. In fact, it has never been GPIO_114. I have no
idea how that number got there. Anyway, fix it. (Like with the ram_code,
SKU IDs were also not used for rev0 so we won't make this
backwards-compatible.)

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: Ia14ec74ec2f16ce2661f89d0d597a5477297ab69
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41545
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Philip Chen <philipchen@google.com>
2020-05-20 23:44:59 +00:00
Matt DeVillier f572d5ed0b mb/purism/librem_skl: select GFX_GMA_IGNORE_PRESENCE_STRAPS
Some Librem 13v4's don't have the presence straps connected,
leading libgfxinit to fail to init the internal display.
Select GFX_GMA_IGNORE_PRESENCE_STRAPS since all SKL/KBL Librems
have an internal display so there's no adverse effect.

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
Change-Id: Ib9d281b7d495c4f9a5c6fc5fdb8042b0fcbda745
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41417
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-20 23:38:44 +00:00
Matt DeVillier dd467bfc14 drivers/intel/gma: Add override for presence straps
A handful of boards do not properly implement the presence straps,
leading libgfxinit to fail to detect an attached display. Add an
override, defaulting to N, which can be set for affected boards.

Add a section to the documentation detailing the option and its usage.

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
Change-Id: I43c61d67147878887658b23d90fb1c0b91e7a2af
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41416
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2020-05-20 23:38:05 +00:00
Matt DeVillier bba5bfc7d2 3rdparty/libgfxinit: Update submodule pointer
Update libgfxinit submodule pointer to pull in handling for
presence straps bypass and some minor cleanup.

Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
Change-Id: Id4a903383f32f352aa3595bd72bc5f6f0777171c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41515
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-05-20 23:37:31 +00:00
Nico Huber 9bafc49c5a drivers/intel/gma: License libgfxinit glue code under GPL v2
Change-Id: I7a78e16512369cbaada4399dbb855ade358ff046
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41521
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-by: Jacob Garber <jgarber1@ualberta.ca>
2020-05-20 23:35:32 +00:00
Jeff Chase 8d002f515d mb/google/endeavour: chrontel: fix interrupt and compat string
The devicetree declares the chrontel interrupt as GpioInt so the GPIO
needs to be configured as such instead of routing directly to APIC.

Also update the compatible string to conform to kernel standards.

BUG=b:146576073
TEST=install ch7322 driver; send commands using cec-ctl and verify
that the interrupt handler is called.

Change-Id: I737d951db135c53deb0f3cb956f0d0f275082251
Signed-off-by: Jeff Chase <jnchase@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41185
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2020-05-20 17:19:06 +00:00
Sumeet R Pawnikar 7d6bc60db9 tigerlake: enable DPTF functionality for volteer
Enable DPTF functionality for volteer platform

BRANCH=None
BUG=b:149722146
TEST=Built and tested on volteer system

Change-Id: I385fb409ccd291d97369295ff99f21c9430880f9
Signed-off-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41427
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-20 16:36:28 +00:00
Duncan Laurie 32585de39e soc/intel/tigerlake: Add TCSS devices to soc_acpi_name()
Add ACPI device names for TCSS devices which were not already defined
which match those declared in the DSDT at acpi/tcss.asl.

Change-Id: I6a79da7dd78c73345986c12d6ffe467cd4322e05
Signed-off-by: Duncan Laurie <dlaurie@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41520
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-05-20 16:08:27 +00:00
Huayang Duan 062646670f soc/mediatek/mt8183: Set CA and DQ vref range to correct value
The CA vref should alway select range[1]. But in fast calibration flow,
we missed the range selection and caused the CA vref to use the range[0] value.

The DQ vref should select correct range that corresponds to current frequency,
that is for 1600Mbps, 2400Mbps to select range[1], for 3200Mbps and 3600Mbps
to select range[0].

Refer to the 'JESD209-4 - Low Power Double Data Rate 4X(LPDDR4X).pdf',
used MR12 to set Vref(CA) levels, used MR14 to set VREF(DQ) levels.
MR12 range[0] values from 15.0% to 44.9%, range[1] values from 32.9% to 62.9%,
MR14 range[0] and range[1] values same as MR12.

BUG=b:153614919
BRANCH=kukui
TEST=Boots correctly on Kukui

Change-Id: Ie7680b1bf0c29c946d18e3b27626ce6f31c4216b
Signed-off-by: Huayang Duan <huayang.duan@mediatek.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40525
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>
2020-05-20 09:50:45 +00:00
Patrick Rudolph efaf1b32ba drivers/emulation/qemu/bochs: Rewrite driver
Support MMIO mapped BOCHS interface supported since qemu 3.0.

This allows to use multiple virtual GPUs by specifying:
qemu -device bochs-display -device bochs-display ...

Tested on qemu. std, qxl, vmware and multiple bochs displays are working fine.

Change-Id: Ib0eba4815942625ce4859946efccca500301bb65
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41406
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Himanshu Sahdev <sahdev.himan@gmail.com>
Reviewed-by: Gerd Hoffmann <kraxel@redhat.com>
2020-05-20 09:50:29 +00:00
Tim Wawrzynczak 2c26108208 soc/intel/tigerlake: Move pmc_soc_set_afterg3_en to pmutil
pmc.c was included in the SMM object, but only needed the one function,
pmc_soc_set_afterg3_en. pmutil.c was already doing power management-
related functionality, and was included in SMM, so moving
pmc_soc_set_afterg3_en to pmutil.c allows pmc.c to be removed from the
SMM build.

Change-Id: I87f65fd10d35f1f75516e804501d5319b81a0383
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41407
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-20 09:49:26 +00:00
Tim Wawrzynczak 6d20d0c140 soc/intel/tigerlake: Move PMC PCI resources under PMC device
Historically in coreboot, the PMC's fixed PCI resources were described
by the System Agent (the MMIO resource), and eSPI/LPC (the I/O
resource). This patch moves both of those to a new Intel SoC-specific
function, soc_pmc_read_resources(). On TGL, this new function takes care
of providing the MMIO and I/O resources for the PMC.

BUG=b:156388055
TEST=verified on volteer that the resource allocator is aware of and
does not touch these two resources:
("PCI: 00:1f.2 resource base fe000000 size 10000 align 0 gran 0 limit 0
	flags f0000200 index 0
  PCI: 00:1f.2 resource base 1800 size 100 align 0 gran 0 limit 18ff
	flags c0000100 index 1")

Also verify that the MEM resource is described in the coreboot table:
("BIOS-e820: [mem 0x00000000fe000000-0x00000000fe00ffff] reserved")

Verified the memory range is also untouchable from Linux:
("system 00:00: [mem 0xfe000000-0xffffffff] could not be reserved")

Change-Id: Ia7c6ae849aefaf549fb682416a87320907fb3fe3
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41385
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-20 09:49:00 +00:00
Tim Wawrzynczak dbcf7b1621 device/pci_device: Add notion of "hidden" PCI devices
On some SoCs, there are PCI devices that may get hidden from PCI
enumeration by platform firmware. Because the Vendor ID reads back as
0xffffffff, it appears that there is no PCI device located at that BDF.
However, because the device does exist, designers may wish to hang its
PCI resources off of a real __pci_driver, as well as have it participate
in ACPI table generation.

This patch extends the semantics of the 'hidden' keyword in
devicetree.cb. If a device now uses 'hidden' instead of 'on', then it
will be assumed during PCI enumeration that the device indeed does
exist, and it will not be removed as a "leftover device." This allows
child devices to be enumerated correctly and also PCI resources can be
designated from the {read,set}_resources callbacks.

It should be noted that as of this commit, there are precisely 0 devices
using 'hidden' in their devicetree.cb files, so this should be a safe
thing to do.

Later patches will begin moving PCI resources from random places (typically
hung off of fixed SA and LPC) into the PMC device (procedure will vary per-
platform).

Change-Id: I16c2d3e1d1433343e63dfc16856cff69cd815e2a
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41384
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-05-20 09:47:35 +00:00
Daniel Kang 17118a833a mb/google/volteer: Fix camera dsdt config for ov2740
Link frequency and a format was not correct for volteer proto 2
ov2740 user-facing camera.

The link frequency is calculated in the following way.
(max frame width * max frame height * max fps * data format in bps
/ number of lanes / data rate) + max 35% of overhead
For ov2740, (1920 * 1080 * 60 * 10 / 2 / 2) = 311Mhz.
360Mhz after adding 18% of overhead.

BUG=b:148428976
BRANCH=none
TEST=Build and boot volteer proto 2 board. Start a camera app
and check user-facing camera functionalities.

Signed-off-by: Daniel Kang <daniel.h.kang@intel.com>
Change-Id: I3b51826e123dec394c1b4eb9a1c5b64b8b11459e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41157
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Dossym Nurmukhanov <dossym@google.com>
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-20 09:14:43 +00:00
Sumeet R Pawnikar d2132469ae tigerlake: update processor power limits configuration
Update processor power limit configuration parameters based on
common code base support for Intel Tigerlake SoC based platforms.

BRANCH=None
BUG=None
TEST=Built and tested on volteer system

Change-Id: Iccd387d78bb45ca3de73f531a901d1d3f793d7bd
Signed-off-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39345
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-20 09:14:11 +00:00
Sumeet R Pawnikar 425d8640fa icelake: remove unused processor power limits configuration
Remove unused processor power limit configuration parameter
and function call based on common code base support for
Intel Icelake SoC based platform.

BRANCH=None
BUG=None
TEST=Built for icelake based dragonegg board.

Change-Id: Id8923f2c176092b6f7acfbfb079587f88258dce8
Signed-off-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41236
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-20 09:13:55 +00:00
Brandon Breitenstein b7911c8e98 mainboard/volteer: Update Aux settings for Port 0
On Volteer port 0 (MB PORT) does not have a retimer so the port needs
to be configured for the SOC to handle Aux orientation flipping. This
requires 2 changes setting the TcssAuxOri UPD to 1 for port 0 (Bit 0)
and configuring AUXP and AUXN GPIOs to Native Function 6 so SOC can
control the orientation

BUG=b:145220205
BRANCH=NONE
TEST=booted Volteer proto 2 and verified that the AUX channels flip
when the cable is flipped

Change-Id: Ic81adc24d10322cc305bf0fa4c38514468ea0942
Signed-off-by: Brandon Breitenstein <brandon.breitenstein@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40245
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
2020-05-20 09:13:27 +00:00
Brandon Breitenstein 71d365d458 soc/tigerlake: Add devicetree configurability for IomTypeCPortPadCfg
In order for the SOC to be able to control the Aux line orientation for
Type-C ports that do not have a retimer, the IomTypeCPortPadCfg UPD needs
to be configurable through devicetree to correctly set the GPIO pins that
the SOC should use to flip orientation.

BUG=b:145220205
BRANCH=NONE
TEST=booted Volteer proto 2 and verified that the AUX channels flip
when the cable is flipped

Change-Id: I2e48adb624c7922170eafb8dfcaed680f008936e
Signed-off-by: Brandon Breitenstein <brandon.breitenstein@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/40244
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Wonkyu Kim <wonkyu.kim@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-20 09:13:16 +00:00
Caveh Jalali b9907042d4 mb/google/volteer: Enable EARLY_EC_SYNC
This enables EC software sync in romstage.

BUG=b:148259137
TEST=verified EC is updated in romstage using coreboot serial console
	logs.

Change-Id: Ibb97c1d57220f7fd74131a5aee450b1ab4b1c982
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41078
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-20 09:12:58 +00:00
Eric Lai af417b4143 mb/google/deltaur: Remove WLAN PCIE setting
Deltaur uses CNVi WLAN module, this setting is not required.

BUG=none
TEST=WiFi is functional in OS.

Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: Idb23e271074c8d1e111c559695d4169af5e0d3cc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41495
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-05-20 09:12:36 +00:00
Eric Lai 38c308515c mb/google/deltaur: Add tcss.asl
Add tcss.asl to support TCSS power management.
For the detail please refer cb:39785.

BUG=none
TEST=Check TBT PCIe root ports: 00:07.0/00:07.1/00:07.2/00:07.3
     /sys/bus/pci/devices/bus:device:func/power suspend and
     active time can increase.

Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: I432f3d6643de13b08c07e47f799c0ecdfe047de6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41506
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-20 09:12:28 +00:00
Aamir Bohra 88712991ba soc/intel/jasperlake: Add ACPI method to get GPIO PCR PID
Add method acpi method GPID to return the GPIO PCR port ID.
This method is further planned to be used for GPIO power
management configuration.

TEST=Build waddledoo board

Change-Id: Ic45b40bbe39e303cddcc82e0e848786b7311ab64
Signed-off-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41501
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2020-05-20 09:11:51 +00:00
Aamir Bohra a2789328f7 soc/intel/common/acpi: Remove gpio community range
Remove hardcoded gpio community range, since it might differ across
the SOCs.

Change-Id: I79c10669f6096537d466d1abd356d58a50fcb8f5
Signed-off-by: Aamir Bohra <aamir.bohra@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41500
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2020-05-20 09:11:40 +00:00
Seunghwan Kim 8952de55cb driver/i2c/max98390: Fix build error related to max98390 driver
Fix coreboot build error with adding this driver

BUG=b:149443429
BRANCH=None
TEST=built without errors

Signed-off-by: Seunghwan Kim <sh_.kim@samsung.corp-partner.google.com>
Change-Id: I2d76ec72ca6ae9ac54ab05f15ea92beb645acd5c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41496
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-05-20 09:11:23 +00:00
Eric Lai 40d00ddcf2 mb/google/deltaur: Add low power idle table
Add low power idle table to notify EC system is entering s0ix.

BUG=none
TEST=Power button and keyboard backlight are off when suspending.

Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: Icf4dffe2bd289c15854bbad914c3b34b307254ec
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41494
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-05-20 09:02:29 +00:00
Patrick Georgi 030037d3e9 superio/winbond/w83977tf: Scope UART configuration defines more locally
By undefining the configuration after use we're sure that nobody else
comes to depend on it without us noticing.

Change-Id: I7c5cfd58be643d6431989fc69cf3b397920590b9
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41530
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-05-20 08:44:36 +00:00
Patrick Georgi 736024afdb Documentation: Encourage documentation with code changes
The resource allocator woes post-4.12 release showed room for
improvement on both discussion and documentation.  To encourage this
(and encourage reviewers to look out for issues in that space),
extend the review guidelines so that they encourage to more clearly
document the reason for a change with the change (commit message or
our documentation) and also to loop in the mailing list.

Change-Id: I1962dba3fe7e1a01fa4c8b0058297c7d050cb7b7
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41493
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2020-05-20 08:44:26 +00:00