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

Modify the DDR driver to handle the DDR power supplies when a PMIC is present in the function stm32mp_board_ddr_power_init(), define in the platform file. This patch allows to easily modify the used DDR power supplies for customer boards, when they don't use STPMIC1 PMU or when the regulators are not connected as on the STMicroelectronics boards. Signed-off-by: Patrick Delaunay <patrick.delaunay@foss.st.com> Change-Id: I93ee6295ef7032ac20f03608d22cd460f7d87ef5
51 lines
1,014 B
C
51 lines
1,014 B
C
/*
|
|
* Copyright (c) 2017-2024, 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_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 */
|