arm-trusted-firmware/include/drivers/st/stm32mp_pmic.h
Yann Gautier 5278ec3faf feat(st-pmic): add pmic_voltages_init() function
This new function pmic_voltages_init() is used to set the minimum value
for STM32MP13 VDDCPU and VDDCORE regulators. This value is retrieved
from device tree.

Signed-off-by: Yann Gautier <yann.gautier@st.com>
Change-Id: Ibbe237cb5dccc1fddf92e07ffd3955048ff82075
2022-03-22 09:09:23 +01:00

58 lines
1.2 KiB
C

/*
* Copyright (c) 2017-2022, STMicroelectronics - All Rights Reserved
*
* SPDX-License-Identifier: BSD-3-Clause
*/
#ifndef STM32MP_PMIC_H
#define STM32MP_PMIC_H
#include <stdbool.h>
#include <platform_def.h>
/*
* dt_pmic_status - Check PMIC status from device tree
*
* Returns the status of the PMIC (secure, non-secure), or a negative value on
* error
*/
int dt_pmic_status(void);
/*
* initialize_pmic_i2c - Initialize I2C for the PMIC control
*
* Returns true if PMIC is available, false if not found, panics on errors
*/
bool initialize_pmic_i2c(void);
/*
* initialize_pmic - Main PMIC initialization function, called at platform init
*
* Panics on errors
*/
void initialize_pmic(void);
#if DEBUG
void print_pmic_info_and_debug(void);
#else
static inline void print_pmic_info_and_debug(void)
{
}
#endif
/*
* pmic_ddr_power_init - Initialize regulators required for DDR
*
* Returns 0 on success, and negative values on errors
*/
int pmic_ddr_power_init(enum ddr_type ddr_type);
/*
* pmic_voltages_init - Update voltages for platform init
*
* Returns 0 on success, and negative values on errors
*/
int pmic_voltages_init(void);
#endif /* STM32MP_PMIC_H */