2015-05-06 00:07:29 +02:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2013 Google Inc.
|
2015-04-21 00:20:28 +02:00
|
|
|
* Copyright (C) 2015 Intel Corp.
|
2015-05-06 00:07:29 +02:00
|
|
|
*
|
|
|
|
* This program is free software; you can redistribute it and/or modify
|
|
|
|
* it under the terms of the GNU General Public License as published by
|
|
|
|
* the Free Software Foundation; version 2 of the License.
|
|
|
|
*
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
*/
|
|
|
|
|
2015-04-21 00:20:28 +02:00
|
|
|
#include <chip.h>
|
2018-04-21 22:45:32 +02:00
|
|
|
#include <compiler.h>
|
2015-05-06 00:07:29 +02:00
|
|
|
#include <console/console.h>
|
|
|
|
#include <device/device.h>
|
|
|
|
#include <device/pci.h>
|
2015-09-10 00:05:06 +02:00
|
|
|
#include <fsp/util.h>
|
2015-05-06 00:07:29 +02:00
|
|
|
#include <soc/pci_devs.h>
|
|
|
|
#include <soc/ramstage.h>
|
|
|
|
|
|
|
|
static void pci_domain_set_resources(device_t dev)
|
|
|
|
{
|
2015-04-21 00:20:28 +02:00
|
|
|
printk(BIOS_SPEW, "%s/%s ( %s )\n",
|
|
|
|
__FILE__, __func__, dev_name(dev));
|
2015-05-06 00:07:29 +02:00
|
|
|
assign_resources(dev->link_list);
|
|
|
|
}
|
|
|
|
|
|
|
|
static struct device_operations pci_domain_ops = {
|
|
|
|
.read_resources = pci_domain_read_resources,
|
|
|
|
.set_resources = pci_domain_set_resources,
|
|
|
|
.enable_resources = NULL,
|
|
|
|
.init = NULL,
|
|
|
|
.scan_bus = pci_domain_scan_bus,
|
|
|
|
};
|
|
|
|
|
2015-04-21 00:20:28 +02:00
|
|
|
static void cpu_bus_noop(device_t dev) { }
|
|
|
|
|
2015-05-06 00:07:29 +02:00
|
|
|
static struct device_operations cpu_bus_ops = {
|
2015-04-21 00:20:28 +02:00
|
|
|
.read_resources = cpu_bus_noop,
|
|
|
|
.set_resources = cpu_bus_noop,
|
|
|
|
.enable_resources = cpu_bus_noop,
|
|
|
|
.init = soc_init_cpus
|
2015-05-06 00:07:29 +02:00
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
static void enable_dev(device_t dev)
|
|
|
|
{
|
2015-04-21 00:20:28 +02:00
|
|
|
printk(BIOS_SPEW, "----------\n%s/%s ( %s ), type: %d\n",
|
|
|
|
__FILE__, __func__,
|
|
|
|
dev_name(dev), dev->path.type);
|
|
|
|
printk(BIOS_SPEW, "vendor: 0x%04x. device: 0x%04x\n",
|
|
|
|
pci_read_config16(dev, PCI_VENDOR_ID),
|
|
|
|
pci_read_config16(dev, PCI_DEVICE_ID));
|
|
|
|
printk(BIOS_SPEW, "class: 0x%02x %s\n"
|
|
|
|
"subclass: 0x%02x %s\n"
|
|
|
|
"prog: 0x%02x\n"
|
|
|
|
"revision: 0x%02x\n",
|
|
|
|
pci_read_config16(dev, PCI_CLASS_DEVICE) >> 8,
|
|
|
|
get_pci_class_name(dev),
|
|
|
|
pci_read_config16(dev, PCI_CLASS_DEVICE) & 0xff,
|
|
|
|
get_pci_subclass_name(dev),
|
|
|
|
pci_read_config8(dev, PCI_CLASS_PROG),
|
|
|
|
pci_read_config8(dev, PCI_REVISION_ID));
|
|
|
|
|
2015-05-06 00:07:29 +02:00
|
|
|
/* Set the operations if it is a special bus type */
|
|
|
|
if (dev->path.type == DEVICE_PATH_DOMAIN) {
|
|
|
|
dev->ops = &pci_domain_ops;
|
|
|
|
} else if (dev->path.type == DEVICE_PATH_CPU_CLUSTER) {
|
|
|
|
dev->ops = &cpu_bus_ops;
|
|
|
|
} else if (dev->path.type == DEVICE_PATH_PCI) {
|
|
|
|
/* Handle south cluster enablement. */
|
|
|
|
if (PCI_SLOT(dev->path.pci.devfn) > GFX_DEV &&
|
|
|
|
(dev->ops == NULL || dev->ops->enable == NULL)) {
|
|
|
|
southcluster_enable_dev(dev);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2018-04-21 22:45:32 +02:00
|
|
|
__weak void board_silicon_USB2_override(SILICON_INIT_UPD *params)
|
2017-08-26 11:53:35 +02:00
|
|
|
{
|
|
|
|
}
|
|
|
|
|
2015-04-21 00:20:28 +02:00
|
|
|
void soc_silicon_init_params(SILICON_INIT_UPD *params)
|
|
|
|
{
|
|
|
|
device_t dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC));
|
2015-09-09 23:12:16 +02:00
|
|
|
struct soc_intel_braswell_config *config;
|
|
|
|
|
|
|
|
if (!dev) {
|
|
|
|
printk(BIOS_ERR,
|
|
|
|
"Error! Device (%s) not found, "
|
|
|
|
"soc_silicon_init_params!\n", dev_path(dev));
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
config = dev->chip_info;
|
2015-04-21 00:20:28 +02:00
|
|
|
|
|
|
|
/* Set the parameters for SiliconInit */
|
|
|
|
printk(BIOS_DEBUG, "Updating UPD values for SiliconInit\n");
|
|
|
|
params->PcdSdcardMode = config->PcdSdcardMode;
|
|
|
|
params->PcdEnableHsuart0 = config->PcdEnableHsuart0;
|
|
|
|
params->PcdEnableHsuart1 = config->PcdEnableHsuart1;
|
|
|
|
params->PcdEnableAzalia = config->PcdEnableAzalia;
|
|
|
|
params->PcdEnableSata = config->PcdEnableSata;
|
|
|
|
params->PcdEnableXhci = config->PcdEnableXhci;
|
|
|
|
params->PcdEnableLpe = config->PcdEnableLpe;
|
|
|
|
params->PcdEnableDma0 = config->PcdEnableDma0;
|
|
|
|
params->PcdEnableDma1 = config->PcdEnableDma1;
|
|
|
|
params->PcdEnableI2C0 = config->PcdEnableI2C0;
|
|
|
|
params->PcdEnableI2C1 = config->PcdEnableI2C1;
|
|
|
|
params->PcdEnableI2C2 = config->PcdEnableI2C2;
|
|
|
|
params->PcdEnableI2C3 = config->PcdEnableI2C3;
|
|
|
|
params->PcdEnableI2C4 = config->PcdEnableI2C4;
|
|
|
|
params->PcdEnableI2C5 = config->PcdEnableI2C5;
|
|
|
|
params->PcdEnableI2C6 = config->PcdEnableI2C6;
|
2015-08-07 14:52:54 +02:00
|
|
|
params->GraphicsConfigPtr = 0;
|
|
|
|
params->AzaliaConfigPtr = 0;
|
2015-04-21 00:20:28 +02:00
|
|
|
params->PunitPwrConfigDisable = config->PunitPwrConfigDisable;
|
|
|
|
params->ChvSvidConfig = config->ChvSvidConfig;
|
|
|
|
params->DptfDisable = config->DptfDisable;
|
|
|
|
params->PcdEmmcMode = config->PcdEmmcMode;
|
|
|
|
params->PcdUsb3ClkSsc = config->PcdUsb3ClkSsc;
|
|
|
|
params->PcdDispClkSsc = config->PcdDispClkSsc;
|
|
|
|
params->PcdSataClkSsc = config->PcdSataClkSsc;
|
|
|
|
params->Usb2Port0PerPortPeTxiSet = config->Usb2Port0PerPortPeTxiSet;
|
|
|
|
params->Usb2Port0PerPortTxiSet = config->Usb2Port0PerPortTxiSet;
|
|
|
|
params->Usb2Port0IUsbTxEmphasisEn = config->Usb2Port0IUsbTxEmphasisEn;
|
|
|
|
params->Usb2Port0PerPortTxPeHalf = config->Usb2Port0PerPortTxPeHalf;
|
2016-06-30 08:50:52 +02:00
|
|
|
if (config->D0Usb2Port0PerPortRXISet != 0)
|
|
|
|
params->D0Usb2Port0PerPortRXISet = config->D0Usb2Port0PerPortRXISet;
|
|
|
|
|
2015-04-21 00:20:28 +02:00
|
|
|
params->Usb2Port1PerPortPeTxiSet = config->Usb2Port1PerPortPeTxiSet;
|
|
|
|
params->Usb2Port1PerPortTxiSet = config->Usb2Port1PerPortTxiSet;
|
|
|
|
params->Usb2Port1IUsbTxEmphasisEn = config->Usb2Port1IUsbTxEmphasisEn;
|
|
|
|
params->Usb2Port1PerPortTxPeHalf = config->Usb2Port1PerPortTxPeHalf;
|
2016-06-30 08:50:52 +02:00
|
|
|
if (config->D0Usb2Port1PerPortRXISet != 0)
|
|
|
|
params->D0Usb2Port1PerPortRXISet = config->D0Usb2Port1PerPortRXISet;
|
|
|
|
|
2015-04-21 00:20:28 +02:00
|
|
|
params->Usb2Port2PerPortPeTxiSet = config->Usb2Port2PerPortPeTxiSet;
|
|
|
|
params->Usb2Port2PerPortTxiSet = config->Usb2Port2PerPortTxiSet;
|
|
|
|
params->Usb2Port2IUsbTxEmphasisEn = config->Usb2Port2IUsbTxEmphasisEn;
|
|
|
|
params->Usb2Port2PerPortTxPeHalf = config->Usb2Port2PerPortTxPeHalf;
|
2016-06-30 08:50:52 +02:00
|
|
|
if (config->D0Usb2Port2PerPortRXISet != 0)
|
|
|
|
params->D0Usb2Port2PerPortRXISet = config->D0Usb2Port2PerPortRXISet;
|
|
|
|
|
2015-04-21 00:20:28 +02:00
|
|
|
params->Usb2Port3PerPortPeTxiSet = config->Usb2Port3PerPortPeTxiSet;
|
|
|
|
params->Usb2Port3PerPortTxiSet = config->Usb2Port3PerPortTxiSet;
|
|
|
|
params->Usb2Port3IUsbTxEmphasisEn = config->Usb2Port3IUsbTxEmphasisEn;
|
|
|
|
params->Usb2Port3PerPortTxPeHalf = config->Usb2Port3PerPortTxPeHalf;
|
2016-06-30 08:50:52 +02:00
|
|
|
if (config->D0Usb2Port3PerPortRXISet != 0)
|
|
|
|
params->D0Usb2Port3PerPortRXISet = config->D0Usb2Port3PerPortRXISet;
|
|
|
|
|
2015-04-21 00:20:28 +02:00
|
|
|
params->Usb2Port4PerPortPeTxiSet = config->Usb2Port4PerPortPeTxiSet;
|
|
|
|
params->Usb2Port4PerPortTxiSet = config->Usb2Port4PerPortTxiSet;
|
|
|
|
params->Usb2Port4IUsbTxEmphasisEn = config->Usb2Port4IUsbTxEmphasisEn;
|
|
|
|
params->Usb2Port4PerPortTxPeHalf = config->Usb2Port4PerPortTxPeHalf;
|
2016-06-30 08:50:52 +02:00
|
|
|
if (config->D0Usb2Port4PerPortRXISet != 0)
|
|
|
|
params->D0Usb2Port4PerPortRXISet = config->D0Usb2Port4PerPortRXISet;
|
|
|
|
|
2015-04-21 00:20:28 +02:00
|
|
|
params->Usb3Lane0Ow2tapgen2deemph3p5 =
|
|
|
|
config->Usb3Lane0Ow2tapgen2deemph3p5;
|
|
|
|
params->Usb3Lane1Ow2tapgen2deemph3p5 =
|
|
|
|
config->Usb3Lane1Ow2tapgen2deemph3p5;
|
|
|
|
params->Usb3Lane2Ow2tapgen2deemph3p5 =
|
|
|
|
config->Usb3Lane2Ow2tapgen2deemph3p5;
|
|
|
|
params->Usb3Lane3Ow2tapgen2deemph3p5 =
|
|
|
|
config->Usb3Lane3Ow2tapgen2deemph3p5;
|
|
|
|
params->PcdSataInterfaceSpeed = config->PcdSataInterfaceSpeed;
|
|
|
|
params->PcdPchUsbSsicPort = config->PcdPchUsbSsicPort;
|
|
|
|
params->PcdPchUsbHsicPort = config->PcdPchUsbHsicPort;
|
|
|
|
params->PcdPcieRootPortSpeed = config->PcdPcieRootPortSpeed;
|
|
|
|
params->PcdPchSsicEnable = config->PcdPchSsicEnable;
|
|
|
|
params->PcdLogoPtr = config->PcdLogoPtr;
|
|
|
|
params->PcdLogoSize = config->PcdLogoSize;
|
|
|
|
params->PcdRtcLock = config->PcdRtcLock;
|
|
|
|
params->PMIC_I2CBus = config->PMIC_I2CBus;
|
|
|
|
params->ISPEnable = config->ISPEnable;
|
|
|
|
params->ISPPciDevConfig = config->ISPPciDevConfig;
|
2015-10-28 23:02:35 +01:00
|
|
|
params->PcdSdDetectChk = config->PcdSdDetectChk;
|
2016-02-08 11:39:21 +01:00
|
|
|
params->I2C0Frequency = config->I2C0Frequency;
|
|
|
|
params->I2C1Frequency = config->I2C1Frequency;
|
|
|
|
params->I2C2Frequency = config->I2C2Frequency;
|
|
|
|
params->I2C3Frequency = config->I2C3Frequency;
|
|
|
|
params->I2C4Frequency = config->I2C4Frequency;
|
|
|
|
params->I2C5Frequency = config->I2C5Frequency;
|
|
|
|
params->I2C6Frequency = config->I2C6Frequency;
|
2017-08-26 11:47:15 +02:00
|
|
|
|
2017-08-26 11:53:35 +02:00
|
|
|
board_silicon_USB2_override(params);
|
2015-04-21 00:20:28 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
void soc_display_silicon_init_params(const SILICON_INIT_UPD *old,
|
|
|
|
SILICON_INIT_UPD *new)
|
|
|
|
{
|
|
|
|
/* Display the parameters for SiliconInit */
|
|
|
|
printk(BIOS_SPEW, "UPD values for SiliconInit:\n");
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdSdcardMode", 1, old->PcdSdcardMode,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdSdcardMode);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableHsuart0", 1, old->PcdEnableHsuart0,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableHsuart0);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableHsuart1", 1, old->PcdEnableHsuart1,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableHsuart1);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableAzalia", 1, old->PcdEnableAzalia,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableAzalia);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("AzaliaConfigPtr", 4,
|
2015-08-07 14:52:54 +02:00
|
|
|
(uint32_t)old->AzaliaConfigPtr,
|
|
|
|
(uint32_t)new->AzaliaConfigPtr);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableSata", 1, old->PcdEnableSata,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableSata);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableXhci", 1, old->PcdEnableXhci,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableXhci);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableLpe", 1, old->PcdEnableLpe,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableLpe);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableDma0", 1, old->PcdEnableDma0,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableDma0);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableDma1", 1, old->PcdEnableDma1,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableDma1);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableI2C0", 1, old->PcdEnableI2C0,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableI2C0);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableI2C1", 1, old->PcdEnableI2C1,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableI2C1);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableI2C2", 1, old->PcdEnableI2C2,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableI2C2);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableI2C3", 1, old->PcdEnableI2C3,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableI2C3);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableI2C4", 1, old->PcdEnableI2C4,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableI2C4);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableI2C5", 1, old->PcdEnableI2C5,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableI2C5);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEnableI2C6", 1, old->PcdEnableI2C6,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEnableI2C6);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdGraphicsConfigPtr", 4,
|
2015-08-07 14:52:54 +02:00
|
|
|
old->GraphicsConfigPtr, new->GraphicsConfigPtr);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("GpioFamilyInitTablePtr", 4,
|
2015-04-21 00:20:28 +02:00
|
|
|
(uint32_t)old->GpioFamilyInitTablePtr,
|
|
|
|
(uint32_t)new->GpioFamilyInitTablePtr);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("GpioPadInitTablePtr", 4,
|
2015-04-21 00:20:28 +02:00
|
|
|
(uint32_t)old->GpioPadInitTablePtr,
|
|
|
|
(uint32_t)new->GpioPadInitTablePtr);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PunitPwrConfigDisable", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->PunitPwrConfigDisable,
|
|
|
|
new->PunitPwrConfigDisable);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("ChvSvidConfig", 1, old->ChvSvidConfig,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->ChvSvidConfig);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("DptfDisable", 1, old->DptfDisable,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->DptfDisable);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdEmmcMode", 1, old->PcdEmmcMode,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdEmmcMode);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdUsb3ClkSsc", 1, old->PcdUsb3ClkSsc,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdUsb3ClkSsc);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdDispClkSsc", 1, old->PcdDispClkSsc,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdDispClkSsc);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdSataClkSsc", 1, old->PcdSataClkSsc,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdSataClkSsc);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port0PerPortPeTxiSet", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port0PerPortPeTxiSet,
|
|
|
|
new->Usb2Port0PerPortPeTxiSet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port0PerPortTxiSet", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port0PerPortTxiSet,
|
|
|
|
new->Usb2Port0PerPortTxiSet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port0IUsbTxEmphasisEn", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port0IUsbTxEmphasisEn,
|
|
|
|
new->Usb2Port0IUsbTxEmphasisEn);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port0PerPortTxPeHalf", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port0PerPortTxPeHalf,
|
|
|
|
new->Usb2Port0PerPortTxPeHalf);
|
2016-06-30 08:50:52 +02:00
|
|
|
fsp_display_upd_value("D0Usb2Port0PerPortRXISet", 1,
|
|
|
|
old->D0Usb2Port0PerPortRXISet,
|
|
|
|
new->D0Usb2Port0PerPortRXISet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port1PerPortPeTxiSet", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port1PerPortPeTxiSet,
|
|
|
|
new->Usb2Port1PerPortPeTxiSet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port1PerPortTxiSet", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port1PerPortTxiSet,
|
|
|
|
new->Usb2Port1PerPortTxiSet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port1IUsbTxEmphasisEn", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port1IUsbTxEmphasisEn,
|
|
|
|
new->Usb2Port1IUsbTxEmphasisEn);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port1PerPortTxPeHalf", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port1PerPortTxPeHalf,
|
|
|
|
new->Usb2Port1PerPortTxPeHalf);
|
2016-06-30 08:50:52 +02:00
|
|
|
fsp_display_upd_value("D0Usb2Port1PerPortRXISet", 1,
|
|
|
|
old->D0Usb2Port1PerPortRXISet,
|
|
|
|
new->D0Usb2Port1PerPortRXISet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port2PerPortPeTxiSet", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port2PerPortPeTxiSet,
|
|
|
|
new->Usb2Port2PerPortPeTxiSet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port2PerPortTxiSet", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port2PerPortTxiSet,
|
|
|
|
new->Usb2Port2PerPortTxiSet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port2IUsbTxEmphasisEn", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port2IUsbTxEmphasisEn,
|
|
|
|
new->Usb2Port2IUsbTxEmphasisEn);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port2PerPortTxPeHalf", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port2PerPortTxPeHalf,
|
|
|
|
new->Usb2Port2PerPortTxPeHalf);
|
2016-06-30 08:50:52 +02:00
|
|
|
fsp_display_upd_value("D0Usb2Port2PerPortRXISet", 1,
|
|
|
|
old->D0Usb2Port2PerPortRXISet,
|
|
|
|
new->D0Usb2Port2PerPortRXISet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port3PerPortPeTxiSet", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port3PerPortPeTxiSet,
|
|
|
|
new->Usb2Port3PerPortPeTxiSet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port3PerPortTxiSet", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port3PerPortTxiSet,
|
|
|
|
new->Usb2Port3PerPortTxiSet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port3IUsbTxEmphasisEn", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port3IUsbTxEmphasisEn,
|
|
|
|
new->Usb2Port3IUsbTxEmphasisEn);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port3PerPortTxPeHalf", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port3PerPortTxPeHalf,
|
|
|
|
new->Usb2Port3PerPortTxPeHalf);
|
2016-06-30 08:50:52 +02:00
|
|
|
fsp_display_upd_value("D0Usb2Port3PerPortRXISet", 1,
|
|
|
|
old->D0Usb2Port3PerPortRXISet,
|
|
|
|
new->D0Usb2Port3PerPortRXISet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port4PerPortPeTxiSet", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port4PerPortPeTxiSet,
|
|
|
|
new->Usb2Port4PerPortPeTxiSet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port4PerPortTxiSet", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port4PerPortTxiSet,
|
|
|
|
new->Usb2Port4PerPortTxiSet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port4IUsbTxEmphasisEn", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port4IUsbTxEmphasisEn,
|
|
|
|
new->Usb2Port4IUsbTxEmphasisEn);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb2Port4PerPortTxPeHalf", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb2Port4PerPortTxPeHalf,
|
|
|
|
new->Usb2Port4PerPortTxPeHalf);
|
2016-06-30 08:50:52 +02:00
|
|
|
fsp_display_upd_value("D0Usb2Port4PerPortRXISet", 1,
|
|
|
|
old->D0Usb2Port4PerPortRXISet,
|
|
|
|
new->D0Usb2Port4PerPortRXISet);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb3Lane0Ow2tapgen2deemph3p5", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb3Lane0Ow2tapgen2deemph3p5,
|
|
|
|
new->Usb3Lane0Ow2tapgen2deemph3p5);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb3Lane1Ow2tapgen2deemph3p5", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb3Lane1Ow2tapgen2deemph3p5,
|
|
|
|
new->Usb3Lane1Ow2tapgen2deemph3p5);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb3Lane2Ow2tapgen2deemph3p5", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb3Lane2Ow2tapgen2deemph3p5,
|
|
|
|
new->Usb3Lane2Ow2tapgen2deemph3p5);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("Usb3Lane3Ow2tapgen2deemph3p5", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->Usb3Lane3Ow2tapgen2deemph3p5,
|
|
|
|
new->Usb3Lane3Ow2tapgen2deemph3p5);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdSataInterfaceSpeed", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->PcdSataInterfaceSpeed,
|
|
|
|
new->PcdSataInterfaceSpeed);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdPchUsbSsicPort", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->PcdPchUsbSsicPort, new->PcdPchUsbSsicPort);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdPchUsbHsicPort", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->PcdPchUsbHsicPort, new->PcdPchUsbHsicPort);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdPcieRootPortSpeed", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->PcdPcieRootPortSpeed, new->PcdPcieRootPortSpeed);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdPchSsicEnable", 1, old->PcdPchSsicEnable,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdPchSsicEnable);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdLogoPtr", 4, old->PcdLogoPtr,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdLogoPtr);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdLogoSize", 4, old->PcdLogoSize,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdLogoSize);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PcdRtcLock", 1, old->PcdRtcLock,
|
2015-04-21 00:20:28 +02:00
|
|
|
new->PcdRtcLock);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("PMIC_I2CBus", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->PMIC_I2CBus, new->PMIC_I2CBus);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("ISPEnable", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->ISPEnable, new->ISPEnable);
|
2015-10-16 01:17:58 +02:00
|
|
|
fsp_display_upd_value("ISPPciDevConfig", 1,
|
2015-04-21 00:20:28 +02:00
|
|
|
old->ISPPciDevConfig, new->ISPPciDevConfig);
|
2015-10-28 23:02:35 +01:00
|
|
|
fsp_display_upd_value("PcdSdDetectChk", 1,
|
|
|
|
old->PcdSdDetectChk, new->PcdSdDetectChk);
|
2015-04-21 00:20:28 +02:00
|
|
|
}
|
|
|
|
|
2015-05-06 00:07:29 +02:00
|
|
|
/* Called at BS_DEV_INIT_CHIPS time -- very early. Just after BS_PRE_DEVICE. */
|
|
|
|
static void soc_init(void *chip_info)
|
|
|
|
{
|
2015-04-21 00:20:28 +02:00
|
|
|
printk(BIOS_SPEW, "%s/%s\n", __FILE__, __func__);
|
|
|
|
soc_init_pre_device(chip_info);
|
2015-05-06 00:07:29 +02:00
|
|
|
}
|
|
|
|
|
2015-04-21 00:20:28 +02:00
|
|
|
struct chip_operations soc_intel_braswell_ops = {
|
|
|
|
CHIP_NAME("Intel Braswell SoC")
|
2015-05-06 00:07:29 +02:00
|
|
|
.enable_dev = enable_dev,
|
|
|
|
.init = soc_init,
|
|
|
|
};
|
|
|
|
|
2017-03-17 01:35:32 +01:00
|
|
|
static void pci_set_subsystem(device_t dev, unsigned int vendor,
|
|
|
|
unsigned int device)
|
2015-05-06 00:07:29 +02:00
|
|
|
{
|
2015-04-21 00:20:28 +02:00
|
|
|
printk(BIOS_SPEW, "%s/%s ( %s, 0x%04x, 0x%04x )\n",
|
|
|
|
__FILE__, __func__, dev_name(dev), vendor, device);
|
2015-05-06 00:07:29 +02:00
|
|
|
if (!vendor || !device) {
|
|
|
|
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
|
|
|
pci_read_config32(dev, PCI_VENDOR_ID));
|
|
|
|
} else {
|
|
|
|
pci_write_config32(dev, PCI_SUBSYSTEM_VENDOR_ID,
|
|
|
|
((device & 0xffff) << 16) | (vendor & 0xffff));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
struct pci_operations soc_pci_ops = {
|
|
|
|
.set_subsystem = &pci_set_subsystem,
|
|
|
|
};
|
2017-08-26 11:47:15 +02:00
|
|
|
|
|
|
|
/**
|
|
|
|
Return SoC stepping type
|
|
|
|
|
|
|
|
@retval SOC_STEPPING SoC stepping type
|
|
|
|
**/
|
|
|
|
int SocStepping(void)
|
|
|
|
{
|
|
|
|
device_t dev = dev_find_slot(0, PCI_DEVFN(LPC_DEV, LPC_FUNC));
|
|
|
|
u8 revid = pci_read_config8(dev, 0x8);
|
|
|
|
|
|
|
|
switch (revid & B_PCH_LPC_RID_STEPPING_MASK) {
|
|
|
|
case V_PCH_LPC_RID_A0:
|
|
|
|
return SocA0;
|
|
|
|
case V_PCH_LPC_RID_A1:
|
|
|
|
return SocA1;
|
|
|
|
case V_PCH_LPC_RID_A2:
|
|
|
|
return SocA2;
|
|
|
|
case V_PCH_LPC_RID_A3:
|
|
|
|
return SocA3;
|
|
|
|
case V_PCH_LPC_RID_A4:
|
|
|
|
return SocA4;
|
|
|
|
case V_PCH_LPC_RID_A5:
|
|
|
|
return SocA5;
|
|
|
|
case V_PCH_LPC_RID_A6:
|
|
|
|
return SocA6;
|
|
|
|
case V_PCH_LPC_RID_A7:
|
|
|
|
return SocA7;
|
|
|
|
case V_PCH_LPC_RID_B0:
|
|
|
|
return SocB0;
|
|
|
|
case V_PCH_LPC_RID_B1:
|
|
|
|
return SocB1;
|
|
|
|
case V_PCH_LPC_RID_B2:
|
|
|
|
return SocB2;
|
|
|
|
case V_PCH_LPC_RID_B3:
|
|
|
|
return SocB3;
|
|
|
|
case V_PCH_LPC_RID_B4:
|
|
|
|
return SocB4;
|
|
|
|
case V_PCH_LPC_RID_B5:
|
|
|
|
return SocB5;
|
|
|
|
case V_PCH_LPC_RID_B6:
|
|
|
|
return SocB6;
|
|
|
|
case V_PCH_LPC_RID_B7:
|
|
|
|
return SocB7;
|
|
|
|
case V_PCH_LPC_RID_C0:
|
|
|
|
return SocC0;
|
|
|
|
case V_PCH_LPC_RID_C1:
|
|
|
|
return SocC1;
|
|
|
|
case V_PCH_LPC_RID_C2:
|
|
|
|
return SocC2;
|
|
|
|
case V_PCH_LPC_RID_C3:
|
|
|
|
return SocC3;
|
|
|
|
case V_PCH_LPC_RID_C4:
|
|
|
|
return SocC4;
|
|
|
|
case V_PCH_LPC_RID_C5:
|
|
|
|
return SocC5;
|
|
|
|
case V_PCH_LPC_RID_C6:
|
|
|
|
return SocC6;
|
|
|
|
case V_PCH_LPC_RID_C7:
|
|
|
|
return SocC7;
|
|
|
|
case V_PCH_LPC_RID_D0:
|
|
|
|
return SocD0;
|
|
|
|
case V_PCH_LPC_RID_D1:
|
|
|
|
return SocD1;
|
|
|
|
case V_PCH_LPC_RID_D2:
|
|
|
|
return SocD2;
|
|
|
|
case V_PCH_LPC_RID_D3:
|
|
|
|
return SocD3;
|
|
|
|
case V_PCH_LPC_RID_D4:
|
|
|
|
return SocD4;
|
|
|
|
case V_PCH_LPC_RID_D5:
|
|
|
|
return SocD5;
|
|
|
|
case V_PCH_LPC_RID_D6:
|
|
|
|
return SocD6;
|
|
|
|
case V_PCH_LPC_RID_D7:
|
|
|
|
return SocD7;
|
|
|
|
default:
|
|
|
|
return SocSteppingMax;
|
|
|
|
}
|
|
|
|
}
|