Commit Graph

38411 Commits

Author SHA1 Message Date
Jeremy Soller
cf36cd8f13 WIP: adjust GPIOs to enable retimer
Change-Id: If9256d01dc844b7272433827ca40d874c55eb713
2020-11-19 10:46:13 -07:00
Jeremy Soller
77009f599d Add PEG0 definition
Change-Id: I75f36d32b53c0cf683a36cd3518cc0c966cf2077
2020-11-18 21:34:51 -07:00
Jeremy Soller
047e58bc35 Move CPU AER and PTM config to mainboard
Change-Id: Idd7908426e33a64afa34ea9e5d02ec7378a56271
2020-11-18 21:13:15 -07:00
Jeremy Soller
130a3b0281 WIP: undo changes that might impact CPU PCIe
Change-Id: Ied4e4ed4c11172a9bb1c7aa47787ba6fb7e72803
2020-11-18 20:27:11 -07:00
Jeremy Soller
18cb9b5ab0 Sync lemp10 CPU power config with lemp9
Change-Id: Ia326f80113c1d19c18d492d5387057fe939b3809
2020-11-18 12:50:34 -07:00
Jeremy Soller
2267ee62e4 Fix lemp10 USB config
Change-Id: If371e351956b4ef65e3c7989f45ec8a88c55e3af
2020-11-18 12:49:52 -07:00
Jeremy Soller
6d1cc1ca1d Sync galp5 with lemp10
Change-Id: I7fdb50fd56beba8a38bdeb10e838dc22eb857deb
2020-11-18 10:59:37 -07:00
Jeremy Soller
1331815d90 Disable CPU PCIe clock req messaging
Change-Id: I7936a770463d150b5310b89a4ab577d8c9aacc98
2020-11-17 20:48:05 -07:00
Jeremy Soller
9847012bc6 Disable Precision Time Measurement for CPU PCIe ports
Change-Id: I007b6825a7d558254f890723ef568b96d9e884bc
2020-11-17 19:26:27 -07:00
Duncan Laurie
efd716cef0 soc/intel/tigerlake: Expose UPD to disable Precision Time Measurement
Expose a config option that allows disabling the FSP UPD which controls
Precision Time Measurement for a particular PCIe root port.  Since this
is enabled by default the option is inverted to allow disabling for
a particular port while not affecting others.

BUG=b:160996445
TEST=boot on volteer with PTM disabled for the NVMe root port

Change-Id: Icb51b256eb581d942b2d30fcabfae52fa90e48d4
Signed-off-by: Duncan Laurie <dlaurie@google.com>
2020-11-17 19:24:07 -07:00
Patrick Rudolph
417fa84913 device/pciexp: Allow ASPM on bridge devices
The device acceptable latency field is only valid for 'endpoints',
but not for bridge devices. Set the maximum acceptable latency on
such devices to allow ASPM being enabled if supported on both sides.

Allows the PCIe link on bridge devices to go into L0s/L1.

This allows the package to enter a deeper sleep state when all links
are idle.

WARNING: This might cause issues on PCIe bridge devices that doesn't
properly support ASPM. In addition it might decrease performance.

Change-Id: I277efe0bd1448ee8bff633428aa729aeedf04e28
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2020-11-17 19:13:14 -07:00
John Zhao
d13acd817d device: Enable ASPM for TBT PCIe root ports
The virtual/generic device under TBT PCIe root ports has path type as
DEVICE_PATH_GENERIC. While scanning the pcie bus, the generic device
blocks its root ports configuration. This change adds device path type
check and enables ASPM for TBT root ports.

