Skip to content

Commit 819ed6f

Browse files
committed
Merge tag 'renesas-drivers-for-v5.19-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel into arm/drivers
Renesas driver updates for v5.19 (take two) - Initial support for the R-Car V4H and RZ/V2M SoCs, - Miscellaneous fixes and improvements. * tag 'renesas-drivers-for-v5.19-tag2' of git://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-devel: soc: renesas: R-Car V3U is R-Car Gen4 soc: renesas: rzn1: Select PM and PM_GENERIC_DOMAINS configs soc: renesas: Add RZ/V2M (R9A09G011) config option soc: renesas: rcar-rst: Add support for R-Car V4H soc: renesas: Identify R-Car V4H soc: renesas: r8a779g0-sysc: Add r8a779g0 support dt-bindings: clock: Add r8a779g0 CPG Core Clock Definitions dt-bindings: power: Add r8a779g0 SYSC power domain definitions Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
2 parents 15b5b76 + 27e7657 commit 819ed6f

File tree

9 files changed

+232
-1
lines changed

9 files changed

+232
-1
lines changed

drivers/soc/renesas/Kconfig

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,8 @@ config ARCH_RZG2L
4747

4848
config ARCH_RZN1
4949
bool
50+
select PM
51+
select PM_GENERIC_DOMAINS
5052
select ARM_AMBA
5153

5254
if ARM && ARCH_RENESAS
@@ -268,6 +270,13 @@ config ARCH_R8A779A0
268270
help
269271
This enables support for the Renesas R-Car V3U SoC.
270272

273+
config ARCH_R8A779G0
274+
bool "ARM64 Platform support for R-Car V4H"
275+
select ARCH_RCAR_GEN3
276+
select SYSC_R8A779G0
277+
help
278+
This enables support for the Renesas R-Car V4H SoC.
279+
271280
config ARCH_R8A774C0
272281
bool "ARM64 Platform support for RZ/G2E"
273282
select ARCH_RCAR_GEN3
@@ -314,6 +323,13 @@ config ARCH_R9A07G054
314323
help
315324
This enables support for the Renesas RZ/V2L SoC variants.
316325

326+
config ARCH_R9A09G011
327+
bool "ARM64 Platform support for RZ/V2M"
328+
select PM
329+
select PM_GENERIC_DOMAINS
330+
help
331+
This enables support for the Renesas RZ/V2M SoC.
332+
317333
endif # ARM64
318334

319335
config RST_RCAR
@@ -385,6 +401,10 @@ config SYSC_R8A779A0
385401
bool "System Controller support for R-Car V3U" if COMPILE_TEST
386402
select SYSC_RCAR_GEN4
387403

404+
config SYSC_R8A779G0
405+
bool "System Controller support for R-Car V4H" if COMPILE_TEST
406+
select SYSC_RCAR_GEN4
407+
388408
config SYSC_RMOBILE
389409
bool "System Controller support for R-Mobile" if COMPILE_TEST
390410

drivers/soc/renesas/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ obj-$(CONFIG_SYSC_R8A77990) += r8a77990-sysc.o
2626
obj-$(CONFIG_SYSC_R8A77995) += r8a77995-sysc.o
2727
obj-$(CONFIG_SYSC_R8A779A0) += r8a779a0-sysc.o
2828
obj-$(CONFIG_SYSC_R8A779F0) += r8a779f0-sysc.o
29+
obj-$(CONFIG_SYSC_R8A779G0) += r8a779g0-sysc.o
2930
ifdef CONFIG_SMP
3031
obj-$(CONFIG_ARCH_R9A06G032) += r9a06g032-smp.o
3132
endif

