Angel Pons | 4b42983 | 2020-04-02 23:48:50 +0200 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 2 | |
Angel Pons | 95de231 | 2020-02-17 13:08:53 +0100 | [diff] [blame] | 3 | #ifndef __NORTHBRIDGE_INTEL_IRONLAKE_IRONLAKE_H__ |
| 4 | #define __NORTHBRIDGE_INTEL_IRONLAKE_IRONLAKE_H__ |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 5 | |
Kevin Paul Herbert | bde6d30 | 2014-12-24 18:43:20 -0800 | [diff] [blame] | 6 | #define DEFAULT_HECIBAR ((u8 *)0xfed17000) |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 7 | |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 8 | /* |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 9 | * D1:F0 PEG |
| 10 | */ |
Angel Pons | dd6a3d8 | 2020-06-22 17:21:23 +0200 | [diff] [blame] | 11 | #define PEG_CAP 0xa2 |
| 12 | #define SLOTCAP 0xb4 |
| 13 | #define PEGLC 0xec |
| 14 | #define D1F0_VCCAP 0x104 |
| 15 | #define D1F0_VC0RCTL 0x114 |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 16 | |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 17 | /* Chipset types */ |
Angel Pons | dd6a3d8 | 2020-06-22 17:21:23 +0200 | [diff] [blame] | 18 | #define IRONLAKE_MOBILE 0 |
Angel Pons | 95de231 | 2020-02-17 13:08:53 +0100 | [diff] [blame] | 19 | #define IRONLAKE_DESKTOP 1 |
Angel Pons | dd6a3d8 | 2020-06-22 17:21:23 +0200 | [diff] [blame] | 20 | #define IRONLAKE_SERVER 2 |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 21 | |
Angel Pons | cdd9db3 | 2020-09-15 00:11:27 +0200 | [diff] [blame] | 22 | #include "memmap.h" |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 23 | |
Shelley Chen | 4e9bb33 | 2021-10-20 15:43:45 -0700 | [diff] [blame^] | 24 | #define QUICKPATH_BUS (CONFIG_ECAM_MMCONF_BUS_NUMBER - 1) |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 25 | |
| 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 Pons | 35a7742 | 2020-09-15 00:31:26 +0200 | [diff] [blame] | 33 | #include "registers/host_bridge.h" |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 34 | |
Angel Pons | e9d1d70 | 2020-07-22 12:47:00 +0200 | [diff] [blame] | 35 | /* |
Angel Pons | c642a0d | 2020-07-22 18:21:43 +0200 | [diff] [blame] | 36 | * Generic Non-Core Registers |
| 37 | */ |
| 38 | #define QPI_NON_CORE PCI_DEV(QUICKPATH_BUS, 0, 0) |
| 39 | |
Angel Pons | 9addda3 | 2020-07-22 18:37:32 +0200 | [diff] [blame] | 40 | #define MAX_RTIDS 0x60 |
| 41 | #define DESIRED_CORES 0x80 |
| 42 | #define MIRROR_PORT_CTL 0xd0 |
| 43 | |
Angel Pons | c642a0d | 2020-07-22 18:21:43 +0200 | [diff] [blame] | 44 | /* |
Angel Pons | 3ab19b3 | 2020-07-22 16:29:54 +0200 | [diff] [blame] | 45 | * SAD - System Address Decoder |
Angel Pons | e9d1d70 | 2020-07-22 12:47:00 +0200 | [diff] [blame] | 46 | */ |
Angel Pons | 3ab19b3 | 2020-07-22 16:29:54 +0200 | [diff] [blame] | 47 | #define QPI_SAD PCI_DEV(QUICKPATH_BUS, 0, 1) |
| 48 | |
Angel Pons | e9d1d70 | 2020-07-22 12:47:00 +0200 | [diff] [blame] | 49 | #define QPD0F1_PAM(x) (0x40 + (x)) /* 0-6 */ |
Vladimir Serbinenko | 786c0f5 | 2014-01-02 10:16:46 +0100 | [diff] [blame] | 50 | #define QPD0F1_SMRAM 0x4d /* System Management RAM Control */ |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 51 | |
Angel Pons | 4500893 | 2020-07-22 16:43:48 +0200 | [diff] [blame] | 52 | #define SAD_PCIEXBAR 0x50 |
| 53 | |
Angel Pons | 6757337 | 2020-07-22 16:56:00 +0200 | [diff] [blame] | 54 | #define SAD_DRAM_RULE(x) (0x80 + 4 * (x)) /* 0-7 */ |
| 55 | #define SAD_INTERLEAVE_LIST(x) (0xc0 + 4 * (x)) /* 0-7 */ |
| 56 | |
Angel Pons | 93d9517 | 2020-07-22 17:30:49 +0200 | [diff] [blame] | 57 | /* |
| 58 | * QPI Link 0 |
| 59 | */ |
| 60 | #define QPI_LINK_0 PCI_DEV(QUICKPATH_BUS, 2, 0) |
| 61 | |
Angel Pons | 0814357 | 2020-07-22 17:47:06 +0200 | [diff] [blame] | 62 | #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 Pons | 10993c4 | 2020-07-22 17:49:28 +0200 | [diff] [blame] | 67 | /* |
| 68 | * QPI Physical Layer 0 |
| 69 | */ |
| 70 | #define QPI_PHY_0 PCI_DEV(QUICKPATH_BUS, 2, 1) |
| 71 | |
Angel Pons | a457e35 | 2020-07-22 18:17:33 +0200 | [diff] [blame] | 72 | #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 Pons | cdd9db3 | 2020-09-15 00:11:27 +0200 | [diff] [blame] | 82 | |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 83 | /* Device 0:2.0 PCI configuration space (Graphics Device) */ |
| 84 | |
| 85 | #define MSAC 0x62 /* Multi Size Aperture Control */ |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 86 | |
| 87 | /* |
| 88 | * MCHBAR |
| 89 | */ |
| 90 | |
Angel Pons | a8df6cf | 2021-01-20 01:32:17 +0100 | [diff] [blame] | 91 | #include <northbridge/intel/common/fixed_bars.h> |
| 92 | |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 93 | /* |
| 94 | * EPBAR - Egress Port Root Complex Register Block |
| 95 | */ |
| 96 | |
Angel Pons | 5876998 | 2020-09-15 00:36:15 +0200 | [diff] [blame] | 97 | #include "registers/epbar.h" |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 98 | |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 99 | /* |
| 100 | * DMIBAR |
| 101 | */ |
| 102 | |
Angel Pons | 5876998 | 2020-09-15 00:36:15 +0200 | [diff] [blame] | 103 | #include "registers/dmibar.h" |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 104 | |
| 105 | #ifndef __ASSEMBLER__ |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 106 | |
Angel Pons | 95de231 | 2020-02-17 13:08:53 +0100 | [diff] [blame] | 107 | void intel_ironlake_finalize_smm(void); |
Kyösti Mälkki | 82c0e7e | 2019-11-05 19:06:56 +0200 | [diff] [blame] | 108 | |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 109 | int bridge_silicon_revision(void); |
Angel Pons | 95de231 | 2020-02-17 13:08:53 +0100 | [diff] [blame] | 110 | void ironlake_early_initialization(int chipset_type); |
| 111 | void ironlake_late_initialization(void); |
Arthur Heymans | cea4fd9 | 2019-10-03 08:54:35 +0200 | [diff] [blame] | 112 | void mainboard_pre_raminit(void); |
| 113 | void mainboard_get_spd_map(u8 *spd_addrmap); |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 114 | |
Vladimir Serbinenko | c6f6be0 | 2013-11-12 22:32:08 +0100 | [diff] [blame] | 115 | #endif |
| 116 | #endif |
Angel Pons | 95de231 | 2020-02-17 13:08:53 +0100 | [diff] [blame] | 117 | #endif /* __NORTHBRIDGE_INTEL_IRONLAKE_IRONLAKE_H__ */ |