From: Magnus Damm <magnus.damm@gmail.com>
To: linux-clk@vger.kernel.org
Cc: kuninori.morimoto.gx@renesas.com,linux-sh@vger.kernel.org,mturquette@baylibre.com,gaku.inami.xw@bp.renesas.com,sboyd@codeaurora.org,horms@verge.net.au,geert@linux-m68k.org,laurent.pinchart@ideasonboard.com,Magnus
Damm <magnus.damm@gmail.com>
Subject: [PATCH v7 05/05] clk: shmobile: rcar-gen3: Add CPG/MSTP Clock Domain support
Date: Tue, 08 Sep 2015 01:33:46 +0900 [thread overview]
Message-ID: <20150907163346.475.69916.sendpatchset@little-apple> (raw)
In-Reply-To: <20150907163252.475.18281.sendpatchset@little-apple>
From: Geert Uytterhoeven <geert+renesas@glider.be>
Add Clock Domain support to the R-Car Gen3 Clock Pulse Generator (CPG)
driver using the generic PM Domain. This allows to power-manage the
module clocks of SoC devices that are part of the CPG/MSTP Clock Domain
using Runtime PM, or for system suspend/resume.
SoC devices that are part of the CPG/MSTP Clock Domain and can be
power-managed through an MSTP clock should be tagged in DT with a proper
"power-domains" property.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
Changes since V6:
- None
Changes since V5:
- Rebased to fit on top of updated CPG DT binding document
Changes since V4:
- Rebased to fit on top of updated CPG DT binding document
Changes since V3:
- Fixed so correct file is actually used. =)
- Took V2 from Geert but filtered out Kconfig.platforms bits
Documentation/devicetree/bindings/clock/renesas,rcar-gen3-cpg-clocks.txt | 26 +++++++++-
drivers/clk/shmobile/clk-rcar-gen3.c | 2
2 files changed, 26 insertions(+), 2 deletions(-)
--- 0009/Documentation/devicetree/bindings/clock/renesas,rcar-gen3-cpg-clocks.txt
+++ work/Documentation/devicetree/bindings/clock/renesas,rcar-gen3-cpg-clocks.txt 2015-09-02 14:41:32.942366518 +0900
@@ -2,6 +2,8 @@
The CPG generates core clocks for the R-Car Gen3 SoCs. It includes three PLLs
and several fixed ratio dividers.
+The CPG also provides a Clock Domain for SoC devices, in combination with the
+CPG Module Stop (MSTP) Clocks.
Required Properties:
@@ -14,9 +16,17 @@ Required Properties:
- clocks: References to the parent clocks: first to the EXTAL clock
- #clock-cells: Must be 1
- clock-indices: Indices of the exported clocks
+ - #power-domain-cells: Must be 0
-Example
--------
+SoC devices that are part of the CPG/MSTP Clock Domain and can be power-managed
+through an MSTP clock should refer to the CPG device node in their
+"power-domains" property, as documented by the generic PM domain bindings in
+Documentation/devicetree/bindings/power/power_domain.txt.
+
+Examples
+--------
+
+ - CPG device node:
cpg_clocks: cpg_clocks@e6150000 {
compatible = "renesas,r8a7795-cpg-clocks",
@@ -29,4 +39,16 @@ Example
R8A7795_CLK_PLL1 R8A7795_CLK_PLL2
R8A7795_CLK_PLL3 R8A7795_CLK_PLL4
>;
+ #power-domain-cells = <0>;
+ };
+
+ - CPG/MSTP Clock Domain member device node:
+
+ scif2: serial@e6e88000 {
+ compatible = "renesas,scif-r8a7795", "renesas,scif";
+ reg = <0 0xe6e88000 0 64>;
+ interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp3_clks RCAR_R8A7795_CLK_SCIF2>;
+ clock-names = "sci_ick";
+ power-domains = <&cpg_clocks>;
};
--- 0009/drivers/clk/shmobile/clk-rcar-gen3.c
+++ work/drivers/clk/shmobile/clk-rcar-gen3.c 2015-09-02 14:39:35.912366518 +0900
@@ -236,6 +236,8 @@ static void __init rcar_gen3_cpg_clocks_
}
of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data);
+
+ cpg_mstp_add_clk_domain(np);
}
CLK_OF_DECLARE(rcar_gen3_cpg_clks, "renesas,rcar-gen3-cpg-clocks",
rcar_gen3_cpg_clocks_init);
WARNING: multiple messages have this Message-ID (diff)
From: Magnus Damm <magnus.damm@gmail.com>
To: linux-clk@vger.kernel.org
Cc: kuninori.morimoto.gx@renesas.com, linux-sh@vger.kernel.org,
mturquette@baylibre.com, gaku.inami.xw@bp.renesas.com,
sboyd@codeaurora.org, horms@verge.net.au, geert@linux-m68k.org,
laurent.pinchart@ideasonboard.com,
Magnus Damm <magnus.damm@gmail.com>
Subject: [PATCH v7 05/05] clk: shmobile: rcar-gen3: Add CPG/MSTP Clock Domain support
Date: Mon, 07 Sep 2015 16:33:46 +0000 [thread overview]
Message-ID: <20150907163346.475.69916.sendpatchset@little-apple> (raw)
In-Reply-To: <20150907163252.475.18281.sendpatchset@little-apple>
From: Geert Uytterhoeven <geert+renesas@glider.be>
Add Clock Domain support to the R-Car Gen3 Clock Pulse Generator (CPG)
driver using the generic PM Domain. This allows to power-manage the
module clocks of SoC devices that are part of the CPG/MSTP Clock Domain
using Runtime PM, or for system suspend/resume.
SoC devices that are part of the CPG/MSTP Clock Domain and can be
power-managed through an MSTP clock should be tagged in DT with a proper
"power-domains" property.
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Magnus Damm <damm+renesas@opensource.se>
---
Changes since V6:
- None
Changes since V5:
- Rebased to fit on top of updated CPG DT binding document
Changes since V4:
- Rebased to fit on top of updated CPG DT binding document
Changes since V3:
- Fixed so correct file is actually used. =)
- Took V2 from Geert but filtered out Kconfig.platforms bits
Documentation/devicetree/bindings/clock/renesas,rcar-gen3-cpg-clocks.txt | 26 +++++++++-
drivers/clk/shmobile/clk-rcar-gen3.c | 2
2 files changed, 26 insertions(+), 2 deletions(-)
--- 0009/Documentation/devicetree/bindings/clock/renesas,rcar-gen3-cpg-clocks.txt
+++ work/Documentation/devicetree/bindings/clock/renesas,rcar-gen3-cpg-clocks.txt 2015-09-02 14:41:32.942366518 +0900
@@ -2,6 +2,8 @@
The CPG generates core clocks for the R-Car Gen3 SoCs. It includes three PLLs
and several fixed ratio dividers.
+The CPG also provides a Clock Domain for SoC devices, in combination with the
+CPG Module Stop (MSTP) Clocks.
Required Properties:
@@ -14,9 +16,17 @@ Required Properties:
- clocks: References to the parent clocks: first to the EXTAL clock
- #clock-cells: Must be 1
- clock-indices: Indices of the exported clocks
+ - #power-domain-cells: Must be 0
-Example
--------
+SoC devices that are part of the CPG/MSTP Clock Domain and can be power-managed
+through an MSTP clock should refer to the CPG device node in their
+"power-domains" property, as documented by the generic PM domain bindings in
+Documentation/devicetree/bindings/power/power_domain.txt.
+
+Examples
+--------
+
+ - CPG device node:
cpg_clocks: cpg_clocks@e6150000 {
compatible = "renesas,r8a7795-cpg-clocks",
@@ -29,4 +39,16 @@ Example
R8A7795_CLK_PLL1 R8A7795_CLK_PLL2
R8A7795_CLK_PLL3 R8A7795_CLK_PLL4
>;
+ #power-domain-cells = <0>;
+ };
+
+ - CPG/MSTP Clock Domain member device node:
+
+ scif2: serial@e6e88000 {
+ compatible = "renesas,scif-r8a7795", "renesas,scif";
+ reg = <0 0xe6e88000 0 64>;
+ interrupts = <GIC_SPI 164 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&mstp3_clks RCAR_R8A7795_CLK_SCIF2>;
+ clock-names = "sci_ick";
+ power-domains = <&cpg_clocks>;
};
--- 0009/drivers/clk/shmobile/clk-rcar-gen3.c
+++ work/drivers/clk/shmobile/clk-rcar-gen3.c 2015-09-02 14:39:35.912366518 +0900
@@ -236,6 +236,8 @@ static void __init rcar_gen3_cpg_clocks_
}
of_clk_add_provider(np, of_clk_src_onecell_get, &cpg->data);
+
+ cpg_mstp_add_clk_domain(np);
}
CLK_OF_DECLARE(rcar_gen3_cpg_clks, "renesas,rcar-gen3-cpg-clocks",
rcar_gen3_cpg_clocks_init);
next prev parent reply other threads:[~2015-09-07 16:33 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-07 16:32 [PATCH v7 00/05] Renesas R-Car Gen3 CPG support V7 Magnus Damm
2015-09-07 16:32 ` Magnus Damm
2015-09-07 16:33 ` [PATCH v7 01/05] clk: shmobile: Rework CONFIG_ARCH_SHMOBILE_MULTI Magnus Damm
2015-09-07 16:33 ` Magnus Damm
2015-09-07 16:33 ` [PATCH v7 02/05] clk: shmobile: Add r8a7795 SoC to MSTP bindings Magnus Damm
2015-09-07 16:33 ` Magnus Damm
2015-09-07 16:33 ` [PATCH v7 03/05] clk: shmobile: Make MSTP clock-output-names optional Magnus Damm
2015-09-07 16:33 ` Magnus Damm
2015-09-07 16:33 ` [PATCH v7 04/05] clk: shmobile: Add Renesas R-Car Gen3 CPG support Magnus Damm
2015-09-07 16:33 ` Magnus Damm
2015-09-07 16:33 ` Magnus Damm [this message]
2015-09-07 16:33 ` [PATCH v7 05/05] clk: shmobile: rcar-gen3: Add CPG/MSTP Clock Domain support Magnus Damm
2015-09-08 7:41 ` Geert Uytterhoeven
2015-09-08 7:41 ` Geert Uytterhoeven
2015-09-08 8:18 ` Magnus Damm
2015-09-08 8:18 ` Magnus Damm
2015-09-08 8:20 ` Geert Uytterhoeven
2015-09-08 8:20 ` Geert Uytterhoeven
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150907163346.475.69916.sendpatchset@little-apple \
--to=magnus.damm@gmail.com \
--cc=gaku.inami.xw@bp.renesas.com \
--cc=geert@linux-m68k.org \
--cc=horms@verge.net.au \
--cc=kuninori.morimoto.gx@renesas.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-clk@vger.kernel.org \
--cc=linux-sh@vger.kernel.org \
--cc=mturquette@baylibre.com \
--cc=sboyd@codeaurora.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.