drivers/soc/renesas/r8a779g0-sysc.c

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
// SPDX-License-Identifier: GPL-2.0
2+
/*
3+
* Renesas R-Car V4H System Controller
4+
*
5+
* Copyright (C) 2022 Renesas Electronics Corp.
6+
*/
7+
8+
#include <linux/bits.h>
9+
#include <linux/clk/renesas.h>
10+
#include <linux/delay.h>
11+
#include <linux/err.h>
12+
#include <linux/io.h>
13+
#include <linux/iopoll.h>
14+
#include <linux/kernel.h>
15+
#include <linux/mm.h>
16+
#include <linux/of_address.h>
17+
#include <linux/pm_domain.h>
18+
#include <linux/slab.h>
19+
#include <linux/spinlock.h>
20+
#include <linux/types.h>
21+
22+
#include <dt-bindings/power/r8a779g0-sysc.h>
23+
24+
#include "rcar-gen4-sysc.h"
25+
26+
static struct rcar_gen4_sysc_area r8a779g0_areas[] __initdata = {
27+
{ "always-on", R8A779G0_PD_ALWAYS_ON, -1, PD_ALWAYS_ON },
28+
{ "a3e0", R8A779G0_PD_A3E0, R8A779G0_PD_ALWAYS_ON, PD_SCU },
29+
{ "a2e0d0", R8A779G0_PD_A2E0D0, R8A779G0_PD_A3E0, PD_SCU },
30+
{ "a2e0d1", R8A779G0_PD_A2E0D1, R8A779G0_PD_A3E0, PD_SCU },
31+
{ "a1e0d0c0", R8A779G0_PD_A1E0D0C0, R8A779G0_PD_A2E0D0, PD_CPU_NOCR },
32+
{ "a1e0d0c1", R8A779G0_PD_A1E0D0C1, R8A779G0_PD_A2E0D0, PD_CPU_NOCR },
33+
{ "a1e0d1c0", R8A779G0_PD_A1E0D1C0, R8A779G0_PD_A2E0D1, PD_CPU_NOCR },
34+
{ "a1e0d1c1", R8A779G0_PD_A1E0D1C1, R8A779G0_PD_A2E0D1, PD_CPU_NOCR },
35+
{ "a33dga", R8A779G0_PD_A33DGA, R8A779G0_PD_ALWAYS_ON },
36+
{ "a23dgb", R8A779G0_PD_A23DGB, R8A779G0_PD_A33DGA },
37+
{ "a3vip0", R8A779G0_PD_A3VIP0, R8A779G0_PD_ALWAYS_ON },
38+
{ "a3vip1", R8A779G0_PD_A3VIP1, R8A779G0_PD_ALWAYS_ON },
39+
{ "a3vip2", R8A779G0_PD_A3VIP2, R8A779G0_PD_ALWAYS_ON },
40+
{ "a3isp0", R8A779G0_PD_A3ISP0, R8A779G0_PD_ALWAYS_ON },
41+
{ "a3isp1", R8A779G0_PD_A3ISP1, R8A779G0_PD_ALWAYS_ON },
42+
{ "a3ir", R8A779G0_PD_A3IR, R8A779G0_PD_ALWAYS_ON },
43+
{ "a2cn0", R8A779G0_PD_A2CN0, R8A779G0_PD_A3IR },
44+
{ "a1cnn0", R8A779G0_PD_A1CNN0, R8A779G0_PD_A2CN0 },
45+
{ "a1dsp0", R8A779G0_PD_A1DSP0, R8A779G0_PD_A2CN0 },
46+
{ "a1dsp1", R8A779G0_PD_A1DSP1, R8A779G0_PD_A2CN0 },
47+
{ "a1dsp2", R8A779G0_PD_A1DSP2, R8A779G0_PD_A2CN0 },
48+
{ "a1dsp3", R8A779G0_PD_A1DSP3, R8A779G0_PD_A2CN0 },
49+
{ "a2imp01", R8A779G0_PD_A2IMP01, R8A779G0_PD_A3IR },
50+
{ "a2imp23", R8A779G0_PD_A2IMP23, R8A779G0_PD_A3IR },
51+
{ "a2psc", R8A779G0_PD_A2PSC, R8A779G0_PD_A3IR },
52+
{ "a2dma", R8A779G0_PD_A2DMA, R8A779G0_PD_A3IR },
53+
{ "a2cv0", R8A779G0_PD_A2CV0, R8A779G0_PD_A3IR },
54+
{ "a2cv1", R8A779G0_PD_A2CV1, R8A779G0_PD_A3IR },
55+
{ "a2cv2", R8A779G0_PD_A2CV2, R8A779G0_PD_A3IR },
56+
{ "a2cv3", R8A779G0_PD_A2CV3, R8A779G0_PD_A3IR },
57+
};
58+
59+
const struct rcar_gen4_sysc_info r8a779g0_sysc_info __initconst = {
60+
.areas = r8a779g0_areas,
61+
.num_areas = ARRAY_SIZE(r8a779g0_areas),
62+
};

