2 * Register bitfield descriptions for Pondicherry2 memory controller.
4 * Copyright (c) 2016, Intel Corporation.
6 * This program is free software; you can redistribute it and/or modify it
7 * under the terms and conditions of the GNU General Public License,
8 * version 2, as published by the Free Software Foundation.
10 * This program is distributed in the hope it will be useful, but WITHOUT
11 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
19 struct b_cr_touud_lo_pci
{
25 #define b_cr_touud_lo_pci_port 0x4c
26 #define b_cr_touud_lo_pci_offset 0xa8
27 #define b_cr_touud_lo_pci_r_opcode 0x04
29 struct b_cr_touud_hi_pci
{
34 #define b_cr_touud_hi_pci_port 0x4c
35 #define b_cr_touud_hi_pci_offset 0xac
36 #define b_cr_touud_hi_pci_r_opcode 0x04
38 struct b_cr_tolud_pci
{
44 #define b_cr_tolud_pci_port 0x4c
45 #define b_cr_tolud_pci_offset 0xbc
46 #define b_cr_tolud_pci_r_opcode 0x04
48 struct b_cr_mchbar_lo_pci
{
55 struct b_cr_mchbar_hi_pci
{
60 /* Symmetric region */
61 struct b_cr_slice_channel_hash
{
62 u64 slice_1_disabled
: 1;
64 u64 interleave_mode
: 2;
65 u64 slice_0_mem_disabled
: 1;
67 u64 slice_hash_mask
: 14;
69 u64 enable_pmi_dual_data_mode
: 1;
70 u64 ch_1_disabled
: 1;
72 u64 sym_slice0_channel_enabled
: 2;
73 u64 sym_slice1_channel_enabled
: 2;
74 u64 ch_hash_mask
: 14;
79 #define b_cr_slice_channel_hash_port 0x4c
80 #define b_cr_slice_channel_hash_offset 0x4c58
81 #define b_cr_slice_channel_hash_r_opcode 0x06
83 struct b_cr_mot_out_base_mchbar
{
85 u32 mot_out_base
: 15;
91 #define b_cr_mot_out_base_mchbar_port 0x4c
92 #define b_cr_mot_out_base_mchbar_offset 0x6af0
93 #define b_cr_mot_out_base_mchbar_r_opcode 0x00
95 struct b_cr_mot_out_mask_mchbar
{
97 u32 mot_out_mask
: 15;
103 #define b_cr_mot_out_mask_mchbar_port 0x4c
104 #define b_cr_mot_out_mask_mchbar_offset 0x6af4
105 #define b_cr_mot_out_mask_mchbar_r_opcode 0x00
107 struct b_cr_asym_mem_region0_mchbar
{
109 u32 slice0_asym_base
: 11;
111 u32 slice0_asym_limit
: 11;
112 u32 slice0_asym_channel_select
: 1;
113 u32 slice0_asym_enable
: 1;
116 #define b_cr_asym_mem_region0_mchbar_port 0x4c
117 #define b_cr_asym_mem_region0_mchbar_offset 0x6e40
118 #define b_cr_asym_mem_region0_mchbar_r_opcode 0x00
120 struct b_cr_asym_mem_region1_mchbar
{
122 u32 slice1_asym_base
: 11;
124 u32 slice1_asym_limit
: 11;
125 u32 slice1_asym_channel_select
: 1;
126 u32 slice1_asym_enable
: 1;
129 #define b_cr_asym_mem_region1_mchbar_port 0x4c
130 #define b_cr_asym_mem_region1_mchbar_offset 0x6e44
131 #define b_cr_asym_mem_region1_mchbar_r_opcode 0x00
133 /* Some bit fields moved in above two structs on Denverton */
134 struct b_cr_asym_mem_region_denverton
{
136 u32 slice_asym_base
: 8;
138 u32 slice_asym_limit
: 8;
140 u32 slice_asym_enable
: 1;
143 struct b_cr_asym_2way_mem_region_mchbar
{
145 u32 asym_2way_intlv_mode
: 2;
146 u32 asym_2way_base
: 11;
148 u32 asym_2way_limit
: 11;
150 u32 asym_2way_interleave_enable
: 1;
153 #define b_cr_asym_2way_mem_region_mchbar_port 0x4c
154 #define b_cr_asym_2way_mem_region_mchbar_offset 0x6e50
155 #define b_cr_asym_2way_mem_region_mchbar_r_opcode 0x00
157 /* Apollo Lake d-unit */
175 u32 dramdevice_pr
: 2;
178 #define d_cr_drp0_offset 0x1400
179 #define d_cr_drp0_r_opcode 0x00
181 /* Denverton d-unit */
197 #define d_cr_dsch_port 0x16
198 #define d_cr_dsch_offset 0x0
199 #define d_cr_dsch_r_opcode 0x0
201 struct d_cr_ecc_ctrl
{
206 #define d_cr_ecc_ctrl_offset 0x180
207 #define d_cr_ecc_ctrl_r_opcode 0x0
223 #define d_cr_drp_offset 0x158
224 #define d_cr_drp_r_opcode 0x0
229 u32 bg0
: 5; /* if ddr3, ba2 = bg0 */
230 u32 bg1
: 5; /* if ddr3, ba3 = bg1 */
236 #define d_cr_dmap_offset 0x174
237 #define d_cr_dmap_r_opcode 0x0
245 #define d_cr_dmap1_offset 0xb4
246 #define d_cr_dmap1_r_opcode 0x0
258 #define d_cr_dmap2_offset 0x148
259 #define d_cr_dmap2_r_opcode 0x0
271 #define d_cr_dmap3_offset 0x14c
272 #define d_cr_dmap3_r_opcode 0x0
284 #define d_cr_dmap4_offset 0x150
285 #define d_cr_dmap4_r_opcode 0x0
298 #define d_cr_dmap5_offset 0x154
299 #define d_cr_dmap5_r_opcode 0x0
301 #endif /* _PND2_REGS_H */