Skip to contentSkip to conversation

Renesas R8A77980 CPG/MSSR clock support

PATCH In review Sergei Shtylyov 4 participants 6 messages Feb 15, 2018 – Feb 20, 2018 1 message not in the archive

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v2 cover Renesas R8A77980 CPG/MSSR clock support

Hello!

Here's the set of 2 patches against the 'clk-renesas' branch of Geert Uytterhoeven's 'renesas-drivers.git' repo. We're adding the CPG/MSSR driver support for R8A77980...

[1/2] dt-bindings: clock: add R8A77980 CPG core clock definitions [2/2] clk: renesas: cpg-mssr: add R8A77980 support

MBR, Sergei

#1 lore raw

PATCH v2 1/2 dt-bindings: clock: add R8A77980 CPG core clock definitions

Add macros usable by the device tree sources to reference the R8A77980 CPG core clocks by index. The data come from the table 8.2e of the R-Car Series, 3rd Generation User's Manual: Hardware (Rev. 0.80, Oct, 2017), however I had to add the Z2 clock which is somehow present only on the figure 8.1e...

Based on the original (and large) patch by Vladimir Barinov.

---
Changes in version 2:
- wrapped the SPDX license ID in its own comment;
- added Geert's tag.

 include/dt-bindings/clock/r8a77980-cpg-mssr.h |   51 ++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
include/dt-bindings/clock/r8a77980-cpg-mssr.h new file +51 -0
Index: renesas-drivers/include/dt-bindings/clock/r8a77980-cpg-mssr.h
===================================================================
@@ -0,0 +1,51 @@
+/* SPDX-License-Identifier: GPL-2.0+ */
+/*
+ * Copyright (C) 2018 Renesas Electronics Corp.
+ * Copyright (C) 2018 Cogent Embedded, Inc.
+ */
+#ifndef __DT_BINDINGS_CLOCK_R8A77980_CPG_MSSR_H__
+#define __DT_BINDINGS_CLOCK_R8A77980_CPG_MSSR_H__
+
+#include <dt-bindings/clock/renesas-cpg-mssr.h>
+
+/* r8a77980 CPG Core Clocks */
+#define R8A77980_CLK_Z2			0
+#define R8A77980_CLK_ZR			1
+#define R8A77980_CLK_ZTR		2
+#define R8A77980_CLK_ZTRD2		3
+#define R8A77980_CLK_ZT			4
+#define R8A77980_CLK_ZX			5
+#define R8A77980_CLK_S0D1		6
+#define R8A77980_CLK_S0D2		7
+#define R8A77980_CLK_S0D3		8
+#define R8A77980_CLK_S0D4		9
+#define R8A77980_CLK_S0D6		10
+#define R8A77980_CLK_S0D12		11
+#define R8A77980_CLK_S0D24		12
+#define R8A77980_CLK_S1D1		13
+#define R8A77980_CLK_S1D2		14
+#define R8A77980_CLK_S1D4		15
+#define R8A77980_CLK_S2D1		16
+#define R8A77980_CLK_S2D2		17
+#define R8A77980_CLK_S2D4		18
+#define R8A77980_CLK_S3D1		19
+#define R8A77980_CLK_S3D2		20
+#define R8A77980_CLK_S3D4		21
+#define R8A77980_CLK_LB			22
+#define R8A77980_CLK_CL			23
+#define R8A77980_CLK_ZB3		24
+#define R8A77980_CLK_ZB3D2		25
+#define R8A77980_CLK_ZB3D4		26
+#define R8A77980_CLK_SD0H		27
+#define R8A77980_CLK_SD0		28
+#define R8A77980_CLK_RPC		29
+#define R8A77980_CLK_RPCD2		30
+#define R8A77980_CLK_MSO		31
+#define R8A77980_CLK_CANFD		32
+#define R8A77980_CLK_CSI0		33
+#define R8A77980_CLK_CP			34
+#define R8A77980_CLK_CPEX		35
+#define R8A77980_CLK_R			36
+#define R8A77980_CLK_OSC		37
+
+#endif /* __DT_BINDINGS_CLOCK_R8A77980_CPG_MSSR_H__ */

