1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24 #ifndef _TONGA_SMUMGR_H_
25 #define _TONGA_SMUMGR_H_
26
27 #include "smu72_discrete.h"
28 #include "smu7_smumgr.h"
29 #include "smu72.h"
30
31
32 #define ASICID_IS_TONGA_P(wDID, bRID) \
33 (((wDID == 0x6930) && ((bRID == 0xF0) || (bRID == 0xF1) || (bRID == 0xFF))) \
34 || ((wDID == 0x6920) && ((bRID == 0) || (bRID == 1))))
35
36 struct tonga_pt_defaults {
37 uint8_t svi_load_line_en;
38 uint8_t svi_load_line_vddC;
39 uint8_t tdc_vddc_throttle_release_limit_perc;
40 uint8_t tdc_mawt;
41 uint8_t tdc_waterfall_ctl;
42 uint8_t dte_ambient_temp_base;
43 uint32_t display_cac;
44 uint32_t bapm_temp_gradient;
45 uint16_t bapmti_r[SMU72_DTE_ITERATIONS * SMU72_DTE_SOURCES * SMU72_DTE_SINKS];
46 uint16_t bapmti_rc[SMU72_DTE_ITERATIONS * SMU72_DTE_SOURCES * SMU72_DTE_SINKS];
47 };
48
49 struct tonga_mc_reg_entry {
50 uint32_t mclk_max;
51 uint32_t mc_data[SMU72_DISCRETE_MC_REGISTER_ARRAY_SIZE];
52 };
53
54 struct tonga_mc_reg_table {
55 uint8_t last;
56 uint8_t num_entries;
57 uint16_t validflag;
58 struct tonga_mc_reg_entry mc_reg_table_entry[MAX_AC_TIMING_ENTRIES];
59 SMU72_Discrete_MCRegisterAddress mc_reg_address[SMU72_DISCRETE_MC_REGISTER_ARRAY_SIZE];
60 };
61
62
63 struct tonga_smumgr {
64
65 struct smu7_smumgr smu7_data;
66 struct SMU72_Discrete_DpmTable smc_state_table;
67 struct SMU72_Discrete_Ulv ulv_setting;
68 struct SMU72_Discrete_PmFuses power_tune_table;
69 const struct tonga_pt_defaults *power_tune_defaults;
70 SMU72_Discrete_MCRegisters mc_regs;
71 struct tonga_mc_reg_table mc_reg_table;
72 };
73
74 #endif