Lines Matching +full:product +full:- +full:id
1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2014-2016 Glider bvba
21 .name = "R-Car Gen1",
22 .reg = 0xff000044, /* PRR (Product Register) */
26 .name = "R-Car Gen2",
27 .reg = 0xff000044, /* PRR (Product Register) */
31 .name = "R-Car Gen3",
32 .reg = 0xfff00044, /* PRR (Product Register) */
36 .name = "R-Car Gen4",
40 .name = "R-Mobile",
58 .reg = 0xff000044, /* PRR (Product Register) */
63 .reg = 0xfff00044, /* PRR (Product Register) */
91 .name = "SH-Mobile",
97 u32 id; member
106 .id = 0x3b,
111 .id = 0x3f,
116 .id = 0x40,
121 .id = 0x847c447,
126 .id = 0x45,
131 .id = 0x47,
136 .id = 0x4b,
141 .id = 0x4c,
146 .id = 0x53,
151 .id = 0x52,
156 .id = 0x55,
161 .id = 0x57,
166 .id = 0x4f,
171 .id = 0x841c447,
176 .id = 0x8450447,
181 .id = 0x85e0447,
186 .id = 0x847a447,
191 .id = 0x8447447,
204 .id = 0x3b,
209 .id = 0x45,
214 .id = 0x47,
219 .id = 0x4a,
224 .id = 0x4b,
229 .id = 0x4c,
234 .id = 0x4f,
239 .id = 0x52,
244 .id = 0x55,
249 .id = 0x54,
254 .id = 0x56,
259 .id = 0x57,
264 .id = 0x58,
269 .id = 0x59,
274 .id = 0x5a,
279 .id = 0x5c,
284 .id = 0x5d,
289 .id = 0x37,
464 { .compatible = "renesas,r9a07g043-sysc", .data = &id_rzg2l },
465 { .compatible = "renesas,r9a07g044-sysc", .data = &id_rzg2l },
466 { .compatible = "renesas,r9a07g054-sysc", .data = &id_rzg2l },
467 { .compatible = "renesas,r9a08g045-sysc", .data = &id_rzg2l },
468 { .compatible = "renesas,r9a09g011-sys", .data = &id_rzv2m },
469 { .compatible = "renesas,r9a09g057-sys", .data = &id_rzv2h },
477 unsigned int product, eshi = 0, eslo; in renesas_soc_init() local
481 const struct renesas_id *id; in renesas_soc_init() local
491 return -ENODEV; in renesas_soc_init()
493 soc_id = strchr(match->compatible, ',') + 1; in renesas_soc_init()
494 soc = match->data; in renesas_soc_init()
495 family = soc->family; in renesas_soc_init()
499 id = match->data; in renesas_soc_init()
502 } else if (soc->id && family->reg) { in renesas_soc_init()
504 id = &id_prr; in renesas_soc_init()
505 chipid = ioremap(family->reg, 4); in renesas_soc_init()
512 return -ENOMEM; in renesas_soc_init()
515 soc_dev_attr->family = kstrdup_const(family->name, GFP_KERNEL); in renesas_soc_init()
516 soc_dev_attr->soc_id = kstrdup_const(soc_id, GFP_KERNEL); in renesas_soc_init()
519 product = readl(chipid + id->offset); in renesas_soc_init()
522 if (id == &id_prr) { in renesas_soc_init()
523 /* R-Car M3-W ES1.1 incorrectly identifies as ES2.0 */ in renesas_soc_init()
524 if ((product & 0x7fff) == 0x5210) in renesas_soc_init()
525 product ^= 0x11; in renesas_soc_init()
526 /* R-Car M3-W ES1.3 incorrectly identifies as ES2.1 */ in renesas_soc_init()
527 if ((product & 0x7fff) == 0x5211) in renesas_soc_init()
528 product ^= 0x12; in renesas_soc_init()
530 eshi = ((product >> 4) & 0x0f) + 1; in renesas_soc_init()
531 eslo = product & 0xf; in renesas_soc_init()
532 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "ES%u.%u", in renesas_soc_init()
534 } else if (id == &id_rzg2l || id == &id_rzv2h) { in renesas_soc_init()
535 eshi = ((product >> 28) & 0x0f); in renesas_soc_init()
536 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u", in renesas_soc_init()
539 } else if (id == &id_rzv2m) { in renesas_soc_init()
540 eshi = ((product >> 4) & 0x0f); in renesas_soc_init()
541 eslo = product & 0xf; in renesas_soc_init()
542 soc_dev_attr->revision = kasprintf(GFP_KERNEL, "%u.%u", in renesas_soc_init()
546 if (soc->id && in renesas_soc_init()
547 ((product & id->mask) >> __ffs(id->mask)) != soc->id) { in renesas_soc_init()
548 pr_warn("SoC mismatch (product = 0x%x)\n", product); in renesas_soc_init()
549 ret = -ENODEV; in renesas_soc_init()
554 pr_info("Detected Renesas %s %s %s%s\n", soc_dev_attr->family, in renesas_soc_init()
555 soc_dev_attr->soc_id, rev_prefix, soc_dev_attr->revision ?: ""); in renesas_soc_init()
566 kfree(soc_dev_attr->revision); in renesas_soc_init()
567 kfree_const(soc_dev_attr->soc_id); in renesas_soc_init()
568 kfree_const(soc_dev_attr->family); in renesas_soc_init()