A message that is not in the archive (sent off-list or not yet received): 7691d7f4-364d-bd7b-f9fe-ea49e7c2ab09-M4DtvfQ/[email protected]

Reviewed-by
#3 lore raw

Re: [PATCH v2 1/2] dt-bindings: clock: add R8A77980 CPG core clock definitions

Quoted 11 lines · Sergei Shtylyov

Add macros usable by the device tree sources to reference the R8A77980 CPG core clocks by index. The data come from the table 8.2e of the R-Car Series, 3rd Generation User's Manual: Hardware (Rev. 0.80, Oct, 2017), however I had to add the Z2 clock which is somehow present only on the figure 8.1e...

Based on the original (and large) patch by Vladimir Barinov.

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

maintainer Reviewed-by on v2 1/2
#4 lore raw

Re: [PATCH v2 1/2] dt-bindings: clock: add R8A77980 CPG core clock definitions

In reply to Sergei Shtylyov
Quoted 12 lines · Sergei Shtylyov

Add macros usable by the device tree sources to reference the R8A77980 CPG core clocks by index. The data come from the table 8.2e of the R-Car Series, 3rd Generation User's Manual: Hardware (Rev. 0.80, Oct, 2017), however I had to add the Z2 clock which is somehow present only on the figure 8.1e...

Based on the original (and large) patch by Vladimir Barinov.

Quoted 7 lines

---
Changes in version 2:
- wrapped the SPDX license ID in its own comment;
- added Geert's tag.

 include/dt-bindings/clock/r8a77980-cpg-mssr.h |   51 ++++++++++++++++++++++++++
 1 file changed, 51 insertions(+)
#5 lore raw

PATCH v2 2/2 clk: renesas: cpg-mssr: add R8A77980 support

In reply to Sergei Shtylyov

Add R-Car V3H (R8A77980) Clock Pulse Generator / Module Standby and Software Reset support, using the CPG/MSSR driver core and the common R-Car Gen3 code.

Based on the original (and large) patch by Vladimir Barinov.

---
Changes in version 2:
- fixed the copyright of the driver this one was based upon;
- removed the useless comments;
- added Rob's, Simon's, and Geert's tags.

 Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt |    5 
 drivers/clk/renesas/Kconfig                                  |    5 
 drivers/clk/renesas/Makefile                                 |    1 
 drivers/clk/renesas/r8a77980-cpg-mssr.c                      |  227 +++++++++++
 drivers/clk/renesas/renesas-cpg-mssr.c                       |    6 
 drivers/clk/renesas/renesas-cpg-mssr.h                       |    1 
 6 files changed, 243 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt +3 -2
Index: renesas-drivers/Documentation/devicetree/bindings/clock/renesas,cpg-mssr.txt
===================================================================
@@ -23,6 +23,7 @@ Required Properties:
       - "renesas,r8a7795-cpg-mssr" for the r8a7795 SoC (R-Car H3)
       - "renesas,r8a7796-cpg-mssr" for the r8a7796 SoC (R-Car M3-W)
       - "renesas,r8a77970-cpg-mssr" for the r8a77970 SoC (R-Car V3M)
+      - "renesas,r8a77980-cpg-mssr" for the r8a77980 SoC (R-Car V3H)
       - "renesas,r8a77995-cpg-mssr" for the r8a77995 SoC (R-Car D3)
 
   - reg: Base address and length of the memory resource used by the CPG/MSSR
@@ -32,8 +33,8 @@ Required Properties:
     clock-names
   - clock-names: List of external parent clock names. Valid names are:
       - "extal" (r8a7743, r8a7745, r8a7790, r8a7791, r8a7792, r8a7793, r8a7794,
-		 r8a7795, r8a7796, r8a77970, r8a77995)
-      - "extalr" (r8a7795, r8a7796, r8a77970)
+		 r8a7795, r8a7796, r8a77970, r8a77980, r8a77995)
+      - "extalr" (r8a7795, r8a7796, r8a77970, r8a77980)
       - "usb_extal" (r8a7743, r8a7745, r8a7790, r8a7791, r8a7793, r8a7794)
 
   - #clock-cells: Must be 2
