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

soc: renesas: rcar-sysc: Add r8a77470 support

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

Signed-off-by: Biju Das <biju.das@bp.renesas.com>
Reviewed-by: Fabrizio Castro <fabrizio.castro@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>

authored by

Biju Das and committed by
Simon Horman
964f7c0d a3a9033f

+62
+1
Documentation/devicetree/bindings/power/renesas,rcar-sysc.txt
··· 9 9 - compatible: Must contain exactly one of the following: 10 10 - "renesas,r8a7743-sysc" (RZ/G1M) 11 11 - "renesas,r8a7745-sysc" (RZ/G1E) 12 + - "renesas,r8a77470-sysc" (RZ/G1C) 12 13 - "renesas,r8a7779-sysc" (R-Car H1) 13 14 - "renesas,r8a7790-sysc" (R-Car H2) 14 15 - "renesas,r8a7791-sysc" (R-Car M2-W)
+5
drivers/soc/renesas/Kconfig
··· 7 7 ARCH_R8A77970 || ARCH_R8A77980 || ARCH_R8A77995 8 8 select SYSC_R8A7743 if ARCH_R8A7743 9 9 select SYSC_R8A7745 if ARCH_R8A7745 10 + select SYSC_R8A77470 if ARCH_R8A77470 10 11 select SYSC_R8A7779 if ARCH_R8A7779 11 12 select SYSC_R8A7790 if ARCH_R8A7790 12 13 select SYSC_R8A7791 if ARCH_R8A7791 || ARCH_R8A7793 ··· 29 28 30 29 config SYSC_R8A7745 31 30 bool "RZ/G1E System Controller support" if COMPILE_TEST 31 + select SYSC_RCAR 32 + 33 + config SYSC_R8A77470 34 + bool "RZ/G1C System Controller support" if COMPILE_TEST 32 35 select SYSC_RCAR 33 36 34 37 config SYSC_R8A7779
+1
drivers/soc/renesas/Makefile
··· 5 5 # SoC 6 6 obj-$(CONFIG_SYSC_R8A7743) += r8a7743-sysc.o 7 7 obj-$(CONFIG_SYSC_R8A7745) += r8a7745-sysc.o 8 + obj-$(CONFIG_SYSC_R8A77470) += r8a77470-sysc.o 8 9 obj-$(CONFIG_SYSC_R8A7779) += r8a7779-sysc.o 9 10 obj-$(CONFIG_SYSC_R8A7790) += r8a7790-sysc.o 10 11 obj-$(CONFIG_SYSC_R8A7791) += r8a7791-sysc.o
+29
drivers/soc/renesas/r8a77470-sysc.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Renesas RZ/G1C System Controller 4 + * 5 + * Copyright (C) 2018 Renesas Electronics Corp. 6 + */ 7 + 8 + #include <linux/bug.h> 9 + #include <linux/kernel.h> 10 + 11 + #include <dt-bindings/power/r8a77470-sysc.h> 12 + 13 + #include "rcar-sysc.h" 14 + 15 + static const struct rcar_sysc_area r8a77470_areas[] __initconst = { 16 + { "always-on", 0, 0, R8A77470_PD_ALWAYS_ON, -1, PD_ALWAYS_ON }, 17 + { "ca7-scu", 0x100, 0, R8A77470_PD_CA7_SCU, R8A77470_PD_ALWAYS_ON, 18 + PD_SCU }, 19 + { "ca7-cpu0", 0x1c0, 0, R8A77470_PD_CA7_CPU0, R8A77470_PD_CA7_SCU, 20 + PD_CPU_NOCR }, 21 + { "ca7-cpu1", 0x1c0, 1, R8A77470_PD_CA7_CPU1, R8A77470_PD_CA7_SCU, 22 + PD_CPU_NOCR }, 23 + { "sgx", 0xc0, 0, R8A77470_PD_SGX, R8A77470_PD_ALWAYS_ON }, 24 + }; 25 + 26 + const struct rcar_sysc_info r8a77470_sysc_info __initconst = { 27 + .areas = r8a77470_areas, 28 + .num_areas = ARRAY_SIZE(r8a77470_areas), 29 + };
+3
drivers/soc/renesas/rcar-sysc.c
··· 261 261 #ifdef CONFIG_SYSC_R8A7745 262 262 { .compatible = "renesas,r8a7745-sysc", .data = &r8a7745_sysc_info }, 263 263 #endif 264 + #ifdef CONFIG_SYSC_R8A77470 265 + { .compatible = "renesas,r8a77470-sysc", .data = &r8a77470_sysc_info }, 266 + #endif 264 267 #ifdef CONFIG_SYSC_R8A7779 265 268 { .compatible = "renesas,r8a7779-sysc", .data = &r8a7779_sysc_info }, 266 269 #endif
+1
drivers/soc/renesas/rcar-sysc.h
··· 51 51 52 52 extern const struct rcar_sysc_info r8a7743_sysc_info; 53 53 extern const struct rcar_sysc_info r8a7745_sysc_info; 54 + extern const struct rcar_sysc_info r8a77470_sysc_info; 54 55 extern const struct rcar_sysc_info r8a7779_sysc_info; 55 56 extern const struct rcar_sysc_info r8a7790_sysc_info; 56 57 extern const struct rcar_sysc_info r8a7791_sysc_info;
+22
include/dt-bindings/power/r8a77470-sysc.h
··· 1 + /* SPDX-License-Identifier: GPL-2.0 2 + * 3 + * Copyright (C) 2018 Renesas Electronics Corp. 4 + */ 5 + #ifndef __DT_BINDINGS_POWER_R8A77470_SYSC_H__ 6 + #define __DT_BINDINGS_POWER_R8A77470_SYSC_H__ 7 + 8 + /* 9 + * These power domain indices match the numbers of the interrupt bits 10 + * representing the power areas in the various Interrupt Registers 11 + * (e.g. SYSCISR, Interrupt Status Register) 12 + */ 13 + 14 + #define R8A77470_PD_CA7_CPU0 5 15 + #define R8A77470_PD_CA7_CPU1 6 16 + #define R8A77470_PD_SGX 20 17 + #define R8A77470_PD_CA7_SCU 21 18 + 19 + /* Always-on power area */ 20 + #define R8A77470_PD_ALWAYS_ON 32 21 + 22 + #endif /* __DT_BINDINGS_POWER_R8A77470_SYSC_H__ */