Skip to content

Commit 5b9fa9c

Browse files
prabhakarladgeertu
authored andcommitted
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 <[email protected]> Reviewed-by: Marian-Cristian Rotariu <[email protected]> Link: https://lore.kernel.org/r/1587678050-23468-4-git-send-email-prabhakar.mahadev-lad.rj@bp.renesas.com Signed-off-by: Geert Uytterhoeven <[email protected]>
1 parent 557b7e5 commit 5b9fa9c

File tree

5 files changed

+51
-0
lines changed

5 files changed

+51
-0
lines changed

drivers/soc/renesas/Kconfig

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,6 +261,10 @@ config ARCH_R8A77995
261261
endif # ARM64
262262

263263
# SoC
264+
config SYSC_R8A7742
265+
bool "RZ/G1H System Controller support" if COMPILE_TEST
266+
select SYSC_RCAR
267+
264268
config SYSC_R8A7743
265269
bool "RZ/G1M System Controller support" if COMPILE_TEST
266270
select SYSC_RCAR

drivers/soc/renesas/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
obj-$(CONFIG_SOC_RENESAS) += renesas-soc.o
44

55
# SoC
6+
obj-$(CONFIG_SYSC_R8A7742) += r8a7742-sysc.o
67
obj-$(CONFIG_SYSC_R8A7743) += r8a7743-sysc.o
78
obj-$(CONFIG_SYSC_R8A7745) += r8a7745-sysc.o
89
obj-$(CONFIG_SYSC_R8A77470) += r8a77470-sysc.o

drivers/soc/renesas/r8a7742-sysc.c

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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+
};

drivers/soc/renesas/rcar-sysc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -273,6 +273,9 @@ static int __init rcar_sysc_pd_setup(struct rcar_sysc_pd *pd)
273273
}
274274

275275
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
276279
#ifdef CONFIG_SYSC_R8A7743
277280
{ .compatible = "renesas,r8a7743-sysc", .data = &r8a7743_sysc_info },
278281
/* RZ/G1N is identical to RZ/G2M w.r.t. power domains. */

drivers/soc/renesas/rcar-sysc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ struct rcar_sysc_info {
4949
u32 extmask_val; /* SYSCEXTMASK register mask value */
5050
};
5151

52+
extern const struct rcar_sysc_info r8a7742_sysc_info;
5253
extern const struct rcar_sysc_info r8a7743_sysc_info;
5354
extern const struct rcar_sysc_info r8a7745_sysc_info;
5455
extern const struct rcar_sysc_info r8a77470_sysc_info;

0 commit comments

Comments
 (0)