Skip to contentSkip to conversation

arm64: renesas: Add R-Car V4M and Gray Hawk Single support

PATCH Superseded Geert Uytterhoeven 7 participants 44 messages Jan 8, 2024 – Jan 24, 2024

Subsystems (6)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
author maintainer
#5 lore raw

PATCH 2/15 dt-bindings: clock: Add R8A779H0 V4M CPG Core Clock Definitions

In reply to Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Add all Clock Pulse Generator Core Clock Outputs for the Renesas R-Car V4M (R8A779H0) SoC.

---
Changes compared to the BSP:
- Drop POST* clocks, as they are internal clocks.

---
 include/dt-bindings/clock/r8a779h0-cpg-mssr.h | 96 +++++++++++++++++++
 1 file changed, 96 insertions(+)
 create mode 100644 include/dt-bindings/clock/r8a779h0-cpg-mssr.h
include/dt-bindings/clock/r8a779h0-cpg-mssr.h new file +96 -0
new file mode 100644
index 0000000000000000..baf41231c215acb3
@@ -0,0 +1,96 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+#ifndef __DT_BINDINGS_CLOCK_R8A779H0_CPG_MSSR_H__
+#define __DT_BINDINGS_CLOCK_R8A779H0_CPG_MSSR_H__
+
+#include <dt-bindings/clock/renesas-cpg-mssr.h>
+
+/* r8a779h0 CPG Core Clocks */
+
+#define R8A779H0_CLK_ZX			0
+#define R8A779H0_CLK_ZD			1
+#define R8A779H0_CLK_ZS			2
+#define R8A779H0_CLK_ZT			3
+#define R8A779H0_CLK_ZTR		4
+#define R8A779H0_CLK_S0D2		5
+#define R8A779H0_CLK_S0D3		6
+#define R8A779H0_CLK_S0D4		7
+#define R8A779H0_CLK_S0D1_VIO		8
+#define R8A779H0_CLK_S0D2_VIO		9
+#define R8A779H0_CLK_S0D4_VIO		10
+#define R8A779H0_CLK_S0D8_VIO		11
+#define R8A779H0_CLK_VIOBUSD1		12
+#define R8A779H0_CLK_VIOBUSD2		13
+#define R8A779H0_CLK_S0D1_VC		14
+#define R8A779H0_CLK_S0D2_VC		15
+#define R8A779H0_CLK_S0D4_VC		16
+#define R8A779H0_CLK_VCBUSD1		17
+#define R8A779H0_CLK_VCBUSD2		18
+#define R8A779H0_CLK_S0D2_MM		19
+#define R8A779H0_CLK_S0D4_MM		20
+#define R8A779H0_CLK_S0D2_U3DG		21
+#define R8A779H0_CLK_S0D4_U3DG		22
+#define R8A779H0_CLK_S0D2_RT		23
+#define R8A779H0_CLK_S0D3_RT		24
+#define R8A779H0_CLK_S0D4_RT		25
+#define R8A779H0_CLK_S0D6_RT		26
+#define R8A779H0_CLK_S0D2_PER		27
+#define R8A779H0_CLK_S0D3_PER		28
+#define R8A779H0_CLK_S0D4_PER		29
+#define R8A779H0_CLK_S0D6_PER		30
+#define R8A779H0_CLK_S0D12_PER		31
+#define R8A779H0_CLK_S0D24_PER		32
+#define R8A779H0_CLK_S0D1_HSC		33
+#define R8A779H0_CLK_S0D2_HSC		34
+#define R8A779H0_CLK_S0D4_HSC		35
+#define R8A779H0_CLK_S0D8_HSC		36
+#define R8A779H0_CLK_SVD1_IR		37
+#define R8A779H0_CLK_SVD2_IR		38
+#define R8A779H0_CLK_IMPAD1		39
+#define R8A779H0_CLK_IMPAD4		40
+#define R8A779H0_CLK_IMPB		41
+#define R8A779H0_CLK_SVD1_VIP		42
+#define R8A779H0_CLK_SVD2_VIP		43
+#define R8A779H0_CLK_CL			44
+#define R8A779H0_CLK_CL16M		45
+#define R8A779H0_CLK_CL16M_MM		46
+#define R8A779H0_CLK_CL16M_RT		47
+#define R8A779H0_CLK_CL16M_PER		48
+#define R8A779H0_CLK_CL16M_HSC		49
+#define R8A779H0_CLK_ZC0		50
+#define R8A779H0_CLK_ZC1		51
+#define R8A779H0_CLK_ZC2		52
+#define R8A779H0_CLK_ZC3		53
+#define R8A779H0_CLK_ZB3		54
+#define R8A779H0_CLK_ZB3D2		55
+#define R8A779H0_CLK_ZB3D4		56
+#define R8A779H0_CLK_ZG			57
+#define R8A779H0_CLK_SD0H		58
+#define R8A779H0_CLK_SD0		59
+#define R8A779H0_CLK_RPC		60
+#define R8A779H0_CLK_RPCD2		61
+#define R8A779H0_CLK_MSO		62
+#define R8A779H0_CLK_CANFD		63
+#define R8A779H0_CLK_CSI		64
+#define R8A779H0_CLK_FRAY		65
+#define R8A779H0_CLK_IPC		66
+#define R8A779H0_CLK_SASYNCRT		67
+#define R8A779H0_CLK_SASYNCPERD1	68
+#define R8A779H0_CLK_SASYNCPERD2	69
+#define R8A779H0_CLK_SASYNCPERD4	70
+#define R8A779H0_CLK_DSIEXT		71
+#define R8A779H0_CLK_DSIREF		72
+#define R8A779H0_CLK_ADGH		73
+#define R8A779H0_CLK_OSC		74
+#define R8A779H0_CLK_ZR0		75
+#define R8A779H0_CLK_ZR1		76
+#define R8A779H0_CLK_ZR2		77
+#define R8A779H0_CLK_RGMII		78
+#define R8A779H0_CLK_CPEX		79
+#define R8A779H0_CLK_CP			80
+#define R8A779H0_CLK_CBFUSA		81
+#define R8A779H0_CLK_R			82
+
+#endif /* __DT_BINDINGS_CLOCK_R8A779H0_CPG_MSSR_H__ */
Signature · 1 line
2.34.1
author maintainer
#37 lore raw

PATCH 12/15 soc: renesas: rcar-rst: Add support for R-Car V4M

In reply to Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Add support for the R-Car V4M (R8A779H0) SoC to the R-Car RST driver.

---
Early firmware versions may not enable WDT resets, so you may need to do s/rcar_rst_gen4/rcar_rst_v3u/ for testing.

---
 drivers/soc/renesas/rcar-rst.c | 1 +
 1 file changed, 1 insertion(+)
drivers/soc/renesas/rcar-rst.c +1 -0
index 98fd97da6cd4330d..7ba02f3a4a4fbb9f 100644
@@ -117,6 +117,7 @@ static const struct of_device_id rcar_rst_matches[] __initconst = {
 	{ .compatible = "renesas,r8a779a0-rst", .data = &rcar_rst_v3u },
 	{ .compatible = "renesas,r8a779f0-rst", .data = &rcar_rst_gen4 },
 	{ .compatible = "renesas,r8a779g0-rst", .data = &rcar_rst_gen4 },
+	{ .compatible = "renesas,r8a779h0-rst", .data = &rcar_rst_gen4 },
 	{ /* sentinel */ }
 };
 
Signature · 1 line
2.34.1
author maintainer
#1 lore raw

PATCH 1/15 dt-bindings: clock: renesas,cpg-mssr: Document R-Car V4M support

In reply to Geert Uytterhoeven

Document support for the Clock Pulse Generator (CPG) and Module Standby Software Reset (MSSR) module on the Renesas R-Car V4M (R8A779H0) SoC.

---
 Documentation/devicetree/bindings/clock/renesas,cpg-mssr.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/clock/renesas,cpg-mssr.yaml +1 -0
index 9c3dc6c4fa94218c..084259d30232aa68 100644
@@ -50,6 +50,7 @@ properties:
       - renesas,r8a779a0-cpg-mssr # R-Car V3U
       - renesas,r8a779f0-cpg-mssr # R-Car S4-8
       - renesas,r8a779g0-cpg-mssr # R-Car V4H
+      - renesas,r8a779h0-cpg-mssr # R-Car V4M
 
   reg:
     maxItems: 1
Signature · 1 line
2.34.1
author maintainer
#11 lore raw

PATCH 3/15 dt-bindings: power: renesas,rcar-sysc: Document R-Car V4M support

In reply to Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Document support for the System Controller (SYSC) in the R-Car V4M (R8A779H0) SoC.

---
 Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml +1 -0
index 0720b54881c2c87a..e76fb273490ff588 100644
@@ -45,6 +45,7 @@ properties:
       - renesas,r8a779a0-sysc # R-Car V3U
       - renesas,r8a779f0-sysc # R-Car S4-8
       - renesas,r8a779g0-sysc # R-Car V4H
+      - renesas,r8a779h0-sysc # R-Car V4M
 
   reg:
     maxItems: 1
Signature · 1 line
2.34.1
author maintainer
#26 lore raw

PATCH 7/15 clk: renesas: rcar-gen4: Add support for FRQCRC1

In reply to Geert Uytterhoeven

R-Car V4H and V4M have a second Frequency Control Register C. Add support for this by treating bit field offsets beyond 31 as referring to the second register.

---
Tested by enabling CLOCK_ALLOW_WRITE_DEBUGFS and checking the impact of CPU core clk rate on CPU core speed on R-Car V4M.

---
 drivers/clk/renesas/rcar-gen4-cpg.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/clk/renesas/rcar-gen4-cpg.c +8 -2
