xref: /dflybsd-src/sys/dev/drm/radeon/nislands_smc.h (revision c59a5c484fdf34b9afa6e283014e4fff693253cc)
157e252bfSMichael Neumann /*
257e252bfSMichael Neumann  * Copyright 2012 Advanced Micro Devices, Inc.
357e252bfSMichael Neumann  *
457e252bfSMichael Neumann  * Permission is hereby granted, free of charge, to any person obtaining a
557e252bfSMichael Neumann  * copy of this software and associated documentation files (the "Software"),
657e252bfSMichael Neumann  * to deal in the Software without restriction, including without limitation
757e252bfSMichael Neumann  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
857e252bfSMichael Neumann  * and/or sell copies of the Software, and to permit persons to whom the
957e252bfSMichael Neumann  * Software is furnished to do so, subject to the following conditions:
1057e252bfSMichael Neumann  *
1157e252bfSMichael Neumann  * The above copyright notice and this permission notice shall be included in
1257e252bfSMichael Neumann  * all copies or substantial portions of the Software.
1357e252bfSMichael Neumann  *
1457e252bfSMichael Neumann  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
1557e252bfSMichael Neumann  * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
1657e252bfSMichael Neumann  * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL
1757e252bfSMichael Neumann  * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
1857e252bfSMichael Neumann  * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
1957e252bfSMichael Neumann  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
2057e252bfSMichael Neumann  * OTHER DEALINGS IN THE SOFTWARE.
2157e252bfSMichael Neumann  *
2257e252bfSMichael Neumann  */
2357e252bfSMichael Neumann #ifndef __NISLANDS_SMC_H__
2457e252bfSMichael Neumann #define __NISLANDS_SMC_H__
2557e252bfSMichael Neumann 
2657e252bfSMichael Neumann #pragma pack(push, 1)
2757e252bfSMichael Neumann 
2857e252bfSMichael Neumann #define NISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE 16
2957e252bfSMichael Neumann 
3057e252bfSMichael Neumann struct PP_NIslands_Dpm2PerfLevel
3157e252bfSMichael Neumann {
3257e252bfSMichael Neumann     uint8_t     MaxPS;
3357e252bfSMichael Neumann     uint8_t     TgtAct;
3457e252bfSMichael Neumann     uint8_t     MaxPS_StepInc;
3557e252bfSMichael Neumann     uint8_t     MaxPS_StepDec;
3657e252bfSMichael Neumann     uint8_t     PSST;
3757e252bfSMichael Neumann     uint8_t     NearTDPDec;
3857e252bfSMichael Neumann     uint8_t     AboveSafeInc;
3957e252bfSMichael Neumann     uint8_t     BelowSafeInc;
4057e252bfSMichael Neumann     uint8_t     PSDeltaLimit;
4157e252bfSMichael Neumann     uint8_t     PSDeltaWin;
4257e252bfSMichael Neumann     uint8_t     Reserved[6];
4357e252bfSMichael Neumann };
4457e252bfSMichael Neumann 
4557e252bfSMichael Neumann typedef struct PP_NIslands_Dpm2PerfLevel PP_NIslands_Dpm2PerfLevel;
4657e252bfSMichael Neumann 
4757e252bfSMichael Neumann struct PP_NIslands_DPM2Parameters
4857e252bfSMichael Neumann {
4957e252bfSMichael Neumann     uint32_t    TDPLimit;
5057e252bfSMichael Neumann     uint32_t    NearTDPLimit;
5157e252bfSMichael Neumann     uint32_t    SafePowerLimit;
5257e252bfSMichael Neumann     uint32_t    PowerBoostLimit;
5357e252bfSMichael Neumann };
5457e252bfSMichael Neumann typedef struct PP_NIslands_DPM2Parameters PP_NIslands_DPM2Parameters;
5557e252bfSMichael Neumann 
5657e252bfSMichael Neumann struct NISLANDS_SMC_SCLK_VALUE
5757e252bfSMichael Neumann {
5857e252bfSMichael Neumann     uint32_t        vCG_SPLL_FUNC_CNTL;
5957e252bfSMichael Neumann     uint32_t        vCG_SPLL_FUNC_CNTL_2;
6057e252bfSMichael Neumann     uint32_t        vCG_SPLL_FUNC_CNTL_3;
6157e252bfSMichael Neumann     uint32_t        vCG_SPLL_FUNC_CNTL_4;
6257e252bfSMichael Neumann     uint32_t        vCG_SPLL_SPREAD_SPECTRUM;
6357e252bfSMichael Neumann     uint32_t        vCG_SPLL_SPREAD_SPECTRUM_2;
6457e252bfSMichael Neumann     uint32_t        sclk_value;
6557e252bfSMichael Neumann };
6657e252bfSMichael Neumann 
6757e252bfSMichael Neumann typedef struct NISLANDS_SMC_SCLK_VALUE NISLANDS_SMC_SCLK_VALUE;
6857e252bfSMichael Neumann 
6957e252bfSMichael Neumann struct NISLANDS_SMC_MCLK_VALUE
7057e252bfSMichael Neumann {
7157e252bfSMichael Neumann     uint32_t        vMPLL_FUNC_CNTL;
7257e252bfSMichael Neumann     uint32_t        vMPLL_FUNC_CNTL_1;
7357e252bfSMichael Neumann     uint32_t        vMPLL_FUNC_CNTL_2;
7457e252bfSMichael Neumann     uint32_t        vMPLL_AD_FUNC_CNTL;
7557e252bfSMichael Neumann     uint32_t        vMPLL_AD_FUNC_CNTL_2;
7657e252bfSMichael Neumann     uint32_t        vMPLL_DQ_FUNC_CNTL;
7757e252bfSMichael Neumann     uint32_t        vMPLL_DQ_FUNC_CNTL_2;
7857e252bfSMichael Neumann     uint32_t        vMCLK_PWRMGT_CNTL;
7957e252bfSMichael Neumann     uint32_t        vDLL_CNTL;
8057e252bfSMichael Neumann     uint32_t        vMPLL_SS;
8157e252bfSMichael Neumann     uint32_t        vMPLL_SS2;
8257e252bfSMichael Neumann     uint32_t        mclk_value;
8357e252bfSMichael Neumann };
8457e252bfSMichael Neumann 
8557e252bfSMichael Neumann typedef struct NISLANDS_SMC_MCLK_VALUE NISLANDS_SMC_MCLK_VALUE;
8657e252bfSMichael Neumann 
8757e252bfSMichael Neumann struct NISLANDS_SMC_VOLTAGE_VALUE
8857e252bfSMichael Neumann {
8957e252bfSMichael Neumann     uint16_t             value;
9057e252bfSMichael Neumann     uint8_t              index;
9157e252bfSMichael Neumann     uint8_t              padding;
9257e252bfSMichael Neumann };
9357e252bfSMichael Neumann 
9457e252bfSMichael Neumann typedef struct NISLANDS_SMC_VOLTAGE_VALUE NISLANDS_SMC_VOLTAGE_VALUE;
9557e252bfSMichael Neumann 
9657e252bfSMichael Neumann struct NISLANDS_SMC_HW_PERFORMANCE_LEVEL
9757e252bfSMichael Neumann {
9857e252bfSMichael Neumann     uint8_t                     arbValue;
9957e252bfSMichael Neumann     uint8_t                     ACIndex;
10057e252bfSMichael Neumann     uint8_t                     displayWatermark;
10157e252bfSMichael Neumann     uint8_t                     gen2PCIE;
10257e252bfSMichael Neumann     uint8_t                     reserved1;
10357e252bfSMichael Neumann     uint8_t                     reserved2;
10457e252bfSMichael Neumann     uint8_t                     strobeMode;
10557e252bfSMichael Neumann     uint8_t                     mcFlags;
10657e252bfSMichael Neumann     uint32_t                    aT;
10757e252bfSMichael Neumann     uint32_t                    bSP;
10857e252bfSMichael Neumann     NISLANDS_SMC_SCLK_VALUE     sclk;
10957e252bfSMichael Neumann     NISLANDS_SMC_MCLK_VALUE     mclk;
11057e252bfSMichael Neumann     NISLANDS_SMC_VOLTAGE_VALUE  vddc;
11157e252bfSMichael Neumann     NISLANDS_SMC_VOLTAGE_VALUE  mvdd;
11257e252bfSMichael Neumann     NISLANDS_SMC_VOLTAGE_VALUE  vddci;
11357e252bfSMichael Neumann     NISLANDS_SMC_VOLTAGE_VALUE  std_vddc;
11457e252bfSMichael Neumann     uint32_t                    powergate_en;
11557e252bfSMichael Neumann     uint8_t                     hUp;
11657e252bfSMichael Neumann     uint8_t                     hDown;
11757e252bfSMichael Neumann     uint8_t                     stateFlags;
11857e252bfSMichael Neumann     uint8_t                     arbRefreshState;
11957e252bfSMichael Neumann     uint32_t                    SQPowerThrottle;
12057e252bfSMichael Neumann     uint32_t                    SQPowerThrottle_2;
12157e252bfSMichael Neumann     uint32_t                    reserved[2];
12257e252bfSMichael Neumann     PP_NIslands_Dpm2PerfLevel   dpm2;
12357e252bfSMichael Neumann };
12457e252bfSMichael Neumann 
12557e252bfSMichael Neumann #define NISLANDS_SMC_STROBE_RATIO    0x0F
12657e252bfSMichael Neumann #define NISLANDS_SMC_STROBE_ENABLE   0x10
12757e252bfSMichael Neumann 
12857e252bfSMichael Neumann #define NISLANDS_SMC_MC_EDC_RD_FLAG  0x01
12957e252bfSMichael Neumann #define NISLANDS_SMC_MC_EDC_WR_FLAG  0x02
13057e252bfSMichael Neumann #define NISLANDS_SMC_MC_RTT_ENABLE   0x04
13157e252bfSMichael Neumann #define NISLANDS_SMC_MC_STUTTER_EN   0x08
13257e252bfSMichael Neumann 
13357e252bfSMichael Neumann typedef struct NISLANDS_SMC_HW_PERFORMANCE_LEVEL NISLANDS_SMC_HW_PERFORMANCE_LEVEL;
13457e252bfSMichael Neumann 
13557e252bfSMichael Neumann struct NISLANDS_SMC_SWSTATE
13657e252bfSMichael Neumann {
13757e252bfSMichael Neumann     uint8_t                             flags;
13857e252bfSMichael Neumann     uint8_t                             levelCount;
13957e252bfSMichael Neumann     uint8_t                             padding2;
14057e252bfSMichael Neumann     uint8_t                             padding3;
14157e252bfSMichael Neumann     NISLANDS_SMC_HW_PERFORMANCE_LEVEL   levels[1];
14257e252bfSMichael Neumann };
14357e252bfSMichael Neumann 
14457e252bfSMichael Neumann typedef struct NISLANDS_SMC_SWSTATE NISLANDS_SMC_SWSTATE;
14557e252bfSMichael Neumann 
14657e252bfSMichael Neumann #define NISLANDS_SMC_VOLTAGEMASK_VDDC  0
14757e252bfSMichael Neumann #define NISLANDS_SMC_VOLTAGEMASK_MVDD  1
14857e252bfSMichael Neumann #define NISLANDS_SMC_VOLTAGEMASK_VDDCI 2
14957e252bfSMichael Neumann #define NISLANDS_SMC_VOLTAGEMASK_MAX   4
15057e252bfSMichael Neumann 
15157e252bfSMichael Neumann struct NISLANDS_SMC_VOLTAGEMASKTABLE
15257e252bfSMichael Neumann {
15357e252bfSMichael Neumann     uint8_t  highMask[NISLANDS_SMC_VOLTAGEMASK_MAX];
15457e252bfSMichael Neumann     uint32_t lowMask[NISLANDS_SMC_VOLTAGEMASK_MAX];
15557e252bfSMichael Neumann };
15657e252bfSMichael Neumann 
15757e252bfSMichael Neumann typedef struct NISLANDS_SMC_VOLTAGEMASKTABLE NISLANDS_SMC_VOLTAGEMASKTABLE;
15857e252bfSMichael Neumann 
15957e252bfSMichael Neumann #define NISLANDS_MAX_NO_VREG_STEPS 32
16057e252bfSMichael Neumann 
16157e252bfSMichael Neumann struct NISLANDS_SMC_STATETABLE
16257e252bfSMichael Neumann {
16357e252bfSMichael Neumann     uint8_t                             thermalProtectType;
16457e252bfSMichael Neumann     uint8_t                             systemFlags;
16557e252bfSMichael Neumann     uint8_t                             maxVDDCIndexInPPTable;
16657e252bfSMichael Neumann     uint8_t                             extraFlags;
16757e252bfSMichael Neumann     uint8_t                             highSMIO[NISLANDS_MAX_NO_VREG_STEPS];
16857e252bfSMichael Neumann     uint32_t                            lowSMIO[NISLANDS_MAX_NO_VREG_STEPS];
16957e252bfSMichael Neumann     NISLANDS_SMC_VOLTAGEMASKTABLE       voltageMaskTable;
17057e252bfSMichael Neumann     PP_NIslands_DPM2Parameters          dpm2Params;
17157e252bfSMichael Neumann     NISLANDS_SMC_SWSTATE                initialState;
17257e252bfSMichael Neumann     NISLANDS_SMC_SWSTATE                ACPIState;
17357e252bfSMichael Neumann     NISLANDS_SMC_SWSTATE                ULVState;
17457e252bfSMichael Neumann     NISLANDS_SMC_SWSTATE                driverState;
17557e252bfSMichael Neumann     NISLANDS_SMC_HW_PERFORMANCE_LEVEL   dpmLevels[NISLANDS_MAX_SMC_PERFORMANCE_LEVELS_PER_SWSTATE - 1];
17657e252bfSMichael Neumann };
17757e252bfSMichael Neumann 
17857e252bfSMichael Neumann typedef struct NISLANDS_SMC_STATETABLE NISLANDS_SMC_STATETABLE;
17957e252bfSMichael Neumann 
18057e252bfSMichael Neumann #define NI_SMC_SOFT_REGISTERS_START        0x108
18157e252bfSMichael Neumann 
18257e252bfSMichael Neumann #define NI_SMC_SOFT_REGISTER_mclk_chg_timeout        0x0
18357e252bfSMichael Neumann #define NI_SMC_SOFT_REGISTER_delay_bbias             0xC
18457e252bfSMichael Neumann #define NI_SMC_SOFT_REGISTER_delay_vreg              0x10
18557e252bfSMichael Neumann #define NI_SMC_SOFT_REGISTER_delay_acpi              0x2C
18657e252bfSMichael Neumann #define NI_SMC_SOFT_REGISTER_seq_index               0x64
18757e252bfSMichael Neumann #define NI_SMC_SOFT_REGISTER_mvdd_chg_time           0x68
18857e252bfSMichael Neumann #define NI_SMC_SOFT_REGISTER_mclk_switch_lim         0x78
18957e252bfSMichael Neumann #define NI_SMC_SOFT_REGISTER_watermark_threshold     0x80
19057e252bfSMichael Neumann #define NI_SMC_SOFT_REGISTER_mc_block_delay          0x84
19157e252bfSMichael Neumann #define NI_SMC_SOFT_REGISTER_uvd_enabled             0x98
19257e252bfSMichael Neumann 
19357e252bfSMichael Neumann #define SMC_NISLANDS_MC_TPP_CAC_NUM_OF_ENTRIES 16
19457e252bfSMichael Neumann #define SMC_NISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES 16
19557e252bfSMichael Neumann #define SMC_NISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES 16
19657e252bfSMichael Neumann #define SMC_NISLANDS_BIF_LUT_NUM_OF_ENTRIES 4
19757e252bfSMichael Neumann 
19857e252bfSMichael Neumann struct SMC_NISLANDS_MC_TPP_CAC_TABLE
19957e252bfSMichael Neumann {
20057e252bfSMichael Neumann     uint32_t    tpp[SMC_NISLANDS_MC_TPP_CAC_NUM_OF_ENTRIES];
20157e252bfSMichael Neumann     uint32_t    cacValue[SMC_NISLANDS_MC_TPP_CAC_NUM_OF_ENTRIES];
20257e252bfSMichael Neumann };
20357e252bfSMichael Neumann 
20457e252bfSMichael Neumann typedef struct SMC_NISLANDS_MC_TPP_CAC_TABLE SMC_NISLANDS_MC_TPP_CAC_TABLE;
20557e252bfSMichael Neumann 
20657e252bfSMichael Neumann 
20757e252bfSMichael Neumann struct PP_NIslands_CACTABLES
20857e252bfSMichael Neumann {
20957e252bfSMichael Neumann     uint32_t                cac_bif_lut[SMC_NISLANDS_BIF_LUT_NUM_OF_ENTRIES];
21057e252bfSMichael Neumann     uint32_t                cac_lkge_lut[SMC_NISLANDS_LKGE_LUT_NUM_OF_TEMP_ENTRIES][SMC_NISLANDS_LKGE_LUT_NUM_OF_VOLT_ENTRIES];
21157e252bfSMichael Neumann 
21257e252bfSMichael Neumann     uint32_t                pwr_const;
21357e252bfSMichael Neumann 
21457e252bfSMichael Neumann     uint32_t                dc_cacValue;
21557e252bfSMichael Neumann     uint32_t                bif_cacValue;
21657e252bfSMichael Neumann     uint32_t                lkge_pwr;
21757e252bfSMichael Neumann 
21857e252bfSMichael Neumann     uint8_t                 cac_width;
21957e252bfSMichael Neumann     uint8_t                 window_size_p2;
22057e252bfSMichael Neumann 
22157e252bfSMichael Neumann     uint8_t                 num_drop_lsb;
22257e252bfSMichael Neumann     uint8_t                 padding_0;
22357e252bfSMichael Neumann 
22457e252bfSMichael Neumann     uint32_t                last_power;
22557e252bfSMichael Neumann 
22657e252bfSMichael Neumann     uint8_t                 AllowOvrflw;
22757e252bfSMichael Neumann     uint8_t                 MCWrWeight;
22857e252bfSMichael Neumann     uint8_t                 MCRdWeight;
22957e252bfSMichael Neumann     uint8_t                 padding_1[9];
23057e252bfSMichael Neumann 
23157e252bfSMichael Neumann     uint8_t                 enableWinAvg;
23257e252bfSMichael Neumann     uint8_t                 numWin_TDP;
23357e252bfSMichael Neumann     uint8_t                 l2numWin_TDP;
23457e252bfSMichael Neumann     uint8_t                 WinIndex;
23557e252bfSMichael Neumann 
23657e252bfSMichael Neumann     uint32_t                dynPwr_TDP[4];
23757e252bfSMichael Neumann     uint32_t                lkgePwr_TDP[4];
23857e252bfSMichael Neumann     uint32_t                power_TDP[4];
23957e252bfSMichael Neumann     uint32_t                avg_dynPwr_TDP;
24057e252bfSMichael Neumann     uint32_t                avg_lkgePwr_TDP;
24157e252bfSMichael Neumann     uint32_t                avg_power_TDP;
24257e252bfSMichael Neumann     uint32_t                lts_power_TDP;
24357e252bfSMichael Neumann     uint8_t                 lts_truncate_n;
24457e252bfSMichael Neumann     uint8_t                 padding_2[7];
24557e252bfSMichael Neumann };
24657e252bfSMichael Neumann 
24757e252bfSMichael Neumann typedef struct PP_NIslands_CACTABLES PP_NIslands_CACTABLES;
24857e252bfSMichael Neumann 
24957e252bfSMichael Neumann #define SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE 32
25057e252bfSMichael Neumann #define SMC_NISLANDS_MC_REGISTER_ARRAY_SET_COUNT 20
25157e252bfSMichael Neumann 
25257e252bfSMichael Neumann struct SMC_NIslands_MCRegisterAddress
25357e252bfSMichael Neumann {
25457e252bfSMichael Neumann     uint16_t s0;
25557e252bfSMichael Neumann     uint16_t s1;
25657e252bfSMichael Neumann };
25757e252bfSMichael Neumann 
25857e252bfSMichael Neumann typedef struct SMC_NIslands_MCRegisterAddress SMC_NIslands_MCRegisterAddress;
25957e252bfSMichael Neumann 
26057e252bfSMichael Neumann 
26157e252bfSMichael Neumann struct SMC_NIslands_MCRegisterSet
26257e252bfSMichael Neumann {
26357e252bfSMichael Neumann     uint32_t value[SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE];
26457e252bfSMichael Neumann };
26557e252bfSMichael Neumann 
26657e252bfSMichael Neumann typedef struct SMC_NIslands_MCRegisterSet SMC_NIslands_MCRegisterSet;
26757e252bfSMichael Neumann 
26857e252bfSMichael Neumann struct SMC_NIslands_MCRegisters
26957e252bfSMichael Neumann {
27057e252bfSMichael Neumann     uint8_t                             last;
27157e252bfSMichael Neumann     uint8_t                             reserved[3];
27257e252bfSMichael Neumann     SMC_NIslands_MCRegisterAddress      address[SMC_NISLANDS_MC_REGISTER_ARRAY_SIZE];
27357e252bfSMichael Neumann     SMC_NIslands_MCRegisterSet          data[SMC_NISLANDS_MC_REGISTER_ARRAY_SET_COUNT];
27457e252bfSMichael Neumann };
27557e252bfSMichael Neumann 
27657e252bfSMichael Neumann typedef struct SMC_NIslands_MCRegisters SMC_NIslands_MCRegisters;
27757e252bfSMichael Neumann 
27857e252bfSMichael Neumann struct SMC_NIslands_MCArbDramTimingRegisterSet
27957e252bfSMichael Neumann {
28057e252bfSMichael Neumann     uint32_t mc_arb_dram_timing;
28157e252bfSMichael Neumann     uint32_t mc_arb_dram_timing2;
28257e252bfSMichael Neumann     uint8_t  mc_arb_rfsh_rate;
28357e252bfSMichael Neumann     uint8_t  padding[3];
28457e252bfSMichael Neumann };
28557e252bfSMichael Neumann 
28657e252bfSMichael Neumann typedef struct SMC_NIslands_MCArbDramTimingRegisterSet SMC_NIslands_MCArbDramTimingRegisterSet;
28757e252bfSMichael Neumann 
28857e252bfSMichael Neumann struct SMC_NIslands_MCArbDramTimingRegisters
28957e252bfSMichael Neumann {
29057e252bfSMichael Neumann     uint8_t                                     arb_current;
29157e252bfSMichael Neumann     uint8_t                                     reserved[3];
29257e252bfSMichael Neumann     SMC_NIslands_MCArbDramTimingRegisterSet     data[20];
29357e252bfSMichael Neumann };
29457e252bfSMichael Neumann 
29557e252bfSMichael Neumann typedef struct SMC_NIslands_MCArbDramTimingRegisters SMC_NIslands_MCArbDramTimingRegisters;
29657e252bfSMichael Neumann 
29757e252bfSMichael Neumann struct SMC_NISLANDS_SPLL_DIV_TABLE
29857e252bfSMichael Neumann {
29957e252bfSMichael Neumann     uint32_t    freq[256];
30057e252bfSMichael Neumann     uint32_t    ss[256];
30157e252bfSMichael Neumann };
30257e252bfSMichael Neumann 
30357e252bfSMichael Neumann #define SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_MASK  0x01ffffff
30457e252bfSMichael Neumann #define SMC_NISLANDS_SPLL_DIV_TABLE_FBDIV_SHIFT 0
30557e252bfSMichael Neumann #define SMC_NISLANDS_SPLL_DIV_TABLE_PDIV_MASK   0xfe000000
30657e252bfSMichael Neumann #define SMC_NISLANDS_SPLL_DIV_TABLE_PDIV_SHIFT  25
30757e252bfSMichael Neumann #define SMC_NISLANDS_SPLL_DIV_TABLE_CLKV_MASK   0x000fffff
30857e252bfSMichael Neumann #define SMC_NISLANDS_SPLL_DIV_TABLE_CLKV_SHIFT  0
30957e252bfSMichael Neumann #define SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_MASK   0xfff00000
31057e252bfSMichael Neumann #define SMC_NISLANDS_SPLL_DIV_TABLE_CLKS_SHIFT  20
31157e252bfSMichael Neumann 
31257e252bfSMichael Neumann typedef struct SMC_NISLANDS_SPLL_DIV_TABLE SMC_NISLANDS_SPLL_DIV_TABLE;
31357e252bfSMichael Neumann 
31457e252bfSMichael Neumann #define NISLANDS_SMC_FIRMWARE_HEADER_LOCATION 0x100
31557e252bfSMichael Neumann 
31657e252bfSMichael Neumann #define NISLANDS_SMC_FIRMWARE_HEADER_version                   0x0
31757e252bfSMichael Neumann #define NISLANDS_SMC_FIRMWARE_HEADER_flags                     0x4
31857e252bfSMichael Neumann #define NISLANDS_SMC_FIRMWARE_HEADER_softRegisters             0x8
31957e252bfSMichael Neumann #define NISLANDS_SMC_FIRMWARE_HEADER_stateTable                0xC
32057e252bfSMichael Neumann #define NISLANDS_SMC_FIRMWARE_HEADER_fanTable                  0x10
32157e252bfSMichael Neumann #define NISLANDS_SMC_FIRMWARE_HEADER_cacTable                  0x14
32257e252bfSMichael Neumann #define NISLANDS_SMC_FIRMWARE_HEADER_mcRegisterTable           0x20
32357e252bfSMichael Neumann #define NISLANDS_SMC_FIRMWARE_HEADER_mcArbDramAutoRefreshTable 0x2C
32457e252bfSMichael Neumann #define NISLANDS_SMC_FIRMWARE_HEADER_spllTable                 0x30
32557e252bfSMichael Neumann 
32657e252bfSMichael Neumann #pragma pack(pop)
32757e252bfSMichael Neumann 
32857e252bfSMichael Neumann #endif
329*c59a5c48SFrançois Tigeot 
330