BUG=b:173207454
TEST=Built image and booted to kernel on Voxel board. Verified both of
the TBT Root ports 00:07.0 and 00:07.1 ASPM are enabled.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: I82ffaeb5a8821d9034d8dae9d98d3b5953a9608b
2020-11-17 19:12:04 -07:00
Jeremy Soller
79aa5fa87f Debug pcie rtd3
Change-Id: I60d2b7533178c8fad5871b0d3b0e3cd6a3cb99e8
2020-11-17 17:08:18 -07:00
Jeremy Soller
2d40287435 Add _PR3 power resource to RTD3 driver
Change-Id: Iddfeaaf1424f7af9983167dd5e234d656e252da7
2020-11-17 16:35:27 -07:00
Jeremy Soller
604e699ace Disable debug console
Change-Id: Ieca895cb4c7be95600f955ed85fc06f877ba9216
2020-11-17 13:53:16 -07:00
Jeremy Soller
68ccba9a11 Enable GNA and disable I2C2 pins
Change-Id: I46b6254748f13c763551ac48e390aedfb2a6def1
2020-11-17 13:51:16 -07:00
Jeremy Soller
faa6da02cc Do not disable PEG60 srcclk
Change-Id: I08808789e48f7e25d8419d752e238cc8c35c3df8
2020-11-16 21:19:39 -07:00
Jeremy Soller
3d0ab91fce Debug root port number in RTD3 driver
Change-Id: I2ce1d69bc8ccc4602b745dd3672af30a70ecff73
2020-11-16 20:59:51 -07:00
Michael Niewöhner
306b440892 [TEST] LPIT table test implementation
... cowardly stolen from CB:32350 ;-)

