/* * Copyright 2015 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 _SMU8_HWMGR_H_ #define _SMU8_HWMGR_H_ #include "cgs_common.h" #include "ppatomctrl.h" #define SMU8_NUM_NBPSTATES 4 #define SMU8_NUM_NBPMEMORYCLOCK 2 #define MAX_DISPLAY_CLOCK_LEVEL 8 #define SMU8_MAX_HARDWARE_POWERLEVELS 8 #define SMU8_VOTINGRIGHTSCLIENTS_DFLT0 0x3FFFC102 #define SMU8_MIN_DEEP_SLEEP_SCLK 800 /* Carrizo device IDs */ #define DEVICE_ID_CZ_9870 0x9870 #define DEVICE_ID_CZ_9874 0x9874 #define DEVICE_ID_CZ_9875 0x9875 #define DEVICE_ID_CZ_9876 0x9876 #define DEVICE_ID_CZ_9877 0x9877 struct smu8_dpm_entry { uint32_t soft_min_clk; uint32_t hard_min_clk; uint32_t soft_max_clk; uint32_t hard_max_clk; }; struct smu8_sys_info { uint32_t bootup_uma_clock; uint32_t bootup_engine_clock; uint32_t dentist_vco_freq; uint32_t nb_dpm_enable; uint32_t nbp_memory_clock[SMU8_NUM_NBPMEMORYCLOCK]; uint32_t nbp_n_clock[SMU8_NUM_NBPSTATES]; uint16_t nbp_voltage_index[SMU8_NUM_NBPSTATES]; uint32_t display_clock[MAX_DISPLAY_CLOCK_LEVEL]; uint16_t bootup_nb_voltage_index; uint8_t htc_tmp_lmt; uint8_t htc_hyst_lmt; uint32_t system_config; uint32_t uma_channel_number; }; #define MAX_DISPLAYPHY_IDS 0x8 #define DISPLAYPHY_LANEMASK 0xF #define UNKNOWN_TRANSMITTER_PHY_ID (-1) #define DISPLAYPHY_PHYID_SHIFT 24 #define DISPLAYPHY_LANESELECT_SHIFT 16 #define DISPLAYPHY_RX_SELECT 0x1 #define DISPLAYPHY_TX_SELECT 0x2 #define DISPLAYPHY_CORE_SELECT 0x4 #define DDI_POWERGATING_ARG(phyID, lanemask, rx, tx, core) \ (((uint32_t)(phyID))<