soc: renesas: Identify R-Car X5H
PATCH v2 1/1 soc: renesas: Identify R-Car X5H
From: Duy Nguyen <[email protected]>
Add support for identifying the R-Car X5H SoC.
[Kuninori: tidyup for upstreaming]
---
v1 -> v2
- Based on latest linux-next/master
drivers/soc/renesas/Kconfig | 11 +++++++++++ drivers/soc/renesas/renesas-soc.c | 13 +++++++++++++ 2 files changed, 24 insertions(+)
drivers/soc/renesas/Kconfig +11 -0
@@ -39,6 +39,10 @@ config ARCH_RCAR_GEN4 bool select ARCH_RCAR_GEN3 +config ARCH_RCAR_GEN5 + bool + select ARCH_RCAR_GEN4 + config ARCH_RMOBILE bool select PM
@@ -348,6 +352,13 @@ config ARCH_R8A779H0 help This enables support for the Renesas R-Car V4M SoC. +config ARCH_R8A78000 + bool "ARM64 Platform support for R8A78000 (R-Car X5H)" + default ARCH_RENESAS + select ARCH_RCAR_GEN5 + help + This enables support for the Renesas R-Car X5H SoC. + config ARCH_R9A07G043 bool "ARM64 Platform support for R9A07G043U (RZ/G2UL)" default y if ARCH_RENESAS
drivers/soc/renesas/renesas-soc.c +13 -0
@@ -36,6 +36,11 @@ static const struct renesas_family fam_rcar_gen4 __initconst __maybe_unused = { .name = "R-Car Gen4", }; +static const struct renesas_family fam_rcar_gen5__initconst __maybe_unused = { + .name ="R-Car Gen5" , + .reg =0xfff00044 ,/* PRR (Product Register) */ +}; +static const struct renesas_family fam_rmobile__initconst __maybe_unused = { .name ="R-Mobile" , .reg =0xe600101c ,/* CCCR (Common Chip Code Register) */
@@ -266,6 +271,11 @@ static const struct renesas_soc soc_rcar_v4m __initconst __maybe_unused = { .id = 0x5d, }; +static const struct renesas_soc soc_rcar_x5h__initconst __maybe_unused = { + .family = &fam_rcar_gen5, + .id =0x60 , +}; +static const struct renesas_soc soc_shmobile_ag5__initconst __maybe_unused = { .family = &fam_shmobile, .id =0x37 ,
@@ -378,6 +388,9 @@ static const struct of_device_id renesas_socs[] __initconst __maybe_unused = { #ifdef CONFIG_ARCH_R8A779H0 { .compatible = "renesas,r8a779h0", .data = &soc_rcar_v4m }, #endif +#ifdef CONFIG_ARCH_R8A78000 + { .compatible = "renesas,r8a78000", .data = &soc_rcar_x5h }, +#endif #ifdef CONFIG_ARCH_R9A07G043 #ifdef CONFIG_RISCV { .compatible = "renesas,r9a07g043", .data = &soc_rz_five },
Signature · 1 line
2.43.0
Hi Morimoto-san,
Quoted 9 lines · Kuninori Morimoto
From: Duy Nguyen <[email protected]>
Add support for identifying the R-Car X5H SoC.
[Kuninori: tidyup for upstreaming]
Signed-off-by Duy Nguyen <[email protected]>Signed-off-by Huy Bui <[email protected]>Signed-off-by Kuninori Morimoto <[email protected]>
Thanks for your patch!
drivers/soc/renesas/Kconfig config ARCH_RCAR_GEN4 · line 44
Quoted 9 lines
drivers/soc/renesas/Kconfig +3
-0@@ -39,6 +39,10 @@ config ARCH_RCAR_GEN4 bool select ARCH_RCAR_GEN3 +config ARCH_RCAR_GEN5 + bool + select ARCH_RCAR_GEN4
Note that this transitively enables four drivers:
select RENESAS_IRQC
select RST_RCAR
select SYS_SUPPORTS_SH_CMT
select SYS_SUPPORTS_SH_TMU
R-Car X5H does have INTC-EX, CMT, and TMU, so enabling their drivers is fine.
The registers to read the mode pins (the main functionality of the RST_RCAR driver) have been moved to a separate block (Operating Mode (OpeMode)) on R-Car X5H, so my first thought was to drop the RST_RCAR select. Fortunately OpeMode shares register space with the Reset Controller (RTSC) block, so we can keep that select.
Quoted 8 lines
drivers/soc/renesas/Kconfig +1
-0+ config ARCH_RMOBILE bool select PM
drivers/soc/renesas/renesas-soc.c static const struct renesas_family fam_rcar_gen4 __initconst __maybe_unused = { · line 41
Quoted 6 lines
drivers/soc/renesas/renesas-soc.c +3
-0@@ -36,6 +36,11 @@ static const struct renesas_family fam_rcar_gen4 __initconst __maybe_unused = { .name = "R-Car Gen4", }; +static const struct renesas_family fam_rcar_gen5__initconst __maybe_unused = { + .name ="R-Car Gen5" , + .reg =0xfff00044 ,/* PRR (Product Register) */
Please no hardcoded register addresses for new (DT-only) platforms (especially if they don't seem to be correct?).
I can drop this line while applying.
drivers/soc/renesas/renesas-soc.c static const struct of_device_id renesas_socs[] __initconst __maybe_unused = { · line 392
Quoted 12 lines
drivers/soc/renesas/renesas-soc.c +4
-0+}; +static const struct renesas_family fam_rmobile__initconst __maybe_unused = { .name ="R-Mobile" , .reg =0xe600101c ,/* CCCR (Common Chip Code Register) */ @@ -378,6 +388,9 @@ static const struct of_device_id renesas_socs[] __initconst __maybe_unused = { #ifdef CONFIG_ARCH_R8A779H0 { .compatible = "renesas,r8a779h0", .data = &soc_rcar_v4m }, #endif +#ifdef CONFIG_ARCH_R8A78000 + { .compatible = "renesas,r8a78000", .data = &soc_rcar_x5h },
scripts/checkpatch.pl:
WARNING: DT compatible string "renesas,r8a78000" appears un-documented -- check ./Documentation/devicetree/bindings/
drivers/soc/renesas/renesas-soc.c static const struct of_device_id renesas_socs[] __initconst __maybe_unused = { · line 396
Quoted 4 lines
drivers/soc/renesas/renesas-soc.c +1
-0+#endif #ifdef CONFIG_ARCH_R9A07G043 #ifdef CONFIG_RISCV { .compatible = "renesas,r9a07g043", .data = &soc_rz_five },
i.e. will queue in renesas-devel for v6.18, pending acceptance of the DT bindings.
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
Hi Geert
Quoted 7 lines
drivers/soc/renesas/renesas-soc.c static const struct renesas_family fam_rcar_gen4 __initconst __maybe_unused = { · line 41
Quoted 3 lines
drivers/soc/renesas/renesas-soc.c +3
-0+static const struct renesas_family fam_rcar_gen5__initconst __maybe_unused = { + .name ="R-Car Gen5" , + .reg =0xfff00044 ,/* PRR (Product Register) */ Please no hardcoded register addresses for new (DT-only) platforms (especially if they don't seem to be correct?).
I can drop this line while applying.
OK, thanks.
Will adjust on DT side.
Quoted 11 lines
drivers/soc/renesas/renesas-soc.c static const struct of_device_id renesas_socs[] __initconst __maybe_unused = { · line 392
Quoted 6 lines
drivers/soc/renesas/renesas-soc.c +2
-0@@ -378,6 +388,9 @@ static const struct of_device_id renesas_socs[] __initconst __maybe_unused = { #ifdef CONFIG_ARCH_R8A779H0 { .compatible = "renesas,r8a779h0", .data = &soc_rcar_v4m }, #endif +#ifdef CONFIG_ARCH_R8A78000 + { .compatible = "renesas,r8a78000", .data = &soc_rcar_x5h },
scripts/checkpatch.pl:WARNING: DT compatible string "renesas,r8a78000" appears un-documented -- check
./Documentation/devicetree/bindings/
Sorry I didn't explain about it. Yes.
My plan is update SoC and board DT DoC in the same time, so it will be included in next patch-set (= DoC support + X5H support + Ironhide suppor)
Thank you for your help !!
Best regards
---
Kuninori Morimoto