1 /* 2 * Copyright (c) 2024 Nordic Semiconductor ASA 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 #ifndef DVFS_OPPOINT_H 7 #define DVFS_OPPOINT_H 8 9 #include <nrfs_common.h> 10 #include <internal/services/nrfs_dvfs.h> 11 12 #ifdef __cplusplus 13 extern "C" { 14 #endif 15 16 struct dvfs_oppoint_data { 17 enum dvfs_frequency_setting freq_setting; 18 uint16_t opp_mv; 19 uint32_t abb_ringo; 20 uint32_t abb_lockrange; 21 uint32_t abb_pvtmoncycles; 22 uint32_t new_f_mult; 23 uint32_t new_f_trim_entry; 24 uint16_t max_hsfll_freq; 25 }; 26 27 #define DVFS_HIGH_OPPOINT_MV ((uint16_t)800) 28 #define DVFS_MEDLOW_OPPOINT_MV ((uint16_t)600) 29 #define DVFS_LOW_OPPOINT_MV ((uint16_t)500) 30 31 /** 32 * @brief Get the DVFS operating point (oppoint) data object. 33 * 34 * @param oppoint desired operating point. 35 * @return struct dvfs_oppoint_data* pointer to the oppoint data structure. 36 * @return NULL pointer when oppoint is invalid. 37 */ 38 const struct dvfs_oppoint_data *get_dvfs_oppoint_data(enum dvfs_frequency_setting oppoint); 39 40 /** 41 * @brief Get the frequency for frequency setting object. 42 * 43 * @param freq_setting item from enum dvfs_frequency_setting. 44 * @return uint16_t frequency in MHz. 45 */ 46 uint16_t get_frequency_for_frequency_setting(enum dvfs_frequency_setting freq_setting); 47 48 #ifdef __cplusplus 49 } 50 #endif 51 52 #endif /* DVFS_OPPOINT_H */ 53