Commit 7e200440 authored by Phil Edworthy's avatar Phil Edworthy Committed by Geert Uytterhoeven

soc: renesas: Identify RZ/V2M SoC

Add support for identifying the RZ/V2M (R9A09G011) SoC.
Note that the SoC does not have a identification register.
Signed-off-by: default avatarPhil Edworthy <phil.edworthy@renesas.com>
[biju: removed config changes ]
Signed-off-by: default avatarBiju Das <biju.das.jz@bp.renesas.com>
Link: https://lore.kernel.org/r/20221116102140.852889-3-biju.das.jz@bp.renesas.comSigned-off-by: default avatarGeert Uytterhoeven <geert+renesas@glider.be>
parent b3acbca3
...@@ -76,6 +76,10 @@ static const struct renesas_family fam_rzv2l __initconst __maybe_unused = { ...@@ -76,6 +76,10 @@ static const struct renesas_family fam_rzv2l __initconst __maybe_unused = {
.name = "RZ/V2L", .name = "RZ/V2L",
}; };
static const struct renesas_family fam_rzv2m __initconst __maybe_unused = {
.name = "RZ/V2M",
};
static const struct renesas_family fam_shmobile __initconst __maybe_unused = { static const struct renesas_family fam_shmobile __initconst __maybe_unused = {
.name = "SH-Mobile", .name = "SH-Mobile",
.reg = 0xe600101c, /* CCCR (Common Chip Code Register) */ .reg = 0xe600101c, /* CCCR (Common Chip Code Register) */
...@@ -171,6 +175,10 @@ static const struct renesas_soc soc_rz_v2l __initconst __maybe_unused = { ...@@ -171,6 +175,10 @@ static const struct renesas_soc soc_rz_v2l __initconst __maybe_unused = {
.id = 0x8447447, .id = 0x8447447,
}; };
static const struct renesas_soc soc_rz_v2m __initconst __maybe_unused = {
.family = &fam_rzv2m,
};
static const struct renesas_soc soc_rcar_m1a __initconst __maybe_unused = { static const struct renesas_soc soc_rcar_m1a __initconst __maybe_unused = {
.family = &fam_rcar_gen1, .family = &fam_rcar_gen1,
}; };
...@@ -380,6 +388,9 @@ static const struct of_device_id renesas_socs[] __initconst = { ...@@ -380,6 +388,9 @@ static const struct of_device_id renesas_socs[] __initconst = {
#if defined(CONFIG_ARCH_R9A07G054) #if defined(CONFIG_ARCH_R9A07G054)
{ .compatible = "renesas,r9a07g054", .data = &soc_rz_v2l }, { .compatible = "renesas,r9a07g054", .data = &soc_rz_v2l },
#endif #endif
#if defined(CONFIG_ARCH_R9A09G011)
{ .compatible = "renesas,r9a09g011", .data = &soc_rz_v2m },
#endif
#ifdef CONFIG_ARCH_SH73A0 #ifdef CONFIG_ARCH_SH73A0
{ .compatible = "renesas,sh73a0", .data = &soc_shmobile_ag5 }, { .compatible = "renesas,sh73a0", .data = &soc_shmobile_ag5 },
#endif #endif
...@@ -405,6 +416,11 @@ static const struct renesas_id id_rzg2l __initconst = { ...@@ -405,6 +416,11 @@ static const struct renesas_id id_rzg2l __initconst = {
.mask = 0xfffffff, .mask = 0xfffffff,
}; };
static const struct renesas_id id_rzv2m __initconst = {
.offset = 0x104,
.mask = 0xff,
};
static const struct renesas_id id_prr __initconst = { static const struct renesas_id id_prr __initconst = {
.offset = 0, .offset = 0,
.mask = 0xff00, .mask = 0xff00,
...@@ -415,6 +431,7 @@ static const struct of_device_id renesas_ids[] __initconst = { ...@@ -415,6 +431,7 @@ static const struct of_device_id renesas_ids[] __initconst = {
{ .compatible = "renesas,r9a07g043-sysc", .data = &id_rzg2l }, { .compatible = "renesas,r9a07g043-sysc", .data = &id_rzg2l },
{ .compatible = "renesas,r9a07g044-sysc", .data = &id_rzg2l }, { .compatible = "renesas,r9a07g044-sysc", .data = &id_rzg2l },
{ .compatible = "renesas,r9a07g054-sysc", .data = &id_rzg2l }, { .compatible = "renesas,r9a07g054-sysc", .data = &id_rzg2l },
{ .compatible = "renesas,r9a09g011-sys", .data = &id_rzv2m },
{ .compatible = "renesas,prr", .data = &id_prr }, { .compatible = "renesas,prr", .data = &id_prr },
{ /* sentinel */ } { /* sentinel */ }
}; };
...@@ -485,6 +502,11 @@ static int __init renesas_soc_init(void) ...@@ -485,6 +502,11 @@ static int __init renesas_soc_init(void)
soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u", soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u",
eshi); eshi);
rev_prefix = "Rev "; rev_prefix = "Rev ";
} else if (id == &id_rzv2m) {
eshi = ((product >> 4) & 0x0f);
eslo = product & 0xf;
soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u.%u",
eshi, eslo);
} }
if (soc->id && if (soc->id &&
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment