All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Thompson <daniel.thompson@linaro.org>
To: Mike Turquette <mturquette@linaro.org>,
	Stephen Boyd <sboyd@codeaurora.org>
Cc: Daniel Thompson <daniel.thompson@linaro.org>,
	Rob Herring <robh+dt@kernel.org>, Pawel Moll <pawel.moll@arm.com>,
	Mark Rutland <mark.rutland@arm.com>,
	Ian Campbell <ijc+devicetree@hellion.org.uk>,
	Kumar Gala <galak@codeaurora.org>,
	Russell King <linux@arm.linux.org.uk>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Kamil Lulko <rev13@wp.pl>, Andreas Farber <afaerber@suse.de>,
	linux-clk@vger.kernel.org, devicetree@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, patches@linaro.org,
	linaro-kernel@lists.linaro.org
Subject: [PATCH v2 2/4] dt-bindings: Document the STM32F4 clock bindings
Date: Sat, 30 May 2015 08:54:06 +0100	[thread overview]
Message-ID: <1432972448-10332-3-git-send-email-daniel.thompson@linaro.org> (raw)
In-Reply-To: <1432972448-10332-1-git-send-email-daniel.thompson@linaro.org>

This adds documentation of device tree bindings for the clock related
portions of the STM32 RCC block.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
---
 .../devicetree/bindings/clock/st,stm32-rcc.txt     | 65 ++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/st,stm32-rcc.txt

diff --git a/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt
new file mode 100644
index 0000000..9715d09
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt
@@ -0,0 +1,65 @@
+STMicroelectronics STM32 Reset and Clock Controller
+===================================================
+
+The RCC IP is both a reset and a clock controller. This documentation only
+describes the clock part.
+
+Please also refer to clock-bindings.txt in this directory for common clock
+controller binding usage.
+
+Required properties:
+- compatible: Should be "st,stm32f42xx-rcc"
+- reg: should be register base and length as documented in the
+  datasheet
+- #clock-cells: 2, device nodes should specify the clock in their "clocks"
+  property, containing a phandle to the clock device node, an index selecting
+  between gated clocks and other clocks and an index specifying the clock to
+  use.
+
+Example:
+
+	rcc: rcc@40023800 {
+		#clock-cells = <2>
+		compatible = "st,stm32f42xx-rcc", "st,stm32-rcc";
+		reg = <0x40023800 0x400>;
+	};
+
+Specifying gated clocks
+=======================
+
+The primary index must be set to 0.
+
+The secondary index is the bit number within the RCC register bank, starting
+from the first RCC clock enable register (RCC_AHB1ENR, address offset 0x30).
+
+It is calculated as: index = register_offset / 4 * 32 + bit_offset.
+Where bit_offset is the bit offset within the register (LSB is 0, MSB is 31).
+
+Example:
+
+	/* Gated clock, AHB1 bit 0 (GPIOA) */
+	... {
+		clocks = <&rcc 0 0>
+	};
+
+	/* Gated clock, AHB2 bit 4 (GPIOA) */
+	... {
+		clocks = <&rcc 0 36>
+	};
+
+Specifying other clocks
+=======================
+
+The primary index must be set to 1.
+
+The secondary index is bound with the following magic numbers:
+
+	0	SYSTICK
+	1	FCLK
+
+Example:
+
+	/* Misc clock, FCLK */
+	... {
+		clocks = <&rcc 1 1>
+	};
-- 
2.1.0


WARNING: multiple messages have this Message-ID (diff)
From: Daniel Thompson <daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
To: Mike Turquette
	<mturquette-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Stephen Boyd <sboyd-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>
Cc: Daniel Thompson
	<daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>,
	Kumar Gala <galak-sgV2jX0FEOL9JmXXK+q4OQ@public.gmane.org>,
	Russell King <linux-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>,
	Maxime Coquelin
	<mcoquelin.stm32-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Kamil Lulko <rev13-5tc4TXWwyLM@public.gmane.org>,
	Andreas Farber <afaerber-l3A5Bk7waGM@public.gmane.org>,
	linux-clk-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r@public.gmane.org,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	patches-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org,
	linaro-kernel-cunTk1MwBs8s++Sfvej+rw@public.gmane.org
