Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc: renesas: rcar-sysc: Add R8A7742 support

Add support for RZ/G1H (R8A7742) SoC power areas to the R-Car SYSC driver.

Signed-off-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
Reviewed-by: Marian-Cristian Rotariu <marian-cristian.rotariu.rb@bp.renesas.com>
Link: https://lore.kernel.org/r/1587678050-23468-4-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

authored by

Lad Prabhakar and committed by
Geert Uytterhoeven
5b9fa9cb 557b7e54

+51
+4
drivers/soc/renesas/Kconfig
··· 261 261 endif # ARM64 262 262 263 263 # SoC 264 + config SYSC_R8A7742 265 + bool "RZ/G1H System Controller support" if COMPILE_TEST 266 + select SYSC_RCAR 267 + 264 268 config SYSC_R8A7743 265 269 bool "RZ/G1M System Controller support" if COMPILE_TEST 266 270 select SYSC_RCAR
+1
drivers/soc/renesas/Makefile
··· 3 3 obj-$(CONFIG_SOC_RENESAS) += renesas-soc.o 4 4 5 5 # SoC 6 + obj-$(CONFIG_SYSC_R8A7742) += r8a7742-sysc.o 6 7 obj-$(CONFIG_SYSC_R8A7743) += r8a7743-sysc.o 7 8 obj-$(CONFIG_SYSC_R8A7745) += r8a7745-sysc.o 8 9 obj-$(CONFIG_SYSC_R8A77470) += r8a77470-sysc.o
+42
drivers/soc/renesas/r8a7742-sysc.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Renesas RZ/G1H System Controller 4 + * 5 + * Copyright (C) 2020 Renesas Electronics Corp. 6 + */ 7 + 8 + #include <linux/kernel.h> 9 + 10 + #include <dt-bindings/power/r8a7742-sysc.h> 11 + 12 + #include "rcar-sysc.h" 13 + 14 + static const struct rcar_sysc_area r8a7742_areas[] __initconst = { 15 + { "always-on", 0, 0, R8A7742_PD_ALWAYS_ON, -1, PD_ALWAYS_ON }, 16 + { "ca15-scu", 0x180, 0, R8A7742_PD_CA15_SCU, R8A7742_PD_ALWAYS_ON, 17 + PD_SCU }, 18 + { "ca15-cpu0", 0x40, 0, R8A7742_PD_CA15_CPU0, R8A7742_PD_CA15_SCU, 19 + PD_CPU_NOCR }, 20 + { "ca15-cpu1", 0x40, 1, R8A7742_PD_CA15_CPU1, R8A7742_PD_CA15_SCU, 21 + PD_CPU_NOCR }, 22 + { "ca15-cpu2", 0x40, 2, R8A7742_PD_CA15_CPU2, R8A7742_PD_CA15_SCU, 23 + PD_CPU_NOCR }, 24 + { "ca15-cpu3", 0x40, 3, R8A7742_PD_CA15_CPU3, R8A7742_PD_CA15_SCU, 25 + PD_CPU_NOCR }, 26 + { "ca7-scu", 0x100, 0, R8A7742_PD_CA7_SCU, R8A7742_PD_ALWAYS_ON, 27 + PD_SCU }, 28 + { "ca7-cpu0", 0x1c0, 0, R8A7742_PD_CA7_CPU0, R8A7742_PD_CA7_SCU, 29 + PD_CPU_NOCR }, 30 + { "ca7-cpu1", 0x1c0, 1, R8A7742_PD_CA7_CPU1, R8A7742_PD_CA7_SCU, 31 + PD_CPU_NOCR }, 32 + { "ca7-cpu2", 0x1c0, 2, R8A7742_PD_CA7_CPU2, R8A7742_PD_CA7_SCU, 33 + PD_CPU_NOCR }, 34 + { "ca7-cpu3", 0x1c0, 3, R8A7742_PD_CA7_CPU3, R8A7742_PD_CA7_SCU, 35 + PD_CPU_NOCR }, 36 + { "rgx", 0xc0, 0, R8A7742_PD_RGX, R8A7742_PD_ALWAYS_ON }, 37 + }; 38 + 39 + const struct rcar_sysc_info r8a7742_sysc_info __initconst = { 40 + .areas = r8a7742_areas, 41 + .num_areas = ARRAY_SIZE(r8a7742_areas), 42 + };
+3
drivers/soc/renesas/rcar-sysc.c
··· 273 273 } 274 274 275 275 static const struct of_device_id rcar_sysc_matches[] __initconst = { 276 + #ifdef CONFIG_SYSC_R8A7742 277 + { .compatible = "renesas,r8a7742-sysc", .data = &r8a7742_sysc_info }, 278 + #endif 276 279 #ifdef CONFIG_SYSC_R8A7743 277 280 { .compatible = "renesas,r8a7743-sysc", .data = &r8a7743_sysc_info }, 278 281 /* RZ/G1N is identical to RZ/G2M w.r.t. power domains. */
+1
drivers/soc/renesas/rcar-sysc.h
··· 49 49 u32 extmask_val; /* SYSCEXTMASK register mask value */ 50 50 }; 51 51 52 + extern const struct rcar_sysc_info r8a7742_sysc_info; 52 53 extern const struct rcar_sysc_info r8a7743_sysc_info; 53 54 extern const struct rcar_sysc_info r8a7745_sysc_info; 54 55 extern const struct rcar_sysc_info r8a77470_sysc_info;