AM64x MCU+ SDK  09.02.01
sdl_vtm.h
Go to the documentation of this file.
1 /********************************************************************
2  * Copyright (C) 2022-23 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
33 
34 #ifndef SDL_IP_VTM_TOP_H_
35 #define SDL_IP_VTM_TOP_H_
36 
37 #ifdef __cplusplus
38 extern "C"
39 {
40 #endif
41 
42 #if defined (SOC_AM64X) || defined (SOC_AM243X)
43 #include <sdl/vtm/v0/soc/sdl_soc_vtm.h>
44 #include <sdl/vtm/v0/sdl_ip_vtm.h>
45 #endif
46 
71 typedef struct {
77  uint8_t vid_opp_val;
83 
89  typedef struct {
101 
102 
111 typedef struct {
115  uint32_t vtm_vd_opp_vid;
119 
128 typedef struct
129 {
131  uint32_t vtm_ts_ctrl2;
133  uint32_t vtm_ts_ctrl;
135  uint32_t vtm_ts_th;
137  uint32_t vtm_ts_th2;
139 
163 int32_t SDL_VTM_initVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig);
164 
181 int32_t SDL_VTM_initTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig);
182 
194 int32_t SDL_VTM_getTemp(SDL_VTM_InstTs instance, uint32_t *pTempVal);
195 
209  SDL_VTM_Stat_val *pStat_val);
210 
211 
224 
236 int32_t SDL_VTM_verifyConfigVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig);
237 
249 int32_t SDL_VTM_verifyConfigTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig);
250 
263 
276 
277 #ifdef __cplusplus
278 }
279 #endif /* extern "C" */
280 
284 #endif /* SDL_IP_VTM_TOP_H_ */
SDL_VTM_staticRegsVd
VTM Static Registers for Voltage Domain.
Definition: sdl_vtm.h:111
SDL_VTM_configTs::tsCtrl_cfg
SDL_VTM_Ctrlcfg tsCtrl_cfg
Definition: sdl_vtm.h:93
SDL_VTM_getStaticRegistersTs
int32_t SDL_VTM_getStaticRegistersTs(SDL_VTM_InstTs instance, SDL_VTM_staticRegsTs *pStaticRegs)
VTM Temperature sensor readback Static configuration registers.
SDL_VTM_configVd::vid_opp_val
uint8_t vid_opp_val
Definition: sdl_vtm.h:77
SDL_VTM_verifyConfigVd
int32_t SDL_VTM_verifyConfigVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig)
VTM Voltage Domain configures verification.
SDL_VTM_tsGlobal_cfg
VTM Global Configuration Registers.
Definition: sdl_ip_vtm.h:427
SDL_VTM_configTs::thr_val
SDL_VTM_tsThrVal thr_val
Definition: sdl_vtm.h:99
SDL_VTM_InstVd
SDL_VTM_InstVd
Definition: sdl_soc_vtm.h:86
SDL_VTM_configTs
VTM temperature sensor configuration.
Definition: sdl_vtm.h:89
SDL_VTM_InstTs
SDL_VTM_InstTs
Definition: sdl_soc_vtm.h:54
SDL_VTM_configVd::vid_opp
SDL_VTM_vid_opp vid_opp
Definition: sdl_vtm.h:75
SDL_VTM_vdEvtSel_set
uint16_t SDL_VTM_vdEvtSel_set
This enumerator define for VTM Voltage domain Event selection set.
Definition: sdl_ip_vtm.h:156
SDL_VTM_configVd::vd_temp_evts
SDL_VTM_vdEvtSel_set vd_temp_evts
Definition: sdl_vtm.h:79
SDL_VTM_configTsCtrl
uint8_t SDL_VTM_configTsCtrl
This enumerator define for VTM TS configuration valid map.
Definition: sdl_ip_vtm.h:82
SDL_VTM_Stat_read_ctrl
uint8_t SDL_VTM_Stat_read_ctrl
This enumerator define for VTM temperature sensor STAT read valid map.
Definition: sdl_ip_vtm.h:380
SDL_VTM_intrCtrl
uint16_t SDL_VTM_intrCtrl
This enumerator define for VTM Voltage domain threshold interrupt control.
Definition: sdl_ip_vtm.h:133
SDL_VTM_configTs::configTsCtrl
SDL_VTM_configTsCtrl configTsCtrl
Definition: sdl_vtm.h:91
SDL_VTM_configVd::tsGlobal_cfg
SDL_VTM_tsGlobal_cfg tsGlobal_cfg
Definition: sdl_vtm.h:81
SDL_VTM_verifyConfigTs
int32_t SDL_VTM_verifyConfigTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig)
VTM Temperature sensor configures verification.
SDL_VTM_staticRegsVd::vtm_vd_evt_sel_ctrl
uint32_t vtm_vd_evt_sel_ctrl
Definition: sdl_vtm.h:113
SDL_VTM_staticRegsTs::vtm_ts_ctrl2
uint32_t vtm_ts_ctrl2
Definition: sdl_vtm.h:131
SDL_VTM_initVd
int32_t SDL_VTM_initVd(SDL_VTM_InstVd instance, const SDL_VTM_configVd *pConfig)
VTM Voltage Domain initialization.
SDL_VTM_getStaticRegistersVd
int32_t SDL_VTM_getStaticRegistersVd(SDL_VTM_InstVd instance, SDL_VTM_staticRegsVd *pStaticRegs)
VTM Voltage Domain readback Static configuration registers.
SDL_VTM_configTs::high_temp_in_milli_degree_celsius
int32_t high_temp_in_milli_degree_celsius
Definition: sdl_vtm.h:95
SDL_VTM_Ctrlcfg
VTM temperature sensor band gap control.
Definition: sdl_ip_vtm.h:465
SDL_VTM_intrCntrl
int32_t SDL_VTM_intrCntrl(SDL_VTM_InstVd instance, SDL_VTM_intrCtrl intrCtrl)
Set maximum Threshold values of VTM Temperature sensor.
SDL_VTM_staticRegsTs
VTM Static Registers for Temperature sensor.
Definition: sdl_vtm.h:129
SDL_VTM_configTs::low_temp_in_milli_degree_celsius
int32_t low_temp_in_milli_degree_celsius
Definition: sdl_vtm.h:97
SDL_VTM_getSensorStatus
int32_t SDL_VTM_getSensorStatus(SDL_VTM_InstTs instance, const SDL_VTM_Stat_read_ctrl *pCtrl, SDL_VTM_Stat_val *pStat_val)
Read VTM Temperature sensor status.
SDL_VTM_staticRegsTs::vtm_ts_th2
uint32_t vtm_ts_th2
Definition: sdl_vtm.h:137
sdl_ip_vtm.h
SDL_VTM_initTs
int32_t SDL_VTM_initTs(SDL_VTM_InstTs instance, const SDL_VTM_configTs *pConfig)
VTM Temperature sensor initialization.
SDL_VTM_tsThrVal
VTM temperature sensor threshold values.
Definition: sdl_ip_vtm.h:492
SDL_VTM_configVd
VTM Voltage Domain configuration.
Definition: sdl_vtm.h:71
SDL_VTM_staticRegsVd::vtm_vd_opp_vid
uint32_t vtm_vd_opp_vid
Definition: sdl_vtm.h:115
SDL_VTM_staticRegsVd::vtm_global_cfg
SDL_VTM_tsGlobal_cfg vtm_global_cfg
Definition: sdl_vtm.h:117
SDL_VTM_Stat_val
VTM temperature sensor Stat values.
Definition: sdl_ip_vtm.h:515
SDL_VTM_staticRegsTs::vtm_ts_ctrl
uint32_t vtm_ts_ctrl
Definition: sdl_vtm.h:133
SDL_VTM_configVd::configVdCtrl
SDL_VTM_configVdCtrl configVdCtrl
Definition: sdl_vtm.h:73
SDL_VTM_vid_opp
uint8_t SDL_VTM_vid_opp
This enumerator defines the possible VID Codes to set various voltage domain supply voltages.
Definition: sdl_ip_vtm.h:96
SDL_VTM_getTemp
int32_t SDL_VTM_getTemp(SDL_VTM_InstTs instance, uint32_t *pTempVal)
Read VTM Temperature sensor values in degree celcius.
SDL_VTM_staticRegsTs::vtm_ts_th
uint32_t vtm_ts_th
Definition: sdl_vtm.h:135
SDL_VTM_configVdCtrl
uint8_t SDL_VTM_configVdCtrl
This enumerator define forVTM VD configuration valid map.
Definition: sdl_ip_vtm.h:70