devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Gerhard Sittig <gsi-ynQEQJNshbs@public.gmane.org>
To: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Cc: Gerhard Sittig <gsi-ynQEQJNshbs@public.gmane.org>,
	Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>,
	Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>,
	Ian Campbell
	<ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>
Subject: [PATCH v1 1/1] dts: bindings: add mpc5121 clocks binding document
Date: Mon,  2 Dec 2013 15:20:34 +0100	[thread overview]
Message-ID: <1385994034-2513-1-git-send-email-gsi@denx.de> (raw)
In-Reply-To: <20131202094656.GA12952-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>

add a clock bindings documentation file for Freescale MPC5121

this binding implements and uses existing common clock bindings,
it does not introduce a new binding semantics but discusses the
specific use on Freescale MPC5121 and provides examples

Cc: Rob Herring <rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org>
Cc: Pawel Moll <pawel.moll-5wv7dgnIgG8@public.gmane.org>
Cc: Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>
Cc: Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>
Cc: Ian Campbell <ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org>
Cc: devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Signed-off-by: Gerhard Sittig <gsi-ynQEQJNshbs@public.gmane.org>
---

an accompanying doc update was suggested while the feature's
implementation currently is under review, i.e. this document does not
apply to the current status but "describes the future"

sending out this doc patch now is meant to neither have to re-spin the
whole series nor to further delay the doc update submission, but to
allow for immediate review of the doc update

 .../devicetree/bindings/clock/mpc5121-clock.txt    |   95 ++++++++++++++++++++
 1 file changed, 95 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/mpc5121-clock.txt

diff --git a/Documentation/devicetree/bindings/clock/mpc5121-clock.txt b/Documentation/devicetree/bindings/clock/mpc5121-clock.txt
new file mode 100644
index 000000000000..8fbb489f6581
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/mpc5121-clock.txt
@@ -0,0 +1,95 @@
+Device Tree Clock bindings for Freescale MPC5121
+
+This binding uses the common clock binding[1] as well as the
+fixed-clock binding[2].
+
+[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
+[2] Documentation/devicetree/bindings/clock/fixed-clock.txt
+
+== Clock provider ==
+
+The MPC5121 clock control module (CCM) implements a clock provider
+with several output clocks, which in turn are input clocks to
+peripherals.
+
+The MPC5121 CCM is another clock consumer with respect to the SoC's
+crystal or oscillator input (referred to both as XTAL or OSC in the
+chip's documentation).
+
+Required properties:
+- compatible:	shall contain "fsl,mpc5121-clock"
+- reg:		shall specify the start address and length of the
+		clock module's set of control registers
+- #clock-cells:	shall be 1; defines the number of integer cells
+		required for a clock specifier which references
+		this clock provider
+
+Optional properties:
+- clocks:	list of phandle and clock specifier pairs for the
+		node's input clocks, following the common clock
+		consumers binding; should be empty, or one XTAL/OSC
+		clock reference
+- clock-names:	list of clock input name strings sorted in the same
+		order as the 'clocks' property
+
+== Clock consumers ==
+
+Peripherals specify their input clocks by referencing clock providers
+according to the common clock consumer binding.  A clock gets identified
+by a phandle and clock specifiers pair.  The number of integer cells in
+the clock specifier is a property of the clock provider.
+
+The <dt-bindings/clock/mpc512x-clock.h> file provides symbolic names
+such that consumers need not encode magic numbers into their specs.
+
+== Examples ==
+
+The following example describes a fixed rate XTAL clock.
+
+osc: osc {
+	compatible = "fixed-clock";
+	#clock-cells = <0>;
+	clock-frequency = <33000000>;
+};
+
+The following example describes the clock control module (CCM),
+referencing the above XTAL as an input, providing output clocks.
+
+clks: clock@f00 {
+	compatible = "fsl,mpc5121-clock";
+	reg = <0xf00 0x100>;
+	#clock-cells = <1>;
+	clocks = <&osc>;
+	clock-names = "osc";
+};
+
+The following examples describe peripheral nodes which reference
+CCM output clocks as their input clocks.
+
+#include <dt-bindings/clock/mpc512x-clock.h>
+
+can@1300 {
+	compatible = "fsl,mpc5121-mscan";
+	...
+	clocks = <&clks MPC512x_CLK_BDLC>,
+		 <&clks MPC512x_CLK_IPS>,
+		 <&clks MPC512x_CLK_SYS>,
+		 <&clks MPC512x_CLK_REF>,
+		 <&clks MPC512x_CLK_MSCAN0_MCLK>;
+	clock-names = "ipg", "ips", "sys", "ref", "mclk";
+};
+
+i2c@1700 {
+	compatible = "fsl,mpc5121-i2c", "fsl-i2c";
+	...
+	clocks = <&clks MPC512x_CLK_I2C>;
+	clock-names = "ipg";
+};
+
+psc@11000 {
+	compatible = "fsl,mpc5121-psc";
+	...
+	clocks = <&clks MPC512x_CLK_PSC0>,
+		 <&clks MPC512x_CLK_PSC0_MCLK>;
+	clock-names = "ipg", "mclk";
+};
-- 
1.7.10.4

--
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

  parent reply	other threads:[~2013-12-02 14:20 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-30 22:51 [PATCH v6 00/17] add COMMON_CLK support for PowerPC MPC512x Gerhard Sittig
     [not found] ` <1385851897-23475-1-git-send-email-gsi-ynQEQJNshbs@public.gmane.org>
2013-11-30 22:51   ` [PATCH v6 02/17] dts: mpc512x: introduce dt-bindings/clock/ header Gerhard Sittig
2013-12-02  9:46     ` Mark Rutland
     [not found]       ` <20131202094656.GA12952-NuALmloUBlrZROr8t4l/smS4ubULX0JqMm0uRHvK7Nw@public.gmane.org>
2013-12-02 14:20         ` Gerhard Sittig [this message]
     [not found]           ` <1385994034-2513-1-git-send-email-gsi-ynQEQJNshbs@public.gmane.org>
2013-12-02 16:55             ` [PATCH v1 1/1] dts: bindings: add mpc5121 clocks binding document Gerhard Sittig
2013-12-02 14:25         ` [PATCH v6 02/17] dts: mpc512x: introduce dt-bindings/clock/ header Gerhard Sittig
     [not found]     ` <1385851897-23475-3-git-send-email-gsi-ynQEQJNshbs@public.gmane.org>
2013-12-07  9:32       ` Anatolij Gustschin
2013-11-30 22:51   ` [PATCH v6 03/17] dts: mpc512x: add clock related device tree specs Gerhard Sittig
     [not found]     ` <1385851897-23475-4-git-send-email-gsi-ynQEQJNshbs@public.gmane.org>
2013-12-07  9:34       ` Anatolij Gustschin
2013-11-30 22:51   ` [PATCH v6 06/17] dts: mpc512x: add clock specs for client lookups Gerhard Sittig
     [not found]     ` <1385851897-23475-7-git-send-email-gsi-ynQEQJNshbs@public.gmane.org>
2013-12-07  9:41       ` Anatolij Gustschin

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=1385994034-2513-1-git-send-email-gsi@denx.de \
    --to=gsi-ynqeqjnshbs@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=ijc+devicetree-KcIKpvwj1kUDXYZnReoRVg@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=pawel.moll-5wv7dgnIgG8@public.gmane.org \
    --cc=rob.herring-bsGFqQB8/DxBDgjK7y7TUQ@public.gmane.org \
    --cc=swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.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).