From bb8a602ca9bb6577309081b66d0f01556a2700f3 Mon Sep 17 00:00:00 2001
From: Svyatoslav Ryhel <clamor95@gmail.com>
Date: Mon, 25 Dec 2023 17:30:37 +0200
Subject: [PATCH] tegra114: clock: define MIPI calibration peripheral clock

TEGRA114_CLK_MIPI_CAL is a fixed child of PLLP and is used
as clock source of the MIPI PHY calibration mechanism.

Signed-off-by: Svyatoslav Ryhel <clamor95@gmail.com>
---
 arch/arm/include/asm/arch-tegra114/clock-tables.h | 2 +-
 arch/arm/mach-tegra/tegra114/clock.c              | 3 +--
 2 files changed, 2 insertions(+), 3 deletions(-)

diff --git a/arch/arm/include/asm/arch-tegra114/clock-tables.h b/arch/arm/include/asm/arch-tegra114/clock-tables.h
index 95fadd0c59..af4d48144a 100644
--- a/arch/arm/include/asm/arch-tegra114/clock-tables.h
+++ b/arch/arm/include/asm/arch-tegra114/clock-tables.h
@@ -109,7 +109,7 @@ enum periph_id {
 	PERIPH_ID_UART3,
 
 	/* 56 */
-	PERIPH_ID_RESERVED56,
+	PERIPH_ID_MIPI_CAL,
 	PERIPH_ID_EMC,
 	PERIPH_ID_USB2,
 	PERIPH_ID_USB3,
diff --git a/arch/arm/mach-tegra/tegra114/clock.c b/arch/arm/mach-tegra/tegra114/clock.c
index 418ad48ddc..2ee755bc64 100644
--- a/arch/arm/mach-tegra/tegra114/clock.c
+++ b/arch/arm/mach-tegra/tegra114/clock.c
@@ -299,7 +299,7 @@ static s8 periph_id_to_internal_id[PERIPH_ID_COUNT] = {
 	PERIPHC_UART3,
 
 	/* 56 */
-	NONE(RESERVED56),
+	NONE(MIPI_CAL),
 	PERIPHC_EMC,
 	NONE(USB2),
 	NONE(USB3),
@@ -635,7 +635,6 @@ enum periph_id clk_id_to_periph_id(int clk_id)
 	case PERIPH_ID_RESERVED35:
 	case PERIPH_ID_RESERVED43:
 	case PERIPH_ID_RESERVED45:
-	case PERIPH_ID_RESERVED56:
 	case PERIPH_ID_RESERVED76:
 	case PERIPH_ID_RESERVED77:
 	case PERIPH_ID_RESERVED78:
-- 
2.39.5