Change-Id: I08b9948366db68bf16076e330bbca8c8dc85e65c

Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: Ibb7f34d03120824710e84d69f8459ea8bd35fbcb
2020-11-16 19:54:13 -07:00
Michael Niewöhner
903d70ab8e soc/intel/common/acpi,mb/*: replace the two obsolete LPID with PEPD
Replace the two obsolete LPID implementations with the new PEPD device.

The PEPD device gets included in the plaforms' `southbridge.asl`, since
it is required to load the `intel_pmc_core` module in Linux, which
checks for the _HID. (See CB:46469 for more info on that.)

There is no harm for mainboards not supporting S0ix, because the _DSM
function won't be called with the LPS0 UUID on such boards. Such boards
can use the debugging functionality of `intel_pmc_core`, too.

Change-Id: Ic8427db33286451618b50ca429d41b604dbb08a5
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
914ec1eb46 soc/intel/common/acpi: add _HID to PEPD
Add the _HID INT33A1 to PEPD to make Linux recognize it as "Intel Power
Engine" in the pmc core driver.

The _ADR gets dropped, because _HID and _ADR are mutually exclusive.

Change-Id: I7a0335681f1601f7fd8a9245a3dea72ffd100b55
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
0b02151c1a soc/intel/common/acpi: correct return value for PEPD enum function
The PEPD enum function returns a bitmask to announce supported/enabled
PEPD functions. Add a comment describing this bitmask and correct the
return value to announce function 1, 5 and 6 as supported.

Also add comments to the disabled functions 3 and 4.

Change-Id: Ib523a54f5ad695e79005aba422282e03f2bc4bed
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
032971dc2c soc/intel/common/acpi: work around Windows crash on S0ix-enabled boards
Windows does not comply with the Low Power Idle S0 specification and
crashes with an `INTERNAL_POWER_ERROR` bluescreen when function 1, does
not return at least one device constraint, even when function 1 is
announced as being not available by the enum function. Returning an
empty package does not work.

At least the following Windows versions were verified to be affected:
- Windows 8.1 x64, release 6.3.9600
- Windoes 10 x64, version 1809, build 17763.379
- Windows 10 x64, version 1903, build 18362.53
- Windows 10 x64, version 2004, build 19041.508
- Windows 10 x64, version 20H2 / 2009, build 19042.450

To make Windows work on S0ix-enabled boards, return a dummy constraint
package with a disabled dummy device.

Since the device constraints are only used for debugging low power
states in Linux and probably also in Windows, there shouldn't be any
negative effect to S0ix. Real device constraint entries could be added
at a later point, if needed.

Note: to fully prevent the BSOD mentioned above the LPIT table is
required on Windows, too. The patch for this is WIP, see CB:32350.
If you want to test this, you need to applie the whole ACPI patch
series including the hacky LPIT test implementation from CB:47242:
https://review.coreboot.org/q/topic:%22low_power_idle_fix%22

Test: no bluescreen anymore on Clevo L140CU on all Windows versions
listed above and S0ix gets detected in `powercfg -a`.

Change-Id: Icd08cbcb1dfcb8cbb23f4f4c902bf8c367c8e3ac
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
c4726c168e soc/intel/common/acpi: drop return value for disabled PEPD function 2
PEPD function 2 is currently unused and disabled. Thus, drop the return
value, which matches the default return value.

Change-Id: Ia95b8b36fcb78e8976b66de15ec214a38c178cda
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
72ceea7118 soc/intel/common/acpi: rename PEPD/LPI macros for clarification
`ARG2` in the macro's names does not really provide any useful
information. Drop it and add `LPI` to clarify the relation to only
low-power idle states.

Change-Id: I8d44c9e4974c7f34aa5c32ba00328725f536fda6
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
1ff04c8b7d soc/intel/common/acpi: rename LPID to PEPD
Rename LPID to PEPD for consistency. PEPD means "Power Engine Plug-In
Device" and is the name Intel and vendors usually use, so let's comply.

Change-Id: I1caa009a3946b1c55da8afbae058cafe98940c6d
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
8369925be2 soc/intel/common/acpi: move S0ix UUID to the condition
Move the UUID to the condition, since there is no need to assign a name
when it is only used once. Also add a comment to make clear that the
functions inside that condition are only used by the Low Power Idle S0
functionality, while the PEPD in general can be present on boards
without S0ix capability, too. For details check CB:46469.

Change-Id: Ic62c37090ad1b747f9d7d204363cc58f96ef67ef
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
0bf0c25af4 soc/intel/common/acpi: drop the southridge scope around PEPD
PEPD will get included directly in the southbridge. Thus, drop the
scope around it.

Change-Id: Icb7a40e476966a7aca36bee055ee71d181508b87
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:12 -07:00
Jeremy Soller
8bd1ee6bd4 Remove lpit acpi code
Change-Id: Iaa51fa7a58a5649be4671437377d2fc94cd8ff8d
2020-11-16 19:54:12 -07:00
Jeremy Soller
d206f606e1 Disable legacy 8254 timer on lemp10
Change-Id: I0d8acc95b778d0d3c1acb29890c765d9c8eba0b3
2020-11-16 10:56:18 -07:00
Jeremy Soller
8ddde8e912 Enable SATA SALP support
Change-Id: If261f708d943df3ad46082a9d4365fd1b9f47f06
2020-11-16 10:49:51 -07:00
Jeremy Soller
abb149ebce Add default IomTypeCPortPadCfg
Change-Id: I5b6639f7f5a2b62aa644c93c69889dda590c34d5
2020-11-16 09:24:34 -07:00
Duncan Laurie
5c341798b3 soc/intel/common: Use per-soc definition for BAR sizes
The various platform BARs are not always the same size across different
SOCs, so use the defined size rather than a hardcoded value.

This results in the following change on TGL which increased the MCHBAR
size to 128K:

-system 00:00: [mem 0xfedc0000-0xfeddffff] has been reserved
+system 00:00: [mem 0xfedc0000-0xfedc7fff] has been reserved

And fixes the following error output from the kernel:

resource sanity check: requesting [mem 0xfedc0000-0xfedcdfff],
  which spans more than pnp 00:00 [mem 0xfedc0000-0xfedc7fff]

Change-Id: I82796c2fc81dec883f3c69ae7bdcedc7d3f16c64
Signed-off-by: Duncan Laurie <dlaurie@google.com>
2020-11-16 08:52:31 -07:00
Duncan Laurie
d4e3f5a44c soc/intel/tigerlake: Enable GPIO IOSTANDBY configuration
Enable SOC_INTEL_COMMON_BLOCK_GPIO_IOSTANDBY so the pads can be
configured with non-zero IOSSTATE values.

BUG=b:171993054

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: I1f895dbdbb71a353a98272db6dc70b54e8e172a3
2020-11-16 08:51:03 -07:00
Jeremy Soller
934fe49137 Add lpit asl to lemp10
Change-Id: I52fb84961cdd0ca8aef23f53ebab06041610a014
2020-11-14 21:20:28 -07:00
Jeremy Soller
32e9a708d5 Select retimer driver
Change-Id: I03304ffe1e6bc108c4557a9dfbe448729d2eaec0
2020-11-14 20:38:13 -07:00
Jeremy Soller
d695072b56 Add retimer device
Change-Id: I40f380af709acce80ce96c674eca521683b1252d
2020-11-14 20:36:36 -07:00
Jeremy Soller
7a1774b337 Enable SATA devslp on lemp10
Change-Id: Ic41d672431d76519406eb3403f8ce1f8b154d6d9
2020-11-14 20:24:11 -07:00
Jeremy Soller
2214f27d92 Add rtd3 config for lemp10 m.2 slots
Change-Id: I0d49ba23205801dbcca7fe420ed8e763e1e80514
2020-11-14 20:13:22 -07:00
Duncan Laurie
bcda5840d2 soc/intel/tigerlake: Enable RTD3 driver and IPC mailbox
This SOC overrides the common PMC device and instantiates the PMC device
in the SSDT.  It needs to call the common PMC function to provide the
IPC mailbox method.

The common PCIe RTD3 driver can also be enabled which will allow
mainboards to enable Runtime D3 power control for PCIe devices.

BUG=b:160996445
TEST=boot on volteer with this driver enabled for the NVMe device in the
devicetree and disassemble the SSDT to ensure the RTD3 code is present.

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: Ifa54ec3b8cebcc2752916cc4f8616fcb6fd2fecc
2020-11-14 19:59:42 -07:00
Duncan Laurie
3a549208b5 soc/intel/common: Add PCIe Runtime D3 driver for ACPI
This driver is for devices attached to a PCIe root port that support
Runtime D3.  It creates the necessary PowerResource in the root port to
provide _ON/_OFF methods for which will turn off power and clocks to the
device when it is in the D3cold state.

The mainboard declares the driver in devicetree and provides the GPIOs
that control power/reset for the device attached to the root port and
the SRCCLK pin used for the PMC IPC mailbox to enable/disable the clock.

An additional device property is created for storage devices if it
matches the PCI storage class which is used to indicate that the storage
device should use D3 for power savings.

BUG=b:160996445
TEST=boot on volteer device with this driver enabled in the devicetree
and disassemble the SSDT to ensure this code exists.

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: I13e59c996b4f5e4c2657694bda9fad869b64ffde
2020-11-14 19:59:25 -07:00
Jeremy Soller
e2c16d57e3 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: I13cd0997db873191951e5c74c819b00acbbf1e89
2020-11-14 19:56:37 -07:00
Jeremy Soller
721cfbc4c5 Disable s3
Change-Id: I1fa063eed7f439ae390225340a10050d0549e65b
2020-11-14 16:35:35 -07:00
Michael Niewöhner
c66e1c2a31 soc/intel/cnl: enable ACPI CPPC entries generation
Enable CPPC entries generation, needed for Intel SpeedShift.

Test: dumped SSDT from Clevo L140CU and checked decompiled version

Change-Id: I0c8066a31d3bec27776836aac54c335c0e5d74e6
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47541
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-14 18:54:35 +00:00
Michael Niewöhner
ed21df6cec soc/intel/common/block: add code for ACPI CPPC entries generation
Copy the code for CPPC entries generation, needed for Intel SpeedShift,
from SKL to common ACPI code.

SKL is going to use common ACPI code, too, in the future, so this code
duplication will vanish soon.

Test: dumped SSDT from Clevo L140CU and checked decompiled version after
enabling CPPC entries via Kconfig

Change-Id: I1fcc2d0d7c6b6f35f8dd011f55dab8469be99d47
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45535
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-14 18:54:23 +00:00
Arthur Heymans
77038b16ff soc/intel/xeon_sp: Improve generating PCH IOAPIC MADT entry
The PCH IOAPIC ID is 0x8 so it needs to be generated before the IIO
IOAPICs. Since we will get rid of the ioapic_id array this makes it
more readable.

Change-Id: I64a3b259e438ef666fb68a433cceda10aebdb1bf
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47301
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
2020-11-14 12:29:29 +00:00
Jeremy Soller
2ad8956e6a Add fivr and lpm config
Change-Id: I702cc273aed7d676016c587e38f31945948b2bc6
2020-11-13 21:55:23 -07:00
Jeremy Soller
dfaccb9009 Enable S0iX
Change-Id: Iba1828a385456a1a5a4e998af9b22e312e298119
2020-11-13 19:58:42 -07:00
Shelley Chen
6615c6eaf7 mrc_cache: Move code for triggering memory training into mrc_cache
Currently the decision of whether or not to use mrc_cache in recovery
mode is made within the individual platforms' drivers (ie: fsp2.0,
fsp1.1, etc.).  As this is not platform specific, but uses common
vboot infrastructure, the code can be unified and moved into
mrc_cache.  The conditions are as follows:

  1.  If HAS_RECOVERY_MRC_CACHE, use mrc_cache data (unless retrain
      switch is true)
  2.  If !HAS_RECOVERY_MRC_CACHE && VBOOT_STARTS_IN_BOOTBLOCK, this
      means that memory training will occur after verified boot,
      meaning that mrc_cache will be filled with data from executing
      RW code.  So in this case, we never want to use the training
      data in the mrc_cache for recovery mode.
  3.  If !HAS_RECOVERY_MRC_CACHE && VBOOT_STARTS_IN_ROMSTAGE, this
      means that memory training happens before verfied boot, meaning
      that the mrc_cache data is generated by RO code, so it is safe
      to use for a recovery boot.
  4.  Any platform that does not use vboot should be unaffected.

Additionally, we have removed the
MRC_CLEAR_NORMAL_CACHE_ON_RECOVERY_RETRAIN config because the
mrc_cache driver takes care of invalidating the mrc_cache data for
normal mode.  If the platform:
  1.  !HAS_RECOVERY_MRC_CACHE, always invalidate mrc_cache data
  2.  HAS_RECOVERY_MRC_CACHE, only invalidate if retrain switch is set

BUG=b:150502246
BRANCH=None
TEST=1. run dut-control power_state:rec_force_mrc twice on lazor
        ensure that memory retraining happens both times
        run dut-control power_state:rec twice on lazor
        ensure that memory retraining happens only first time
     2. remove HAS_RECOVERY_MRC_CACHE from lazor Kconfig
        boot twice to ensure caching of memory training occurred
	on each boot.

Change-Id: I3875a7b4a4ba3c1aa8a3c1507b3993036a7155fc
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46855
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-13 22:57:50 +00:00
Stanley Wu
0c3845d2ee mb/google/volteer/variant/lindar: Update devicetree settings
Update I2C address for Goodix touchscreen and add ELAN touchscreen &
Synaptics trackpad device. Follow CB:47415 to correct HID over I2C
device to be level triggerd.

BUG=b:160013582
TEST=emerge-volteer coreboot and check system dmesg and evtest can get
device.

Change-Id: I070fb0e06b588f128253270502c9c2c427c62b84
Signed-off-by: Stanley Wu <stanley1.wu@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47390
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-11-13 22:50:13 +00:00