2016-03-05 06:41:13 +01:00
|
|
|
/*
|
|
|
|
* This file is part of the coreboot project.
|
|
|
|
*
|
|
|
|
* Copyright (C) 2015 Intel Corp.
|
|
|
|
* (Written by Alexandru Gagniuc <alexandrux.gagniuc@intel.com> for Intel Corp.)
|
|
|
|
*
|
|
|
|
* 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; either version 2 of the License, or
|
|
|
|
* (at your option) any later version.
|
2016-04-10 19:09:16 +02:00
|
|
|
*
|
|
|
|
* 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.
|
2016-03-05 06:41:13 +01:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef _SOC_APOLLOLAKE_CHIP_H_
|
|
|
|
#define _SOC_APOLLOLAKE_CHIP_H_
|
|
|
|
|
2016-07-28 22:44:53 +02:00
|
|
|
#include <soc/gpe.h>
|
2016-06-27 19:57:13 +02:00
|
|
|
#include <soc/gpio.h>
|
2017-04-26 17:36:35 +02:00
|
|
|
#include <intelblocks/lpss_i2c.h>
|
2016-06-27 19:57:13 +02:00
|
|
|
#include <device/i2c.h>
|
2016-06-07 11:06:28 +02:00
|
|
|
#include <soc/pm.h>
|
2017-01-11 05:53:58 +01:00
|
|
|
#include <soc/usb.h>
|
2016-06-27 19:57:13 +02:00
|
|
|
|
2016-03-05 06:41:13 +01:00
|
|
|
#define CLKREQ_DISABLED 0xf
|
2016-06-27 19:57:13 +02:00
|
|
|
#define APOLLOLAKE_I2C_DEV_MAX 8
|
|
|
|
|
2016-04-04 19:47:49 +02:00
|
|
|
/* Serial IRQ control. SERIRQ_QUIET is the default (0). */
|
|
|
|
enum serirq_mode {
|
|
|
|
SERIRQ_QUIET,
|
|
|
|
SERIRQ_CONTINUOUS,
|
|
|
|
SERIRQ_OFF,
|
|
|
|
};
|
|
|
|
|
2016-03-05 06:41:13 +01:00
|
|
|
struct soc_intel_apollolake_config {
|
|
|
|
/*
|
|
|
|
* Mapping from PCIe root port to CLKREQ input on the SOC. The SOC has
|
|
|
|
* four CLKREQ inputs, but six root ports. Root ports without an
|
|
|
|
* associated CLKREQ signal must be marked with "CLKREQ_DISABLED"
|
|
|
|
*/
|
|
|
|
uint8_t pcie_rp0_clkreq_pin;
|
|
|
|
uint8_t pcie_rp1_clkreq_pin;
|
|
|
|
uint8_t pcie_rp2_clkreq_pin;
|
|
|
|
uint8_t pcie_rp3_clkreq_pin;
|
|
|
|
uint8_t pcie_rp4_clkreq_pin;
|
|
|
|
uint8_t pcie_rp5_clkreq_pin;
|
2016-04-04 19:47:49 +02:00
|
|
|
|
2016-05-18 04:01:34 +02:00
|
|
|
/* [14:8] DDR mode Number of dealy elements.Each = 125pSec.
|
|
|
|
* [6:0] SDR mode Number of dealy elements.Each = 125pSec.
|
|
|
|
*/
|
|
|
|
uint32_t emmc_tx_cmd_cntl;
|
|
|
|
|
|
|
|
/* [14:8] HS400 mode Number of dealy elements.Each = 125pSec.
|
|
|
|
* [6:0] SDR104/HS200 mode Number of dealy elements.Each = 125pSec.
|
|
|
|
*/
|
|
|
|
uint32_t emmc_tx_data_cntl1;
|
|
|
|
|
|
|
|
/* [30:24] SDR50 mode Number of dealy elements.Each = 125pSec.
|
|
|
|
* [22:16] DDR50 mode Number of dealy elements.Each = 125pSec.
|
|
|
|
* [14:8] SDR25/HS50 mode Number of dealy elements.Each = 125pSec.
|
2017-03-09 19:59:25 +01:00
|
|
|
* [6:0] SDR12/Compatibility mode Number of dealy elements.
|
|
|
|
* Each = 125pSec.
|
2016-05-18 04:01:34 +02:00
|
|
|
*/
|
|
|
|
uint32_t emmc_tx_data_cntl2;
|
|
|
|
|
|
|
|
/* [30:24] SDR50 mode Number of dealy elements.Each = 125pSec.
|
|
|
|
* [22:16] DDR50 mode Number of dealy elements.Each = 125pSec.
|
|
|
|
* [14:8] SDR25/HS50 mode Number of dealy elements.Each = 125pSec.
|
2017-03-09 19:59:25 +01:00
|
|
|
* [6:0] SDR12/Compatibility mode Number of dealy elements.
|
|
|
|
* Each = 125pSec.
|
2016-05-18 04:01:34 +02:00
|
|
|
*/
|
|
|
|
uint32_t emmc_rx_cmd_data_cntl1;
|
|
|
|
|
|
|
|
/* [14:8] HS400 mode 1 Number of dealy elements.Each = 125pSec.
|
|
|
|
* [6:0] HS400 mode 2 Number of dealy elements.Each = 125pSec.
|
|
|
|
*/
|
|
|
|
uint32_t emmc_rx_strobe_cntl;
|
|
|
|
|
|
|
|
/* [13:8] Auto Tuning mode Number of dealy elements.Each = 125pSec.
|
|
|
|
* [6:0] SDR104/HS200 Number of dealy elements.Each = 125pSec.
|
|
|
|
*/
|
|
|
|
uint32_t emmc_rx_cmd_data_cntl2;
|
|
|
|
|
2016-04-04 19:47:49 +02:00
|
|
|
/* Configure serial IRQ (SERIRQ) line. */
|
|
|
|
enum serirq_mode serirq_mode;
|
2016-03-28 23:45:59 +02:00
|
|
|
|
2016-06-27 19:57:13 +02:00
|
|
|
/* I2C bus configuration */
|
2016-11-10 00:09:40 +01:00
|
|
|
struct lpss_i2c_bus_config i2c[APOLLOLAKE_I2C_DEV_MAX];
|
2016-06-07 11:06:28 +02:00
|
|
|
|
|
|
|
uint8_t gpe0_dw1; /* GPE0_63_32 STS/EN */
|
|
|
|
uint8_t gpe0_dw2; /* GPE0_95_64 STS/EN */
|
|
|
|
uint8_t gpe0_dw3; /* GPE0_127_96 STS/EN */
|
2016-05-04 00:15:31 +02:00
|
|
|
|
|
|
|
/* Configure LPSS S0ix Enable */
|
|
|
|
uint8_t lpss_s0ix_enable;
|
2016-07-12 10:22:33 +02:00
|
|
|
|
|
|
|
/* Enable DPTF support */
|
|
|
|
int dptf_enable;
|
2016-08-25 22:42:04 +02:00
|
|
|
|
2016-09-27 19:48:35 +02:00
|
|
|
/* PL1 override value in mW for APL */
|
|
|
|
uint16_t tdp_pl1_override_mw;
|
2016-12-02 13:44:19 +01:00
|
|
|
/* PL2 override value in mW for APL */
|
|
|
|
uint16_t tdp_pl2_override_mw;
|
2016-09-27 19:48:35 +02:00
|
|
|
|
2016-09-03 01:04:27 +02:00
|
|
|
/* Configure Audio clk gate and power gate
|
|
|
|
* IOSF-SB port ID 92 offset 0x530 [5] and [3]
|
|
|
|
*/
|
|
|
|
uint8_t hdaudio_clk_gate_enable;
|
|
|
|
uint8_t hdaudio_pwr_gate_enable;
|
|
|
|
uint8_t hdaudio_bios_config_lockdown;
|
|
|
|
|
2016-08-25 22:42:04 +02:00
|
|
|
/* SLP S3 minimum assertion width. */
|
|
|
|
int slp_s3_assertion_width_usecs;
|
2016-08-24 02:56:17 +02:00
|
|
|
|
|
|
|
/* GPIO pin for PERST_0 */
|
|
|
|
uint16_t prt0_gpio;
|
2017-01-11 05:53:58 +01:00
|
|
|
|
|
|
|
/* USB2 eye diagram settings per port */
|
|
|
|
struct usb2_eye_per_port usb2eye[APOLLOLAKE_USB2_PORT_MAX];
|
|
|
|
|
2017-02-25 00:37:30 +01:00
|
|
|
/* GPIO SD card detect pin */
|
|
|
|
unsigned int sdcard_cd_gpio;
|
2016-03-05 06:41:13 +01:00
|
|
|
};
|
|
|
|
|
2017-02-25 00:37:30 +01:00
|
|
|
typedef struct soc_intel_apollolake_config config_t;
|
|
|
|
extern struct pci_operations soc_pci_ops;
|
|
|
|
|
2016-03-05 06:41:13 +01:00
|
|
|
#endif /* _SOC_APOLLOLAKE_CHIP_H_ */
|