u-boot/include/k3-avs.h
Reid Tonking afe0ab6d30 misc: k3_avs: Check validity of efuse voltage data
k3_avs driver checks opp_ids when probing and overwrites the voltage
values in vd_data for the respective board. The new k3_avs_check_opp()
can be called from board files to check the efuse data and returns 0 if
valid.

Also add the same check in k3_avs_program_voltage() to error out if
the efuse data was not valid.

Signed-off-by: Reid Tonking <reidt@ti.com>
Signed-off-by: Aniket Limaye <a-limaye@ti.com>
Reviewed-by: Manorit Chawdhry <m-chawdhry@ti.com>
2024-12-04 14:30:18 -06:00

32 lines
717 B
C

// SPDX-License-Identifier: GPL-2.0+
/*
* Texas Instruments' K3 Adaptive Voltage Scaling driver
*
* Copyright (C) 2019 Texas Instruments Incorporated - https://www.ti.com/
* Tero Kristo <t-kristo@ti.com>
*
*/
#ifndef _K3_AVS0_
#define _K3_AVS0_
#define AM6_VDD_WKUP 0
#define AM6_VDD_MCU 1
#define AM6_VDD_CORE 2
#define AM6_VDD_MPU0 3
#define AM6_VDD_MPU1 4
#define J721E_VDD_MPU 2
#define NUM_OPPS 4
#define AM6_OPP_LOW 0
#define AM6_OPP_NOM 1
#define AM6_OPP_OD 2
#define AM6_OPP_TURBO 3
int k3_avs_set_opp(struct udevice *dev, int vdd_id, int opp_id);
int k3_avs_notify_freq(int dev_id, int clk_id, u32 freq);
int k3_avs_check_opp(struct udevice *dev, int vdd_id, int opp_id);
#endif