Loading...
1/*
2 * Copyright 2013 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
24#ifndef SMU7_DISCRETE_H
25#define SMU7_DISCRETE_H
26
27#include "smu7.h"
28
29#pragma pack(push, 1)
30
31#define SMU7_DTE_ITERATIONS 5
32#define SMU7_DTE_SOURCES 3
33#define SMU7_DTE_SINKS 1
34#define SMU7_NUM_CPU_TES 0
35#define SMU7_NUM_GPU_TES 1
36#define SMU7_NUM_NON_TES 2
37
38struct SMU7_SoftRegisters
39{
40 uint32_t RefClockFrequency;
41 uint32_t PmTimerP;
42 uint32_t FeatureEnables;
43 uint32_t PreVBlankGap;
44 uint32_t VBlankTimeout;
45 uint32_t TrainTimeGap;
46
47 uint32_t MvddSwitchTime;
48 uint32_t LongestAcpiTrainTime;
49 uint32_t AcpiDelay;
50 uint32_t G5TrainTime;
51 uint32_t DelayMpllPwron;
52 uint32_t VoltageChangeTimeout;
53 uint32_t HandshakeDisables;
54
55 uint8_t DisplayPhy1Config;
56 uint8_t DisplayPhy2Config;
57 uint8_t DisplayPhy3Config;
58 uint8_t DisplayPhy4Config;
59
60 uint8_t DisplayPhy5Config;
61 uint8_t DisplayPhy6Config;
62 uint8_t DisplayPhy7Config;
63 uint8_t DisplayPhy8Config;
64
65 uint32_t AverageGraphicsA;
66 uint32_t AverageMemoryA;
67 uint32_t AverageGioA;
68
69 uint8_t SClkDpmEnabledLevels;
70 uint8_t MClkDpmEnabledLevels;
71 uint8_t LClkDpmEnabledLevels;
72 uint8_t PCIeDpmEnabledLevels;
73
74 uint8_t UVDDpmEnabledLevels;
75 uint8_t SAMUDpmEnabledLevels;
76 uint8_t ACPDpmEnabledLevels;
77 uint8_t VCEDpmEnabledLevels;
78
79 uint32_t DRAM_LOG_ADDR_H;
80 uint32_t DRAM_LOG_ADDR_L;
81 uint32_t DRAM_LOG_PHY_ADDR_H;
82 uint32_t DRAM_LOG_PHY_ADDR_L;
83 uint32_t DRAM_LOG_BUFF_SIZE;
84 uint32_t UlvEnterC;
85 uint32_t UlvTime;
86 uint32_t Reserved[3];
87
88};
89
90typedef struct SMU7_SoftRegisters SMU7_SoftRegisters;
91
92struct SMU7_Discrete_VoltageLevel
93{
94 uint16_t Voltage;
95 uint16_t StdVoltageHiSidd;
96 uint16_t StdVoltageLoSidd;
97 uint8_t Smio;
98 uint8_t padding;
99};
100
101typedef struct SMU7_Discrete_VoltageLevel SMU7_Discrete_VoltageLevel;
102
103struct SMU7_Discrete_GraphicsLevel
104{
105 uint32_t Flags;
106 uint32_t MinVddc;
107 uint32_t MinVddcPhases;
108
109 uint32_t SclkFrequency;
110
111 uint8_t padding1[2];
112 uint16_t ActivityLevel;
113
114 uint32_t CgSpllFuncCntl3;
115 uint32_t CgSpllFuncCntl4;
116 uint32_t SpllSpreadSpectrum;
117 uint32_t SpllSpreadSpectrum2;
118 uint32_t CcPwrDynRm;
119 uint32_t CcPwrDynRm1;
120 uint8_t SclkDid;
121 uint8_t DisplayWatermark;
122 uint8_t EnabledForActivity;
123 uint8_t EnabledForThrottle;
124 uint8_t UpH;
125 uint8_t DownH;
126 uint8_t VoltageDownH;
127 uint8_t PowerThrottle;
128 uint8_t DeepSleepDivId;
129 uint8_t padding[3];
130};
131
132typedef struct SMU7_Discrete_GraphicsLevel SMU7_Discrete_GraphicsLevel;
133
134struct SMU7_Discrete_ACPILevel
135{
136 uint32_t Flags;
137 uint32_t MinVddc;
138 uint32_t MinVddcPhases;
139 uint32_t SclkFrequency;
140 uint8_t SclkDid;
141 uint8_t DisplayWatermark;
142 uint8_t DeepSleepDivId;
143 uint8_t padding;
144 uint32_t CgSpllFuncCntl;
145 uint32_t CgSpllFuncCntl2;
146 uint32_t CgSpllFuncCntl3;
147 uint32_t CgSpllFuncCntl4;
148 uint32_t SpllSpreadSpectrum;
149 uint32_t SpllSpreadSpectrum2;
150 uint32_t CcPwrDynRm;
151 uint32_t CcPwrDynRm1;
152};
153
154typedef struct SMU7_Discrete_ACPILevel SMU7_Discrete_ACPILevel;
155
156struct SMU7_Discrete_Ulv
157{
158 uint32_t CcPwrDynRm;
159 uint32_t CcPwrDynRm1;
160 uint16_t VddcOffset;
161 uint8_t VddcOffsetVid;
162 uint8_t VddcPhase;
163 uint32_t Reserved;
164};
165
166typedef struct SMU7_Discrete_Ulv SMU7_Discrete_Ulv;
167
168struct SMU7_Discrete_MemoryLevel
169{
170 uint32_t MinVddc;
171 uint32_t MinVddcPhases;
172 uint32_t MinVddci;
173 uint32_t MinMvdd;
174
175 uint32_t MclkFrequency;
176
177 uint8_t EdcReadEnable;
178 uint8_t EdcWriteEnable;
179 uint8_t RttEnable;
180 uint8_t StutterEnable;
181
182 uint8_t StrobeEnable;
183 uint8_t StrobeRatio;
184 uint8_t EnabledForThrottle;
185 uint8_t EnabledForActivity;
186
187 uint8_t UpH;
188 uint8_t DownH;
189 uint8_t VoltageDownH;
190 uint8_t padding;
191
192 uint16_t ActivityLevel;
193 uint8_t DisplayWatermark;
194 uint8_t padding1;
195
196 uint32_t MpllFuncCntl;
197 uint32_t MpllFuncCntl_1;
198 uint32_t MpllFuncCntl_2;
199 uint32_t MpllAdFuncCntl;
200 uint32_t MpllDqFuncCntl;
201 uint32_t MclkPwrmgtCntl;
202 uint32_t DllCntl;
203 uint32_t MpllSs1;
204 uint32_t MpllSs2;
205};
206
207typedef struct SMU7_Discrete_MemoryLevel SMU7_Discrete_MemoryLevel;
208
209struct SMU7_Discrete_LinkLevel
210{
211 uint8_t PcieGenSpeed;
212 uint8_t PcieLaneCount;
213 uint8_t EnabledForActivity;
214 uint8_t Padding;
215 uint32_t DownT;
216 uint32_t UpT;
217 uint32_t Reserved;
218};
219
220typedef struct SMU7_Discrete_LinkLevel SMU7_Discrete_LinkLevel;
221
222
223struct SMU7_Discrete_MCArbDramTimingTableEntry
224{
225 uint32_t McArbDramTiming;
226 uint32_t McArbDramTiming2;
227 uint8_t McArbBurstTime;
228 uint8_t padding[3];
229};
230
231typedef struct SMU7_Discrete_MCArbDramTimingTableEntry SMU7_Discrete_MCArbDramTimingTableEntry;
232
233struct SMU7_Discrete_MCArbDramTimingTable
234{
235 SMU7_Discrete_MCArbDramTimingTableEntry entries[SMU__NUM_SCLK_DPM_STATE][SMU__NUM_MCLK_DPM_LEVELS];
236};
237
238typedef struct SMU7_Discrete_MCArbDramTimingTable SMU7_Discrete_MCArbDramTimingTable;
239
240struct SMU7_Discrete_UvdLevel
241{
242 uint32_t VclkFrequency;
243 uint32_t DclkFrequency;
244 uint16_t MinVddc;
245 uint8_t MinVddcPhases;
246 uint8_t VclkDivider;
247 uint8_t DclkDivider;
248 uint8_t padding[3];
249};
250
251typedef struct SMU7_Discrete_UvdLevel SMU7_Discrete_UvdLevel;
252
253struct SMU7_Discrete_ExtClkLevel
254{
255 uint32_t Frequency;
256 uint16_t MinVoltage;
257 uint8_t MinPhases;
258 uint8_t Divider;
259};
260
261typedef struct SMU7_Discrete_ExtClkLevel SMU7_Discrete_ExtClkLevel;
262
263struct SMU7_Discrete_StateInfo
264{
265 uint32_t SclkFrequency;
266 uint32_t MclkFrequency;
267 uint32_t VclkFrequency;
268 uint32_t DclkFrequency;
269 uint32_t SamclkFrequency;
270 uint32_t AclkFrequency;
271 uint32_t EclkFrequency;
272 uint16_t MvddVoltage;
273 uint16_t padding16;
274 uint8_t DisplayWatermark;
275 uint8_t McArbIndex;
276 uint8_t McRegIndex;
277 uint8_t SeqIndex;
278 uint8_t SclkDid;
279 int8_t SclkIndex;
280 int8_t MclkIndex;
281 uint8_t PCIeGen;
282
283};
284
285typedef struct SMU7_Discrete_StateInfo SMU7_Discrete_StateInfo;
286
287
288struct SMU7_Discrete_DpmTable
289{
290 SMU7_PIDController GraphicsPIDController;
291 SMU7_PIDController MemoryPIDController;
292 SMU7_PIDController LinkPIDController;
293
294 uint32_t SystemFlags;
295
296
297 uint32_t SmioMaskVddcVid;
298 uint32_t SmioMaskVddcPhase;
299 uint32_t SmioMaskVddciVid;
300 uint32_t SmioMaskMvddVid;
301
302 uint32_t VddcLevelCount;
303 uint32_t VddciLevelCount;
304 uint32_t MvddLevelCount;
305
306 SMU7_Discrete_VoltageLevel VddcLevel [SMU7_MAX_LEVELS_VDDC];
307// SMU7_Discrete_VoltageLevel VddcStandardReference [SMU7_MAX_LEVELS_VDDC];
308 SMU7_Discrete_VoltageLevel VddciLevel [SMU7_MAX_LEVELS_VDDCI];
309 SMU7_Discrete_VoltageLevel MvddLevel [SMU7_MAX_LEVELS_MVDD];
310
311 uint8_t GraphicsDpmLevelCount;
312 uint8_t MemoryDpmLevelCount;
313 uint8_t LinkLevelCount;
314 uint8_t UvdLevelCount;
315 uint8_t VceLevelCount;
316 uint8_t AcpLevelCount;
317 uint8_t SamuLevelCount;
318 uint8_t MasterDeepSleepControl;
319 uint32_t Reserved[5];
320// uint32_t SamuDefaultLevel;
321
322 SMU7_Discrete_GraphicsLevel GraphicsLevel [SMU7_MAX_LEVELS_GRAPHICS];
323 SMU7_Discrete_MemoryLevel MemoryACPILevel;
324 SMU7_Discrete_MemoryLevel MemoryLevel [SMU7_MAX_LEVELS_MEMORY];
325 SMU7_Discrete_LinkLevel LinkLevel [SMU7_MAX_LEVELS_LINK];
326 SMU7_Discrete_ACPILevel ACPILevel;
327 SMU7_Discrete_UvdLevel UvdLevel [SMU7_MAX_LEVELS_UVD];
328 SMU7_Discrete_ExtClkLevel VceLevel [SMU7_MAX_LEVELS_VCE];
329 SMU7_Discrete_ExtClkLevel AcpLevel [SMU7_MAX_LEVELS_ACP];
330 SMU7_Discrete_ExtClkLevel SamuLevel [SMU7_MAX_LEVELS_SAMU];
331 SMU7_Discrete_Ulv Ulv;
332
333 uint32_t SclkStepSize;
334 uint32_t Smio [SMU7_MAX_ENTRIES_SMIO];
335
336 uint8_t UvdBootLevel;
337 uint8_t VceBootLevel;
338 uint8_t AcpBootLevel;
339 uint8_t SamuBootLevel;
340
341 uint8_t UVDInterval;
342 uint8_t VCEInterval;
343 uint8_t ACPInterval;
344 uint8_t SAMUInterval;
345
346 uint8_t GraphicsBootLevel;
347 uint8_t GraphicsVoltageChangeEnable;
348 uint8_t GraphicsThermThrottleEnable;
349 uint8_t GraphicsInterval;
350
351 uint8_t VoltageInterval;
352 uint8_t ThermalInterval;
353 uint16_t TemperatureLimitHigh;
354
355 uint16_t TemperatureLimitLow;
356 uint8_t MemoryBootLevel;
357 uint8_t MemoryVoltageChangeEnable;
358
359 uint8_t MemoryInterval;
360 uint8_t MemoryThermThrottleEnable;
361 uint16_t VddcVddciDelta;
362
363 uint16_t VoltageResponseTime;
364 uint16_t PhaseResponseTime;
365
366 uint8_t PCIeBootLinkLevel;
367 uint8_t PCIeGenInterval;
368 uint8_t DTEInterval;
369 uint8_t DTEMode;
370
371 uint8_t SVI2Enable;
372 uint8_t VRHotGpio;
373 uint8_t AcDcGpio;
374 uint8_t ThermGpio;
375
376 uint16_t PPM_PkgPwrLimit;
377 uint16_t PPM_TemperatureLimit;
378
379 uint16_t DefaultTdp;
380 uint16_t TargetTdp;
381
382 uint16_t FpsHighT;
383 uint16_t FpsLowT;
384
385 uint16_t BAPMTI_R [SMU7_DTE_ITERATIONS][SMU7_DTE_SOURCES][SMU7_DTE_SINKS];
386 uint16_t BAPMTI_RC [SMU7_DTE_ITERATIONS][SMU7_DTE_SOURCES][SMU7_DTE_SINKS];
387
388 uint8_t DTEAmbientTempBase;
389 uint8_t DTETjOffset;
390 uint8_t GpuTjMax;
391 uint8_t GpuTjHyst;
392
393 uint16_t BootVddc;
394 uint16_t BootVddci;
395
396 uint16_t BootMVdd;
397 uint16_t padding;
398
399 uint32_t BAPM_TEMP_GRADIENT;
400
401 uint32_t LowSclkInterruptT;
402};
403
404typedef struct SMU7_Discrete_DpmTable SMU7_Discrete_DpmTable;
405
406#define SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE 16
407#define SMU7_DISCRETE_MC_REGISTER_ARRAY_SET_COUNT SMU7_MAX_LEVELS_MEMORY
408
409struct SMU7_Discrete_MCRegisterAddress
410{
411 uint16_t s0;
412 uint16_t s1;
413};
414
415typedef struct SMU7_Discrete_MCRegisterAddress SMU7_Discrete_MCRegisterAddress;
416
417struct SMU7_Discrete_MCRegisterSet
418{
419 uint32_t value[SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE];
420};
421
422typedef struct SMU7_Discrete_MCRegisterSet SMU7_Discrete_MCRegisterSet;
423
424struct SMU7_Discrete_MCRegisters
425{
426 uint8_t last;
427 uint8_t reserved[3];
428 SMU7_Discrete_MCRegisterAddress address[SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE];
429 SMU7_Discrete_MCRegisterSet data[SMU7_DISCRETE_MC_REGISTER_ARRAY_SET_COUNT];
430};
431
432typedef struct SMU7_Discrete_MCRegisters SMU7_Discrete_MCRegisters;
433
434struct SMU7_Discrete_FanTable
435{
436 uint16_t FdoMode;
437 int16_t TempMin;
438 int16_t TempMed;
439 int16_t TempMax;
440 int16_t Slope1;
441 int16_t Slope2;
442 int16_t FdoMin;
443 int16_t HystUp;
444 int16_t HystDown;
445 int16_t HystSlope;
446 int16_t TempRespLim;
447 int16_t TempCurr;
448 int16_t SlopeCurr;
449 int16_t PwmCurr;
450 uint32_t RefreshPeriod;
451 int16_t FdoMax;
452 uint8_t TempSrc;
453 int8_t Padding;
454};
455
456typedef struct SMU7_Discrete_FanTable SMU7_Discrete_FanTable;
457
458
459struct SMU7_Discrete_PmFuses {
460 // dw0-dw1
461 uint8_t BapmVddCVidHiSidd[8];
462
463 // dw2-dw3
464 uint8_t BapmVddCVidLoSidd[8];
465
466 // dw4-dw5
467 uint8_t VddCVid[8];
468
469 // dw6
470 uint8_t SviLoadLineEn;
471 uint8_t SviLoadLineVddC;
472 uint8_t SviLoadLineTrimVddC;
473 uint8_t SviLoadLineOffsetVddC;
474
475 // dw7
476 uint16_t TDC_VDDC_PkgLimit;
477 uint8_t TDC_VDDC_ThrottleReleaseLimitPerc;
478 uint8_t TDC_MAWt;
479
480 // dw8
481 uint8_t TdcWaterfallCtl;
482 uint8_t LPMLTemperatureMin;
483 uint8_t LPMLTemperatureMax;
484 uint8_t Reserved;
485
486 // dw9-dw10
487 uint8_t BapmVddCVidHiSidd2[8];
488
489 // dw11-dw12
490 int16_t FuzzyFan_ErrorSetDelta;
491 int16_t FuzzyFan_ErrorRateSetDelta;
492 int16_t FuzzyFan_PwmSetDelta;
493 uint16_t CalcMeasPowerBlend;
494
495 // dw13-dw16
496 uint8_t GnbLPML[16];
497
498 // dw17
499 uint8_t GnbLPMLMaxVid;
500 uint8_t GnbLPMLMinVid;
501 uint8_t Reserved1[2];
502
503 // dw18
504 uint16_t BapmVddCBaseLeakageHiSidd;
505 uint16_t BapmVddCBaseLeakageLoSidd;
506};
507
508typedef struct SMU7_Discrete_PmFuses SMU7_Discrete_PmFuses;
509
510
511#pragma pack(pop)
512
513#endif
514
1/*
2 * Copyright 2013 Advanced Micro Devices, Inc.
3 *
4 * Permission is hereby granted, free of charge, to any person obtaining a
5 * copy of this software and associated documentation files (the "Software"),
6 * to deal in the Software without restriction, including without limitation
7 * the rights to use, copy, modify, merge, publish, distribute, sublicense,
8 * and/or sell copies of the Software, and to permit persons to whom the
9 * Software is furnished to do so, subject to the following conditions:
10 *
11 * The above copyright notice and this permission notice shall be included in
12 * all copies or substantial portions of the Software.
13 *
14 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
17 * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
18 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
19 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
20 * OTHER DEALINGS IN THE SOFTWARE.
21 *
22 */
23
24#ifndef SMU7_DISCRETE_H
25#define SMU7_DISCRETE_H
26
27#include "smu7.h"
28
29#pragma pack(push, 1)
30
31#define SMU7_DTE_ITERATIONS 5
32#define SMU7_DTE_SOURCES 3
33#define SMU7_DTE_SINKS 1
34#define SMU7_NUM_CPU_TES 0
35#define SMU7_NUM_GPU_TES 1
36#define SMU7_NUM_NON_TES 2
37
38struct SMU7_SoftRegisters {
39 uint32_t RefClockFrequency;
40 uint32_t PmTimerP;
41 uint32_t FeatureEnables;
42 uint32_t PreVBlankGap;
43 uint32_t VBlankTimeout;
44 uint32_t TrainTimeGap;
45
46 uint32_t MvddSwitchTime;
47 uint32_t LongestAcpiTrainTime;
48 uint32_t AcpiDelay;
49 uint32_t G5TrainTime;
50 uint32_t DelayMpllPwron;
51 uint32_t VoltageChangeTimeout;
52 uint32_t HandshakeDisables;
53
54 uint8_t DisplayPhy1Config;
55 uint8_t DisplayPhy2Config;
56 uint8_t DisplayPhy3Config;
57 uint8_t DisplayPhy4Config;
58
59 uint8_t DisplayPhy5Config;
60 uint8_t DisplayPhy6Config;
61 uint8_t DisplayPhy7Config;
62 uint8_t DisplayPhy8Config;
63
64 uint32_t AverageGraphicsA;
65 uint32_t AverageMemoryA;
66 uint32_t AverageGioA;
67
68 uint8_t SClkDpmEnabledLevels;
69 uint8_t MClkDpmEnabledLevels;
70 uint8_t LClkDpmEnabledLevels;
71 uint8_t PCIeDpmEnabledLevels;
72
73 uint8_t UVDDpmEnabledLevels;
74 uint8_t SAMUDpmEnabledLevels;
75 uint8_t ACPDpmEnabledLevels;
76 uint8_t VCEDpmEnabledLevels;
77
78 uint32_t DRAM_LOG_ADDR_H;
79 uint32_t DRAM_LOG_ADDR_L;
80 uint32_t DRAM_LOG_PHY_ADDR_H;
81 uint32_t DRAM_LOG_PHY_ADDR_L;
82 uint32_t DRAM_LOG_BUFF_SIZE;
83 uint32_t UlvEnterC;
84 uint32_t UlvTime;
85 uint32_t Reserved[3];
86
87};
88
89typedef struct SMU7_SoftRegisters SMU7_SoftRegisters;
90
91struct SMU7_Discrete_VoltageLevel {
92 uint16_t Voltage;
93 uint16_t StdVoltageHiSidd;
94 uint16_t StdVoltageLoSidd;
95 uint8_t Smio;
96 uint8_t padding;
97};
98
99typedef struct SMU7_Discrete_VoltageLevel SMU7_Discrete_VoltageLevel;
100
101struct SMU7_Discrete_GraphicsLevel {
102 uint32_t Flags;
103 uint32_t MinVddc;
104 uint32_t MinVddcPhases;
105
106 uint32_t SclkFrequency;
107
108 uint8_t padding1[2];
109 uint16_t ActivityLevel;
110
111 uint32_t CgSpllFuncCntl3;
112 uint32_t CgSpllFuncCntl4;
113 uint32_t SpllSpreadSpectrum;
114 uint32_t SpllSpreadSpectrum2;
115 uint32_t CcPwrDynRm;
116 uint32_t CcPwrDynRm1;
117 uint8_t SclkDid;
118 uint8_t DisplayWatermark;
119 uint8_t EnabledForActivity;
120 uint8_t EnabledForThrottle;
121 uint8_t UpH;
122 uint8_t DownH;
123 uint8_t VoltageDownH;
124 uint8_t PowerThrottle;
125 uint8_t DeepSleepDivId;
126 uint8_t padding[3];
127};
128
129typedef struct SMU7_Discrete_GraphicsLevel SMU7_Discrete_GraphicsLevel;
130
131struct SMU7_Discrete_ACPILevel {
132 uint32_t Flags;
133 uint32_t MinVddc;
134 uint32_t MinVddcPhases;
135 uint32_t SclkFrequency;
136 uint8_t SclkDid;
137 uint8_t DisplayWatermark;
138 uint8_t DeepSleepDivId;
139 uint8_t padding;
140 uint32_t CgSpllFuncCntl;
141 uint32_t CgSpllFuncCntl2;
142 uint32_t CgSpllFuncCntl3;
143 uint32_t CgSpllFuncCntl4;
144 uint32_t SpllSpreadSpectrum;
145 uint32_t SpllSpreadSpectrum2;
146 uint32_t CcPwrDynRm;
147 uint32_t CcPwrDynRm1;
148};
149
150typedef struct SMU7_Discrete_ACPILevel SMU7_Discrete_ACPILevel;
151
152struct SMU7_Discrete_Ulv {
153 uint32_t CcPwrDynRm;
154 uint32_t CcPwrDynRm1;
155 uint16_t VddcOffset;
156 uint8_t VddcOffsetVid;
157 uint8_t VddcPhase;
158 uint32_t Reserved;
159};
160
161typedef struct SMU7_Discrete_Ulv SMU7_Discrete_Ulv;
162
163struct SMU7_Discrete_MemoryLevel {
164 uint32_t MinVddc;
165 uint32_t MinVddcPhases;
166 uint32_t MinVddci;
167 uint32_t MinMvdd;
168
169 uint32_t MclkFrequency;
170
171 uint8_t EdcReadEnable;
172 uint8_t EdcWriteEnable;
173 uint8_t RttEnable;
174 uint8_t StutterEnable;
175
176 uint8_t StrobeEnable;
177 uint8_t StrobeRatio;
178 uint8_t EnabledForThrottle;
179 uint8_t EnabledForActivity;
180
181 uint8_t UpH;
182 uint8_t DownH;
183 uint8_t VoltageDownH;
184 uint8_t padding;
185
186 uint16_t ActivityLevel;
187 uint8_t DisplayWatermark;
188 uint8_t padding1;
189
190 uint32_t MpllFuncCntl;
191 uint32_t MpllFuncCntl_1;
192 uint32_t MpllFuncCntl_2;
193 uint32_t MpllAdFuncCntl;
194 uint32_t MpllDqFuncCntl;
195 uint32_t MclkPwrmgtCntl;
196 uint32_t DllCntl;
197 uint32_t MpllSs1;
198 uint32_t MpllSs2;
199};
200
201typedef struct SMU7_Discrete_MemoryLevel SMU7_Discrete_MemoryLevel;
202
203struct SMU7_Discrete_LinkLevel {
204 uint8_t PcieGenSpeed;
205 uint8_t PcieLaneCount;
206 uint8_t EnabledForActivity;
207 uint8_t Padding;
208 uint32_t DownT;
209 uint32_t UpT;
210 uint32_t Reserved;
211};
212
213typedef struct SMU7_Discrete_LinkLevel SMU7_Discrete_LinkLevel;
214
215
216struct SMU7_Discrete_MCArbDramTimingTableEntry {
217 uint32_t McArbDramTiming;
218 uint32_t McArbDramTiming2;
219 uint8_t McArbBurstTime;
220 uint8_t padding[3];
221};
222
223typedef struct SMU7_Discrete_MCArbDramTimingTableEntry SMU7_Discrete_MCArbDramTimingTableEntry;
224
225struct SMU7_Discrete_MCArbDramTimingTable {
226 SMU7_Discrete_MCArbDramTimingTableEntry entries[SMU__NUM_SCLK_DPM_STATE][SMU__NUM_MCLK_DPM_LEVELS];
227};
228
229typedef struct SMU7_Discrete_MCArbDramTimingTable SMU7_Discrete_MCArbDramTimingTable;
230
231struct SMU7_Discrete_UvdLevel {
232 uint32_t VclkFrequency;
233 uint32_t DclkFrequency;
234 uint16_t MinVddc;
235 uint8_t MinVddcPhases;
236 uint8_t VclkDivider;
237 uint8_t DclkDivider;
238 uint8_t padding[3];
239};
240
241typedef struct SMU7_Discrete_UvdLevel SMU7_Discrete_UvdLevel;
242
243struct SMU7_Discrete_ExtClkLevel {
244 uint32_t Frequency;
245 uint16_t MinVoltage;
246 uint8_t MinPhases;
247 uint8_t Divider;
248};
249
250typedef struct SMU7_Discrete_ExtClkLevel SMU7_Discrete_ExtClkLevel;
251
252struct SMU7_Discrete_StateInfo {
253 uint32_t SclkFrequency;
254 uint32_t MclkFrequency;
255 uint32_t VclkFrequency;
256 uint32_t DclkFrequency;
257 uint32_t SamclkFrequency;
258 uint32_t AclkFrequency;
259 uint32_t EclkFrequency;
260 uint16_t MvddVoltage;
261 uint16_t padding16;
262 uint8_t DisplayWatermark;
263 uint8_t McArbIndex;
264 uint8_t McRegIndex;
265 uint8_t SeqIndex;
266 uint8_t SclkDid;
267 int8_t SclkIndex;
268 int8_t MclkIndex;
269 uint8_t PCIeGen;
270
271};
272
273typedef struct SMU7_Discrete_StateInfo SMU7_Discrete_StateInfo;
274
275
276struct SMU7_Discrete_DpmTable {
277 SMU7_PIDController GraphicsPIDController;
278 SMU7_PIDController MemoryPIDController;
279 SMU7_PIDController LinkPIDController;
280
281 uint32_t SystemFlags;
282
283
284 uint32_t SmioMaskVddcVid;
285 uint32_t SmioMaskVddcPhase;
286 uint32_t SmioMaskVddciVid;
287 uint32_t SmioMaskMvddVid;
288
289 uint32_t VddcLevelCount;
290 uint32_t VddciLevelCount;
291 uint32_t MvddLevelCount;
292
293 SMU7_Discrete_VoltageLevel VddcLevel [SMU7_MAX_LEVELS_VDDC];
294// SMU7_Discrete_VoltageLevel VddcStandardReference [SMU7_MAX_LEVELS_VDDC];
295 SMU7_Discrete_VoltageLevel VddciLevel [SMU7_MAX_LEVELS_VDDCI];
296 SMU7_Discrete_VoltageLevel MvddLevel [SMU7_MAX_LEVELS_MVDD];
297
298 uint8_t GraphicsDpmLevelCount;
299 uint8_t MemoryDpmLevelCount;
300 uint8_t LinkLevelCount;
301 uint8_t UvdLevelCount;
302 uint8_t VceLevelCount;
303 uint8_t AcpLevelCount;
304 uint8_t SamuLevelCount;
305 uint8_t MasterDeepSleepControl;
306 uint32_t Reserved[5];
307// uint32_t SamuDefaultLevel;
308
309 SMU7_Discrete_GraphicsLevel GraphicsLevel [SMU7_MAX_LEVELS_GRAPHICS];
310 SMU7_Discrete_MemoryLevel MemoryACPILevel;
311 SMU7_Discrete_MemoryLevel MemoryLevel [SMU7_MAX_LEVELS_MEMORY];
312 SMU7_Discrete_LinkLevel LinkLevel [SMU7_MAX_LEVELS_LINK];
313 SMU7_Discrete_ACPILevel ACPILevel;
314 SMU7_Discrete_UvdLevel UvdLevel [SMU7_MAX_LEVELS_UVD];
315 SMU7_Discrete_ExtClkLevel VceLevel [SMU7_MAX_LEVELS_VCE];
316 SMU7_Discrete_ExtClkLevel AcpLevel [SMU7_MAX_LEVELS_ACP];
317 SMU7_Discrete_ExtClkLevel SamuLevel [SMU7_MAX_LEVELS_SAMU];
318 SMU7_Discrete_Ulv Ulv;
319
320 uint32_t SclkStepSize;
321 uint32_t Smio [SMU7_MAX_ENTRIES_SMIO];
322
323 uint8_t UvdBootLevel;
324 uint8_t VceBootLevel;
325 uint8_t AcpBootLevel;
326 uint8_t SamuBootLevel;
327
328 uint8_t UVDInterval;
329 uint8_t VCEInterval;
330 uint8_t ACPInterval;
331 uint8_t SAMUInterval;
332
333 uint8_t GraphicsBootLevel;
334 uint8_t GraphicsVoltageChangeEnable;
335 uint8_t GraphicsThermThrottleEnable;
336 uint8_t GraphicsInterval;
337
338 uint8_t VoltageInterval;
339 uint8_t ThermalInterval;
340 uint16_t TemperatureLimitHigh;
341
342 uint16_t TemperatureLimitLow;
343 uint8_t MemoryBootLevel;
344 uint8_t MemoryVoltageChangeEnable;
345
346 uint8_t MemoryInterval;
347 uint8_t MemoryThermThrottleEnable;
348 uint16_t VddcVddciDelta;
349
350 uint16_t VoltageResponseTime;
351 uint16_t PhaseResponseTime;
352
353 uint8_t PCIeBootLinkLevel;
354 uint8_t PCIeGenInterval;
355 uint8_t DTEInterval;
356 uint8_t DTEMode;
357
358 uint8_t SVI2Enable;
359 uint8_t VRHotGpio;
360 uint8_t AcDcGpio;
361 uint8_t ThermGpio;
362
363 uint16_t PPM_PkgPwrLimit;
364 uint16_t PPM_TemperatureLimit;
365
366 uint16_t DefaultTdp;
367 uint16_t TargetTdp;
368
369 uint16_t FpsHighT;
370 uint16_t FpsLowT;
371
372 uint16_t BAPMTI_R [SMU7_DTE_ITERATIONS][SMU7_DTE_SOURCES][SMU7_DTE_SINKS];
373 uint16_t BAPMTI_RC [SMU7_DTE_ITERATIONS][SMU7_DTE_SOURCES][SMU7_DTE_SINKS];
374
375 uint8_t DTEAmbientTempBase;
376 uint8_t DTETjOffset;
377 uint8_t GpuTjMax;
378 uint8_t GpuTjHyst;
379
380 uint16_t BootVddc;
381 uint16_t BootVddci;
382
383 uint16_t BootMVdd;
384 uint16_t padding;
385
386 uint32_t BAPM_TEMP_GRADIENT;
387
388 uint32_t LowSclkInterruptT;
389};
390
391typedef struct SMU7_Discrete_DpmTable SMU7_Discrete_DpmTable;
392
393#define SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE 16
394#define SMU7_DISCRETE_MC_REGISTER_ARRAY_SET_COUNT SMU7_MAX_LEVELS_MEMORY
395
396struct SMU7_Discrete_MCRegisterAddress {
397 uint16_t s0;
398 uint16_t s1;
399};
400
401typedef struct SMU7_Discrete_MCRegisterAddress SMU7_Discrete_MCRegisterAddress;
402
403struct SMU7_Discrete_MCRegisterSet {
404 uint32_t value[SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE];
405};
406
407typedef struct SMU7_Discrete_MCRegisterSet SMU7_Discrete_MCRegisterSet;
408
409struct SMU7_Discrete_MCRegisters {
410 uint8_t last;
411 uint8_t reserved[3];
412 SMU7_Discrete_MCRegisterAddress address[SMU7_DISCRETE_MC_REGISTER_ARRAY_SIZE];
413 SMU7_Discrete_MCRegisterSet data[SMU7_DISCRETE_MC_REGISTER_ARRAY_SET_COUNT];
414};
415
416typedef struct SMU7_Discrete_MCRegisters SMU7_Discrete_MCRegisters;
417
418struct SMU7_Discrete_FanTable {
419 uint16_t FdoMode;
420 int16_t TempMin;
421 int16_t TempMed;
422 int16_t TempMax;
423 int16_t Slope1;
424 int16_t Slope2;
425 int16_t FdoMin;
426 int16_t HystUp;
427 int16_t HystDown;
428 int16_t HystSlope;
429 int16_t TempRespLim;
430 int16_t TempCurr;
431 int16_t SlopeCurr;
432 int16_t PwmCurr;
433 uint32_t RefreshPeriod;
434 int16_t FdoMax;
435 uint8_t TempSrc;
436 int8_t Padding;
437};
438
439typedef struct SMU7_Discrete_FanTable SMU7_Discrete_FanTable;
440
441
442struct SMU7_Discrete_PmFuses {
443 // dw0-dw1
444 uint8_t BapmVddCVidHiSidd[8];
445
446 // dw2-dw3
447 uint8_t BapmVddCVidLoSidd[8];
448
449 // dw4-dw5
450 uint8_t VddCVid[8];
451
452 // dw6
453 uint8_t SviLoadLineEn;
454 uint8_t SviLoadLineVddC;
455 uint8_t SviLoadLineTrimVddC;
456 uint8_t SviLoadLineOffsetVddC;
457
458 // dw7
459 uint16_t TDC_VDDC_PkgLimit;
460 uint8_t TDC_VDDC_ThrottleReleaseLimitPerc;
461 uint8_t TDC_MAWt;
462
463 // dw8
464 uint8_t TdcWaterfallCtl;
465 uint8_t LPMLTemperatureMin;
466 uint8_t LPMLTemperatureMax;
467 uint8_t Reserved;
468
469 // dw9-dw10
470 uint8_t BapmVddCVidHiSidd2[8];
471
472 // dw11-dw12
473 int16_t FuzzyFan_ErrorSetDelta;
474 int16_t FuzzyFan_ErrorRateSetDelta;
475 int16_t FuzzyFan_PwmSetDelta;
476 uint16_t CalcMeasPowerBlend;
477
478 // dw13-dw16
479 uint8_t GnbLPML[16];
480
481 // dw17
482 uint8_t GnbLPMLMaxVid;
483 uint8_t GnbLPMLMinVid;
484 uint8_t Reserved1[2];
485
486 // dw18
487 uint16_t BapmVddCBaseLeakageHiSidd;
488 uint16_t BapmVddCBaseLeakageLoSidd;
489};
490
491typedef struct SMU7_Discrete_PmFuses SMU7_Discrete_PmFuses;
492
493
494#pragma pack(pop)
495
496#endif
497