1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22 #ifndef SMU_11_0_PPTABLE_H
23 #define SMU_11_0_PPTABLE_H
24
25
26 #define SMU_11_0_TABLE_FORMAT_REVISION 12
27
28
29 #define SMU_11_0_PP_PLATFORM_CAP_POWERPLAY 0x1
30 #define SMU_11_0_PP_PLATFORM_CAP_SBIOSPOWERSOURCE 0x2
31 #define SMU_11_0_PP_PLATFORM_CAP_HARDWAREDC 0x4
32 #define SMU_11_0_PP_PLATFORM_CAP_BACO 0x8
33 #define SMU_11_0_PP_PLATFORM_CAP_MACO 0x10
34 #define SMU_11_0_PP_PLATFORM_CAP_SHADOWPSTATE 0x20
35
36
37 #define SMU_11_0_PP_THERMALCONTROLLER_NONE 0
38
39 #define SMU_11_0_PP_OVERDRIVE_VERSION 0x0800
40 #define SMU_11_0_PP_POWERSAVINGCLOCK_VERSION 0x0100
41
42 enum SMU_11_0_ODFEATURE_ID {
43 SMU_11_0_ODFEATURE_GFXCLK_LIMITS = 1 << 0,
44 SMU_11_0_ODFEATURE_GFXCLK_CURVE = 1 << 1,
45 SMU_11_0_ODFEATURE_UCLK_MAX = 1 << 2,
46 SMU_11_0_ODFEATURE_POWER_LIMIT = 1 << 3,
47 SMU_11_0_ODFEATURE_FAN_ACOUSTIC_LIMIT = 1 << 4,
48 SMU_11_0_ODFEATURE_FAN_SPEED_MIN = 1 << 5,
49 SMU_11_0_ODFEATURE_TEMPERATURE_FAN = 1 << 6,
50 SMU_11_0_ODFEATURE_TEMPERATURE_SYSTEM = 1 << 7,
51 SMU_11_0_ODFEATURE_MEMORY_TIMING_TUNE = 1 << 8,
52 SMU_11_0_ODFEATURE_FAN_ZERO_RPM_CONTROL = 1 << 9,
53 SMU_11_0_ODFEATURE_AUTO_UV_ENGINE = 1 << 10,
54 SMU_11_0_ODFEATURE_AUTO_OC_ENGINE = 1 << 11,
55 SMU_11_0_ODFEATURE_AUTO_OC_MEMORY = 1 << 12,
56 SMU_11_0_ODFEATURE_FAN_CURVE = 1 << 13,
57 SMU_11_0_ODFEATURE_COUNT = 14,
58 };
59 #define SMU_11_0_MAX_ODFEATURE 32
60
61 enum SMU_11_0_ODSETTING_ID {
62 SMU_11_0_ODSETTING_GFXCLKFMAX = 0,
63 SMU_11_0_ODSETTING_GFXCLKFMIN,
64 SMU_11_0_ODSETTING_VDDGFXCURVEFREQ_P1,
65 SMU_11_0_ODSETTING_VDDGFXCURVEVOLTAGE_P1,
66 SMU_11_0_ODSETTING_VDDGFXCURVEFREQ_P2,
67 SMU_11_0_ODSETTING_VDDGFXCURVEVOLTAGE_P2,
68 SMU_11_0_ODSETTING_VDDGFXCURVEFREQ_P3,
69 SMU_11_0_ODSETTING_VDDGFXCURVEVOLTAGE_P3,
70 SMU_11_0_ODSETTING_UCLKFMAX,
71 SMU_11_0_ODSETTING_POWERPERCENTAGE,
72 SMU_11_0_ODSETTING_FANRPMMIN,
73 SMU_11_0_ODSETTING_FANRPMACOUSTICLIMIT,
74 SMU_11_0_ODSETTING_FANTARGETTEMPERATURE,
75 SMU_11_0_ODSETTING_OPERATINGTEMPMAX,
76 SMU_11_0_ODSETTING_ACTIMING,
77 SMU_11_0_ODSETTING_FAN_ZERO_RPM_CONTROL,
78 SMU_11_0_ODSETTING_AUTOUVENGINE,
79 SMU_11_0_ODSETTING_AUTOOCENGINE,
80 SMU_11_0_ODSETTING_AUTOOCMEMORY,
81 SMU_11_0_ODSETTING_COUNT,
82 };
83 #define SMU_11_0_MAX_ODSETTING 32
84
85 struct smu_11_0_overdrive_table
86 {
87 uint8_t revision;
88 uint8_t reserve[3];
89 uint32_t feature_count;
90 uint32_t setting_count;
91 uint8_t cap[SMU_11_0_MAX_ODFEATURE];
92 uint32_t max[SMU_11_0_MAX_ODSETTING];
93 uint32_t min[SMU_11_0_MAX_ODSETTING];
94 } __attribute__((packed));
95
96 enum SMU_11_0_PPCLOCK_ID {
97 SMU_11_0_PPCLOCK_GFXCLK = 0,
98 SMU_11_0_PPCLOCK_VCLK,
99 SMU_11_0_PPCLOCK_DCLK,
100 SMU_11_0_PPCLOCK_ECLK,
101 SMU_11_0_PPCLOCK_SOCCLK,
102 SMU_11_0_PPCLOCK_UCLK,
103 SMU_11_0_PPCLOCK_DCEFCLK,
104 SMU_11_0_PPCLOCK_DISPCLK,
105 SMU_11_0_PPCLOCK_PIXCLK,
106 SMU_11_0_PPCLOCK_PHYCLK,
107 SMU_11_0_PPCLOCK_COUNT,
108 };
109 #define SMU_11_0_MAX_PPCLOCK 16
110
111 struct smu_11_0_power_saving_clock_table
112 {
113 uint8_t revision;
114 uint8_t reserve[3];
115 uint32_t count;
116 uint32_t max[SMU_11_0_MAX_PPCLOCK];
117 uint32_t min[SMU_11_0_MAX_PPCLOCK];
118 } __attribute__((packed));
119
120 struct smu_11_0_powerplay_table
121 {
122 struct atom_common_table_header header;
123 uint8_t table_revision;
124 uint16_t table_size;
125 uint32_t golden_pp_id;
126 uint32_t golden_revision;
127 uint16_t format_id;
128 uint32_t platform_caps;
129
130 uint8_t thermal_controller_type;
131
132 uint16_t small_power_limit1;
133 uint16_t small_power_limit2;
134 uint16_t boost_power_limit;
135 uint16_t od_turbo_power_limit;
136 uint16_t od_power_save_power_limit;
137 uint16_t software_shutdown_temp;
138
139 uint16_t reserve[6];
140
141 struct smu_11_0_power_saving_clock_table power_saving_clock;
142 struct smu_11_0_overdrive_table overdrive_table;
143
144 PPTable_t smc_pptable;
145 } __attribute__((packed));
146
147 #endif