Subject: [PATCH v2 2/4] dt-bindings: Document the STM32F4 clock bindings
Date: Sat, 30 May 2015 08:54:06 +0100	[thread overview]
Message-ID: <1432972448-10332-3-git-send-email-daniel.thompson@linaro.org> (raw)
In-Reply-To: <1432972448-10332-1-git-send-email-daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>

This adds documentation of device tree bindings for the clock related
portions of the STM32 RCC block.

Signed-off-by: Daniel Thompson <daniel.thompson-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
---
 .../devicetree/bindings/clock/st,stm32-rcc.txt     | 65 ++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/st,stm32-rcc.txt

diff --git a/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt
new file mode 100644
index 0000000..9715d09
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt
@@ -0,0 +1,65 @@
+STMicroelectronics STM32 Reset and Clock Controller
+===================================================
+
+The RCC IP is both a reset and a clock controller. This documentation only
+describes the clock part.
+
+Please also refer to clock-bindings.txt in this directory for common clock
+controller binding usage.
+
+Required properties:
+- compatible: Should be "st,stm32f42xx-rcc"
+- reg: should be register base and length as documented in the
+  datasheet
+- #clock-cells: 2, device nodes should specify the clock in their "clocks"
+  property, containing a phandle to the clock device node, an index selecting
+  between gated clocks and other clocks and an index specifying the clock to
+  use.
+
+Example:
+
+	rcc: rcc@40023800 {
+		#clock-cells = <2>
+		compatible = "st,stm32f42xx-rcc", "st,stm32-rcc";
+		reg = <0x40023800 0x400>;
+	};
+
+Specifying gated clocks
+=======================
+
+The primary index must be set to 0.
+
+The secondary index is the bit number within the RCC register bank, starting
+from the first RCC clock enable register (RCC_AHB1ENR, address offset 0x30).
+
+It is calculated as: index = register_offset / 4 * 32 + bit_offset.
+Where bit_offset is the bit offset within the register (LSB is 0, MSB is 31).
+
+Example:
+
+	/* Gated clock, AHB1 bit 0 (GPIOA) */
+	... {
+		clocks = <&rcc 0 0>
+	};
+
+	/* Gated clock, AHB2 bit 4 (GPIOA) */
+	... {
+		clocks = <&rcc 0 36>
+	};
+
+Specifying other clocks
+=======================
+
+The primary index must be set to 1.
+
+The secondary index is bound with the following magic numbers:
+
+	0	SYSTICK
+	1	FCLK
+
+Example:
+
+	/* Misc clock, FCLK */
+	... {
+		clocks = <&rcc 1 1>
+	};
-- 
2.1.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

WARNING: multiple messages have this Message-ID (diff)
From: daniel.thompson@linaro.org (Daniel Thompson)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 2/4] dt-bindings: Document the STM32F4 clock bindings
Date: Sat, 30 May 2015 08:54:06 +0100	[thread overview]
Message-ID: <1432972448-10332-3-git-send-email-daniel.thompson@linaro.org> (raw)
In-Reply-To: <1432972448-10332-1-git-send-email-daniel.thompson@linaro.org>

This adds documentation of device tree bindings for the clock related
portions of the STM32 RCC block.

Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
---
 .../devicetree/bindings/clock/st,stm32-rcc.txt     | 65 ++++++++++++++++++++++
 1 file changed, 65 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/st,stm32-rcc.txt

