u-boot/arch/arm/include/asm/arch-imx9/sys_proto.h
Ye Li 46f72ebad9 imx9: soc: Add function to get target voltage mode
Replace the static CONFIG_IMX9_LOW_DRIVE_MODE with runtime target
voltage mode by checking the part's SPEED GRADE fuse.
SPL will configure to highest A55 speed which is indicated by the SPEED
fuse and select corresponding voltage mode.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
2024-09-19 00:12:41 -03:00

26 lines
485 B
C

/* SPDX-License-Identifier: GPL-2.0+ */
/*
* Copyright (C) 2022 NXP
*/
#ifndef __ARCH_IMX9_SYS_PROTO_H
#define __ARCH_IMX9_SYS_PROTO_H
#include <asm/mach-imx/sys_proto.h>
enum imx9_soc_voltage_mode {
VOLT_LOW_DRIVE = 0,
VOLT_NOMINAL_DRIVE,
VOLT_OVER_DRIVE,
};
void soc_power_init(void);
bool m33_is_rom_kicked(void);
int m33_prepare(void);
enum imx9_soc_voltage_mode soc_target_voltage_mode(void);
#define is_voltage_mode(mode) (soc_target_voltage_mode() == (mode))
#endif