From e4e242b29627bcfa9a93fe75c7ececf199a02cec Mon Sep 17 00:00:00 2001
From: Hai Pham <hai.pham.ud@renesas.com>
Date: Tue, 28 Feb 2023 22:37:07 +0100
Subject: [PATCH] ARM: renesas: Add R8A779G0 V4H Kconfig entry and PRR ID

Add Kconfig entry and PRR ID to support R8A779G0 V4H SoC.

Reviewed-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
Signed-off-by: Hai Pham <hai.pham.ud@renesas.com>
Signed-off-by: Marek Vasut <marek.vasut+renesas@mailbox.org>
[Marek: Update commit message]
---
 arch/arm/mach-rmobile/Kconfig.rcar4          | 6 ++++++
 arch/arm/mach-rmobile/cpu_info.c             | 1 +
 arch/arm/mach-rmobile/include/mach/rmobile.h | 1 +
 3 files changed, 8 insertions(+)

diff --git a/arch/arm/mach-rmobile/Kconfig.rcar4 b/arch/arm/mach-rmobile/Kconfig.rcar4
index 262791635e..2dc9f00b5d 100644
--- a/arch/arm/mach-rmobile/Kconfig.rcar4
+++ b/arch/arm/mach-rmobile/Kconfig.rcar4
@@ -14,6 +14,12 @@ config R8A779F0
 	imply CLK_R8A779F0
 	imply PINCTRL_PFC_R8A779F0
 
+config R8A779G0
+	bool "Renesas SoC R8A779G0"
+	select GICV3
+	imply CLK_R8A779G0
+	imply PINCTRL_PFC_R8A779G0
+
 endmenu
 
 choice
diff --git a/arch/arm/mach-rmobile/cpu_info.c b/arch/arm/mach-rmobile/cpu_info.c
index 02477c2cc7..7e7465a2c8 100644
--- a/arch/arm/mach-rmobile/cpu_info.c
+++ b/arch/arm/mach-rmobile/cpu_info.c
@@ -77,6 +77,7 @@ static const struct {
 	{ RMOBILE_CPU_TYPE_R8A77995, "R8A77995" },
 	{ RMOBILE_CPU_TYPE_R8A779A0, "R8A779A0" },
 	{ RMOBILE_CPU_TYPE_R8A779F0, "R8A779F0" },
+	{ RMOBILE_CPU_TYPE_R8A779G0, "R8A779G0" },
 	{ 0x0, "CPU" },
 };
 
diff --git a/arch/arm/mach-rmobile/include/mach/rmobile.h b/arch/arm/mach-rmobile/include/mach/rmobile.h
index 7583844147..a14c2aad0a 100644
--- a/arch/arm/mach-rmobile/include/mach/rmobile.h
+++ b/arch/arm/mach-rmobile/include/mach/rmobile.h
@@ -40,6 +40,7 @@
 #define RMOBILE_CPU_TYPE_R8A77995	0x58
 #define RMOBILE_CPU_TYPE_R8A779A0	0x59
 #define RMOBILE_CPU_TYPE_R8A779F0	0x5A
+#define RMOBILE_CPU_TYPE_R8A779G0	0x5C
 
 #ifndef __ASSEMBLY__
 const u8 *rzg_get_cpu_name(void);
-- 
2.39.5