blob: be5f11ba14d11eb3fc95617b2f33a1ed79a6616b [file] [log] [blame]
Angel Pons4b429832020-04-02 23:48:50 +02001/* SPDX-License-Identifier: GPL-2.0-only */
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +01002
Angel Pons95de2312020-02-17 13:08:53 +01003#ifndef __NORTHBRIDGE_INTEL_IRONLAKE_IRONLAKE_H__
4#define __NORTHBRIDGE_INTEL_IRONLAKE_IRONLAKE_H__
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +01005
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +01006/*
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +01007 * D1:F0 PEG
8 */
Angel Ponsdd6a3d82020-06-22 17:21:23 +02009#define PEG_CAP 0xa2
10#define SLOTCAP 0xb4
11#define PEGLC 0xec
12#define D1F0_VCCAP 0x104
13#define D1F0_VC0RCTL 0x114
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010014
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010015/* Chipset types */
Angel Ponsdd6a3d82020-06-22 17:21:23 +020016#define IRONLAKE_MOBILE 0
Angel Pons95de2312020-02-17 13:08:53 +010017#define IRONLAKE_DESKTOP 1
Angel Ponsdd6a3d82020-06-22 17:21:23 +020018#define IRONLAKE_SERVER 2
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010019
Angel Ponscdd9db32020-09-15 00:11:27 +020020#include "memmap.h"
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010021
Shelley Chen4e9bb332021-10-20 15:43:45 -070022#define QUICKPATH_BUS (CONFIG_ECAM_MMCONF_BUS_NUMBER - 1)
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010023
24#include <southbridge/intel/ibexpeak/pch.h>
25
26/* Everything below this line is ignored in the DSDT */
27#ifndef __ACPI__
28
29/* Device 0:0.0 PCI configuration space (Host Bridge) */
30
Angel Pons35a77422020-09-15 00:31:26 +020031#include "registers/host_bridge.h"
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010032
Angel Ponse9d1d702020-07-22 12:47:00 +020033/*
Angel Ponsc642a0d2020-07-22 18:21:43 +020034 * Generic Non-Core Registers
35 */
36#define QPI_NON_CORE PCI_DEV(QUICKPATH_BUS, 0, 0)
37
Angel Pons9addda32020-07-22 18:37:32 +020038#define MAX_RTIDS 0x60
39#define DESIRED_CORES 0x80
40#define MIRROR_PORT_CTL 0xd0
41
Angel Ponsc642a0d2020-07-22 18:21:43 +020042/*
Angel Pons3ab19b32020-07-22 16:29:54 +020043 * SAD - System Address Decoder
Angel Ponse9d1d702020-07-22 12:47:00 +020044 */
Angel Pons3ab19b32020-07-22 16:29:54 +020045#define QPI_SAD PCI_DEV(QUICKPATH_BUS, 0, 1)
46
Angel Ponse9d1d702020-07-22 12:47:00 +020047#define QPD0F1_PAM(x) (0x40 + (x)) /* 0-6 */
Vladimir Serbinenko786c0f52014-01-02 10:16:46 +010048#define QPD0F1_SMRAM 0x4d /* System Management RAM Control */
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010049
Angel Pons45008932020-07-22 16:43:48 +020050#define SAD_PCIEXBAR 0x50
51
Angel Pons67573372020-07-22 16:56:00 +020052#define SAD_DRAM_RULE(x) (0x80 + 4 * (x)) /* 0-7 */
53#define SAD_INTERLEAVE_LIST(x) (0xc0 + 4 * (x)) /* 0-7 */
54
Angel Pons93d95172020-07-22 17:30:49 +020055/*
56 * QPI Link 0
57 */
58#define QPI_LINK_0 PCI_DEV(QUICKPATH_BUS, 2, 0)
59
Angel Pons08143572020-07-22 17:47:06 +020060#define QPI_QPILCP 0x40 /* QPI Link Capability */
61#define QPI_QPILCL 0x48 /* QPI Link Control */
62#define QPI_QPILS 0x50 /* QPI Link Status */
63#define QPI_DEF_RMT_VN_CREDITS 0x58 /* Default Available Remote Credits */
64
Angel Pons10993c42020-07-22 17:49:28 +020065/*
66 * QPI Physical Layer 0
67 */
68#define QPI_PHY_0 PCI_DEV(QUICKPATH_BUS, 2, 1)
69
Angel Ponsa457e352020-07-22 18:17:33 +020070#define QPI_PLL_STATUS 0x50
71#define QPI_PLL_RATIO 0x54
72#define QPI_PHY_CAPABILITY 0x68 /* QPI Phys. Layer Capability */
73#define QPI_PHY_CONTROL 0x6c /* QPI Phys. Layer Control */
74#define QPI_PHY_INIT_STATUS 0x80 /* QPI Phys. Layer Initialization Status */
75#define QPI_PHY_PRIM_TIMEOUT 0x94 /* QPI Phys. Layer Primary Timeout Value */
76#define QPI_PHY_PWR_MGMT 0xd0 /* QPI Phys. Layer Power Management */
77#define QPI_PHY_EP_SELECT 0xe0 /* QPI Phys. Layer Electrical Parameter Select */
78#define QPI_PHY_EP_MCTR 0xf4 /* QPI Phys. Layer Electrical Parameter Misc. Control */
79
Angel Ponscdd9db32020-09-15 00:11:27 +020080
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010081/* Device 0:2.0 PCI configuration space (Graphics Device) */
82
83#define MSAC 0x62 /* Multi Size Aperture Control */
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010084
85/*
86 * MCHBAR
87 */
88
Angel Ponsa8df6cf2021-01-20 01:32:17 +010089#include <northbridge/intel/common/fixed_bars.h>
90
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010091/*
92 * EPBAR - Egress Port Root Complex Register Block
93 */
94
Angel Pons58769982020-09-15 00:36:15 +020095#include "registers/epbar.h"
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010096
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010097/*
98 * DMIBAR
99 */
100
Angel Pons58769982020-09-15 00:36:15 +0200101#include "registers/dmibar.h"
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +0100102
103#ifndef __ASSEMBLER__
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +0100104
Angel Pons95de2312020-02-17 13:08:53 +0100105void intel_ironlake_finalize_smm(void);
Kyösti Mälkki82c0e7e2019-11-05 19:06:56 +0200106
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +0100107int bridge_silicon_revision(void);
Angel Pons95de2312020-02-17 13:08:53 +0100108void ironlake_early_initialization(int chipset_type);
109void ironlake_late_initialization(void);
Arthur Heymanscea4fd92019-10-03 08:54:35 +0200110void mainboard_pre_raminit(void);
111void mainboard_get_spd_map(u8 *spd_addrmap);
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +0100112
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +0100113#endif
114#endif
Angel Pons95de2312020-02-17 13:08:53 +0100115#endif /* __NORTHBRIDGE_INTEL_IRONLAKE_IRONLAKE_H__ */