drivers/clk/renesas/Kconfig +5 -0
Index: renesas-drivers/drivers/clk/renesas/Kconfig
===================================================================
@@ -16,6 +16,7 @@ config CLK_RENESAS
 	select CLK_R8A7795 if ARCH_R8A7795
 	select CLK_R8A7796 if ARCH_R8A7796
 	select CLK_R8A77970 if ARCH_R8A77970
+	select CLK_R8A77980 if ARCH_R8A77980
 	select CLK_R8A77995 if ARCH_R8A77995
 	select CLK_SH73A0 if ARCH_SH73A0
 
@@ -101,6 +102,10 @@ config CLK_R8A77970
 	bool "R-Car V3M clock support" if COMPILE_TEST
 	select CLK_RCAR_GEN3_CPG
 
+config CLK_R8A77980
+	bool "R-Car V3H clock support" if COMPILE_TEST
+	select CLK_RCAR_GEN3_CPG
+
 config CLK_R8A77995
 	bool "R-Car D3 clock support" if COMPILE_TEST
 	select CLK_RCAR_GEN3_CPG
drivers/clk/renesas/Makefile +1 -0
Index: renesas-drivers/drivers/clk/renesas/Makefile
===================================================================
@@ -15,6 +15,7 @@ obj-$(CONFIG_CLK_R8A7794)		+= r8a7794-cp
 obj-$(CONFIG_CLK_R8A7795)		+= r8a7795-cpg-mssr.o
 obj-$(CONFIG_CLK_R8A7796)		+= r8a7796-cpg-mssr.o
 obj-$(CONFIG_CLK_R8A77970)		+= r8a77970-cpg-mssr.o
+obj-$(CONFIG_CLK_R8A77980)		+= r8a77980-cpg-mssr.o
 obj-$(CONFIG_CLK_R8A77995)		+= r8a77995-cpg-mssr.o
 obj-$(CONFIG_CLK_SH73A0)		+= clk-sh73a0.o
 
drivers/clk/renesas/r8a77980-cpg-mssr.c new file +227 -0

227 lines not on this page · raw message

drivers/clk/renesas/renesas-cpg-mssr.c +6 -0
Index: renesas-drivers/drivers/clk/renesas/renesas-cpg-mssr.c
===================================================================
@@ -699,6 +699,12 @@ static const struct of_device_id cpg_mss
 		.data = &r8a77970_cpg_mssr_info,
 	},
 #endif
+#ifdef CONFIG_ARCH_R8A77980
+	{
+		.compatible = "renesas,r8a77980-cpg-mssr",
+		.data = &r8a77980_cpg_mssr_info,
+	},
+#endif
 #ifdef CONFIG_CLK_R8A77995
 	{
 		.compatible = "renesas,r8a77995-cpg-mssr",
drivers/clk/renesas/renesas-cpg-mssr.h +1 -0
Index: renesas-drivers/drivers/clk/renesas/renesas-cpg-mssr.h
===================================================================
@@ -140,6 +140,7 @@ extern const struct cpg_mssr_info r8a779
 extern const struct cpg_mssr_info r8a7795_cpg_mssr_info;
 extern const struct cpg_mssr_info r8a7796_cpg_mssr_info;
 extern const struct cpg_mssr_info r8a77970_cpg_mssr_info;
+extern const struct cpg_mssr_info r8a77980_cpg_mssr_info;
 extern const struct cpg_mssr_info r8a77995_cpg_mssr_info;
 
 
#6 lore raw
In reply to Sergei Shtylyov
Quoted 5 lines · Sergei Shtylyov

Here's the set of 2 patches against the 'clk-renesas' branch of Geert Uytterhoeven's 'renesas-drivers.git' repo. We're adding the CPG/MSSR driver support for R8A77980...

[1/2] dt-bindings: clock: add R8A77980 CPG core clock definitions [2/2] clk: renesas: cpg-mssr: add R8A77980 support

Thanks, queued in clk-renesas-for-v4.17.

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