diff --git a/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt
new file mode 100644
index 0000000..9715d09
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt
@@ -0,0 +1,65 @@
+STMicroelectronics STM32 Reset and Clock Controller
+===================================================
+
+The RCC IP is both a reset and a clock controller. This documentation only
+describes the clock part.
+
+Please also refer to clock-bindings.txt in this directory for common clock
+controller binding usage.
+
+Required properties:
+- compatible: Should be "st,stm32f42xx-rcc"
+- reg: should be register base and length as documented in the
+  datasheet
+- #clock-cells: 2, device nodes should specify the clock in their "clocks"
+  property, containing a phandle to the clock device node, an index selecting
+  between gated clocks and other clocks and an index specifying the clock to
+  use.
+
+Example:
+
+	rcc: rcc at 40023800 {
+		#clock-cells = <2>
+		compatible = "st,stm32f42xx-rcc", "st,stm32-rcc";
+		reg = <0x40023800 0x400>;
+	};
+
+Specifying gated clocks
+=======================
+
+The primary index must be set to 0.
+
+The secondary index is the bit number within the RCC register bank, starting
+from the first RCC clock enable register (RCC_AHB1ENR, address offset 0x30).
+
+It is calculated as: index = register_offset / 4 * 32 + bit_offset.
+Where bit_offset is the bit offset within the register (LSB is 0, MSB is 31).
+
+Example:
+
+	/* Gated clock, AHB1 bit 0 (GPIOA) */
+	... {
+		clocks = <&rcc 0 0>
+	};
+
+	/* Gated clock, AHB2 bit 4 (GPIOA) */
+	... {
+		clocks = <&rcc 0 36>
+	};
+
+Specifying other clocks
+=======================
+
+The primary index must be set to 1.
+
+The secondary index is bound with the following magic numbers:
+
+	0	SYSTICK
+	1	FCLK
+
+Example:
+
+	/* Misc clock, FCLK */
+	... {
+		clocks = <&rcc 1 1>
+	};
-- 
2.1.0

  parent reply	other threads:[~2015-05-30  7:55 UTC|newest]