drivers/soc/renesas/rcar-gen4-sysc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -281,6 +281,9 @@ static const struct of_device_id rcar_gen4_sysc_matches[] __initconst = {
281281
#endif
282282
#ifdef CONFIG_SYSC_R8A779F0
283283
{ .compatible = "renesas,r8a779f0-sysc", .data = &r8a779f0_sysc_info },
284+
#endif
285+
#ifdef CONFIG_SYSC_R8A779G0
286+
{ .compatible = "renesas,r8a779g0-sysc", .data = &r8a779g0_sysc_info },
284287
#endif
285288
{ /* sentinel */ }
286289
};

drivers/soc/renesas/rcar-gen4-sysc.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,5 +39,6 @@ struct rcar_gen4_sysc_info {
3939

4040
extern const struct rcar_gen4_sysc_info r8a779a0_sysc_info;
4141
extern const struct rcar_gen4_sysc_info r8a779f0_sysc_info;
42+
extern const struct rcar_gen4_sysc_info r8a779g0_sysc_info;
4243

4344
#endif /* __SOC_RENESAS_RCAR_GEN4_SYSC_H__ */

drivers/soc/renesas/rcar-rst.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ static const struct of_device_id rcar_rst_matches[] __initconst = {
103103
/* R-Car Gen4 */
104104
{ .compatible = "renesas,r8a779a0-rst", .data = &rcar_rst_gen4 },
105105
{ .compatible = "renesas,r8a779f0-rst", .data = &rcar_rst_gen4 },
106+
{ .compatible = "renesas,r8a779g0-rst", .data = &rcar_rst_gen4 },
106107
{ /* sentinel */ }
107108
};
108109

drivers/soc/renesas/renesas-soc.c

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,7 +232,7 @@ static const struct renesas_soc soc_rcar_d3 __initconst __maybe_unused = {
232232
};
233233

234234
static const struct renesas_soc soc_rcar_v3u __initconst __maybe_unused = {
235-
.family = &fam_rcar_gen3,
235+
.family = &fam_rcar_gen4,
236236
.id = 0x59,
237237
};
238238

@@ -241,6 +241,11 @@ static const struct renesas_soc soc_rcar_s4 __initconst __maybe_unused = {
241241
.id = 0x5a,
242242
};
243243

244+
static const struct renesas_soc soc_rcar_v4h __initconst __maybe_unused = {
245+
.family = &fam_rcar_gen4,
246+
.id = 0x5c,
247+
};
248+
244249
static const struct renesas_soc soc_shmobile_ag5 __initconst __maybe_unused = {
245250
.family = &fam_shmobile,
246251
.id = 0x37,
@@ -349,6 +354,9 @@ static const struct of_device_id renesas_socs[] __initconst = {
349354
#ifdef CONFIG_ARCH_R8A779F0
350355
{ .compatible = "renesas,r8a779f0", .data = &soc_rcar_s4 },
351356
#endif
357+
#ifdef CONFIG_ARCH_R8A779G0
358+
{ .compatible = "renesas,r8a779g0", .data = &soc_rcar_v4h },
359+
#endif
352360
#if defined(CONFIG_ARCH_R9A07G043)
353361
{ .compatible = "renesas,r9a07g043", .data = &soc_rz_g2ul },
354362
#endif
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2+
/*
3+
* Copyright (C) 2022 Renesas Electronics Corp.
4+
*/
5+
#ifndef __DT_BINDINGS_CLOCK_R8A779G0_CPG_MSSR_H__
6+
#define __DT_BINDINGS_CLOCK_R8A779G0_CPG_MSSR_H__
7+
8+
#include <dt-bindings/clock/renesas-cpg-mssr.h>
9+
10+
/* r8a779g0 CPG Core Clocks */
11+
12+
#define R8A779G0_CLK_ZX 0
13+
#define R8A779G0_CLK_ZS 1
14+
#define R8A779G0_CLK_ZT 2
15+
#define R8A779G0_CLK_ZTR 3
16+
#define R8A779G0_CLK_S0D2 4
17+
#define R8A779G0_CLK_S0D3 5
18+
#define R8A779G0_CLK_S0D4 6
19+
#define R8A779G0_CLK_S0D1_VIO 7
20+
#define R8A779G0_CLK_S0D2_VIO 8
21+
#define R8A779G0_CLK_S0D4_VIO 9
22+
#define R8A779G0_CLK_S0D8_VIO 10
23+
#define R8A779G0_CLK_S0D1_VC 11
24+
#define R8A779G0_CLK_S0D2_VC 12
25+
#define R8A779G0_CLK_S0D4_VC 13
26+
#define R8A779G0_CLK_S0D2_MM 14
27+
#define R8A779G0_CLK_S0D4_MM 15
28+
#define R8A779G0_CLK_S0D2_U3DG 16
29+
#define R8A779G0_CLK_S0D4_U3DG 17
30+
#define R8A779G0_CLK_S0D2_RT 18
31+
#define R8A779G0_CLK_S0D3_RT 19
32+
#define R8A779G0_CLK_S0D4_RT 20
33+
#define R8A779G0_CLK_S0D6_RT 21
34+
#define R8A779G0_CLK_S0D24_RT 22
35+
#define R8A779G0_CLK_S0D2_PER 23
36+
#define R8A779G0_CLK_S0D3_PER 24
37+
#define R8A779G0_CLK_S0D4_PER 25
38+
#define R8A779G0_CLK_S0D6_PER 26
39+
#define R8A779G0_CLK_S0D12_PER 27
40+
#define R8A779G0_CLK_S0D24_PER 28
41+
#define R8A779G0_CLK_S0D1_HSC 29
42+
#define R8A779G0_CLK_S0D2_HSC 30
43+
#define R8A779G0_CLK_S0D4_HSC 31
44+
#define R8A779G0_CLK_S0D2_CC 32
45+
#define R8A779G0_CLK_SVD1_IR 33
46+
#define R8A779G0_CLK_SVD2_IR 34
47+
#define R8A779G0_CLK_SVD1_VIP 35
48+
#define R8A779G0_CLK_SVD2_VIP 36
49+
#define R8A779G0_CLK_CL 37
50+
#define R8A779G0_CLK_CL16M 38
51+
#define R8A779G0_CLK_CL16M_MM 39
52+
#define R8A779G0_CLK_CL16M_RT 40
53+
#define R8A779G0_CLK_CL16M_PER 41
54+
#define R8A779G0_CLK_CL16M_HSC 42
55+
#define R8A779G0_CLK_Z0 43
56+
#define R8A779G0_CLK_ZB3 44
57+
#define R8A779G0_CLK_ZB3D2 45
58+
#define R8A779G0_CLK_ZB3D4 46
59+
#define R8A779G0_CLK_ZG 47
60+
#define R8A779G0_CLK_SD0H 48
61+
#define R8A779G0_CLK_SD0 49
62+
#define R8A779G0_CLK_RPC 50
63+
#define R8A779G0_CLK_RPCD2 51
64+
#define R8A779G0_CLK_MSO 52
65+
#define R8A779G0_CLK_CANFD 53
66+
#define R8A779G0_CLK_CSI 54
67+
#define R8A779G0_CLK_FRAY 55
68+
#define R8A779G0_CLK_IPC 56
69+
#define R8A779G0_CLK_SASYNCRT 57
70+
#define R8A779G0_CLK_SASYNCPERD1 58
71+
#define R8A779G0_CLK_SASYNCPERD2 59
72+
#define R8A779G0_CLK_SASYNCPERD4 60
73+
#define R8A779G0_CLK_VIOBUS 61
74+
#define R8A779G0_CLK_VIOBUSD2 62
75+
#define R8A779G0_CLK_VCBUS 63
76+
#define R8A779G0_CLK_VCBUSD2 64
77+
#define R8A779G0_CLK_DSIEXT 65
78+
#define R8A779G0_CLK_DSIREF 66
79+
#define R8A779G0_CLK_ADGH 67
80+
#define R8A779G0_CLK_OSC 68
81+
#define R8A779G0_CLK_ZR0 69
82+
#define R8A779G0_CLK_ZR1 70
83+
#define R8A779G0_CLK_ZR2 71
84+
#define R8A779G0_CLK_IMPA 72
85+
#define R8A779G0_CLK_IMPAD4 73
86+
#define R8A779G0_CLK_CPEX 74
87+
#define R8A779G0_CLK_CBFUSA 75
88+
#define R8A779G0_CLK_R 76
89+
90+
#endif /* __DT_BINDINGS_CLOCK_R8A779G0_CPG_MSSR_H__ */
Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
2+
/*
3+
* Copyright (C) 2022 Renesas Electronics Corp.
4+
*/
5+
#ifndef __DT_BINDINGS_POWER_R8A779G0_SYSC_H__
6+
#define __DT_BINDINGS_POWER_R8A779G0_SYSC_H__
7+
8+
/*
9+
* These power domain indices match the Power Domain Register Numbers (PDR)
10+
*/
11+
12+
#define R8A779G0_PD_A1E0D0C0 0
13+
#define R8A779G0_PD_A1E0D0C1 1
14+
#define R8A779G0_PD_A1E0D1C0 2
15+
#define R8A779G0_PD_A1E0D1C1 3
16+
#define R8A779G0_PD_A2E0D0 16
17+
#define R8A779G0_PD_A2E0D1 17
18+
#define R8A779G0_PD_A3E0 20
19+
#define R8A779G0_PD_A33DGA 24
20+
#define R8A779G0_PD_A23DGB 25
21+
#define R8A779G0_PD_A1DSP0 33
22+
#define R8A779G0_PD_A2IMP01 34
23+
#define R8A779G0_PD_A2PSC 35
24+
#define R8A779G0_PD_A2CV0 36
25+
#define R8A779G0_PD_A2CV1 37
26+
#define R8A779G0_PD_A1CNN0 41
27+
#define R8A779G0_PD_A2CN0 42
28+
#define R8A779G0_PD_A3IR 43
29+
#define R8A779G0_PD_A1DSP1 45
30+
#define R8A779G0_PD_A2IMP23 46
31+
#define R8A779G0_PD_A2DMA 47
32+
#define R8A779G0_PD_A2CV2 48
33+
#define R8A779G0_PD_A2CV3 49
34+
#define R8A779G0_PD_A1DSP2 53
35+
#define R8A779G0_PD_A1DSP3 54
36+
#define R8A779G0_PD_A3VIP0 56
37+
#define R8A779G0_PD_A3VIP1 57
38+
#define R8A779G0_PD_A3VIP2 58
39+
#define R8A779G0_PD_A3ISP0 60
40+
#define R8A779G0_PD_A3ISP1 61
41+
42+
/* Always-on power area */
43+
#define R8A779G0_PD_ALWAYS_ON 64
44+
45+
#endif /* __DT_BINDINGS_POWER_R8A779G0_SYSC_H__*/

0 commit comments

Comments
 (0)