Home | History | Annotate | Line # | Download | only in hwmgr
      1  1.1  riastrad /*	$NetBSD: ppatomctrl.h,v 1.2 2021/12/18 23:45:26 riastradh Exp $	*/
      2  1.1  riastrad 
      3  1.1  riastrad /*
      4  1.1  riastrad  * Copyright 2015 Advanced Micro Devices, Inc.
      5  1.1  riastrad  *
      6  1.1  riastrad  * Permission is hereby granted, free of charge, to any person obtaining a
      7  1.1  riastrad  * copy of this software and associated documentation files (the "Software"),
      8  1.1  riastrad  * to deal in the Software without restriction, including without limitation
      9  1.1  riastrad  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
     10  1.1  riastrad  * and/or sell copies of the Software, and to permit persons to whom the
     11  1.1  riastrad  * Software is furnished to do so, subject to the following conditions:
     12  1.1  riastrad  *
     13  1.1  riastrad  * The above copyright notice and this permission notice shall be included in
     14  1.1  riastrad  * all copies or substantial portions of the Software.
     15  1.1  riastrad  *
     16  1.1  riastrad  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
     17  1.1  riastrad  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
     18  1.1  riastrad  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
     19  1.1  riastrad  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
     20  1.1  riastrad  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
     21  1.1  riastrad  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
     22  1.1  riastrad  * OTHER DEALINGS IN THE SOFTWARE.
     23  1.1  riastrad  *
     24  1.1  riastrad  */
     25  1.1  riastrad 
     26  1.1  riastrad #ifndef PP_ATOMVOLTAGECTRL_H
     27  1.1  riastrad #define PP_ATOMVOLTAGECTRL_H
     28  1.1  riastrad 
     29  1.1  riastrad #include "hwmgr.h"
     30  1.1  riastrad 
     31  1.1  riastrad #define MEM_TYPE_GDDR5  0x50
     32  1.1  riastrad #define MEM_TYPE_GDDR4  0x40
     33  1.1  riastrad #define MEM_TYPE_GDDR3  0x30
     34  1.1  riastrad #define MEM_TYPE_DDR2   0x20
     35  1.1  riastrad #define MEM_TYPE_GDDR1  0x10
     36  1.1  riastrad #define MEM_TYPE_DDR3   0xb0
     37  1.1  riastrad #define MEM_TYPE_MASK   0xF0
     38  1.1  riastrad 
     39  1.1  riastrad 
     40  1.1  riastrad /* As returned from PowerConnectorDetectionTable. */
     41  1.1  riastrad #define PP_ATOM_POWER_BUDGET_DISABLE_OVERDRIVE  0x80
     42  1.1  riastrad #define PP_ATOM_POWER_BUDGET_SHOW_WARNING       0x40
     43  1.1  riastrad #define PP_ATOM_POWER_BUDGET_SHOW_WAIVER        0x20
     44  1.1  riastrad #define PP_ATOM_POWER_POWER_BUDGET_BEHAVIOUR    0x0F
     45  1.1  riastrad 
     46  1.1  riastrad /* New functions for Evergreen and beyond. */
     47  1.1  riastrad #define PP_ATOMCTRL_MAX_VOLTAGE_ENTRIES 32
     48  1.1  riastrad 
     49  1.1  riastrad struct pp_atomctrl_clock_dividers {
     50  1.1  riastrad 	uint32_t pll_post_divider;
     51  1.1  riastrad 	uint32_t pll_feedback_divider;
     52  1.1  riastrad 	uint32_t pll_ref_divider;
     53  1.1  riastrad 	bool  enable_post_divider;
     54  1.1  riastrad };
     55  1.1  riastrad 
     56  1.1  riastrad typedef struct pp_atomctrl_clock_dividers pp_atomctrl_clock_dividers;
     57  1.1  riastrad 
     58  1.1  riastrad union pp_atomctrl_tcipll_fb_divider {
     59  1.1  riastrad 	struct {
     60  1.1  riastrad 		uint32_t ul_fb_div_frac : 14;
     61  1.1  riastrad 		uint32_t ul_fb_div : 12;
     62  1.1  riastrad 		uint32_t un_used : 6;
     63  1.1  riastrad 	};
     64  1.1  riastrad 	uint32_t ul_fb_divider;
     65  1.1  riastrad };
     66  1.1  riastrad 
     67  1.1  riastrad typedef union pp_atomctrl_tcipll_fb_divider pp_atomctrl_tcipll_fb_divider;
     68  1.1  riastrad 
     69  1.1  riastrad struct pp_atomctrl_clock_dividers_rv730 {
     70  1.1  riastrad 	uint32_t pll_post_divider;
     71  1.1  riastrad 	pp_atomctrl_tcipll_fb_divider mpll_feedback_divider;
     72  1.1  riastrad 	uint32_t pll_ref_divider;
     73  1.1  riastrad 	bool  enable_post_divider;
     74  1.1  riastrad 	bool  enable_dithen;
     75  1.1  riastrad 	uint32_t vco_mode;
     76  1.1  riastrad };
     77  1.1  riastrad typedef struct pp_atomctrl_clock_dividers_rv730 pp_atomctrl_clock_dividers_rv730;
     78  1.1  riastrad 
     79  1.1  riastrad 
     80  1.1  riastrad struct pp_atomctrl_clock_dividers_kong {
     81  1.1  riastrad 	uint32_t    pll_post_divider;
     82  1.1  riastrad 	uint32_t    real_clock;
     83  1.1  riastrad };
     84  1.1  riastrad typedef struct pp_atomctrl_clock_dividers_kong pp_atomctrl_clock_dividers_kong;
     85  1.1  riastrad 
     86  1.1  riastrad struct pp_atomctrl_clock_dividers_ci {
     87  1.1  riastrad 	uint32_t    pll_post_divider;               /* post divider value */
     88  1.1  riastrad 	uint32_t    real_clock;
     89  1.1  riastrad 	pp_atomctrl_tcipll_fb_divider   ul_fb_div;         /* Output Parameter: PLL FB divider */
     90  1.1  riastrad 	uint8_t   uc_pll_ref_div;                      /* Output Parameter: PLL ref divider */
     91  1.1  riastrad 	uint8_t   uc_pll_post_div;                      /* Output Parameter: PLL post divider */
     92  1.1  riastrad 	uint8_t   uc_pll_cntl_flag;                    /*Output Flags: control flag */
     93  1.1  riastrad };
     94  1.1  riastrad typedef struct pp_atomctrl_clock_dividers_ci pp_atomctrl_clock_dividers_ci;
     95  1.1  riastrad 
     96  1.1  riastrad struct pp_atomctrl_clock_dividers_vi {
     97  1.1  riastrad 	uint32_t    pll_post_divider;               /* post divider value */
     98  1.1  riastrad 	uint32_t    real_clock;
     99  1.1  riastrad 	pp_atomctrl_tcipll_fb_divider   ul_fb_div;         /*Output Parameter: PLL FB divider */
    100  1.1  riastrad 	uint8_t   uc_pll_ref_div;                      /*Output Parameter: PLL ref divider */
    101  1.1  riastrad 	uint8_t   uc_pll_post_div;                     /*Output Parameter: PLL post divider */
    102  1.1  riastrad 	uint8_t   uc_pll_cntl_flag;                    /*Output Flags: control flag */
    103  1.1  riastrad };
    104  1.1  riastrad typedef struct pp_atomctrl_clock_dividers_vi pp_atomctrl_clock_dividers_vi;
    105  1.1  riastrad 
    106  1.1  riastrad struct pp_atomctrl_clock_dividers_ai {
    107  1.1  riastrad 	u16 usSclk_fcw_frac;
    108  1.1  riastrad 	u16  usSclk_fcw_int;
    109  1.1  riastrad 	u8   ucSclkPostDiv;
    110  1.1  riastrad 	u8   ucSclkVcoMode;
    111  1.1  riastrad 	u8   ucSclkPllRange;
    112  1.1  riastrad 	u8   ucSscEnable;
    113  1.1  riastrad 	u16  usSsc_fcw1_frac;
    114  1.1  riastrad 	u16  usSsc_fcw1_int;
    115  1.1  riastrad 	u16  usReserved;
    116  1.1  riastrad 	u16  usPcc_fcw_int;
    117  1.1  riastrad 	u16  usSsc_fcw_slew_frac;
    118  1.1  riastrad 	u16  usPcc_fcw_slew_frac;
    119  1.1  riastrad };
    120  1.1  riastrad typedef struct pp_atomctrl_clock_dividers_ai pp_atomctrl_clock_dividers_ai;
    121  1.1  riastrad 
    122  1.1  riastrad 
    123  1.1  riastrad union pp_atomctrl_s_mpll_fb_divider {
    124  1.1  riastrad 	struct {
    125  1.1  riastrad 		uint32_t cl_kf : 12;
    126  1.1  riastrad 		uint32_t clk_frac : 12;
    127  1.1  riastrad 		uint32_t un_used : 8;
    128  1.1  riastrad 	};
    129  1.1  riastrad 	uint32_t ul_fb_divider;
    130  1.1  riastrad };
    131  1.1  riastrad typedef union pp_atomctrl_s_mpll_fb_divider pp_atomctrl_s_mpll_fb_divider;
    132  1.1  riastrad 
    133  1.1  riastrad enum pp_atomctrl_spread_spectrum_mode {
    134  1.1  riastrad 	pp_atomctrl_spread_spectrum_mode_down = 0,
    135  1.1  riastrad 	pp_atomctrl_spread_spectrum_mode_center
    136  1.1  riastrad };
    137  1.1  riastrad typedef enum pp_atomctrl_spread_spectrum_mode pp_atomctrl_spread_spectrum_mode;
    138  1.1  riastrad 
    139  1.1  riastrad struct pp_atomctrl_memory_clock_param {
    140  1.1  riastrad 	pp_atomctrl_s_mpll_fb_divider mpll_fb_divider;
    141  1.1  riastrad 	uint32_t mpll_post_divider;
    142  1.1  riastrad 	uint32_t bw_ctrl;
    143  1.1  riastrad 	uint32_t dll_speed;
    144  1.1  riastrad 	uint32_t vco_mode;
    145  1.1  riastrad 	uint32_t yclk_sel;
    146  1.1  riastrad 	uint32_t qdr;
    147  1.1  riastrad 	uint32_t half_rate;
    148  1.1  riastrad };
    149  1.1  riastrad typedef struct pp_atomctrl_memory_clock_param pp_atomctrl_memory_clock_param;
    150  1.1  riastrad 
    151  1.1  riastrad struct pp_atomctrl_memory_clock_param_ai {
    152  1.1  riastrad 	uint32_t ulClock;
    153  1.1  riastrad 	uint32_t ulPostDiv;
    154  1.1  riastrad 	uint16_t ulMclk_fcw_frac;
    155  1.1  riastrad 	uint16_t ulMclk_fcw_int;
    156  1.1  riastrad };
    157  1.1  riastrad typedef struct pp_atomctrl_memory_clock_param_ai pp_atomctrl_memory_clock_param_ai;
    158  1.1  riastrad 
    159  1.1  riastrad struct pp_atomctrl_internal_ss_info {
    160  1.1  riastrad 	uint32_t speed_spectrum_percentage;                      /* in 1/100 percentage */
    161  1.1  riastrad 	uint32_t speed_spectrum_rate;                            /* in KHz */
    162  1.1  riastrad 	pp_atomctrl_spread_spectrum_mode speed_spectrum_mode;
    163  1.1  riastrad };
    164  1.1  riastrad typedef struct pp_atomctrl_internal_ss_info pp_atomctrl_internal_ss_info;
    165  1.1  riastrad 
    166  1.1  riastrad #ifndef NUMBER_OF_M3ARB_PARAMS
    167  1.1  riastrad #define NUMBER_OF_M3ARB_PARAMS 3
    168  1.1  riastrad #endif
    169  1.1  riastrad 
    170  1.1  riastrad #ifndef NUMBER_OF_M3ARB_PARAM_SETS
    171  1.1  riastrad #define NUMBER_OF_M3ARB_PARAM_SETS 10
    172  1.1  riastrad #endif
    173  1.1  riastrad 
    174  1.1  riastrad struct pp_atomctrl_kong_system_info {
    175  1.1  riastrad 	uint32_t			ul_bootup_uma_clock;          /* in 10kHz unit */
    176  1.1  riastrad 	uint16_t			us_max_nb_voltage;            /* high NB voltage, calculated using current VDDNB (D24F2xDC) and VDDNB offset fuse; */
    177  1.1  riastrad 	uint16_t			us_min_nb_voltage;            /* low NB voltage, calculated using current VDDNB (D24F2xDC) and VDDNB offset fuse; */
    178  1.1  riastrad 	uint16_t			us_bootup_nb_voltage;         /* boot up NB voltage */
    179  1.1  riastrad 	uint8_t			uc_htc_tmp_lmt;               /* bit [22:16] of D24F3x64 Hardware Thermal Control (HTC) Register, may not be needed, TBD */
    180  1.1  riastrad 	uint8_t			uc_tj_offset;                /* bit [28:22] of D24F3xE4 Thermtrip Status Register,may not be needed, TBD */
    181  1.1  riastrad 	/* 0: default 1: uvd 2: fs-3d */
    182  1.1  riastrad 	uint32_t          ul_csr_m3_srb_cntl[NUMBER_OF_M3ARB_PARAM_SETS][NUMBER_OF_M3ARB_PARAMS];/* arrays with values for CSR M3 arbiter for default */
    183  1.1  riastrad };
    184  1.1  riastrad typedef struct pp_atomctrl_kong_system_info pp_atomctrl_kong_system_info;
    185  1.1  riastrad 
    186  1.1  riastrad struct pp_atomctrl_memory_info {
    187  1.1  riastrad 	uint8_t memory_vendor;
    188  1.1  riastrad 	uint8_t memory_type;
    189  1.1  riastrad };
    190  1.1  riastrad typedef struct pp_atomctrl_memory_info pp_atomctrl_memory_info;
    191  1.1  riastrad 
    192  1.1  riastrad #define MAX_AC_TIMING_ENTRIES 16
    193  1.1  riastrad 
    194  1.1  riastrad struct pp_atomctrl_memory_clock_range_table {
    195  1.1  riastrad 	uint8_t   num_entries;
    196  1.1  riastrad 	uint8_t   rsv[3];
    197  1.1  riastrad 
    198  1.1  riastrad 	uint32_t mclk[MAX_AC_TIMING_ENTRIES];
    199  1.1  riastrad };
    200  1.1  riastrad typedef struct pp_atomctrl_memory_clock_range_table pp_atomctrl_memory_clock_range_table;
    201  1.1  riastrad 
    202  1.1  riastrad struct pp_atomctrl_voltage_table_entry {
    203  1.1  riastrad 	uint16_t value;
    204  1.1  riastrad 	uint32_t smio_low;
    205  1.1  riastrad };
    206  1.1  riastrad 
    207  1.1  riastrad typedef struct pp_atomctrl_voltage_table_entry pp_atomctrl_voltage_table_entry;
    208  1.1  riastrad 
    209  1.1  riastrad struct pp_atomctrl_voltage_table {
    210  1.1  riastrad 	uint32_t count;
    211  1.1  riastrad 	uint32_t mask_low;
    212  1.1  riastrad 	uint32_t phase_delay;   /* Used for ATOM_GPIO_VOLTAGE_OBJECT_V3 and later */
    213  1.1  riastrad 	pp_atomctrl_voltage_table_entry entries[PP_ATOMCTRL_MAX_VOLTAGE_ENTRIES];
    214  1.1  riastrad };
    215  1.1  riastrad 
    216  1.1  riastrad typedef struct pp_atomctrl_voltage_table pp_atomctrl_voltage_table;
    217  1.1  riastrad 
    218  1.1  riastrad #define VBIOS_MC_REGISTER_ARRAY_SIZE           32
    219  1.1  riastrad #define VBIOS_MAX_AC_TIMING_ENTRIES            20
    220  1.1  riastrad 
    221  1.1  riastrad struct pp_atomctrl_mc_reg_entry {
    222  1.1  riastrad 	uint32_t           mclk_max;
    223  1.1  riastrad 	uint32_t mc_data[VBIOS_MC_REGISTER_ARRAY_SIZE];
    224  1.1  riastrad };
    225  1.1  riastrad typedef struct pp_atomctrl_mc_reg_entry pp_atomctrl_mc_reg_entry;
    226  1.1  riastrad 
    227  1.1  riastrad struct pp_atomctrl_mc_register_address {
    228  1.1  riastrad 	uint16_t s1;
    229  1.1  riastrad 	uint8_t  uc_pre_reg_data;
    230  1.1  riastrad };
    231  1.1  riastrad 
    232  1.1  riastrad typedef struct pp_atomctrl_mc_register_address pp_atomctrl_mc_register_address;
    233  1.1  riastrad 
    234  1.1  riastrad #define MAX_SCLK_RANGE 8
    235  1.1  riastrad 
    236  1.1  riastrad struct pp_atom_ctrl_sclk_range_table_entry{
    237  1.1  riastrad 	uint8_t  ucVco_setting;
    238  1.1  riastrad 	uint8_t  ucPostdiv;
    239  1.1  riastrad 	uint16_t usFcw_pcc;
    240  1.1  riastrad 	uint16_t usFcw_trans_upper;
    241  1.1  riastrad 	uint16_t usRcw_trans_lower;
    242  1.1  riastrad };
    243  1.1  riastrad 
    244  1.1  riastrad 
    245  1.1  riastrad struct pp_atom_ctrl_sclk_range_table{
    246  1.1  riastrad 	struct pp_atom_ctrl_sclk_range_table_entry entry[MAX_SCLK_RANGE];
    247  1.1  riastrad };
    248  1.1  riastrad 
    249  1.1  riastrad struct pp_atomctrl_mc_reg_table {
    250  1.1  riastrad 	uint8_t                         last;                    /* number of registers */
    251  1.1  riastrad 	uint8_t                         num_entries;             /* number of AC timing entries */
    252  1.1  riastrad 	pp_atomctrl_mc_reg_entry        mc_reg_table_entry[VBIOS_MAX_AC_TIMING_ENTRIES];
    253  1.1  riastrad 	pp_atomctrl_mc_register_address mc_reg_address[VBIOS_MC_REGISTER_ARRAY_SIZE];
    254  1.1  riastrad };
    255  1.1  riastrad typedef struct pp_atomctrl_mc_reg_table pp_atomctrl_mc_reg_table;
    256  1.1  riastrad 
    257  1.1  riastrad struct pp_atomctrl_gpio_pin_assignment {
    258  1.1  riastrad 	uint16_t                   us_gpio_pin_aindex;
    259  1.1  riastrad 	uint8_t                    uc_gpio_pin_bit_shift;
    260  1.1  riastrad };
    261  1.1  riastrad typedef struct pp_atomctrl_gpio_pin_assignment pp_atomctrl_gpio_pin_assignment;
    262  1.1  riastrad 
    263  1.1  riastrad struct pp_atom_ctrl__avfs_parameters {
    264  1.1  riastrad 	uint32_t  ulAVFS_meanNsigma_Acontant0;
    265  1.1  riastrad 	uint32_t  ulAVFS_meanNsigma_Acontant1;
    266  1.1  riastrad 	uint32_t  ulAVFS_meanNsigma_Acontant2;
    267  1.1  riastrad 	uint16_t usAVFS_meanNsigma_DC_tol_sigma;
    268  1.1  riastrad 	uint16_t usAVFS_meanNsigma_Platform_mean;
    269  1.1  riastrad 	uint16_t usAVFS_meanNsigma_Platform_sigma;
    270  1.1  riastrad 	uint32_t  ulGB_VDROOP_TABLE_CKSOFF_a0;
    271  1.1  riastrad 	uint32_t  ulGB_VDROOP_TABLE_CKSOFF_a1;
    272  1.1  riastrad 	uint32_t  ulGB_VDROOP_TABLE_CKSOFF_a2;
    273  1.1  riastrad 	uint32_t  ulGB_VDROOP_TABLE_CKSON_a0;
    274  1.1  riastrad 	uint32_t  ulGB_VDROOP_TABLE_CKSON_a1;
    275  1.1  riastrad 	uint32_t  ulGB_VDROOP_TABLE_CKSON_a2;
    276  1.1  riastrad 	uint32_t  ulAVFSGB_FUSE_TABLE_CKSOFF_m1;
    277  1.1  riastrad 	uint16_t  usAVFSGB_FUSE_TABLE_CKSOFF_m2;
    278  1.1  riastrad 	uint32_t  ulAVFSGB_FUSE_TABLE_CKSOFF_b;
    279  1.1  riastrad 	uint32_t  ulAVFSGB_FUSE_TABLE_CKSON_m1;
    280  1.1  riastrad 	uint16_t  usAVFSGB_FUSE_TABLE_CKSON_m2;
    281  1.1  riastrad 	uint32_t  ulAVFSGB_FUSE_TABLE_CKSON_b;
    282  1.1  riastrad 	uint16_t  usMaxVoltage_0_25mv;
    283  1.1  riastrad 	uint8_t  ucEnableGB_VDROOP_TABLE_CKSOFF;
    284  1.1  riastrad 	uint8_t  ucEnableGB_VDROOP_TABLE_CKSON;
    285  1.1  riastrad 	uint8_t  ucEnableGB_FUSE_TABLE_CKSOFF;
    286  1.1  riastrad 	uint8_t  ucEnableGB_FUSE_TABLE_CKSON;
    287  1.1  riastrad 	uint16_t usPSM_Age_ComFactor;
    288  1.1  riastrad 	uint8_t  ucEnableApplyAVFS_CKS_OFF_Voltage;
    289  1.1  riastrad 	uint8_t  ucReserved;
    290  1.1  riastrad };
    291  1.1  riastrad 
    292  1.1  riastrad extern bool atomctrl_get_pp_assign_pin(struct pp_hwmgr *hwmgr, const uint32_t pinId, pp_atomctrl_gpio_pin_assignment *gpio_pin_assignment);
    293  1.1  riastrad extern int atomctrl_get_voltage_evv_on_sclk(struct pp_hwmgr *hwmgr, uint8_t voltage_type, uint32_t sclk, uint16_t virtual_voltage_Id, uint16_t *voltage);
    294  1.1  riastrad extern int atomctrl_get_voltage_evv(struct pp_hwmgr *hwmgr, uint16_t virtual_voltage_id, uint16_t *voltage);
    295  1.1  riastrad extern uint32_t atomctrl_get_mpll_reference_clock(struct pp_hwmgr *hwmgr);
    296  1.1  riastrad extern int atomctrl_get_memory_clock_spread_spectrum(struct pp_hwmgr *hwmgr, const uint32_t memory_clock, pp_atomctrl_internal_ss_info *ssInfo);
    297  1.1  riastrad extern int atomctrl_get_engine_clock_spread_spectrum(struct pp_hwmgr *hwmgr, const uint32_t engine_clock, pp_atomctrl_internal_ss_info *ssInfo);
    298  1.1  riastrad extern int atomctrl_initialize_mc_reg_table(struct pp_hwmgr *hwmgr, uint8_t module_index, pp_atomctrl_mc_reg_table *table);
    299  1.1  riastrad extern int atomctrl_set_engine_dram_timings_rv770(struct pp_hwmgr *hwmgr, uint32_t engine_clock, uint32_t memory_clock);
    300  1.1  riastrad extern uint32_t atomctrl_get_reference_clock(struct pp_hwmgr *hwmgr);
    301  1.1  riastrad extern int atomctrl_get_memory_pll_dividers_si(struct pp_hwmgr *hwmgr, uint32_t clock_value, pp_atomctrl_memory_clock_param *mpll_param, bool strobe_mode);
    302  1.1  riastrad extern int atomctrl_get_engine_pll_dividers_vi(struct pp_hwmgr *hwmgr, uint32_t clock_value, pp_atomctrl_clock_dividers_vi *dividers);
    303  1.1  riastrad extern int atomctrl_get_dfs_pll_dividers_vi(struct pp_hwmgr *hwmgr, uint32_t clock_value, pp_atomctrl_clock_dividers_vi *dividers);
    304  1.1  riastrad extern bool atomctrl_is_voltage_controlled_by_gpio_v3(struct pp_hwmgr *hwmgr, uint8_t voltage_type, uint8_t voltage_mode);
    305  1.1  riastrad extern int atomctrl_get_voltage_table_v3(struct pp_hwmgr *hwmgr, uint8_t voltage_type, uint8_t voltage_mode, pp_atomctrl_voltage_table *voltage_table);
    306  1.1  riastrad extern int atomctrl_get_memory_pll_dividers_vi(struct pp_hwmgr *hwmgr,
    307  1.1  riastrad 		uint32_t clock_value, pp_atomctrl_memory_clock_param *mpll_param);
    308  1.1  riastrad extern int atomctrl_get_memory_pll_dividers_ai(struct pp_hwmgr *hwmgr,
    309  1.1  riastrad 		uint32_t clock_value, pp_atomctrl_memory_clock_param_ai *mpll_param);
    310  1.1  riastrad extern int atomctrl_get_engine_pll_dividers_kong(struct pp_hwmgr *hwmgr,
    311  1.1  riastrad 						 uint32_t clock_value,
    312  1.1  riastrad 						 pp_atomctrl_clock_dividers_kong *dividers);
    313  1.1  riastrad extern int atomctrl_read_efuse(struct pp_hwmgr *hwmgr, uint16_t start_index,
    314  1.1  riastrad 		uint16_t end_index, uint32_t mask, uint32_t *efuse);
    315  1.1  riastrad extern int atomctrl_calculate_voltage_evv_on_sclk(struct pp_hwmgr *hwmgr, uint8_t voltage_type,
    316  1.1  riastrad 		uint32_t sclk, uint16_t virtual_voltage_Id, uint16_t *voltage, uint16_t dpm_level, bool debug);
    317  1.1  riastrad extern int atomctrl_get_engine_pll_dividers_ai(struct pp_hwmgr *hwmgr, uint32_t clock_value, pp_atomctrl_clock_dividers_ai *dividers);
    318  1.1  riastrad extern int atomctrl_set_ac_timing_ai(struct pp_hwmgr *hwmgr, uint32_t memory_clock,
    319  1.1  riastrad 								uint8_t level);
    320  1.1  riastrad extern int atomctrl_get_voltage_evv_on_sclk_ai(struct pp_hwmgr *hwmgr, uint8_t voltage_type,
    321  1.1  riastrad 				uint32_t sclk, uint16_t virtual_voltage_Id, uint32_t *voltage);
    322  1.1  riastrad extern int atomctrl_get_smc_sclk_range_table(struct pp_hwmgr *hwmgr, struct pp_atom_ctrl_sclk_range_table *table);
    323  1.1  riastrad 
    324  1.1  riastrad extern int atomctrl_get_avfs_information(struct pp_hwmgr *hwmgr, struct pp_atom_ctrl__avfs_parameters *param);
    325  1.1  riastrad 
    326  1.1  riastrad extern int  atomctrl_get_svi2_info(struct pp_hwmgr *hwmgr, uint8_t voltage_type,
    327  1.1  riastrad 				uint8_t *svd_gpio_id, uint8_t *svc_gpio_id,
    328  1.1  riastrad 				uint16_t *load_line);
    329  1.1  riastrad 
    330  1.1  riastrad extern int atomctrl_get_leakage_vddc_base_on_leakage(struct pp_hwmgr *hwmgr,
    331  1.1  riastrad 					uint16_t *vddc, uint16_t *vddci,
    332  1.1  riastrad 					uint16_t virtual_voltage_id,
    333  1.1  riastrad 					uint16_t efuse_voltage_id);
    334  1.1  riastrad extern int atomctrl_get_leakage_id_from_efuse(struct pp_hwmgr *hwmgr, uint16_t *virtual_voltage_id);
    335  1.1  riastrad 
    336  1.1  riastrad extern void atomctrl_get_voltage_range(struct pp_hwmgr *hwmgr, uint32_t *max_vddc,
    337  1.1  riastrad 							uint32_t *min_vddc);
    338  1.1  riastrad #endif
    339  1.1  riastrad 
    340