mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-16 17:44:19 +00:00

The STPMIC2 embeds 15 regulators with various properties, and is designed to supply the STM32MP2 SOC. This driver handles a minimal set of feature to handle the boot of a board. Signed-off-by: Pascal Paillet <p.paillet@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Signed-off-by: Maxime Méré <maxime.mere@foss.st.com> Change-Id: Ibe0cacf8aec2871eb9a86ec16cbbd18d3745fe9e
51 lines
1 KiB
C
51 lines
1 KiB
C
/*
|
|
* Copyright (c) 2024, STMicroelectronics - All Rights Reserved
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef STM32MP_PMIC2_H
|
|
#define STM32MP_PMIC2_H
|
|
|
|
#include <stdbool.h>
|
|
#include <drivers/st/regulator.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);
|
|
|
|
/*
|
|
* stpmic2_set_prop - Set PMIC2 proprietary property
|
|
*
|
|
* Returns non zero on errors
|
|
*/
|
|
int stpmic2_set_prop(const struct regul_description *desc, uint16_t prop, uint32_t value);
|
|
|
|
/*
|
|
* pmic_switch_off - switch off the platform with PMIC
|
|
*
|
|
* Panics on errors
|
|
*/
|
|
void pmic_switch_off(void);
|
|
|
|
#endif /* STM32MP_PMIC2_H */
|