1e098bc96SEvan Quan /* 2e098bc96SEvan Quan * Copyright 2016 Advanced Micro Devices, Inc. 3e098bc96SEvan Quan * 4e098bc96SEvan Quan * Permission is hereby granted, free of charge, to any person obtaining a 5e098bc96SEvan Quan * copy of this software and associated documentation files (the "Software"), 6e098bc96SEvan Quan * to deal in the Software without restriction, including without limitation 7e098bc96SEvan Quan * the rights to use, copy, modify, merge, publish, distribute, sublicense, 8e098bc96SEvan Quan * and/or sell copies of the Software, and to permit persons to whom the 9e098bc96SEvan Quan * Software is furnished to do so, subject to the following conditions: 10e098bc96SEvan Quan * 11e098bc96SEvan Quan * The above copyright notice and this permission notice shall be included in 12e098bc96SEvan Quan * all copies or substantial portions of the Software. 13e098bc96SEvan Quan * 14e098bc96SEvan Quan * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 15e098bc96SEvan Quan * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 16e098bc96SEvan Quan * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL 17e098bc96SEvan Quan * THE COPYRIGHT HOLDER(S) OR AUTHOR(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 18e098bc96SEvan Quan * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 19e098bc96SEvan Quan * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 20e098bc96SEvan Quan * OTHER DEALINGS IN THE SOFTWARE. 21e098bc96SEvan Quan * 22e098bc96SEvan Quan */ 23e098bc96SEvan Quan 24e098bc96SEvan Quan #ifndef _SMU7_THERMAL_H_ 25e098bc96SEvan Quan #define _SMU7_THERMAL_H_ 26e098bc96SEvan Quan 27e098bc96SEvan Quan #include "hwmgr.h" 28e098bc96SEvan Quan 29e098bc96SEvan Quan #define SMU7_THERMAL_HIGH_ALERT_MASK 0x1 30e098bc96SEvan Quan #define SMU7_THERMAL_LOW_ALERT_MASK 0x2 31e098bc96SEvan Quan 32e098bc96SEvan Quan #define SMU7_THERMAL_MINIMUM_TEMP_READING -256 33e098bc96SEvan Quan #define SMU7_THERMAL_MAXIMUM_TEMP_READING 255 34e098bc96SEvan Quan 35e098bc96SEvan Quan #define SMU7_THERMAL_MINIMUM_ALERT_TEMP 0 36e098bc96SEvan Quan #define SMU7_THERMAL_MAXIMUM_ALERT_TEMP 255 37e098bc96SEvan Quan 38e098bc96SEvan Quan #define FDO_PWM_MODE_STATIC 1 39e098bc96SEvan Quan #define FDO_PWM_MODE_STATIC_RPM 5 40e098bc96SEvan Quan 41e098bc96SEvan Quan extern int smu7_thermal_get_temperature(struct pp_hwmgr *hwmgr); 42e098bc96SEvan Quan extern int smu7_thermal_stop_thermal_controller(struct pp_hwmgr *hwmgr); 43e098bc96SEvan Quan extern int smu7_fan_ctrl_get_fan_speed_info(struct pp_hwmgr *hwmgr, struct phm_fan_speed_info *fan_speed_info); 44*0d8318e1SEvan Quan extern int smu7_fan_ctrl_get_fan_speed_pwm(struct pp_hwmgr *hwmgr, uint32_t *speed); 45e098bc96SEvan Quan extern int smu7_fan_ctrl_set_default_mode(struct pp_hwmgr *hwmgr); 46e098bc96SEvan Quan extern int smu7_fan_ctrl_set_static_mode(struct pp_hwmgr *hwmgr, uint32_t mode); 47*0d8318e1SEvan Quan extern int smu7_fan_ctrl_set_fan_speed_pwm(struct pp_hwmgr *hwmgr, uint32_t speed); 48e098bc96SEvan Quan extern int smu7_fan_ctrl_reset_fan_speed_to_default(struct pp_hwmgr *hwmgr); 49e098bc96SEvan Quan extern int smu7_thermal_ctrl_uninitialize_thermal_controller(struct pp_hwmgr *hwmgr); 50e098bc96SEvan Quan extern int smu7_fan_ctrl_set_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t speed); 51e098bc96SEvan Quan extern int smu7_fan_ctrl_get_fan_speed_rpm(struct pp_hwmgr *hwmgr, uint32_t *speed); 52e098bc96SEvan Quan extern int smu7_fan_ctrl_stop_smc_fan_control(struct pp_hwmgr *hwmgr); 53e098bc96SEvan Quan extern int smu7_thermal_disable_alert(struct pp_hwmgr *hwmgr); 54e098bc96SEvan Quan extern int smu7_fan_ctrl_start_smc_fan_control(struct pp_hwmgr *hwmgr); 55e098bc96SEvan Quan extern int smu7_start_thermal_controller(struct pp_hwmgr *hwmgr, 56e098bc96SEvan Quan struct PP_TemperatureRange *temperature_range); 57e098bc96SEvan Quan #endif 58e098bc96SEvan Quan 59