1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Utility functions for parsing Tegra CVB voltage tables
6 #ifndef __DRIVERS_CLK_TEGRA_CVB_H
7 #define __DRIVERS_CLK_TEGRA_CVB_H
9 #include <linux/types.h>
13 #define MAX_DVFS_FREQS 40
15 struct rail_alignment
{
20 struct cvb_coefficients
{
26 struct cvb_table_freq_entry
{
28 struct cvb_coefficients coefficients
;
31 struct cvb_cpu_dfll_data
{
35 unsigned int tune_high_min_millivolts
;
47 struct cvb_table_freq_entry entries
[MAX_DVFS_FREQS
];
48 struct cvb_cpu_dfll_data cpu_dfll_data
;
51 const struct cvb_table
*
52 tegra_cvb_add_opp_table(struct device
*dev
, const struct cvb_table
*cvb_tables
,
53 size_t count
, struct rail_alignment
*align
,
54 int process_id
, int speedo_id
, int speedo_value
,
55 unsigned long max_freq
);
56 void tegra_cvb_remove_opp_table(struct device
*dev
,
57 const struct cvb_table
*table
,
58 unsigned long max_freq
);