Skip to content

Commit 0be9a32

Browse files
prabhakarladgeertu
authored andcommitted
soc: renesas: Add identification support for RZ/V2H SoC
Add support to identify the RZ/V2H (R9A09G057) SoC. Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com> Reviewed-by: Fabrizio Castro <fabrizio.castro.jz@renesas.com> Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be> Link: https://lore.kernel.org/r/20240227232531.218159-4-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
1 parent 4cece76 commit 0be9a32

2 files changed

Lines changed: 24 additions & 1 deletion

File tree

drivers/soc/renesas/Kconfig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -344,6 +344,11 @@ config ARCH_R9A09G011
344344
help
345345
This enables support for the Renesas RZ/V2M SoC.
346346

347+
config ARCH_R9A09G057
348+
bool "ARM64 Platform support for RZ/V2H(P)"
349+
help
350+
This enables support for the Renesas RZ/V2H(P) SoC variants.
351+
347352
endif # ARM64
348353

349354
if RISCV

drivers/soc/renesas/renesas-soc.c

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ static const struct renesas_family fam_rzg3s __initconst __maybe_unused = {
7575
.name = "RZ/G3S",
7676
};
7777

78+
static const struct renesas_family fam_rzv2h __initconst __maybe_unused = {
79+
.name = "RZ/V2H",
80+
};
81+
7882
static const struct renesas_family fam_rzv2l __initconst __maybe_unused = {
7983
.name = "RZ/V2L",
8084
};
@@ -177,6 +181,11 @@ static const struct renesas_soc soc_rz_g3s __initconst __maybe_unused = {
177181
.id = 0x85e0447,
178182
};
179183

184+
static const struct renesas_soc soc_rz_v2h __initconst __maybe_unused = {
185+
.family = &fam_rzv2h,
186+
.id = 0x847a447,
187+
};
188+
180189
static const struct renesas_soc soc_rz_v2l __initconst __maybe_unused = {
181190
.family = &fam_rzv2l,
182191
.id = 0x8447447,
@@ -407,6 +416,9 @@ static const struct of_device_id renesas_socs[] __initconst __maybe_unused = {
407416
#ifdef CONFIG_ARCH_R9A09G011
408417
{ .compatible = "renesas,r9a09g011", .data = &soc_rz_v2m },
409418
#endif
419+
#ifdef CONFIG_ARCH_R9A09G057
420+
{ .compatible = "renesas,r9a09g057", .data = &soc_rz_v2h },
421+
#endif
410422
#ifdef CONFIG_ARCH_SH73A0
411423
{ .compatible = "renesas,sh73a0", .data = &soc_shmobile_ag5 },
412424
#endif
@@ -432,6 +444,11 @@ static const struct renesas_id id_rzg2l __initconst = {
432444
.mask = 0xfffffff,
433445
};
434446

447+
static const struct renesas_id id_rzv2h __initconst = {
448+
.offset = 0x304,
449+
.mask = 0xfffffff,
450+
};
451+
435452
static const struct renesas_id id_rzv2m __initconst = {
436453
.offset = 0x104,
437454
.mask = 0xff,
@@ -449,6 +466,7 @@ static const struct of_device_id renesas_ids[] __initconst = {
449466
{ .compatible = "renesas,r9a07g054-sysc", .data = &id_rzg2l },
450467
{ .compatible = "renesas,r9a08g045-sysc", .data = &id_rzg2l },
451468
{ .compatible = "renesas,r9a09g011-sys", .data = &id_rzv2m },
469+
{ .compatible = "renesas,r9a09g057-sys", .data = &id_rzv2h },
452470
{ .compatible = "renesas,prr", .data = &id_prr },
453471
{ /* sentinel */ }
454472
};
@@ -513,7 +531,7 @@ static int __init renesas_soc_init(void)
513531
eslo = product & 0xf;
514532
soc_dev_attr->revision = kasprintf(GFP_KERNEL, "ES%u.%u",
515533
eshi, eslo);
516-
} else if (id == &id_rzg2l) {
534+
} else if (id == &id_rzg2l || id == &id_rzv2h) {
517535
eshi = ((product >> 28) & 0x0f);
518536
soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u",
519537
eshi);

0 commit comments

Comments
 (0)