1
2
3
4
5
6#ifndef __AXP_VARS_H
7#define __AXP_VARS_H
8
9#include "ddr3_axp_config.h"
10#include "ddr3_axp_mc_static.h"
11#include "ddr3_axp_training_static.h"
12
13MV_DRAM_MODES ddr_modes[MV_DDR3_MODES_NUMBER] = {
14
15
16 {"db_800-400", 0xA, 0x5, 0x0, A0, ddr3_A0_db_400, NULL},
17 {"db_1200-300", 0x2, 0xC, 0x0, A0, ddr3_A0_db_400, NULL},
18 {"db_1200-600", 0x2, 0x5, 0x0, A0, NULL, NULL},
19 {"db_1333-667", 0x3, 0x5, 0x0, A0, ddr3_A0_db_667, ddr3_db_rev2_667},
20 {"db_1600-800", 0xB, 0x5, 0x0, A0, ddr3_A0_db_667, ddr3_db_rev2_800},
21 {"amc_1333-667", 0x3, 0x5, 0x0, A0_AMC, ddr3_A0_AMC_667, NULL},
22 {"db_667-667", 0x9, 0x13, 0x0, Z1, ddr3_Z1_db_600, ddr3_db_667},
23 {"db_800-400", 0xA, 0x1, 0x0, Z1, ddr3_Z1_db_300, ddr3_db_400},
24 {"db_1066-533", 0x1, 0x1, 0x0, Z1, ddr3_Z1_db_300, ddr3_db_533},
25 {"db_1200-300", 0x2, 0xC, 0x0, Z1, ddr3_Z1_db_300, ddr3_db_667},
26 {"db_1200-600", 0x2, 0x5, 0x0, Z1, ddr3_Z1_db_600, NULL},
27 {"db_1333-333", 0x3, 0xC, 0x0, Z1, ddr3_Z1_db_300, ddr3_db_400},
28 {"db_1333-667", 0x3, 0x5, 0x0, Z1, ddr3_Z1_db_600, ddr3_db_667},
29
30 {"pcac_1200-600", 0x2, 0x5, 0x0, Z1_PCAC, ddr3_Z1_db_600,
31 ddr3_pcac_600},
32
33 {"rd_667_0", 0x3, 0x5, 0x0, Z1_RD_SLED, ddr3_Z1_db_600, ddr3_rd_667_0},
34 {"rd_667_1", 0x3, 0x5, 0x1, Z1_RD_SLED, ddr3_Z1_db_600, ddr3_rd_667_1},
35 {"rd_667_2", 0x3, 0x5, 0x2, Z1_RD_SLED, ddr3_Z1_db_600, ddr3_rd_667_2},
36 {"rd_667_3", 0x3, 0x5, 0x3, Z1_RD_SLED, ddr3_Z1_db_600, ddr3_rd_667_3}
37};
38
39
40
41u16 odt_static[ODT_OPT][MAX_CS] = {
42 {0, 0, 0, 0},
43 {ODT40, 0, 0, 0},
44 {0, 0, 0, 0},
45 {ODT40, ODT40, 0, 0},
46 {0, 0, ODT40, 0},
47 {ODT30, 0, ODT30, 0},
48 {0, 0, 0, 0},
49 {ODT120, ODT20, ODT20, 0},
50 {0, 0, 0, 0},
51 {0, 0, 0, 0},
52 {0, 0, 0, 0},
53 {0, 0, 0, 0},
54 {0, 0, ODT40, 0},
55 {ODT20, 0, ODT120, ODT20},
56 {0, 0, 0, 0},
57 {ODT120, ODT30, ODT120, ODT30}
58};
59
60u16 odt_dynamic[ODT_OPT][MAX_CS] = {
61 {0, 0, 0, 0},
62 {0, 0, 0, 0},
63 {0, 0, 0, 0},
64 {0, 0, 0, 0},
65 {0, 0, 0, 0},
66 {ODT120D, 0, ODT120D, 0},
67 {0, 0, 0, 0},
68 {0, 0, ODT120D, 0},
69 {0, 0, 0, 0},
70 {0, 0, 0, 0},
71 {0, 0, 0, 0},
72 {0, 0, 0, 0},
73 {0, 0, 0, 0},
74 {ODT120D, 0, 0, 0},
75 {0, 0, 0, 0},
76 {0, 0, 0, 0}
77};
78
79u32 odt_config[ODT_OPT] = {
80 0, 0x00010000, 0, 0x00030000, 0x04000000, 0x05050104, 0, 0x07430340, 0,
81 0, 0, 0,
82 0x30000, 0x1C0D100C, 0, 0x3CC330C0
83};
84
85
86
87
88
89
90u8 spd_data[SPD_SIZE] = {
91
92 0x92, 0x10, 0x0B, 0x2, 0x3, 0x19, 0x0, 0x9, 0x09, 0x52, 0x1, 0x8, 0x0C,
93 0x0, 0x7E, 0x0, 0x69, 0x78,
94 0x69, 0x30, 0x69, 0x11, 0x20, 0x89, 0x0, 0x5, 0x3C, 0x3C, 0x0, 0xF0,
95 0x82, 0x5, 0x80, 0x0, 0x0, 0x0,
96 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
97 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
98 0x0, 0x0, 0x0, 0x0, 0x0F, 0x1, 0x3, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
99 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
100 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
101 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
102 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
103 0x0, 0x0, 0x0, 0x0, 0x0, 0x0,
104 0x0, 0x80, 0x2C, 0x1, 0x10, 0x23, 0x35, 0x28, 0xEB, 0xCA, 0x19, 0x8F
105};
106
107
108
109
110
111
112u32 cpu_fab_clk_to_hclk[FAB_OPT][CLK_CPU] =
113
114
115{
116 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
117 {0, 0, 0, 0, 0, 0, 0, 0, 0, 3000, 2500, 0},
118 {0, 0, 0, 0, 0, 0, 0, 0, 0, 4500, 3750, 0},
119 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
120 {0, 0, 2500, 0, 0, 0, 0, 0, 0, 0, 0, 0},
121 {4000, 3750, 3333, 3000, 2666, 2400, 0, 0, 0, 0, 5000, 2500},
122 {0, 0, 0, 0, 0, 0, 0, 0, 0, 3000, 0, 0},
123 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
124 {2500, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
125 {0, 0, 5000, 0, 4000, 0, 0, 0, 0, 0, 0, 3750},
126 {5000, 0, 0, 3750, 3333, 0, 0, 0, 0, 0, 0, 3125},
127 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
128 {0, 0, 3330, 3000, 0, 0, 0, 0, 0, 0, 0, 2500},
129 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3750},
130 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
131 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
132 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
133 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
134 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
135 {0, 0, 0, 0, 0, 0, 0, 0, 0, 3000, 2500, 0},
136 {3000, 0, 2500, 0, 0, 0, 0, 0, 0, 0, 3750, 0}
137};
138
139u32 cpu_ddr_ratios[FAB_OPT][CLK_CPU] =
140
141
142{
143 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
144 {0, 0, 0, 0, 0, 0, 0, 0, 0, DDR_333, DDR_400, 0},
145 {0, 0, 0, 0, 0, 0, 0, 0, 0, DDR_444, DDR_533, 0},
146 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
147 {0, 0, DDR_400, 0, 0, 0, 0, 0, 0, 0, 0, 0},
148 {DDR_500, DDR_533, DDR_600, DDR_666, DDR_750, DDR_833, 0, 0, 0, 0,
149 DDR_400, DDR_800},
150 {0, 0, 0, 0, 0, 0, 0, 0, 0, DDR_333, 0, 0},
151 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
152 {DDR_400, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
153 {0, 0, DDR_400, 0, DDR_500, 0, 0, 0, 0, 0, 0, DDR_533},
154 {DDR_400, 0, 0, DDR_533, DDR_600, 0, 0, 0, 0, 0, 0, DDR_640},
155 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
156 {0, 0, DDR_300, DDR_333, 0, 0, 0, 0, 0, 0, 0, DDR_400},
157 {0, 0, 0, 0, 0, 0, DDR_600, DDR_666, 0, 0, 0, DDR_533},
158 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
159 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
160 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
161 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
162 {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
163 {0, 0, 0, 0, 0, 0, 0, 0, 0, DDR_666, DDR_800, 0},
164 {DDR_666, 0, DDR_800, 0, 0, 0, 0, 0, 0, 0, DDR_533, 0}
165};
166
167u8 div_ratio1to1[CLK_VCO][CLK_DDR] =
168
169
170{ {0xA, 3, 0, 3, 0, 2, 0, 0, 0, 0, 0, 0},
171{0xB, 3, 0, 3, 0, 0, 2, 0, 0, 0, 0, 0},
172{0xC, 4, 0, 3, 0, 0, 0, 2, 0, 0, 0, 0},
173{0xD, 4, 0, 4, 0, 0, 0, 0, 2, 0, 0, 0},
174{0xF, 5, 0, 4, 0, 3, 0, 0, 0, 0, 0, 0},
175{0x11, 5, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0},
176{0x12, 6, 5, 4, 0, 0, 0, 3, 0, 0, 0, 0},
177{0x14, 7, 0, 5, 0, 4, 0, 0, 3, 0, 0, 0},
178{0x6, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0},
179{0x6, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0},
180{0x8, 2, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0},
181{0x10, 5, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0},
182{0x14, 0, 0, 5, 0, 0, 0, 0, 0, 0, 0, 0},
183{0x15, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0},
184{0x18, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0},
185{0x1A, 0, 0, 7, 0, 0, 0, 0, 0, 0, 0, 0},
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, 0, 0, 0, 0, 0, 0, 0},
217{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
218{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
219{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0},
220{0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0},
221{0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0},
222{0, 0, 0, 0, 0, 0, 0, 5, 5, 0, 0, 0}
223};
224
225#endif
226