From: laurent.pinchart@ideasonboard.com (Laurent Pinchart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH V2 03/12] ARM: shmobile: r7s72100: add essential clock nodes to dtsi
Date: Thu, 06 Mar 2014 13:16:45 +0100 [thread overview]
Message-ID: <31686239.1N332dKyCy@avalon> (raw)
In-Reply-To: <1394105552-9744-4-git-send-email-wsa@the-dreams.de>
Hi Wolfram,
Thank you for the patch.
On Thursday 06 March 2014 12:32:23 Wolfram Sang wrote:
> From: Wolfram Sang <wsa@sang-engineering.com>
>
> Only essential clocks are added for now. Other clocks will be added when
> needed.
>
> Signed-off-by: Wolfram Sang <wsa@sang-engineering.com>
> ---
>
> Changes since V1:
> * add usb_x1 clock
> * reference usb_x1 to cpg
> * improved wording
> * #clock-cells consistently first property
>
> arch/arm/boot/dts/r7s72100.dtsi | 86 ++++++++++++++++++++++++++-
> include/dt-bindings/clock/r7s72100-clock.h | 25 +++++++++
> 2 files changed, 110 insertions(+), 1 deletion(-)
> create mode 100644 include/dt-bindings/clock/r7s72100-clock.h
>
> diff --git a/arch/arm/boot/dts/r7s72100.dtsi
> b/arch/arm/boot/dts/r7s72100.dtsi index ee700717a34b..2429b5be2e56 100644
> --- a/arch/arm/boot/dts/r7s72100.dtsi
> +++ b/arch/arm/boot/dts/r7s72100.dtsi
> @@ -1,13 +1,15 @@
> /*
> * Device Tree Source for the r7s72100 SoC
> *
> - * Copyright (C) 2013 Renesas Solutions Corp.
> + * Copyright (C) 2013-14 Renesas Solutions Corp.
> + * Copyright (C) 2014 Wolfram Sang, Sang Engineering
> <wsa@sang-engineering.com>
> *
> * This file is licensed under the terms of the GNU General Public License
> * version 2. This program is licensed "as is" without any warranty of any
> * kind, whether express or implied.
> */
>
> +#include <dt-bindings/clock/r7s72100-clock.h>
> #include <dt-bindings/interrupt-controller/irq.h>
>
> / {
> @@ -28,6 +30,88 @@
> spi4 = &spi4;
> };
>
> + clocks {
> + ranges;
> + #address-cells = <1>;
> + #size-cells = <1>;
> +
> + /* External clocks */
> + extal_clk: extal_clk {
> + #clock-cells = <0>;
> + compatible = "fixed-clock";
> + /* If clk present, value must be set by board */
> + clock-frequency = <0>;
> + clock-output-names = "extal";
> + };
> +
> + usb_x1_clk: usb_x1_clk {
> + #clock-cells = <0>;
> + compatible = "fixed-clock";
> + /* If clk present, value must be set by board */
> + clock-frequency = <0>;
> + clock-output-names = "usb_x1";
> + };
> +
> + /* Special CPG clocks */
> + cpg_clocks: cpg_clocks at fcfe0000 {
> + #clock-cells = <1>;
> + compatible = "renesas,r7s72100-cpg-clocks",
> + "renesas,rz-cpg-clocks";
> + reg = <0xfcfe0000 0x18>;
> + clocks = <&extal_clk>, <&usb_x1_clk>;
> + clock-output-names = "pll", "i", "g";
> + };
> +
> + /* Fixed factor clocks */
> + b_clk: b_clk {
> + #clock-cells = <0>;
> + compatible = "fixed-factor-clock";
> + clocks = <&cpg_clocks 0>;
What about adding #define's for the CPG clocks to include/dt-
bindings/clock/r7s72100-clock.h like is done for the R8A7790 and R8A7791 ?
> + clock-mult = <1>;
> + clock-div = <3>;
> + clock-output-names = "b";
> + };
> + p1_clk: p1_clk {
> + #clock-cells = <0>;
> + compatible = "fixed-factor-clock";
> + clocks = <&cpg_clocks 0>;
> + clock-mult = <1>;
> + clock-div = <6>;
> + clock-output-names = "p1";
> + };
> + p0_clk: p0_clk {
> + #clock-cells = <0>;
> + compatible = "fixed-factor-clock";
> + clocks = <&cpg_clocks 0>;
> + clock-mult = <1>;
> + clock-div = <12>;
> + clock-output-names = "p0";
> + };
> +
> + /* MSTP clocks */
> + mstp3_clks: mstp3_clks at fcfe0420 {
> + #clock-cells = <1>;
> + compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-
clocks";
> + reg = <0xfcfe0420 4>;
> + clocks = <&p0_clk>;
> + renesas,clock-indices = <R7S72100_CLK_MTU2>;
> + clock-output-names = "mtu2";
> + };
> +
> + mstp4_clks: mstp4_clks at fcfe0424 {
> + #clock-cells = <1>;
> + compatible = "renesas,r7s72100-mstp-clocks", "renesas,cpg-mstp-
clocks";
> + reg = <0xfcfe0424 4>;
> + clocks = <&p1_clk>, <&p1_clk>, <&p1_clk>, <&p1_clk>,
> + <&p1_clk>, <&p1_clk>, <&p1_clk>, <&p1_clk>;
> + renesas,clock-indices = <
> + R7S72100_CLK_SCIF0 R7S72100_CLK_SCIF1 R7S72100_CLK_SCIF2
> R7S72100_CLK_SCIF3 + R7S72100_CLK_SCIF4 R7S72100_CLK_SCIF5
> R7S72100_CLK_SCIF6 R7S72100_CLK_SCIF7 + >;
> + clock-output-names = "scif0", "scif1", "scif2", "scif3", "scif4",
> "scif5", "scif6", "scif7"; + };
> + };
> +
> cpus {
> #address-cells = <1>;
> #size-cells = <0>;
> diff --git a/include/dt-bindings/clock/r7s72100-clock.h
> b/include/dt-bindings/clock/r7s72100-clock.h new file mode 100644
> index 000000000000..eced0a8382b0
> --- /dev/null
> +++ b/include/dt-bindings/clock/r7s72100-clock.h
> @@ -0,0 +1,25 @@
> +/*
> + * Copyright (C) 2014 Wolfram Sang, Sang Engineering
> <wsa@sang-engineering.com> + *
> + * This program is free software; you can redistribute it and/or modify
> + * it under the terms of the GNU General Public License as published by
> + * the Free Software Foundation; version 2 of the License.
> + */
> +
> +#ifndef __DT_BINDINGS_CLOCK_R7S72100_H__
> +#define __DT_BINDINGS_CLOCK_R7S72100_H__
> +
> +/* MSTP3 */
> +#define R7S72100_CLK_MTU2 3
> +
> +/* MSTP4 */
> +#define R7S72100_CLK_SCIF0 7
> +#define R7S72100_CLK_SCIF1 6
> +#define R7S72100_CLK_SCIF2 5
> +#define R7S72100_CLK_SCIF3 4
> +#define R7S72100_CLK_SCIF4 3
> +#define R7S72100_CLK_SCIF5 2
> +#define R7S72100_CLK_SCIF6 1
> +#define R7S72100_CLK_SCIF7 0
> +
> +#endif /* __DT_BINDINGS_CLOCK_R7S72100_H__ */
--
Regards,
Laurent Pinchart
next prev parent reply other threads:[~2014-03-06 12:16 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-03-06 11:32 [PATCH V2 00/12] CCF support for Renesas r7s72100 Wolfram Sang
2014-03-06 11:32 ` [PATCH V2 01/12] clk: shmobile: add CPG driver for rz-platforms Wolfram Sang
2014-03-06 12:12 ` Laurent Pinchart
2014-03-06 13:06 ` Wolfram Sang
2014-03-06 13:21 ` Geert Uytterhoeven
2014-03-06 11:32 ` [PATCH V2 02/12] ARM: shmobile: r7s72100: document MSTP clock support Wolfram Sang
2014-03-06 11:32 ` [PATCH V2 03/12] ARM: shmobile: r7s72100: add essential clock nodes to dtsi Wolfram Sang
2014-03-06 12:16 ` Laurent Pinchart [this message]
2014-03-06 11:32 ` [PATCH V2 04/12] ARM: shmobile: r7s72100: genmai: populate nodes for external clocks Wolfram Sang
2014-03-06 11:32 ` [PATCH V2 05/12] ARM: shmobile: r7s72100: use workaround for non DT-clocks Wolfram Sang
2014-03-06 11:32 ` [PATCH V2 06/12] ARM: shmobile: r7s72100: add scif nodes to dtsi Wolfram Sang
2014-03-06 11:32 ` [PATCH V2 07/12] ARM: shmobile: r7s72100: genmai: activate scif2 for console output Wolfram Sang
2014-03-06 11:32 ` [PATCH V2 08/12] ARM: shmobile: r7s72100: genmai: platform scif devices only for legacy support Wolfram Sang
2014-03-06 11:32 ` [PATCH V2 09/12] ARM: shmobile: r7s72100: add i2c clocks to dtsi Wolfram Sang
2014-03-06 11:32 ` [PATCH V2 10/12] ARM: shmobile: r7s72100: remove I2C DT clocks from legacy clock support Wolfram Sang
2014-03-06 11:32 ` [PATCH V2 11/12] ARM: shmobile: r7s72100: add spi clocks to dtsi Wolfram Sang
2014-03-06 13:03 ` 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=31686239.1N332dKyCy@avalon \
--to=laurent.pinchart@ideasonboard.com \
--cc=linux-arm-kernel@lists.infradead.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).