index c68d8b987054131b..a2bbdad021ed8e95 100644
@@ -179,7 +179,8 @@ static struct clk * __init cpg_pll_clk_register(const char *name,
  */
 #define CPG_FRQCRB			0x00000804
 #define CPG_FRQCRB_KICK			BIT(31)
-#define CPG_FRQCRC			0x00000808
+#define CPG_FRQCRC0			0x00000808
+#define CPG_FRQCRC1			0x000008e0
 
 struct cpg_z_clk {
 	struct clk_hw hw;
@@ -304,7 +305,12 @@ static struct clk * __init cpg_z_clk_register(const char *name,
 	init.parent_names = &parent_name;
 	init.num_parents = 1;
 
-	zclk->reg = reg + CPG_FRQCRC;
+	if (offset < 32) {
+		zclk->reg = reg + CPG_FRQCRC0;
+	} else {
+		zclk->reg = reg + CPG_FRQCRC1;
+		offset -= 32;
+	}
 	zclk->kick_reg = reg + CPG_FRQCRB;
 	zclk->hw.init = &init;
 	zclk->mask = GENMASK(offset + 4, offset);
Signature · 1 line
2.34.1
author maintainer
#35 lore raw

PATCH 11/15 soc: renesas: Identify R-Car V4M

In reply to Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Add support for identifying the R-Car V4M (R8A779H0) SoC.

---
Changes compared to the BSP:
- Use lower-case hex for literals in C source code.

---
 drivers/soc/renesas/Kconfig       | 7 +++++++
 drivers/soc/renesas/renesas-soc.c | 8 ++++++++
 2 files changed, 15 insertions(+)
drivers/soc/renesas/Kconfig +7 -0
index 784a2b50561d5a97..5deca747fb771744 100644
@@ -277,6 +277,13 @@ config ARCH_R8A779G0
 	help
 	  This enables support for the Renesas R-Car V4H SoC.
 
+config ARCH_R8A779H0
+	bool "ARM64 Platform support for R-Car V4M"
+	select ARCH_RCAR_GEN4
+	select SYSC_R8A779H0
+	help
+	  This enables support for the Renesas R-Car V4M SoC.
+
 config ARCH_R8A774C0
 	bool "ARM64 Platform support for RZ/G2E"
 	select ARCH_RCAR_GEN3
drivers/soc/renesas/renesas-soc.c +8 -0
index 27eae1a354ab2329..8f9b8d3736dcdb47 100644
@@ -270,6 +270,11 @@ static const struct renesas_soc soc_rcar_v4h __initconst __maybe_unused = {
 	.id	= 0x5c,
 };
 
+static const struct renesas_soc soc_rcar_v4m __initconst __maybe_unused = {
+	.family = &fam_rcar_gen4,
+	.id     = 0x5d,
+};
+
 static const struct renesas_soc soc_shmobile_ag5 __initconst __maybe_unused = {
 	.family	= &fam_shmobile,
 	.id	= 0x37,
@@ -380,6 +385,9 @@ static const struct of_device_id renesas_socs[] __initconst __maybe_unused = {
 #ifdef CONFIG_ARCH_R8A779G0
 	{ .compatible = "renesas,r8a779g0",	.data = &soc_rcar_v4h },
 #endif
+#ifdef CONFIG_ARCH_R8A779H0
+	{ .compatible = "renesas,r8a779h0",	.data = &soc_rcar_v4m },
+#endif
 #ifdef CONFIG_ARCH_R9A07G043
 #ifdef CONFIG_RISCV
 	{ .compatible = "renesas,r9a07g043",	.data = &soc_rz_five },
Signature · 1 line
2.34.1
author maintainer
#40 lore raw

PATCH 14/15 arm64: dts: renesas: Add Gray Hawk Single board support

In reply to Geert Uytterhoeven

Add initial support for the Renesas Gray Hawk Single board, which is based on the R-Car V4M (R8A779H0) SoC:
- Memory,
- Crystal oscillators,
- Serial console.

Based on the White Hawk Single DTS, and on a patch for the Gray Hawk board stack in the BSP by Hai Pham.

---
An alternative naming candidate would be "r8a779h0-gray-hawk-s.dts".

As the Gray Hawk and White Hawk board stacks share all boards except for the CPU board, we might be able to reuse white-hawk-common.dtsi[1] once all needed SoC support has been added to r8a779h0.dtsi.

[1] "[PATCH/RFC 0/7] arm64: dts: renesas: Add support for more R-Car V4H and White Hawk variants"
https://lore.kernel.org/all/[email protected]

---
 arch/arm64/boot/dts/renesas/Makefile          |  2 +
 .../dts/renesas/r8a779h0-gray-hawk-single.dts | 52 +++++++++++++++++++
 2 files changed, 54 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dts
arch/arm64/boot/dts/renesas/Makefile +2 -0
index 8ea68d5827105b76..34d7c2262260f220 100644
@@ -86,6 +86,8 @@ dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk-ard-audio-da7212.dtbo
 r8a779g0-white-hawk-ard-audio-da7212-dtbs := r8a779g0-white-hawk.dtb r8a779g0-white-hawk-ard-audio-da7212.dtbo
 dtb-$(CONFIG_ARCH_R8A779G0) += r8a779g0-white-hawk-ard-audio-da7212.dtb
 
+dtb-$(CONFIG_ARCH_R8A779H0) += r8a779h0-gray-hawk-single.dtb
+
 dtb-$(CONFIG_ARCH_R8A77951) += r8a779m1-salvator-xs.dtb
 r8a779m1-salvator-xs-panel-aa104xd12-dtbs := r8a779m1-salvator-xs.dtb salvator-panel-aa104xd12.dtbo
 dtb-$(CONFIG_ARCH_R8A77951) += r8a779m1-salvator-xs-panel-aa104xd12.dtb
arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dts new file +52 -0

52 lines not on this page · raw message

Signature · 1 line
2.34.1
author maintainer
#18 lore raw

PATCH 5/15 dt-bindings: reset: renesas,rst: Document R-Car V4M support

In reply to Geert Uytterhoeven

Document support for the Reset (RST) module in the Renesas R-Car V4M (R8A779H0) SoC.

---
 Documentation/devicetree/bindings/reset/renesas,rst.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/reset/renesas,rst.yaml +1 -0
index e7e4872477517b2d..58b4a45d338006ff 100644
@@ -50,6 +50,7 @@ properties:
       - renesas,r8a779a0-rst      # R-Car V3U
       - renesas,r8a779f0-rst      # R-Car S4-8
       - renesas,r8a779g0-rst      # R-Car V4H
+      - renesas,r8a779h0-rst      # R-Car V4M
 
   reg:
     maxItems: 1
Signature · 1 line
2.34.1
author maintainer
#29 lore raw

PATCH 8/15 clk: renesas: cpg-mssr: Add support for R-Car V4M

In reply to Geert Uytterhoeven

From: Cong Dang <[email protected]>

Initial CPG support for the R-Car V4M (R8A779H0).

---
Changes compared to the BSP:
- Merge two patches,
- Fix whitespace in Makefile,
- Rename VIOSCR/VCSCR to VIOSRC/VCSRC,
- Rename "zN" to "zcN" to match documentation,
- Change register bitfield offsets for zc[1-3] from 0 to actual values,
- Change parent of IMPBSRC/VIOSRC/VCSRC from PLL1_DIV2 to PLL1,
- Add missing SD0H clock,
- Change parent of SD0 from SDSRC to SD0H,
- Fix No newline at end of file.

---
 drivers/clk/renesas/Kconfig             |   5 +
 drivers/clk/renesas/Makefile            |   1 +
 drivers/clk/renesas/r8a779h0-cpg-mssr.c | 240 ++++++++++++++++++++++++
 drivers/clk/renesas/renesas-cpg-mssr.c  |   6 +
 drivers/clk/renesas/renesas-cpg-mssr.h  |   1 +
 5 files changed, 253 insertions(+)
 create mode 100644 drivers/clk/renesas/r8a779h0-cpg-mssr.c
drivers/clk/renesas/Kconfig +5 -0
index 69396e19795903e8..d252150402e86366 100644
@@ -33,6 +33,7 @@ config CLK_RENESAS
 	select CLK_R8A779A0 if ARCH_R8A779A0
 	select CLK_R8A779F0 if ARCH_R8A779F0
 	select CLK_R8A779G0 if ARCH_R8A779G0
+	select CLK_R8A779H0 if ARCH_R8A779H0
 	select CLK_R9A06G032 if ARCH_R9A06G032
 	select CLK_R9A07G043 if ARCH_R9A07G043
 	select CLK_R9A07G044 if ARCH_R9A07G044
@@ -165,6 +166,10 @@ config CLK_R8A779G0
 	bool "R-Car V4H clock support" if COMPILE_TEST
 	select CLK_RCAR_GEN4_CPG
 
+config CLK_R8A779H0
+	bool "R-Car V4M clock support" if COMPILE_TEST
+	select CLK_RCAR_GEN4_CPG
+
 config CLK_R9A06G032
 	bool "RZ/N1D clock support" if COMPILE_TEST
 
drivers/clk/renesas/Makefile +1 -0
index 879a07d445f9056a..f7e18679c3b81b97 100644
@@ -30,6 +30,7 @@ obj-$(CONFIG_CLK_R8A77995)		+= r8a77995-cpg-mssr.o
 obj-$(CONFIG_CLK_R8A779A0)		+= r8a779a0-cpg-mssr.o
 obj-$(CONFIG_CLK_R8A779F0)		+= r8a779f0-cpg-mssr.o
 obj-$(CONFIG_CLK_R8A779G0)		+= r8a779g0-cpg-mssr.o
+obj-$(CONFIG_CLK_R8A779H0)		+= r8a779h0-cpg-mssr.o
 obj-$(CONFIG_CLK_R9A06G032)		+= r9a06g032-clocks.o
 obj-$(CONFIG_CLK_R9A07G043)		+= r9a07g043-cpg.o
 obj-$(CONFIG_CLK_R9A07G044)		+= r9a07g044-cpg.o
drivers/clk/renesas/r8a779h0-cpg-mssr.c new file +240 -0

240 lines not on this page · raw message

drivers/clk/renesas/renesas-cpg-mssr.c +6 -0
index cb80d1bf6c7c6a82..2c271c89f0858ce4 100644
@@ -853,6 +853,12 @@ static const struct of_device_id cpg_mssr_match[] = {
 		.compatible = "renesas,r8a779g0-cpg-mssr",
 		.data = &r8a779g0_cpg_mssr_info,
 	},
+#endif
+#ifdef CONFIG_CLK_R8A779H0
+	{
+		.compatible = "renesas,r8a779h0-cpg-mssr",
+		.data = &r8a779h0_cpg_mssr_info,
+	},
 #endif
 	{ /* sentinel */ }
 };
drivers/clk/renesas/renesas-cpg-mssr.h +1 -0
index 80c5b462924ac343..a1d6e0cbcff94813 100644
@@ -180,6 +180,7 @@ extern const struct cpg_mssr_info r8a77995_cpg_mssr_info;
 extern const struct cpg_mssr_info r8a779a0_cpg_mssr_info;
 extern const struct cpg_mssr_info r8a779f0_cpg_mssr_info;
 extern const struct cpg_mssr_info r8a779g0_cpg_mssr_info;
+extern const struct cpg_mssr_info r8a779h0_cpg_mssr_info;
 
 void __init cpg_mssr_early_init(struct device_node *np,
 				const struct cpg_mssr_info *info);
Signature · 1 line
2.34.1
author maintainer
#30 lore raw

PATCH 9/15 pmdomain: renesas: r8a779h0-sysc: Add r8a779h0 support

In reply to Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Add support for R-Car V4M (R8A779H0) SoC power areas to the R-Car SYSC driver.

---
Changes compared to the BSP:
- Move from drivers/soc/renesas/ to drivers/pmdomain/renesas/,
- Include rcar-gen4-sysc glue from "soc: renesas: rcar-gen4-sysc:
Introduce R-Car Gen4 SYSC driver",
- Remove unneeded includes,
- Align second column,
- Fix names of "a33dga" and "a23dgb" domains,
- Add missing "a3cr[012]" domains.

---
 drivers/pmdomain/renesas/Kconfig          |  4 ++
 drivers/pmdomain/renesas/Makefile         |  1 +
 drivers/pmdomain/renesas/r8a779h0-sysc.c  | 55 +++++++++++++++++++++++
 drivers/pmdomain/renesas/rcar-gen4-sysc.c |  3 ++
 drivers/pmdomain/renesas/rcar-gen4-sysc.h |  1 +
 5 files changed, 64 insertions(+)
 create mode 100644 drivers/pmdomain/renesas/r8a779h0-sysc.c
drivers/pmdomain/renesas/Kconfig +4 -0
index 80bf2cf8b60e6f63..54acb4b1ec7c4892 100644
@@ -71,6 +71,10 @@ config SYSC_R8A779G0
 	bool "System Controller support for R-Car V4H" if COMPILE_TEST
 	select SYSC_RCAR_GEN4
 
+config SYSC_R8A779H0
+	bool "System Controller support for R-Car V4M" if COMPILE_TEST
+	select SYSC_RCAR_GEN4
+
 config SYSC_RMOBILE
 	bool "System Controller support for R-Mobile" if COMPILE_TEST
 
drivers/pmdomain/renesas/Makefile +1 -0
index e306e396fc8c10e3..89180f19c23be732 100644
@@ -24,6 +24,7 @@ obj-$(CONFIG_SYSC_R8A77995)	+= r8a77995-sysc.o
 obj-$(CONFIG_SYSC_R8A779A0)	+= r8a779a0-sysc.o
 obj-$(CONFIG_SYSC_R8A779F0)	+= r8a779f0-sysc.o
 obj-$(CONFIG_SYSC_R8A779G0)	+= r8a779g0-sysc.o
+obj-$(CONFIG_SYSC_R8A779H0)     += r8a779h0-sysc.o
 # Family
 obj-$(CONFIG_SYSC_RCAR)		+= rcar-sysc.o
 obj-$(CONFIG_SYSC_RCAR_GEN4)	+= rcar-gen4-sysc.o
drivers/pmdomain/renesas/r8a779h0-sysc.c new file +55 -0

55 lines not on this page · raw message

drivers/pmdomain/renesas/rcar-gen4-sysc.c +3 -0
index 9e5e6e077abc081c..728248659a97e8cc 100644
@@ -284,6 +284,9 @@ static const struct of_device_id rcar_gen4_sysc_matches[] __initconst = {
 #endif
 #ifdef CONFIG_SYSC_R8A779G0
 	{ .compatible = "renesas,r8a779g0-sysc", .data = &r8a779g0_sysc_info },
+#endif
+#ifdef CONFIG_SYSC_R8A779H0
+	{ .compatible = "renesas,r8a779h0-sysc", .data = &r8a779h0_sysc_info },
 #endif
 	{ /* sentinel */ }
 };
drivers/pmdomain/renesas/rcar-gen4-sysc.h +1 -0
index 388cfa8f8f9fd656..fdf843aa51134f87 100644
@@ -40,5 +40,6 @@ struct rcar_gen4_sysc_info {
 extern const struct rcar_gen4_sysc_info r8a779a0_sysc_info;
 extern const struct rcar_gen4_sysc_info r8a779f0_sysc_info;
 extern const struct rcar_gen4_sysc_info r8a779g0_sysc_info;
+extern const struct rcar_gen4_sysc_info r8a779h0_sysc_info;
 
 #endif /* __SOC_RENESAS_RCAR_GEN4_SYSC_H__ */
Signature · 1 line
2.34.1
author maintainer
#33 lore raw

PATCH 10/15 soc: renesas: Introduce ARCH_RCAR_GEN4

In reply to Geert Uytterhoeven

Currently, all Kconfig symbols for R-Car Gen4 SoCs select the ARCH_RCAR_GEN3 SoC family symbol, which might confuse the casual reader.

Fix this by introducing a new SoC family symbol for R-Car Gen4 SoCs. For now this just selects ARCH_RCAR_GEN3, to avoid duplication, and to relax dependencies.

---
Once "[PATCH] i2c: rcar: Prepare for the advent of ARCH_RCAR_GEN4"[1] has been applied, ARCH_RCAR_GEN4 can stop selecting ARCH_RCAR_GEN3.

I'm open for suggestions how to improve this.
Perhaps factor out common parts into ARCH_RCAR?

[1] https://lore.kernel.org/r/bf7b105f7d9728ae5cd9fa99d1cdd278d71e7df2.1704723713.git.geert+renesas@glider.be

---
 drivers/soc/renesas/Kconfig | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
drivers/soc/renesas/Kconfig +7 -3
index 0986672f63757663..784a2b50561d5a97 100644
@@ -34,6 +34,10 @@ config ARCH_RCAR_GEN3
 	select SYS_SUPPORTS_SH_CMT
 	select SYS_SUPPORTS_SH_TMU
 
+config ARCH_RCAR_GEN4
+	bool
+	select ARCH_RCAR_GEN3
+
 config ARCH_RMOBILE
 	bool
 	select PM
@@ -240,7 +244,7 @@ config ARCH_R8A77961
 
 config ARCH_R8A779F0
 	bool "ARM64 Platform support for R-Car S4-8"
-	select ARCH_RCAR_GEN3
+	select ARCH_RCAR_GEN4
 	select SYSC_R8A779F0
 	help
 	  This enables support for the Renesas R-Car S4-8 SoC.
@@ -261,14 +265,14 @@ config ARCH_R8A77970
 
 config ARCH_R8A779A0
 	bool "ARM64 Platform support for R-Car V3U"
-	select ARCH_RCAR_GEN3
+	select ARCH_RCAR_GEN4
 	select SYSC_R8A779A0
 	help
 	  This enables support for the Renesas R-Car V3U SoC.
 
 config ARCH_R8A779G0
 	bool "ARM64 Platform support for R-Car V4H"
-	select ARCH_RCAR_GEN3
+	select ARCH_RCAR_GEN4
 	select SYSC_R8A779G0
 	help
 	  This enables support for the Renesas R-Car V4H SoC.
Signature · 1 line
2.34.1
author maintainer
#42 lore raw

PATCH 15/15 arm64: defconfig: Enable R8A779H0 SoC

In reply to Geert Uytterhoeven

From: Linh Phung <[email protected]>

Enable support for the Renesas R-Car V4M (R8A779H0) SoC in the ARM64 defconfig.

---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index 5ad2b841aafc8ed0..05500654bcf49a79 100644
@@ -1346,6 +1346,7 @@ CONFIG_ARCH_R8A77980=y
 CONFIG_ARCH_R8A77970=y
 CONFIG_ARCH_R8A779A0=y
 CONFIG_ARCH_R8A779G0=y
+CONFIG_ARCH_R8A779H0=y
 CONFIG_ARCH_R8A774C0=y
 CONFIG_ARCH_R8A774E1=y
 CONFIG_ARCH_R8A774A1=y
Signature · 1 line
2.34.1

Geert Uytterhoeven

author maintainer
#0 lore raw

cover arm64: renesas: Add R-Car V4M and Gray Hawk Single support

Hi all,

This patch series adds initial support for the Renesas R-Car V4M (R8A779G0) SoC and the Renesas Gray Hawk Single development board.

As both driver code and DTS have hard dependencies on DT binding definitions, all patches in this series are supposed to go in through the renesas-devel, renesas-clk, and/or renesas-pmdomain trees, using a shared branch for DT binding definitions, as usual.

Note that this series does not include the DT binding update for the HSCIF serial ports, as Greg does not like receiving new patches during the merge window.

For testing, this series can be found at
https://git.kernel.org/pub/scm/linux/kernel/git/geert/renesas-drivers.git/log/?h=topic/v4m-gray-hawk-single-v1

Thanks for your comments (especially about the naming of the compatible value and DTB for Gray Hawk Single :-)!

Cong Dang (1):
clk: renesas: cpg-mssr: Add support for R-Car V4M

Duy Nguyen (6):
dt-bindings: clock: Add R8A779H0 V4M CPG Core Clock Definitions
dt-bindings: power: renesas,rcar-sysc: Document R-Car V4M support
dt-bindings: power: Add r8a779h0 SYSC power domain definitions
pmdomain: renesas: r8a779h0-sysc: Add r8a779h0 support
soc: renesas: Identify R-Car V4M
soc: renesas: rcar-rst: Add support for R-Car V4M

Geert Uytterhoeven (6):
dt-bindings: clock: renesas,cpg-mssr: Document R-Car V4M support
dt-bindings: reset: renesas,rst: Document R-Car V4M support
dt-bindings: soc: renesas: Document R-Car V4M Gray Hawk Single
clk: renesas: rcar-gen4: Add support for FRQCRC1
soc: renesas: Introduce ARCH_RCAR_GEN4
arm64: dts: renesas: Add Gray Hawk Single board support

Hai Pham (1):
arm64: dts: renesas: Add Renesas R8A779H0 SoC support

Linh Phung (1):
arm64: defconfig: Enable R8A779H0 SoC

 .../bindings/clock/renesas,cpg-mssr.yaml      |   1 +
 .../bindings/power/renesas,rcar-sysc.yaml     |   1 +
 .../bindings/reset/renesas,rst.yaml           |   1 +
 .../bindings/soc/renesas/renesas.yaml         |   6 +
 arch/arm64/boot/dts/renesas/Makefile          |   2 +
 .../dts/renesas/r8a779h0-gray-hawk-single.dts |  52 ++++
 arch/arm64/boot/dts/renesas/r8a779h0.dtsi     | 121 +++++++++
 arch/arm64/configs/defconfig                  |   1 +
 drivers/clk/renesas/Kconfig                   |   5 +
 drivers/clk/renesas/Makefile                  |   1 +
 drivers/clk/renesas/r8a779h0-cpg-mssr.c       | 240 ++++++++++++++++++
 drivers/clk/renesas/rcar-gen4-cpg.c           |  10 +-
 drivers/clk/renesas/renesas-cpg-mssr.c        |   6 +
 drivers/clk/renesas/renesas-cpg-mssr.h        |   1 +
 drivers/pmdomain/renesas/Kconfig              |   4 +
 drivers/pmdomain/renesas/Makefile             |   1 +
 drivers/pmdomain/renesas/r8a779h0-sysc.c      |  55 ++++
 drivers/pmdomain/renesas/rcar-gen4-sysc.c     |   3 +
 drivers/pmdomain/renesas/rcar-gen4-sysc.h     |   1 +
 drivers/soc/renesas/Kconfig                   |  17 +-
 drivers/soc/renesas/rcar-rst.c                |   1 +
 drivers/soc/renesas/renesas-soc.c             |   8 +
 include/dt-bindings/clock/r8a779h0-cpg-mssr.h |  96 +++++++
 include/dt-bindings/power/r8a779h0-sysc.h     |  49 ++++
 24 files changed, 678 insertions(+), 5 deletions(-)
 create mode 100644 arch/arm64/boot/dts/renesas/r8a779h0-gray-hawk-single.dts
 create mode 100644 arch/arm64/boot/dts/renesas/r8a779h0.dtsi
 create mode 100644 drivers/clk/renesas/r8a779h0-cpg-mssr.c
 create mode 100644 drivers/pmdomain/renesas/r8a779h0-sysc.c
 create mode 100644 include/dt-bindings/clock/r8a779h0-cpg-mssr.h
 create mode 100644 include/dt-bindings/power/r8a779h0-sysc.h
Signature · 12 lines
2.34.1

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
author maintainer
#16 lore raw

PATCH 4/15 dt-bindings: power: Add r8a779h0 SYSC power domain definitions

From: Duy Nguyen <[email protected]>

Add power domain indices for the Renesas R-Car V4M (R8A779H0) SoC.

---
 include/dt-bindings/power/r8a779h0-sysc.h | 49 +++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 include/dt-bindings/power/r8a779h0-sysc.h
include/dt-bindings/power/r8a779h0-sysc.h new file +49 -0
new file mode 100644
index 0000000000000000..29f05f0401a13336
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+#ifndef __DT_BINDINGS_POWER_R8A779H0_SYSC_H__
+#define __DT_BINDINGS_POWER_R8A779H0_SYSC_H__
+
+/*
+ * These power domain indices match the Power Domain Register Numbers (PDR)
+ */
+
+#define R8A779H0_PD_A1E0D0C0		0
+#define R8A779H0_PD_A1E0D0C1		1
+#define R8A779H0_PD_A1E0D0C2		2
+#define R8A779H0_PD_A1E0D0C3		3
+#define R8A779H0_PD_A2E0D0		16
+#define R8A779H0_PD_A3CR0		21
+#define R8A779H0_PD_A3CR1		22
+#define R8A779H0_PD_A3CR2		23
+#define R8A779H0_PD_A33DGA		24
+#define R8A779H0_PD_A23DGB		25
+#define R8A779H0_PD_C4			31
+#define R8A779H0_PD_A1DSP0		33
+#define R8A779H0_PD_A2IMP01		34
+#define R8A779H0_PD_A2PSC		35
+#define R8A779H0_PD_A2CV0		36
+#define R8A779H0_PD_A2CV1		37
+#define R8A779H0_PD_A3IMR0		38
+#define R8A779H0_PD_A3IMR1		39
+#define R8A779H0_PD_A3VC		40
+#define R8A779H0_PD_A2CN0		42
+#define R8A779H0_PD_A1CN0		44
+#define R8A779H0_PD_A1DSP1		45
+#define R8A779H0_PD_A2DMA		47
+#define R8A779H0_PD_A2CV2		48
+#define R8A779H0_PD_A2CV3		49
+#define R8A779H0_PD_A3IMR2		50
+#define R8A779H0_PD_A3IMR3		51
+#define R8A779H0_PD_A3PCI		52
+#define R8A779H0_PD_A2PCIPHY		53
+#define R8A779H0_PD_A3VIP0		56
+#define R8A779H0_PD_A3VIP2		58
+#define R8A779H0_PD_A3ISP0		60
+#define R8A779H0_PD_A3DUL		62
+
+/* Always-on power area */
+#define R8A779H0_PD_ALWAYS_ON		64
+
+#endif /* __DT_BINDINGS_POWER_R8A779H0_SYSC_H__ */
Signature · 1 line
2.34.1
author maintainer
#22 lore raw

PATCH 6/15 dt-bindings: soc: renesas: Document R-Car V4M Gray Hawk Single

In reply to Geert Uytterhoeven

Document the compatible values for the Renesas R-Car V4M (R8A779H0) SoC and the Renesas Gray Hawk Single development board.

---
The Gray Hawk Single board is an integrated variant of the (not yet supported) Gray Hawk board stack, which is very similar to the White Hawk board stack.

The schematics call it '"Gray Hawk"(1Board)'. The Setup Manual calls it 'Gray Hawk Single Board'.

Alternative naming candidates would be 'Gray Hawk S' and/or 'renesas,gray-hawk-s'.

---
 Documentation/devicetree/bindings/soc/renesas/renesas.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/soc/renesas/renesas.yaml +6 -0
index 16ca3ff7b1aea146..1c8f5122bccdb5c8 100644
@@ -354,6 +354,12 @@ properties:
           - const: renesas,white-hawk-cpu
           - const: renesas,r8a779g0
 
+      - description: R-Car V4M (R8A779H0)
+        items:
+          - enum:
+              - renesas,gray-hawk-single # Gray Hawk Single (RTP8A779H0ASKB0F10S)
+          - const: renesas,r8a779h0
+
       - description: R-Car H3e (R8A779M0)
         items:
           - enum:
Signature · 1 line
2.34.1
author maintainer
#39 lore raw

PATCH 13/15 arm64: dts: renesas: Add Renesas R8A779H0 SoC support

In reply to Geert Uytterhoeven

From: Hai Pham <[email protected]>

Add initial support for the Renesas R-Car V4M (R8A779H0) SoC.

---
Changes compared to the BSP:
- Add "-clk" suffix to clock node names,
- Rename "pmu_a76" node to "pmu-a76",
- Drop bogus CPU masks from GICv3 PPI interrupt specifiers,
- Drop hscif0 dmas and dma-names placeholder,
- Add missing hypervisor virtual timer IRQ to timer node.

---
 arch/arm64/boot/dts/renesas/r8a779h0.dtsi | 121 ++++++++++++++++++++++
 1 file changed, 121 insertions(+)
 create mode 100644 arch/arm64/boot/dts/renesas/r8a779h0.dtsi
arch/arm64/boot/dts/renesas/r8a779h0.dtsi new file +121 -0
new file mode 100644
index 0000000000000000..4e7944a5625aa966
@@ -0,0 +1,121 @@
+// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+/*
+ * Device Tree Source for the R-Car V4M (R8A779H0) SoC
+ *
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+
+#include <dt-bindings/clock/r8a779h0-cpg-mssr.h>
+#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/power/r8a779h0-sysc.h>
+
+/ {
+	compatible = "renesas,r8a779h0";
+	#address-cells = <2>;
+	#size-cells = <2>;
+
+	cpus {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		a76_0: cpu@0 {
+			compatible = "arm,cortex-a76";
+			reg = <0>;
+			device_type = "cpu";
+			power-domains = <&sysc R8A779H0_PD_A1E0D0C0>;
+		};
+	};
+
+	extal_clk: extal-clk {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		/* This value must be overridden by the board */
+		clock-frequency = <0>;
+	};
+
+	extalr_clk: extalr-clk {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		/* This value must be overridden by the board */
+		clock-frequency = <0>;
+	};
+
+	pmu-a76 {
+		compatible = "arm,cortex-a76-pmu";
+		interrupts-extended = <&gic GIC_PPI 7 IRQ_TYPE_LEVEL_LOW>;
+	};
+
+	/* External SCIF clock - to be overridden by boards that provide it */
+	scif_clk: scif-clk {
+		compatible = "fixed-clock";
+		#clock-cells = <0>;
+		clock-frequency = <0>;
+	};
+
+	soc: soc {
+		compatible = "simple-bus";
+		interrupt-parent = <&gic>;
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		cpg: clock-controller@e6150000 {
+			compatible = "renesas,r8a779h0-cpg-mssr";
+			reg = <0 0xe6150000 0 0x4000>;
+			clocks = <&extal_clk>, <&extalr_clk>;
+			clock-names = "extal", "extalr";
+			#clock-cells = <2>;
+			#power-domain-cells = <0>;
+			#reset-cells = <1>;
+		};
+
+		rst: reset-controller@e6160000 {
+			compatible = "renesas,r8a779h0-rst";
+			reg = <0 0xe6160000 0 0x4000>;
+		};
+
+		sysc: system-controller@e6180000 {
+			compatible = "renesas,r8a779h0-sysc";
+			reg = <0 0xe6180000 0 0x4000>;
+			#power-domain-cells = <1>;
+		};
+
+		hscif0: serial@e6540000 {
+			compatible = "renesas,hscif-r8a779h0",
+				     "renesas,rcar-gen4-hscif", "renesas,hscif";
+			reg = <0 0xe6540000 0 0x60>;
+			interrupts = <GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cpg CPG_MOD 514>,
+				 <&cpg CPG_CORE R8A779H0_CLK_SASYNCPERD1>,
+				 <&scif_clk>;
+			clock-names = "fck", "brg_int", "scif_clk";
+			power-domains = <&sysc R8A779H0_PD_ALWAYS_ON>;
+			resets = <&cpg 514>;
+			status = "disabled";
+		};
+
+		gic: interrupt-controller@f1000000 {
+			compatible = "arm,gic-v3";
+			#interrupt-cells = <3>;
+			#address-cells = <0>;
+			interrupt-controller;
+			reg = <0x0 0xf1000000 0 0x20000>,
+			      <0x0 0xf1060000 0 0x110000>;
+			interrupts = <GIC_PPI 9 IRQ_TYPE_LEVEL_HIGH>;
+		};
+
+		prr: chipid@fff00044 {
+			compatible = "renesas,prr";
+			reg = <0 0xfff00044 0 4>;
+		};
+	};
+
+	timer {
+		compatible = "arm,armv8-timer";
+		interrupts-extended = <&gic GIC_PPI 13 IRQ_TYPE_LEVEL_LOW>,
+				      <&gic GIC_PPI 14 IRQ_TYPE_LEVEL_LOW>,
+				      <&gic GIC_PPI 11 IRQ_TYPE_LEVEL_LOW>,
+				      <&gic GIC_PPI 10 IRQ_TYPE_LEVEL_LOW>,
+				      <&gic GIC_PPI 12 IRQ_TYPE_LEVEL_LOW>;
+	};
+};
Signature · 1 line
2.34.1
Acked-by on v1 3/15
#12 lore raw

Re: [PATCH 03/15] dt-bindings: power: renesas,rcar-sysc: Document R-Car V4M support

In reply to Geert Uytterhoeven
Quoted 16 lines · Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Document support for the System Controller (SYSC) in the R-Car V4M (R8A779H0) SoC.

---
 Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml +0 -0
index 0720b54881c2c87a..e76fb273490ff588 100644

Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml properties: · line 48

Quoted 4 lines
Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml +1 -0
@@ -45,6 +45,7 @@ properties:
       - renesas,r8a779a0-sysc # R-Car V3U
       - renesas,r8a779f0-sysc # R-Car S4-8
       - renesas,r8a779g0-sysc # R-Car V4H
+      - renesas,r8a779h0-sysc # R-Car V4M

I like that the g0 is the v4h and the h0 is a v4m. Makes complete sense to me!

Cheers,
Conor.

Acked-by on v1 6/15
#23 lore raw

Re: [PATCH 06/15] dt-bindings: soc: renesas: Document R-Car V4M Gray Hawk Single

In reply to Geert Uytterhoeven
Quoted 4 lines · Geert Uytterhoeven

Document the compatible values for the Renesas R-Car V4M (R8A779H0) SoC and the Renesas Gray Hawk Single development board.

Cheers,
Conor.

Quoted 34 lines

---
The Gray Hawk Single board is an integrated variant of the (not yet supported) Gray Hawk board stack, which is very similar to the White Hawk board stack.

The schematics call it '"Gray Hawk"(1Board)'. The Setup Manual calls it 'Gray Hawk Single Board'.

Alternative naming candidates would be 'Gray Hawk S' and/or 'renesas,gray-hawk-s'.

---
 Documentation/devicetree/bindings/soc/renesas/renesas.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/soc/renesas/renesas.yaml +6 -0
index 16ca3ff7b1aea146..1c8f5122bccdb5c8 100644
@@ -354,6 +354,12 @@ properties:
           - const: renesas,white-hawk-cpu
           - const: renesas,r8a779g0
 
+      - description: R-Car V4M (R8A779H0)
+        items:
+          - enum:
+              - renesas,gray-hawk-single # Gray Hawk Single (RTP8A779H0ASKB0F10S)
+          - const: renesas,r8a779h0
+
       - description: R-Car H3e (R8A779M0)
         items:
           - enum:
Signature · 1 line
2.34.1
Acked-by on v1 5/15
#19 lore raw

Re: [PATCH 05/15] dt-bindings: reset: renesas,rst: Document R-Car V4M support

In reply to Geert Uytterhoeven
Quoted 4 lines · Geert Uytterhoeven

Document support for the Reset (RST) module in the Renesas R-Car V4M (R8A779H0) SoC.

Cheers,
Conor.

Quoted 20 lines
---
 Documentation/devicetree/bindings/reset/renesas,rst.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/reset/renesas,rst.yaml +1 -0
index e7e4872477517b2d..58b4a45d338006ff 100644
@@ -50,6 +50,7 @@ properties:
       - renesas,r8a779a0-rst      # R-Car V3U
       - renesas,r8a779f0-rst      # R-Car S4-8
       - renesas,r8a779g0-rst      # R-Car V4H
+      - renesas,r8a779h0-rst      # R-Car V4M
 
   reg:
     maxItems: 1
Signature · 1 line
2.34.1
#6 lore raw

Re: [PATCH 02/15] dt-bindings: clock: Add R8A779H0 V4M CPG Core Clock Definitions

In reply to Geert Uytterhoeven
Quoted 5 lines · Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Add all Clock Pulse Generator Core Clock Outputs for the Renesas R-Car V4M (R8A779H0) SoC.

Quoted 8 lines

---
Changes compared to the BSP:
- Drop POST* clocks, as they are internal clocks.

---
 include/dt-bindings/clock/r8a779h0-cpg-mssr.h | 96 +++++++++++++++++++

Mediatek was able to switch to vendor,device naming scheme, so Renesas should follow as well.

Best regards,
Krzysztof

Reviewed-by on v1 1/15
#3 lore raw

Re: [PATCH 01/15] dt-bindings: clock: renesas,cpg-mssr: Document R-Car V4M support

In reply to Geert Uytterhoeven

Hi Geert,

Thanks for your work.

Quoted 4 lines · Geert Uytterhoeven

Document support for the Clock Pulse Generator (CPG) and Module Standby Software Reset (MSSR) module on the Renesas R-Car V4M (R8A779H0) SoC.

Quoted 20 lines
---
 Documentation/devicetree/bindings/clock/renesas,cpg-mssr.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/clock/renesas,cpg-mssr.yaml +1 -0
index 9c3dc6c4fa94218c..084259d30232aa68 100644
@@ -50,6 +50,7 @@ properties:
       - renesas,r8a779a0-cpg-mssr # R-Car V3U
       - renesas,r8a779f0-cpg-mssr # R-Car S4-8
       - renesas,r8a779g0-cpg-mssr # R-Car V4H
+      - renesas,r8a779h0-cpg-mssr # R-Car V4M
 
   reg:
     maxItems: 1
Signature · 1 line
2.34.1
Signature · 2 lines
Kind Regards,
Niklas Söderlund
Reviewed-by on v1 2/15
#10 lore raw

Re: [PATCH 02/15] dt-bindings: clock: Add R8A779H0 V4M CPG Core Clock Definitions

In reply to Geert Uytterhoeven

Hi Geert,

Thanks for your patch.

Quoted 8 lines · Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Add all Clock Pulse Generator Core Clock Outputs for the Renesas R-Car V4M (R8A779H0) SoC.

I have no opinion on Krzysztof comment about renaming the file, for the file content,

Quoted 114 lines

---
Changes compared to the BSP:
- Drop POST* clocks, as they are internal clocks.

---
 include/dt-bindings/clock/r8a779h0-cpg-mssr.h | 96 +++++++++++++++++++
 1 file changed, 96 insertions(+)
 create mode 100644 include/dt-bindings/clock/r8a779h0-cpg-mssr.h
include/dt-bindings/clock/r8a779h0-cpg-mssr.h new file +96 -0
new file mode 100644
index 0000000000000000..baf41231c215acb3
@@ -0,0 +1,96 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+#ifndef __DT_BINDINGS_CLOCK_R8A779H0_CPG_MSSR_H__
+#define __DT_BINDINGS_CLOCK_R8A779H0_CPG_MSSR_H__
+
+#include <dt-bindings/clock/renesas-cpg-mssr.h>
+
+/* r8a779h0 CPG Core Clocks */
+
+#define R8A779H0_CLK_ZX			0
+#define R8A779H0_CLK_ZD			1
+#define R8A779H0_CLK_ZS			2
+#define R8A779H0_CLK_ZT			3
+#define R8A779H0_CLK_ZTR		4
+#define R8A779H0_CLK_S0D2		5
+#define R8A779H0_CLK_S0D3		6
+#define R8A779H0_CLK_S0D4		7
+#define R8A779H0_CLK_S0D1_VIO		8
+#define R8A779H0_CLK_S0D2_VIO		9
+#define R8A779H0_CLK_S0D4_VIO		10
+#define R8A779H0_CLK_S0D8_VIO		11
+#define R8A779H0_CLK_VIOBUSD1		12
+#define R8A779H0_CLK_VIOBUSD2		13
+#define R8A779H0_CLK_S0D1_VC		14
+#define R8A779H0_CLK_S0D2_VC		15
+#define R8A779H0_CLK_S0D4_VC		16
+#define R8A779H0_CLK_VCBUSD1		17
+#define R8A779H0_CLK_VCBUSD2		18
+#define R8A779H0_CLK_S0D2_MM		19
+#define R8A779H0_CLK_S0D4_MM		20
+#define R8A779H0_CLK_S0D2_U3DG		21
+#define R8A779H0_CLK_S0D4_U3DG		22
+#define R8A779H0_CLK_S0D2_RT		23
+#define R8A779H0_CLK_S0D3_RT		24
+#define R8A779H0_CLK_S0D4_RT		25
+#define R8A779H0_CLK_S0D6_RT		26
+#define R8A779H0_CLK_S0D2_PER		27
+#define R8A779H0_CLK_S0D3_PER		28
+#define R8A779H0_CLK_S0D4_PER		29
+#define R8A779H0_CLK_S0D6_PER		30
+#define R8A779H0_CLK_S0D12_PER		31
+#define R8A779H0_CLK_S0D24_PER		32
+#define R8A779H0_CLK_S0D1_HSC		33
+#define R8A779H0_CLK_S0D2_HSC		34
+#define R8A779H0_CLK_S0D4_HSC		35
+#define R8A779H0_CLK_S0D8_HSC		36
+#define R8A779H0_CLK_SVD1_IR		37
+#define R8A779H0_CLK_SVD2_IR		38
+#define R8A779H0_CLK_IMPAD1		39
+#define R8A779H0_CLK_IMPAD4		40
+#define R8A779H0_CLK_IMPB		41
+#define R8A779H0_CLK_SVD1_VIP		42
+#define R8A779H0_CLK_SVD2_VIP		43
+#define R8A779H0_CLK_CL			44
+#define R8A779H0_CLK_CL16M		45
+#define R8A779H0_CLK_CL16M_MM		46
+#define R8A779H0_CLK_CL16M_RT		47
+#define R8A779H0_CLK_CL16M_PER		48
+#define R8A779H0_CLK_CL16M_HSC		49
+#define R8A779H0_CLK_ZC0		50
+#define R8A779H0_CLK_ZC1		51
+#define R8A779H0_CLK_ZC2		52
+#define R8A779H0_CLK_ZC3		53
+#define R8A779H0_CLK_ZB3		54
+#define R8A779H0_CLK_ZB3D2		55
+#define R8A779H0_CLK_ZB3D4		56
+#define R8A779H0_CLK_ZG			57
+#define R8A779H0_CLK_SD0H		58
+#define R8A779H0_CLK_SD0		59
+#define R8A779H0_CLK_RPC		60
+#define R8A779H0_CLK_RPCD2		61
+#define R8A779H0_CLK_MSO		62
+#define R8A779H0_CLK_CANFD		63
+#define R8A779H0_CLK_CSI		64
+#define R8A779H0_CLK_FRAY		65
+#define R8A779H0_CLK_IPC		66
+#define R8A779H0_CLK_SASYNCRT		67
+#define R8A779H0_CLK_SASYNCPERD1	68
+#define R8A779H0_CLK_SASYNCPERD2	69
+#define R8A779H0_CLK_SASYNCPERD4	70
+#define R8A779H0_CLK_DSIEXT		71
+#define R8A779H0_CLK_DSIREF		72
+#define R8A779H0_CLK_ADGH		73
+#define R8A779H0_CLK_OSC		74
+#define R8A779H0_CLK_ZR0		75
+#define R8A779H0_CLK_ZR1		76
+#define R8A779H0_CLK_ZR2		77
+#define R8A779H0_CLK_RGMII		78
+#define R8A779H0_CLK_CPEX		79
+#define R8A779H0_CLK_CP			80
+#define R8A779H0_CLK_CBFUSA		81
+#define R8A779H0_CLK_R			82
+
+#endif /* __DT_BINDINGS_CLOCK_R8A779H0_CPG_MSSR_H__ */
Signature · 1 line
2.34.1
Signature · 2 lines
Kind Regards,
Niklas Söderlund
Reviewed-by on v1 3/15
#14 lore raw

Re: [PATCH 03/15] dt-bindings: power: renesas,rcar-sysc: Document R-Car V4M support

In reply to Geert Uytterhoeven

Hi Geert,

Thanks for your work.

Quoted 7 lines · Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Document support for the System Controller (SYSC) in the R-Car V4M (R8A779H0) SoC.

Quoted 20 lines
---
 Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/power/renesas,rcar-sysc.yaml +1 -0
index 0720b54881c2c87a..e76fb273490ff588 100644
@@ -45,6 +45,7 @@ properties:
       - renesas,r8a779a0-sysc # R-Car V3U
       - renesas,r8a779f0-sysc # R-Car S4-8
       - renesas,r8a779g0-sysc # R-Car V4H
+      - renesas,r8a779h0-sysc # R-Car V4M
 
   reg:
     maxItems: 1
Signature · 1 line
2.34.1
Signature · 2 lines
Kind Regards,
Niklas Söderlund
Reviewed-by on v1 4/15
#17 lore raw

Re: [PATCH 04/15] dt-bindings: power: Add r8a779h0 SYSC power domain definitions

In reply to Geert Uytterhoeven

Hello Geert,

Thanks for your work.

Quoted 7 lines · Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Add power domain indices for the Renesas R-Car V4M (R8A779H0) SoC.

Quoted 64 lines
---
 include/dt-bindings/power/r8a779h0-sysc.h | 49 +++++++++++++++++++++++
 1 file changed, 49 insertions(+)
 create mode 100644 include/dt-bindings/power/r8a779h0-sysc.h
include/dt-bindings/power/r8a779h0-sysc.h new file +49 -0
new file mode 100644
index 0000000000000000..29f05f0401a13336
@@ -0,0 +1,49 @@
+/* SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) */
+/*
+ * Copyright (C) 2023 Renesas Electronics Corp.
+ */
+#ifndef __DT_BINDINGS_POWER_R8A779H0_SYSC_H__
+#define __DT_BINDINGS_POWER_R8A779H0_SYSC_H__
+
+/*
+ * These power domain indices match the Power Domain Register Numbers (PDR)
+ */
+
+#define R8A779H0_PD_A1E0D0C0		0
+#define R8A779H0_PD_A1E0D0C1		1
+#define R8A779H0_PD_A1E0D0C2		2
+#define R8A779H0_PD_A1E0D0C3		3
+#define R8A779H0_PD_A2E0D0		16
+#define R8A779H0_PD_A3CR0		21
+#define R8A779H0_PD_A3CR1		22
+#define R8A779H0_PD_A3CR2		23
+#define R8A779H0_PD_A33DGA		24
+#define R8A779H0_PD_A23DGB		25
+#define R8A779H0_PD_C4			31
+#define R8A779H0_PD_A1DSP0		33
+#define R8A779H0_PD_A2IMP01		34
+#define R8A779H0_PD_A2PSC		35
+#define R8A779H0_PD_A2CV0		36
+#define R8A779H0_PD_A2CV1		37
+#define R8A779H0_PD_A3IMR0		38
+#define R8A779H0_PD_A3IMR1		39
+#define R8A779H0_PD_A3VC		40
+#define R8A779H0_PD_A2CN0		42
+#define R8A779H0_PD_A1CN0		44
+#define R8A779H0_PD_A1DSP1		45
+#define R8A779H0_PD_A2DMA		47
+#define R8A779H0_PD_A2CV2		48
+#define R8A779H0_PD_A2CV3		49
+#define R8A779H0_PD_A3IMR2		50
+#define R8A779H0_PD_A3IMR3		51
+#define R8A779H0_PD_A3PCI		52
+#define R8A779H0_PD_A2PCIPHY		53
+#define R8A779H0_PD_A3VIP0		56
+#define R8A779H0_PD_A3VIP2		58
+#define R8A779H0_PD_A3ISP0		60
+#define R8A779H0_PD_A3DUL		62
+
+/* Always-on power area */
+#define R8A779H0_PD_ALWAYS_ON		64
+
+#endif /* __DT_BINDINGS_POWER_R8A779H0_SYSC_H__ */
Signature · 1 line
2.34.1
Signature · 2 lines
Kind Regards,
Niklas Söderlund
Reviewed-by on v1 5/15
#20 lore raw

Re: [PATCH 05/15] dt-bindings: reset: renesas,rst: Document R-Car V4M support

In reply to Geert Uytterhoeven

Hi Geert,

Thanks for your patch.

Quoted 4 lines · Geert Uytterhoeven

Document support for the Reset (RST) module in the Renesas R-Car V4M (R8A779H0) SoC.

Quoted 20 lines
---
 Documentation/devicetree/bindings/reset/renesas,rst.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/reset/renesas,rst.yaml +1 -0
index e7e4872477517b2d..58b4a45d338006ff 100644
@@ -50,6 +50,7 @@ properties:
       - renesas,r8a779a0-rst      # R-Car V3U
       - renesas,r8a779f0-rst      # R-Car S4-8
       - renesas,r8a779g0-rst      # R-Car V4H
+      - renesas,r8a779h0-rst      # R-Car V4M
 
   reg:
     maxItems: 1
Signature · 1 line
2.34.1
Signature · 2 lines
Kind Regards,
Niklas Söderlund
#24 lore raw

Re: [PATCH 06/15] dt-bindings: soc: renesas: Document R-Car V4M Gray Hawk Single

In reply to Geert Uytterhoeven

Hi Geert,

Thanks for your work.

Quoted 23 lines · Geert Uytterhoeven

Document the compatible values for the Renesas R-Car V4M (R8A779H0) SoC and the Renesas Gray Hawk Single development board.

---
The Gray Hawk Single board is an integrated variant of the (not yet supported) Gray Hawk board stack, which is very similar to the White Hawk board stack.

The schematics call it '"Gray Hawk"(1Board)'. The Setup Manual calls it 'Gray Hawk Single Board'.

Alternative naming candidates would be 'Gray Hawk S' and/or 'renesas,gray-hawk-s'.

---
 Documentation/devicetree/bindings/soc/renesas/renesas.yaml | 6 ++++++
 1 file changed, 6 insertions(+)
Documentation/devicetree/bindings/soc/renesas/renesas.yaml +0 -0
index 16ca3ff7b1aea146..1c8f5122bccdb5c8 100644

Documentation/devicetree/bindings/soc/renesas/renesas.yaml properties: · line 360

Quoted 7 lines
Documentation/devicetree/bindings/soc/renesas/renesas.yaml +4 -0
@@ -354,6 +354,12 @@ properties:
           - const: renesas,white-hawk-cpu
           - const: renesas,r8a779g0
 
+      - description: R-Car V4M (R8A779H0)
+        items:
+          - enum:
+              - renesas,gray-hawk-single # Gray Hawk Single (RTP8A779H0ASKB0F10S)

nit: Should that not be 'Single Board' or '1Board'? I see both in the documentation but not just "Single".

Quoted 9 lines
Documentation/devicetree/bindings/soc/renesas/renesas.yaml +2 -0
+          - const: renesas,r8a779h0
+
       - description: R-Car H3e (R8A779M0)
         items:
           - enum:
Signature · 1 line
2.34.1
Signature · 2 lines
Kind Regards,
Niklas Söderlund
Reviewed-by on v1 7/15
#27 lore raw

Re: [PATCH 07/15] clk: renesas: rcar-gen4: Add support for FRQCRC1

In reply to Geert Uytterhoeven

Hi Geert,

Thanks for your work.

Quoted 5 lines · Geert Uytterhoeven

R-Car V4H and V4M have a second Frequency Control Register C. Add support for this by treating bit field offsets beyond 31 as referring to the second register.

Quoted 39 lines

---
Tested by enabling CLOCK_ALLOW_WRITE_DEBUGFS and checking the impact of CPU core clk rate on CPU core speed on R-Car V4M.

---
 drivers/clk/renesas/rcar-gen4-cpg.c | 10 ++++++++--
 1 file changed, 8 insertions(+), 2 deletions(-)
drivers/clk/renesas/rcar-gen4-cpg.c +8 -2
index c68d8b987054131b..a2bbdad021ed8e95 100644
@@ -179,7 +179,8 @@ static struct clk * __init cpg_pll_clk_register(const char *name,
  */
 #define CPG_FRQCRB			0x00000804
 #define CPG_FRQCRB_KICK			BIT(31)
-#define CPG_FRQCRC			0x00000808
+#define CPG_FRQCRC0			0x00000808
+#define CPG_FRQCRC1			0x000008e0
 
 struct cpg_z_clk {
 	struct clk_hw hw;
@@ -304,7 +305,12 @@ static struct clk * __init cpg_z_clk_register(const char *name,
 	init.parent_names = &parent_name;
 	init.num_parents = 1;
 
-	zclk->reg = reg + CPG_FRQCRC;
+	if (offset < 32) {
+		zclk->reg = reg + CPG_FRQCRC0;
+	} else {
+		zclk->reg = reg + CPG_FRQCRC1;
+		offset -= 32;
+	}
 	zclk->kick_reg = reg + CPG_FRQCRB;
 	zclk->hw.init = &init;
 	zclk->mask = GENMASK(offset + 4, offset);
Signature · 1 line
2.34.1
Signature · 2 lines
Kind Regards,
Niklas Söderlund
#7 lore raw

Re: [PATCH 02/15] dt-bindings: clock: Add R8A779H0 V4M CPG Core Clock Definitions

In reply to Krzysztof Kozlowski

Hi Krzysztof,

Quoted 15 lines · Krzysztof Kozlowski
Quoted 5 lines · Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Add all Clock Pulse Generator Core Clock Outputs for the Renesas R-Car V4M (R8A779H0) SoC.

Quoted 8 lines

---
Changes compared to the BSP:
- Drop POST* clocks, as they are internal clocks.

---
 include/dt-bindings/clock/r8a779h0-cpg-mssr.h | 96 +++++++++++++++++++
Quoted 2 lines

Mediatek was able to switch to vendor,device naming scheme, so Renesas should follow as well.

For new bindings, or also for existing ones?
Doing the former means there are inconsistencies among different SoCs in the same family.
Doing the latter requires keeping the existing header files as wrappers including the new header files, because the binding definitions are part of the stable DT API.

Thanks!

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
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
#8 lore raw

Re: [PATCH 02/15] dt-bindings: clock: Add R8A779H0 V4M CPG Core Clock Definitions

Quoted 19 lines · Geert Uytterhoeven

Hi Krzysztof,

Quoted 15 lines · Krzysztof Kozlowski
Quoted 13 lines · Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Add all Clock Pulse Generator Core Clock Outputs for the Renesas R-Car V4M (R8A779H0) SoC.

---
Changes compared to the BSP:
- Drop POST* clocks, as they are internal clocks.

---
 include/dt-bindings/clock/r8a779h0-cpg-mssr.h | 96 +++++++++++++++++++
Quoted 6 lines
Quoted 2 lines

Mediatek was able to switch to vendor,device naming scheme, so Renesas should follow as well.

For new bindings, or also for existing ones?
Doing the former means there are inconsistencies among different SoCs in the same family.

For the new ones. It's just naming inconsistency which does not cause any issues. Otherwise you never move to vendor,device.h format... which is not that critical, but in the long term brings uniformity.

Quoted 3 lines

Doing the latter requires keeping the existing header files as wrappers including the new header files, because the binding definitions are part of the stable DT API.

This could also work if you want all the filenames to be consistent. I would go only with new ones, though.

Best regards,
Krzysztof

#31 lore raw

Re: [PATCH 09/15] pmdomain: renesas: r8a779h0-sysc: Add r8a779h0 support

In reply to Geert Uytterhoeven

- trimmed cc-list

Quoted 8 lines · Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Add support for R-Car V4M (R8A779H0) SoC power areas to the R-Car SYSC driver.

To make sure we agree on the merge strategy; should I pick up $subject patch, patch3 and patch4 through my pmdomain tree? DT patches, like patch3 and patch4, I should share as usual via my immutable "dt" branch, so you can pull it into your renesas tree?

Kind regards
Uffe

Quoted 134 lines

---
Changes compared to the BSP:
- Move from drivers/soc/renesas/ to drivers/pmdomain/renesas/,
- Include rcar-gen4-sysc glue from "soc: renesas: rcar-gen4-sysc:
Introduce R-Car Gen4 SYSC driver",
- Remove unneeded includes,
- Align second column,
- Fix names of "a33dga" and "a23dgb" domains,
- Add missing "a3cr[012]" domains.

---
 drivers/pmdomain/renesas/Kconfig          |  4 ++
 drivers/pmdomain/renesas/Makefile         |  1 +
 drivers/pmdomain/renesas/r8a779h0-sysc.c  | 55 +++++++++++++++++++++++
 drivers/pmdomain/renesas/rcar-gen4-sysc.c |  3 ++
 drivers/pmdomain/renesas/rcar-gen4-sysc.h |  1 +
 5 files changed, 64 insertions(+)
 create mode 100644 drivers/pmdomain/renesas/r8a779h0-sysc.c
drivers/pmdomain/renesas/Kconfig +4 -0
index 80bf2cf8b60e6f63..54acb4b1ec7c4892 100644
@@ -71,6 +71,10 @@ config SYSC_R8A779G0
        bool "System Controller support for R-Car V4H" if COMPILE_TEST
        select SYSC_RCAR_GEN4
 
+config SYSC_R8A779H0
+       bool "System Controller support for R-Car V4M" if COMPILE_TEST
+       select SYSC_RCAR_GEN4
+
 config SYSC_RMOBILE
        bool "System Controller support for R-Mobile" if COMPILE_TEST
 
drivers/pmdomain/renesas/Makefile +1 -0
index e306e396fc8c10e3..89180f19c23be732 100644
@@ -24,6 +24,7 @@ obj-$(CONFIG_SYSC_R8A77995)   += r8a77995-sysc.o
 obj-$(CONFIG_SYSC_R8A779A0)    += r8a779a0-sysc.o
 obj-$(CONFIG_SYSC_R8A779F0)    += r8a779f0-sysc.o
 obj-$(CONFIG_SYSC_R8A779G0)    += r8a779g0-sysc.o
+obj-$(CONFIG_SYSC_R8A779H0)     += r8a779h0-sysc.o
 # Family
 obj-$(CONFIG_SYSC_RCAR)                += rcar-sysc.o
 obj-$(CONFIG_SYSC_RCAR_GEN4)   += rcar-gen4-sysc.o
drivers/pmdomain/renesas/r8a779h0-sysc.c new file +55 -0
new file mode 100644
index 0000000000000000..bf3fd50dc8dccaf0
@@ -0,0 +1,55 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Renesas R-Car V4M System Controller
+ *
+ * Copyright (C) 2016-2017 Glider bvba
+ * Copyright (C) 2023 Renesas Electronics Corp
+ */
+
+#include <linux/kernel.h>
+
+#include <dt-bindings/power/r8a779h0-sysc.h>
+
+#include "rcar-gen4-sysc.h"
+
+static struct rcar_gen4_sysc_area r8a779h0_areas[] __initdata = {
+       { "always-on",  R8A779H0_PD_ALWAYS_ON, -1, PD_ALWAYS_ON },
+       { "c4",         R8A779H0_PD_C4, R8A779H0_PD_ALWAYS_ON },
+       { "a2e0d0",     R8A779H0_PD_A2E0D0, R8A779H0_PD_C4, PD_SCU },
+       { "a1e0d0c0",   R8A779H0_PD_A1E0D0C0, R8A779H0_PD_A2E0D0, PD_CPU_NOCR },
+       { "a1e0d0c1",   R8A779H0_PD_A1E0D0C1, R8A779H0_PD_A2E0D0, PD_CPU_NOCR },
+       { "a1e0d0c2",   R8A779H0_PD_A1E0D0C2, R8A779H0_PD_A2E0D0, PD_CPU_NOCR },
+       { "a1e0d0c3",   R8A779H0_PD_A1E0D0C3, R8A779H0_PD_A2E0D0, PD_CPU_NOCR },
+       { "a3cr0",      R8A779H0_PD_A3CR0, R8A779H0_PD_ALWAYS_ON, PD_CPU_NOCR },
+       { "a3cr1",      R8A779H0_PD_A3CR1, R8A779H0_PD_ALWAYS_ON, PD_CPU_NOCR },
+       { "a3cr2",      R8A779H0_PD_A3CR2, R8A779H0_PD_ALWAYS_ON, PD_CPU_NOCR },
+       { "a33dga",     R8A779H0_PD_A33DGA, R8A779H0_PD_C4 },
+       { "a23dgb",     R8A779H0_PD_A23DGB, R8A779H0_PD_A33DGA },
+       { "a3vip0",     R8A779H0_PD_A3VIP0, R8A779H0_PD_C4 },
+       { "a3vip2",     R8A779H0_PD_A3VIP2, R8A779H0_PD_C4 },
+       { "a3dul",      R8A779H0_PD_A3DUL, R8A779H0_PD_C4 },
+       { "a3isp0",     R8A779H0_PD_A3ISP0, R8A779H0_PD_C4 },
+       { "a2cn0",      R8A779H0_PD_A2CN0, R8A779H0_PD_C4 },
+       { "a1cn0",      R8A779H0_PD_A1CN0, R8A779H0_PD_A2CN0 },
+       { "a1dsp0",     R8A779H0_PD_A1DSP0, R8A779H0_PD_A2CN0 },
+       { "a1dsp1",     R8A779H0_PD_A1DSP1, R8A779H0_PD_A2CN0 },
+       { "a2imp01",    R8A779H0_PD_A2IMP01, R8A779H0_PD_C4 },
+       { "a2psc",      R8A779H0_PD_A2PSC, R8A779H0_PD_C4 },
+       { "a2dma",      R8A779H0_PD_A2DMA, R8A779H0_PD_C4 },
+       { "a2cv0",      R8A779H0_PD_A2CV0, R8A779H0_PD_C4 },
+       { "a2cv1",      R8A779H0_PD_A2CV1, R8A779H0_PD_C4 },
+       { "a2cv2",      R8A779H0_PD_A2CV2, R8A779H0_PD_C4 },
+       { "a2cv3",      R8A779H0_PD_A2CV3, R8A779H0_PD_C4 },
+       { "a3imr0",     R8A779H0_PD_A3IMR0, R8A779H0_PD_C4 },
+       { "a3imr1",     R8A779H0_PD_A3IMR1, R8A779H0_PD_C4 },
+       { "a3imr2",     R8A779H0_PD_A3IMR2, R8A779H0_PD_C4 },
+       { "a3imr3",     R8A779H0_PD_A3IMR3, R8A779H0_PD_C4 },
+       { "a3vc",       R8A779H0_PD_A3VC, R8A779H0_PD_C4 },
+       { "a3pci",      R8A779H0_PD_A3PCI, R8A779H0_PD_C4 },
+       { "a2pciphy",   R8A779H0_PD_A2PCIPHY, R8A779H0_PD_A3PCI },
+};
+
+const struct rcar_gen4_sysc_info r8a779h0_sysc_info __initconst = {
+       .areas = r8a779h0_areas,
+       .num_areas = ARRAY_SIZE(r8a779h0_areas),
+};
drivers/pmdomain/renesas/rcar-gen4-sysc.c +3 -0
index 9e5e6e077abc081c..728248659a97e8cc 100644
@@ -284,6 +284,9 @@ static const struct of_device_id rcar_gen4_sysc_matches[] __initconst = {
 #endif
 #ifdef CONFIG_SYSC_R8A779G0
        { .compatible = "renesas,r8a779g0-sysc", .data = &r8a779g0_sysc_info },
+#endif
+#ifdef CONFIG_SYSC_R8A779H0
+       { .compatible = "renesas,r8a779h0-sysc", .data = &r8a779h0_sysc_info },
 #endif
        { /* sentinel */ }
 };
drivers/pmdomain/renesas/rcar-gen4-sysc.h +1 -1
index 388cfa8f8f9fd656..fdf843aa51134f87 100644
@@ -40,5 +40,6 @@ struct rcar_gen4_sysc_info {
 extern const struct rcar_gen4_sysc_info r8a779a0_sysc_info;
 extern const struct rcar_gen4_sysc_info r8a779f0_sysc_info;
 extern const struct rcar_gen4_sysc_info r8a779g0_sysc_info;
+extern const struct rcar_gen4_sysc_info r8a779h0_sysc_info;
 
 #endif /* __SOC_RENESAS_RCAR_GEN4_SYSC_H__ */
--

2.34.1

#32 lore raw

Re: [PATCH 09/15] pmdomain: renesas: r8a779h0-sysc: Add r8a779h0 support

Hi Ulf,

Quoted 1 line · Ulf Hansson

- trimmed cc-list

CC krzk ;-)

Quoted 6 lines · Geert Uytterhoeven
Quoted 5 lines

From: Duy Nguyen <[email protected]>

Add support for R-Car V4M (R8A779H0) SoC power areas to the R-Car SYSC driver.

Quoted 7 lines
Quoted 2 lines

To make sure we agree on the merge strategy; should I pick up $subject patch, patch3 and patch4 through my pmdomain tree? DT patches, like patch3 and patch4, I should share as usual via my immutable "dt" branch, so you can pull it into your renesas tree?

Thanks, that would be great!

However, please note that Krzysztof wants me to add a vendor-prefix to DT binding definition files[1], so there will be a v2.

[1] include/dt-bindings/power/r8a779h0-sysc.h

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
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
#9 lore raw

Re: [PATCH 02/15] dt-bindings: clock: Add R8A779H0 V4M CPG Core Clock Definitions

In reply to Krzysztof Kozlowski
Quoted 8 lines
Quoted 4 lines

For new bindings, or also for existing ones?
Doing the former means there are inconsistencies among different SoCs in the same family.

For the new ones. It's just naming inconsistency which does not cause any issues. Otherwise you never move to vendor,device.h format... which is not that critical, but in the long term brings uniformity.

I haven't reviewed the patch itself, but for the naming scheme I'd suggest to follow Krzysztof's suggestion. If he is OK with this level of uniformity, then all is good, I'd say. Converting existing ones sounds more messy to me.

#13 lore raw

Re: [PATCH 03/15] dt-bindings: power: renesas,rcar-sysc: Document R-Car V4M support

In reply to Conor Dooley
Quoted 6 lines
Quoted 3 lines

- renesas,r8a779g0-sysc # R-Car V4H
+ - renesas,r8a779h0-sysc # R-Car V4M

I like that the g0 is the v4h and the h0 is a v4m. Makes complete sense to me!

Hey, at least the number is constantly increasing! Well, mostly... ;)

Reviewed-by on v1 6/15
#25 lore raw

Re: [PATCH 06/15] dt-bindings: soc: renesas: Document R-Car V4M Gray Hawk Single

In reply to Geert Uytterhoeven
Quoted 9 lines · Geert Uytterhoeven

Document the compatible values for the Renesas R-Car V4M (R8A779H0) SoC and the Renesas Gray Hawk Single development board.

---
The Gray Hawk Single board is an integrated variant of the (not yet supported) Gray Hawk board stack, which is very similar to the White Hawk board stack.

Quoted 5 lines

The schematics call it '"Gray Hawk"(1Board)'. The Setup Manual calls it 'Gray Hawk Single Board'.

Alternative naming candidates would be 'Gray Hawk S' and/or 'renesas,gray-hawk-s'.

I like this current version with the explicit and easy to understand naming.

Reviewed-by on v1 7/15
#28 lore raw

Re: [PATCH 07/15] clk: renesas: rcar-gen4: Add support for FRQCRC1

In reply to Geert Uytterhoeven
Quoted 8 lines · Geert Uytterhoeven

R-Car V4H and V4M have a second Frequency Control Register C. Add support for this by treating bit field offsets beyond 31 as referring to the second register.

---
Tested by enabling CLOCK_ALLOW_WRITE_DEBUGFS and checking the impact of CPU core clk rate on CPU core speed on R-Car V4M.

Reviewed-by on v1 10/15
#34 lore raw

Re: [PATCH 10/15] soc: renesas: Introduce ARCH_RCAR_GEN4

In reply to Geert Uytterhoeven
Quoted 9 lines · Geert Uytterhoeven

Currently, all Kconfig symbols for R-Car Gen4 SoCs select the ARCH_RCAR_GEN3 SoC family symbol, which might confuse the casual reader.

Fix this by introducing a new SoC family symbol for R-Car Gen4 SoCs. For now this just selects ARCH_RCAR_GEN3, to avoid duplication, and to relax dependencies.

---

Quoted 2 lines

Once "[PATCH] i2c: rcar: Prepare for the advent of ARCH_RCAR_GEN4"[1] has been applied, ARCH_RCAR_GEN4 can stop selecting ARCH_RCAR_GEN3.

Oh, that's me :)

Quoted 2 lines

I'm open for suggestions how to improve this.
Perhaps factor out common parts into ARCH_RCAR?

I kinda like the situation after this patch. I'd think using ARCH_RCAR might hurt readability. Also, if Gen5 needs to modify ARCH_RCAR, then we need to fix up old archs. Potential regressions ahead.

Reviewed-by on v1 12/15
#38 lore raw

Re: [PATCH 12/15] soc: renesas: rcar-rst: Add support for R-Car V4M

In reply to Geert Uytterhoeven
Quoted 6 lines · Geert Uytterhoeven

From: Duy Nguyen <[email protected]>

Add support for the R-Car V4M (R8A779H0) SoC to the R-Car RST driver.

Quoted 3 lines

---
Early firmware versions may not enable WDT resets, so you may need to do s/rcar_rst_gen4/rcar_rst_v3u/ for testing.

See, how useful this V3U patch has become ;)

#41 lore raw

Re: [PATCH 14/15] arm64: dts: renesas: Add Gray Hawk Single board support

In reply to Geert Uytterhoeven
Quoted 6 lines · Geert Uytterhoeven

Add initial support for the Renesas Gray Hawk Single board, which is based on the R-Car V4M (R8A779H0) SoC:
- Memory,
- Crystal oscillators,
- Serial console.

Quoted 6 lines

Based on the White Hawk Single DTS, and on a patch for the Gray Hawk board stack in the BSP by Hai Pham.

---
An alternative naming candidate would be "r8a779h0-gray-hawk-s.dts".

As said in another patch, I like the current naming.

Quoted 3 lines

As the Gray Hawk and White Hawk board stacks share all boards except for the CPU board, we might be able to reuse white-hawk-common.dtsi[1] once all needed SoC support has been added to r8a779h0.dtsi.

Sounds great.

Quoted 3 lines

[1] "[PATCH/RFC 0/7] arm64: dts: renesas: Add support for more R-Car V4H and White Hawk variants"
https://lore.kernel.org/all/[email protected]

I will check it next.