aboutsummaryrefslogtreecommitdiff
path: root/include/k3-avs.h
diff options
context:
space:
mode:
authorTero Kristo2019-10-24 15:00:46 +0530
committerTom Rini2019-11-07 18:39:16 -0500
commit9d233b4e3ed675561c4e3bd904e0a314f20dbe82 (patch)
tree8516fa4da7dc59e5098b038cda33f7d16990f56b /include/k3-avs.h
parent0be2ecd4861faa410491170e205488f9ee82a227 (diff)
misc: k3_avs: add driver for K3 Adaptive Voltage Scaling Class 0
Adaptive Voltage Scaling is a technology used in TI SoCs to optimize the operating voltage based on characterization data written to efuse during production. Add a driver to support this feature for K3 line of SoCs, initially for AM65x. Signed-off-by: Tero Kristo <t-kristo@ti.com> Signed-off-by: Keerthy <j-keerthy@ti.com>
Diffstat (limited to 'include/k3-avs.h')
-rw-r--r--include/k3-avs.h28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/k3-avs.h b/include/k3-avs.h
new file mode 100644
index 00000000000..98674816179
--- /dev/null
+++ b/include/k3-avs.h
@@ -0,0 +1,28 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Texas Instruments' K3 Adaptive Voltage Scaling driver
+ *
+ * Copyright (C) 2019 Texas Instruments Incorporated - http://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 NUM_OPPS 4
+
+#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);
+
+#endif