diff mbox series

[U-Boot,v3,04/18] misc: k3_avs: Add j721e support

Message ID 20191024093103.13220-5-j-keerthy@ti.com
State Accepted
Commit 9a03e50c5fad1daff7335dafa5b8b7e2a66ce6c9
Delegated to: Tom Rini
Headers show
Series misc: Add AVS class 0 support for AM6 | expand

Commit Message

Keerthy Oct. 24, 2019, 9:30 a.m. UTC
j721e SoCs have different OPP tables. Add support for the same.

Note: DM Still has lot of voltages TBD hence the correct
values need to be programmed once they are published.

Signed-off-by: Keerthy <j-keerthy@ti.com>
---
Changes in v3:

  * No change

Changes in v2:

  * No change

 drivers/misc/k3_avs.c | 22 ++++++++++++++++++++++
 include/k3-avs.h      |  2 ++
 2 files changed, 24 insertions(+)

Comments

Tom Rini Nov. 8, 2019, 3:33 p.m. UTC | #1
On Thu, Oct 24, 2019 at 03:00:49PM +0530, Keerthy wrote:

> j721e SoCs have different OPP tables. Add support for the same.
> 
> Note: DM Still has lot of voltages TBD hence the correct
> values need to be programmed once they are published.
> 
> Signed-off-by: Keerthy <j-keerthy@ti.com>

Applied to u-boot/master, thanks!
diff mbox series

Patch

diff --git a/drivers/misc/k3_avs.c b/drivers/misc/k3_avs.c
index dd7fc3d585..c19c3c0646 100644
--- a/drivers/misc/k3_avs.c
+++ b/drivers/misc/k3_avs.c
@@ -347,6 +347,27 @@  static struct vd_data am654_vd_data[] = {
 	{ .id = -1 },
 };
 
+static struct vd_data j721e_vd_data[] = {
+	{
+		.id = J721E_VDD_MPU,
+		.opp = AM6_OPP_NOM,
+		.dev_id = 202, /* J721E_DEV_A72SS0_CORE0 */
+		.clk_id = 2, /* ARM clock */
+		.opps = {
+			[AM6_OPP_NOM] = {
+				.volt = 880000, /* TBD in DM */
+				.freq = 2000000000,
+			},
+		},
+	},
+	{ .id = -1 },
+};
+
+static struct vd_config j721e_vd_config = {
+	.efuse_xlate = am6_efuse_xlate,
+	.vds = j721e_vd_data,
+};
+
 static struct vd_config am654_vd_config = {
 	.efuse_xlate = am6_efuse_xlate,
 	.vds = am654_vd_data,
@@ -354,6 +375,7 @@  static struct vd_config am654_vd_config = {
 
 static const struct udevice_id k3_avs_ids[] = {
 	{ .compatible = "ti,am654-avs", .data = (ulong)&am654_vd_config },
+	{ .compatible = "ti,j721e-avs", .data = (ulong)&j721e_vd_config },
 	{}
 };
 
diff --git a/include/k3-avs.h b/include/k3-avs.h
index 9867481617..e3c3cafbb9 100644
--- a/include/k3-avs.h
+++ b/include/k3-avs.h
@@ -16,6 +16,8 @@ 
 #define AM6_VDD_MPU0		3
 #define AM6_VDD_MPU1		4
 
+#define J721E_VDD_MPU		2
+
 #define NUM_OPPS		4
 
 #define AM6_OPP_NOM		1