/* * Copyright 2017 Advanced Micro Devices, Inc. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), * to deal in the Software without restriction, including without limitation * the rights to use, copy, modify, merge, publish, distribute, sublicense, * and/or sell copies of the Software, and to permit persons to whom the * Software is furnished to do so, subject to the following conditions: * * The above copyright notice and this permission notice shall be included in * all copies or substantial portions of the Software. * * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR * OTHER DEALINGS IN THE SOFTWARE. * */ #ifndef SMU75_H #define SMU75_H #pragma pack(push, 1) typedef struct { uint32_t high; uint32_t low; } data_64_t; typedef struct { data_64_t high; data_64_t low; } data_128_t; #define SMU__DGPU_ONLY #define SMU__NUM_SCLK_DPM_STATE 8 #define SMU__NUM_MCLK_DPM_LEVELS 4 #define SMU__NUM_LCLK_DPM_LEVELS 8 #define SMU__NUM_PCIE_DPM_LEVELS 8 #define SMU7_CONTEXT_ID_SMC 1 #define SMU7_CONTEXT_ID_VBIOS 2 #define SMU75_MAX_LEVELS_VDDC 16 #define SMU75_MAX_LEVELS_VDDGFX 16 #define SMU75_MAX_LEVELS_VDDCI 8 #define SMU75_MAX_LEVELS_MVDD 4 #define SMU_MAX_SMIO_LEVELS 4 #define SMU75_MAX_LEVELS_GRAPHICS SMU__NUM_SCLK_DPM_STATE #define SMU75_MAX_LEVELS_MEMORY SMU__NUM_MCLK_DPM_LEVELS #define SMU75_MAX_LEVELS_GIO SMU__NUM_LCLK_DPM_LEVELS #define SMU75_MAX_LEVELS_LINK SMU__NUM_PCIE_DPM_LEVELS #define SMU75_MAX_LEVELS_UVD 8 #define SMU75_MAX_LEVELS_VCE 8 #define SMU75_MAX_LEVELS_ACP 8 #define SMU75_MAX_LEVELS_SAMU 8 #define SMU75_MAX_ENTRIES_SMIO 32 #define DPM_NO_LIMIT 0 #define DPM_NO_UP 1 #define DPM_GO_DOWN 2 #define DPM_GO_UP 3 #define SMU7_FIRST_DPM_GRAPHICS_LEVEL 0 #define SMU7_FIRST_DPM_MEMORY_LEVEL 0 #define GPIO_CLAMP_MODE_VRHOT 1 #define GPIO_CLAMP_MODE_THERM 2 #define GPIO_CLAMP_MODE_DC 4 #define SCRATCH_B_TARG_PCIE_INDEX_SHIFT 0 #define SCRATCH_B_TARG_PCIE_INDEX_MASK (0x7<