Thread overview: 91+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-22 20:41 [RFC PATCH 0/3] clk: stm32: Add clock driver for STM32F4[23]xxx devices Daniel Thompson
2015-05-22 20:41 ` Daniel Thompson
2015-05-22 20:41 ` [RFC PATCH 1/3] dt-bindings: Document the STM32F4 clock bindings Daniel Thompson
2015-05-22 20:41   ` Daniel Thompson
2015-05-22 20:41   ` Daniel Thompson
2015-05-22 20:41 ` [RFC PATCH 2/3] clk: stm32: Add clock driver for STM32F4[23]xxx devices Daniel Thompson
2015-05-22 20:41   ` Daniel Thompson
2015-06-04 22:07   ` Stephen Boyd
2015-06-04 22:07     ` Stephen Boyd
2015-06-05  9:36     ` Daniel Thompson
2015-06-05  9:36       ` Daniel Thompson
2015-06-06  0:10       ` Stephen Boyd
2015-06-06  0:10         ` Stephen Boyd
2015-05-22 20:41 ` [RFC PATCH 3/3] ARM: dts: stm32f429: Adopt STM32F4 clock driver Daniel Thompson
2015-05-22 20:41   ` Daniel Thompson
2015-05-26 16:41 ` [RFC PATCH 0/3] clk: stm32: Add clock driver for STM32F4[23]xxx devices Maxime Coquelin
2015-05-26 16:41   ` Maxime Coquelin
2015-05-26 16:41   ` Maxime Coquelin
2015-05-27  8:36   ` Daniel Thompson
2015-05-27  8:36     ` Daniel Thompson
2015-05-27  8:36     ` Daniel Thompson
2015-05-27  8:36     ` Daniel Thompson
2015-05-30  7:54 ` [PATCH v2 0/4] " Daniel Thompson
2015-05-30  7:54   ` Daniel Thompson
2015-05-30  7:54   ` Daniel Thompson
2015-05-30  7:54   ` [PATCH v2 1/4] ARM: stm32: Enable clock source Daniel Thompson
2015-05-30  7:54     ` Daniel Thompson
2015-05-30  7:54   ` Daniel Thompson [this message]
2015-05-30  7:54     ` [PATCH v2 2/4] dt-bindings: Document the STM32F4 clock bindings Daniel Thompson
2015-05-30  7:54     ` Daniel Thompson
2015-05-30  9:21     ` Maxime Coquelin
2015-05-30  9:21       ` Maxime Coquelin
2015-05-30  9:21       ` Maxime Coquelin
2015-06-01  7:46       ` Daniel Thompson
2015-06-01  7:46         ` Daniel Thompson
2015-06-01  7:46         ` Daniel Thompson
2015-05-30  7:54   ` [PATCH v2 3/4] clk: stm32: Add clock driver for STM32F4[23]xxx devices Daniel Thompson
2015-05-30  7:54     ` Daniel Thompson
2015-05-30  7:54     ` Daniel Thompson
2015-05-30  9:15     ` Maxime Coquelin
2015-05-30  9:15       ` Maxime Coquelin
2015-06-01  7:18       ` Daniel Thompson
2015-06-01  7:18         ` Daniel Thompson
2015-06-01  7:18         ` Daniel Thompson
2015-05-30  7:54   ` [PATCH v2 4/4] ARM: dts: stm32f429: Adopt STM32F4 clock driver Daniel Thompson
2015-05-30  7:54     ` Daniel Thompson
2015-05-30  7:54     ` Daniel Thompson
2015-05-30  9:38     ` Maxime Coquelin
2015-05-30  9:38       ` Maxime Coquelin
2015-05-30  8:40   ` [PATCH v2 0/4] clk: stm32: Add clock driver for STM32F4[23]xxx devices Maxime Coquelin
2015-05-30  8:40     ` Maxime Coquelin
2015-06-10 20:09 ` [PATCH v3 0/3] " Daniel Thompson
2015-06-10 20:09   ` Daniel Thompson
2015-06-10 20:09   ` Daniel Thompson
2015-06-10 20:09   ` [PATCH v3 1/3] dt-bindings: Document the STM32F4 clock bindings Daniel Thompson
2015-06-10 20:09     ` Daniel Thompson
2015-06-10 20:09     ` Daniel Thompson
2015-06-12  7:25     ` Maxime Coquelin
2015-06-12  7:25       ` Maxime Coquelin
2015-06-12  7:25       ` Maxime Coquelin
2015-06-22 22:47     ` Stephen Boyd
2015-06-22 22:47       ` Stephen Boyd
2015-06-22 22:47       ` Stephen Boyd
2015-06-10 20:09   ` [PATCH v3 2/3] clk: stm32: Add clock driver for STM32F4[23]xxx devices Daniel Thompson
2015-06-10 20:09     ` Daniel Thompson
2015-06-10 20:09     ` Daniel Thompson
2015-06-22 22:48     ` Stephen Boyd
2015-06-22 22:48       ` Stephen Boyd
2015-06-22 22:48       ` Stephen Boyd
2015-06-22 22:48       ` Stephen Boyd
2015-06-22 23:21     ` Stephen Boyd
2015-06-22 23:21       ` Stephen Boyd
2015-06-22 23:21       ` Stephen Boyd
2015-06-23  8:25       ` Daniel Thompson
2015-06-23  8:25         ` Daniel Thompson
2015-06-23  8:25         ` Daniel Thompson
2015-06-10 20:09   ` [PATCH v3 3/3] ARM: dts: stm32f429: Adopt STM32F4 clock driver Daniel Thompson
2015-06-10 20:09     ` Daniel Thompson
2015-07-07  9:38     ` Maxime Coquelin
2015-07-07  9:38       ` Maxime Coquelin
2015-07-07  9:38       ` Maxime Coquelin
2015-06-22 22:48   ` [PATCH v3 0/3] clk: stm32: Add clock driver for STM32F4[23]xxx devices Stephen Boyd
2015-06-22 22:48     ` Stephen Boyd
2015-06-22 22:48     ` Stephen Boyd
2015-06-22 22:48     ` Stephen Boyd
2015-06-23  8:22     ` Daniel Thompson
2015-06-23  8:22       ` Daniel Thompson
2015-06-23  8:22       ` Daniel Thompson
2015-06-23  9:24       ` Maxime Coquelin
2015-06-23  9:24         ` Maxime Coquelin
2015-06-23  9:24         ` Maxime Coquelin

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=1432972448-10332-3-git-send-email-daniel.thompson@linaro.org \
    --to=daniel.thompson@linaro.org \
    --cc=afaerber@suse.de \
    --cc=devicetree@vger.kernel.org \
    --cc=galak@codeaurora.org \
    --cc=ijc+devicetree@hellion.org.uk \
    --cc=linaro-kernel@lists.linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@arm.linux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=mturquette@linaro.org \
    --cc=patches@linaro.org \
    --cc=pawel.moll@arm.com \
    --cc=rev13@wp.pl \
    --cc=robh+dt@kernel.org \
    --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.