1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Register bitfield descriptions for Pondicherry2 memory controller.
5 * Copyright (c) 2016, Intel Corporation.
11 struct b_cr_touud_lo_pci {
17 #define b_cr_touud_lo_pci_port 0x4c
18 #define b_cr_touud_lo_pci_offset 0xa8
19 #define b_cr_touud_lo_pci_r_opcode 0x04
21 struct b_cr_touud_hi_pci {
26 #define b_cr_touud_hi_pci_port 0x4c
27 #define b_cr_touud_hi_pci_offset 0xac
28 #define b_cr_touud_hi_pci_r_opcode 0x04
30 struct b_cr_tolud_pci {
36 #define b_cr_tolud_pci_port 0x4c
37 #define b_cr_tolud_pci_offset 0xbc
38 #define b_cr_tolud_pci_r_opcode 0x04
40 struct b_cr_mchbar_lo_pci {
47 struct b_cr_mchbar_hi_pci {
52 /* Symmetric region */
53 struct b_cr_slice_channel_hash {
54 u64 slice_1_disabled : 1;
56 u64 interleave_mode : 2;
57 u64 slice_0_mem_disabled : 1;
59 u64 slice_hash_mask : 14;
61 u64 enable_pmi_dual_data_mode : 1;
62 u64 ch_1_disabled : 1;
64 u64 sym_slice0_channel_enabled : 2;
65 u64 sym_slice1_channel_enabled : 2;
66 u64 ch_hash_mask : 14;
71 #define b_cr_slice_channel_hash_port 0x4c
72 #define b_cr_slice_channel_hash_offset 0x4c58
73 #define b_cr_slice_channel_hash_r_opcode 0x06
75 struct b_cr_mot_out_base_mchbar {
77 u32 mot_out_base : 15;
83 #define b_cr_mot_out_base_mchbar_port 0x4c
84 #define b_cr_mot_out_base_mchbar_offset 0x6af0
85 #define b_cr_mot_out_base_mchbar_r_opcode 0x00
87 struct b_cr_mot_out_mask_mchbar {
89 u32 mot_out_mask : 15;
95 #define b_cr_mot_out_mask_mchbar_port 0x4c
96 #define b_cr_mot_out_mask_mchbar_offset 0x6af4
97 #define b_cr_mot_out_mask_mchbar_r_opcode 0x00
99 struct b_cr_asym_mem_region0_mchbar {
101 u32 slice0_asym_base : 11;
103 u32 slice0_asym_limit : 11;
104 u32 slice0_asym_channel_select : 1;
105 u32 slice0_asym_enable : 1;
108 #define b_cr_asym_mem_region0_mchbar_port 0x4c
109 #define b_cr_asym_mem_region0_mchbar_offset 0x6e40
110 #define b_cr_asym_mem_region0_mchbar_r_opcode 0x00
112 struct b_cr_asym_mem_region1_mchbar {
114 u32 slice1_asym_base : 11;
116 u32 slice1_asym_limit : 11;
117 u32 slice1_asym_channel_select : 1;
118 u32 slice1_asym_enable : 1;
121 #define b_cr_asym_mem_region1_mchbar_port 0x4c
122 #define b_cr_asym_mem_region1_mchbar_offset 0x6e44
123 #define b_cr_asym_mem_region1_mchbar_r_opcode 0x00
125 /* Some bit fields moved in above two structs on Denverton */
126 struct b_cr_asym_mem_region_denverton {
128 u32 slice_asym_base : 8;
130 u32 slice_asym_limit : 8;
132 u32 slice_asym_enable : 1;
135 struct b_cr_asym_2way_mem_region_mchbar {
137 u32 asym_2way_intlv_mode : 2;
138 u32 asym_2way_base : 11;
140 u32 asym_2way_limit : 11;
142 u32 asym_2way_interleave_enable : 1;
145 #define b_cr_asym_2way_mem_region_mchbar_port 0x4c
146 #define b_cr_asym_2way_mem_region_mchbar_offset 0x6e50
147 #define b_cr_asym_2way_mem_region_mchbar_r_opcode 0x00
149 /* Apollo Lake d-unit */
167 u32 dramdevice_pr : 2;
170 #define d_cr_drp0_offset 0x1400
171 #define d_cr_drp0_r_opcode 0x00
173 /* Denverton d-unit */
189 #define d_cr_dsch_port 0x16
190 #define d_cr_dsch_offset 0x0
191 #define d_cr_dsch_r_opcode 0x0
193 struct d_cr_ecc_ctrl {
198 #define d_cr_ecc_ctrl_offset 0x180
199 #define d_cr_ecc_ctrl_r_opcode 0x0
215 #define d_cr_drp_offset 0x158
216 #define d_cr_drp_r_opcode 0x0
221 u32 bg0 : 5; /* if ddr3, ba2 = bg0 */
222 u32 bg1 : 5; /* if ddr3, ba3 = bg1 */
228 #define d_cr_dmap_offset 0x174
229 #define d_cr_dmap_r_opcode 0x0
237 #define d_cr_dmap1_offset 0xb4
238 #define d_cr_dmap1_r_opcode 0x0
250 #define d_cr_dmap2_offset 0x148
251 #define d_cr_dmap2_r_opcode 0x0
263 #define d_cr_dmap3_offset 0x14c
264 #define d_cr_dmap3_r_opcode 0x0
276 #define d_cr_dmap4_offset 0x150
277 #define d_cr_dmap4_r_opcode 0x0
290 #define d_cr_dmap5_offset 0x154
291 #define d_cr_dmap5_r_opcode 0x0
293 #endif /* _PND2_REGS_H */