blob: 9a8b21e003202af0943bf4c9609bd527a0a1276c [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
Kevin Paul Herbertbde6d302014-12-24 18:43:20 -08006#define DEFAULT_HECIBAR ((u8 *)0xfed17000)
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +01007
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +01008/*
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +01009 * D1:F0 PEG
10 */
Angel Ponsdd6a3d82020-06-22 17:21:23 +020011#define PEG_CAP 0xa2
12#define SLOTCAP 0xb4
13#define PEGLC 0xec
14#define D1F0_VCCAP 0x104
15#define D1F0_VC0RCTL 0x114
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010016
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010017/* Chipset types */
Angel Ponsdd6a3d82020-06-22 17:21:23 +020018#define IRONLAKE_MOBILE 0
Angel Pons95de2312020-02-17 13:08:53 +010019#define IRONLAKE_DESKTOP 1
Angel Ponsdd6a3d82020-06-22 17:21:23 +020020#define IRONLAKE_SERVER 2
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010021
Angel Ponscdd9db32020-09-15 00:11:27 +020022#include "memmap.h"
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010023
Shelley Chen4e9bb332021-10-20 15:43:45 -070024#define QUICKPATH_BUS (CONFIG_ECAM_MMCONF_BUS_NUMBER - 1)
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010025
26#include <southbridge/intel/ibexpeak/pch.h>
27
28/* Everything below this line is ignored in the DSDT */
29#ifndef __ACPI__
30
31/* Device 0:0.0 PCI configuration space (Host Bridge) */
32
Angel Pons35a77422020-09-15 00:31:26 +020033#include "registers/host_bridge.h"
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010034
Angel Ponse9d1d702020-07-22 12:47:00 +020035/*
Angel Ponsc642a0d2020-07-22 18:21:43 +020036 * Generic Non-Core Registers
37 */
38#define QPI_NON_CORE PCI_DEV(QUICKPATH_BUS, 0, 0)
39
Angel Pons9addda32020-07-22 18:37:32 +020040#define MAX_RTIDS 0x60
41#define DESIRED_CORES 0x80
42#define MIRROR_PORT_CTL 0xd0
43
Angel Ponsc642a0d2020-07-22 18:21:43 +020044/*
Angel Pons3ab19b32020-07-22 16:29:54 +020045 * SAD - System Address Decoder
Angel Ponse9d1d702020-07-22 12:47:00 +020046 */
Angel Pons3ab19b32020-07-22 16:29:54 +020047#define QPI_SAD PCI_DEV(QUICKPATH_BUS, 0, 1)
48
Angel Ponse9d1d702020-07-22 12:47:00 +020049#define QPD0F1_PAM(x) (0x40 + (x)) /* 0-6 */
Vladimir Serbinenko786c0f52014-01-02 10:16:46 +010050#define QPD0F1_SMRAM 0x4d /* System Management RAM Control */
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010051
Angel Pons45008932020-07-22 16:43:48 +020052#define SAD_PCIEXBAR 0x50
53
Angel Pons67573372020-07-22 16:56:00 +020054#define SAD_DRAM_RULE(x) (0x80 + 4 * (x)) /* 0-7 */
55#define SAD_INTERLEAVE_LIST(x) (0xc0 + 4 * (x)) /* 0-7 */
56
Angel Pons93d95172020-07-22 17:30:49 +020057/*
58 * QPI Link 0
59 */
60#define QPI_LINK_0 PCI_DEV(QUICKPATH_BUS, 2, 0)
61
Angel Pons08143572020-07-22 17:47:06 +020062#define QPI_QPILCP 0x40 /* QPI Link Capability */
63#define QPI_QPILCL 0x48 /* QPI Link Control */
64#define QPI_QPILS 0x50 /* QPI Link Status */
65#define QPI_DEF_RMT_VN_CREDITS 0x58 /* Default Available Remote Credits */
66
Angel Pons10993c42020-07-22 17:49:28 +020067/*
68 * QPI Physical Layer 0
69 */
70#define QPI_PHY_0 PCI_DEV(QUICKPATH_BUS, 2, 1)
71
Angel Ponsa457e352020-07-22 18:17:33 +020072#define QPI_PLL_STATUS 0x50
73#define QPI_PLL_RATIO 0x54
74#define QPI_PHY_CAPABILITY 0x68 /* QPI Phys. Layer Capability */
75#define QPI_PHY_CONTROL 0x6c /* QPI Phys. Layer Control */
76#define QPI_PHY_INIT_STATUS 0x80 /* QPI Phys. Layer Initialization Status */
77#define QPI_PHY_PRIM_TIMEOUT 0x94 /* QPI Phys. Layer Primary Timeout Value */
78#define QPI_PHY_PWR_MGMT 0xd0 /* QPI Phys. Layer Power Management */
79#define QPI_PHY_EP_SELECT 0xe0 /* QPI Phys. Layer Electrical Parameter Select */
80#define QPI_PHY_EP_MCTR 0xf4 /* QPI Phys. Layer Electrical Parameter Misc. Control */
81
Angel Ponscdd9db32020-09-15 00:11:27 +020082
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010083/* Device 0:2.0 PCI configuration space (Graphics Device) */
84
85#define MSAC 0x62 /* Multi Size Aperture Control */
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010086
87/*
88 * MCHBAR
89 */
90
Angel Ponsa8df6cf2021-01-20 01:32:17 +010091#include <northbridge/intel/common/fixed_bars.h>
92
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010093/*
94 * EPBAR - Egress Port Root Complex Register Block
95 */
96
Angel Pons58769982020-09-15 00:36:15 +020097#include "registers/epbar.h"
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010098
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +010099/*
100 * DMIBAR
101 */
102
Angel Pons58769982020-09-15 00:36:15 +0200103#include "registers/dmibar.h"
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +0100104
105#ifndef __ASSEMBLER__
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +0100106
Angel Pons95de2312020-02-17 13:08:53 +0100107void intel_ironlake_finalize_smm(void);
Kyösti Mälkki82c0e7e2019-11-05 19:06:56 +0200108
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +0100109int bridge_silicon_revision(void);
Angel Pons95de2312020-02-17 13:08:53 +0100110void ironlake_early_initialization(int chipset_type);
111void ironlake_late_initialization(void);
Arthur Heymanscea4fd92019-10-03 08:54:35 +0200112void mainboard_pre_raminit(void);
113void mainboard_get_spd_map(u8 *spd_addrmap);
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +0100114
Vladimir Serbinenkoc6f6be02013-11-12 22:32:08 +0100115#endif
116#endif
Angel Pons95de2312020-02-17 13:08:53 +0100117#endif /* __NORTHBRIDGE_INTEL_IRONLAKE_IRONLAKE_H__ */