soc/intel/skylake: Set FSP options for PEG port

FSP options list (for each PEG port):
  - PegXEnable,
  - PegXMaxLinkWidth,
  - PegXMaxLinkSpeed,
  - PegXPowerDownUnusedLanes,
  - PegXGen3EqPh2Enable,
  - PegXGen3EqPh3Method.

Add PegMaxLinkWidth to chip.h. This option overrides the number of
active lines from the devicetree.cb for each enabled PEG port (for
example for boards that use x4 instead of x16 lines in PEG0). If the
PegMaxLinkWidth is not defined, the port uses the maximum possible
number of lines.

To enable or disable the corresponding PEG root port you need to add
to the devicetree.cb:

  device pci 01.0 on  end # enable PEG0 root port
  device pci 01.1 off end # do not configure PEG1

If PEG port is not defined in the devicetree, it will be disabled in
FSP.

It has been tested on ASRock H110M-DVS motherboard (Skylake i5-6600
CPU).

Change-Id: I23708f7060edf08739adf61fe61a419329907563
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/32045
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Maxim Polyakov
2019-03-18 17:38:44 +03:00
committed by Nico Huber
parent 0de6c50744
commit 0220d1e46a
3 changed files with 87 additions and 0 deletions

View File

@@ -35,6 +35,8 @@
#include <soc/usb.h>
#include <soc/vr_config.h>
#define MAX_PEG_PORTS 3
enum skylake_i2c_voltage {
I2C_VOLTAGE_3V3,
I2C_VOLTAGE_1V8
@@ -213,6 +215,28 @@ struct soc_intel_skylake_config {
* respective PCIe root port.
*/
/* PEG Max Link Width */
enum {
Peg0_x16,
Peg0_x1,
Peg0_x2,
Peg0_x4,
Peg0_x8,
} Peg0MaxLinkWidth;
enum {
Peg1_x8,
Peg1_x1,
Peg1_x2,
Peg1_x4,
} Peg1MaxLinkWidth;
enum {
Peg2_x4,
Peg2_x1,
Peg2_x2,
} Peg2MaxLinkWidth;
/*
* Enable/Disable Root Port
* 0: Disable Root Port