From: James Hogan <james.hogan@imgtec.com>
To: Mike Turquette <mturquette@linaro.org>,
linux-metag@vger.kernel.org, linux-kernel@vger.kernel.org,
devicetree@vger.kernel.org
Cc: Heiko Stuebner <heiko@sntech.de>,
James Hogan <james.hogan@imgtec.com>,
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>
Subject: [PATCH v2 13/16] dt: binding: add binding for TZ1090 PERIP clocks
Date: Mon, 1 Dec 2014 23:20:03 +0000 [thread overview]
Message-ID: <1417476006-10407-14-git-send-email-james.hogan@imgtec.com> (raw)
In-Reply-To: <1417476006-10407-1-git-send-email-james.hogan@imgtec.com>
The TZ1090 peripheral (PERIP) register region controls a bank of system
clock gates for individual peripherals.
Create a clock binding for the provider of these clocks, and a header
file in <dt-bindings/clock/> for enumerating the provided clocks.
There is a single input clock, the main system clock, and multiple
peripheral specific system clocks provided which should be referenced by
the relevant peripheral device nodes.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Mike Turquette <mturquette@linaro.org>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Pawel Moll <pawel.moll@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Cc: Ian Campbell <ijc+devicetree@hellion.org.uk>
Cc: Kumar Gala <galak@codeaurora.org>
Cc: linux-metag@vger.kernel.org
Cc: devicetree@vger.kernel.org
---
Changes since v1 (patch 15):
- New patch.
- Convert explicit DT representation of clock infrastructure using
generic bindings to several TZ1090 specific bindings representing
groups of TZ1090 clocks.
---
.../bindings/clock/img,tz1090-perip-cru.txt | 49 ++++++++++++++++++++++
include/dt-bindings/clock/tz1090-perip.h | 30 +++++++++++++
2 files changed, 79 insertions(+)
create mode 100644 Documentation/devicetree/bindings/clock/img,tz1090-perip-cru.txt
create mode 100644 include/dt-bindings/clock/tz1090-perip.h
diff --git a/Documentation/devicetree/bindings/clock/img,tz1090-perip-cru.txt b/Documentation/devicetree/bindings/clock/img,tz1090-perip-cru.txt
new file mode 100644
index 0000000..3517737
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/img,tz1090-perip-cru.txt
@@ -0,0 +1,49 @@
+Binding for TZ1090 Peripheral register clocks.
+
+This binding uses the common clock binding[1]. It represents the clocks
+controlled from the peripheral registers of the TZ1090:
+
+[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
+
+Required properties:
+- compatible : Shall be "img,tz1090-perip-cru".
+- #clock-cells : From common clock binding; shall be set to 1.
+- reg : Base address for clock registers in peripheral register
+ region.
+- clocks : Clock specifiers for each input clock.
+- clock-names : Labels for each input clock specified in clocks.
+ Can contain the following entries:
+ "sys" : Main system clock.
+
+Optional properties:
+- clock-indices : From common clock binding. Allows clock-output-names to
+ be sparse.
+- clock-output-names : From common clock binding. May be used to name specific
+ output clocks so that other clock providers can find
+ the clocks by name before the provider has been
+ instantiated. Can contain:
+ "sys_scb0", "sys_scb1", "sys_scb2", "sys_sdio",
+ "sys_uart0", "sys_uart1", "sys_spim", "sys_spis",
+ "sys_spim1", "sys_i2sout", "sys_i2sin", "sys_lcd",
+ "sys_sdhost", "sys_usb"
+
+Clock Specifier Definition:
+- <1st-cell>: Output clock number. Use constants from
+ <dt-bindings/clock/tz1090-perip.h>.
+
+Examples:
+ perip_cru: perip_cru {
+ compatible = "img,tz1090-perip-cru";
+ #clock-cells = <1>;
+ reg = <0x02004000 0x18>;
+ clocks = <&top_clks CLK_TOP_SYS>;
+ clock-names = "sys";
+ };
+
+ i2c {
+ ...
+ clocks = <&top_clks CLK_TOP_SCB>,
+ <&perip_cru CLK_PERIP_SCB0>;
+ clock-names = "scb", "sys";
+ ...
+ };
diff --git a/include/dt-bindings/clock/tz1090-perip.h b/include/dt-bindings/clock/tz1090-perip.h
new file mode 100644
index 0000000..b2990ea
--- /dev/null
+++ b/include/dt-bindings/clock/tz1090-perip.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright (C) 2013-2014 Imagination Technologies Ltd.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2 as
+ * published by the Free Software Foundation.
+ */
+
+#ifndef _DT_BINDINGS_CLK_TZ1090_PERIP_H
+#define _DT_BINDINGS_CLK_TZ1090_PERIP_H
+
+/* CR_PERIP_CLKEN - Peripheral system clocks */
+#define CLK_PERIP_SCB0 0
+#define CLK_PERIP_SCB1 1
+#define CLK_PERIP_SCB2 2
+#define CLK_PERIP_SDIO 3
+#define CLK_PERIP_UART0 4
+#define CLK_PERIP_UART1 5
+#define CLK_PERIP_SPIM 6
+#define CLK_PERIP_SPIS 7
+#define CLK_PERIP_SPIM1 8
+#define CLK_PERIP_I2SOUT 9
+#define CLK_PERIP_I2SIN 10
+#define CLK_PERIP_LCD 11
+#define CLK_PERIP_SDHOST 12
+#define CLK_PERIP_USB 13
+
+#define CLK_PERIP_MAX 14
+
+#endif
--
2.0.4
next prev parent reply other threads:[~2014-12-01 23:21 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-01 23:19 [PATCH v2 00/16] tz1090: add clock components James Hogan
2014-12-01 23:19 ` [PATCH v2 01/16] clk: tz1090: add clock provider common code James Hogan
2014-12-01 23:19 ` [PATCH v2 02/16] clk: tz1090: add gate bank clock driver James Hogan
2014-12-01 23:19 ` [PATCH v2 03/16] clk: tz1090: add mux " James Hogan
2014-12-01 23:19 ` [PATCH v2 04/16] clk: tz1090: add deleter " James Hogan
2014-12-01 23:19 ` [PATCH v2 05/16] clk: tz1090: add divider " James Hogan
2014-12-01 23:19 ` [PATCH v2 06/16] clk: tz1090: add PLL " James Hogan
2014-12-01 23:19 ` [PATCH v2 07/16] dt: binding: add binding for TZ1090 PDC clocks James Hogan
2014-12-01 23:19 ` [PATCH v2 08/16] clk: tz1090: add PDC clock provider driver James Hogan
2014-12-01 23:19 ` [PATCH v2 09/16] dt: binding: add binding for TZ1090 TOP clocks James Hogan
2014-12-01 23:20 ` [PATCH v2 10/16] clk: tz1090: add TOP clock provider driver James Hogan
2014-12-01 23:20 ` [PATCH v2 11/16] dt: binding: add binding for TZ1090 HEP clocks James Hogan
2014-12-01 23:20 ` [PATCH v2 12/16] clk: tz1090: add HEP clock provider driver James Hogan
2014-12-01 23:20 ` James Hogan [this message]
2014-12-01 23:20 ` [PATCH v2 14/16] clk: tz1090: add PERIP " James Hogan
2014-12-01 23:20 ` [PATCH v2 15/16] metag: tz1090: add TZ1090 clocks to device tree James Hogan
2014-12-01 23:20 ` [PATCH v2 16/16] metag: tz1090: connect Meta core clock James Hogan
2015-01-09 15:10 ` [PATCH v2 00/16] tz1090: add clock components James Hogan
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=1417476006-10407-14-git-send-email-james.hogan@imgtec.com \
--to=james.hogan@imgtec.com \
--cc=devicetree@vger.kernel.org \
--cc=galak@codeaurora.org \
--cc=heiko@sntech.de \
--cc=ijc+devicetree@hellion.org.uk \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-metag@vger.kernel.org \
--cc=mark.rutland@arm.com \
--cc=mturquette@linaro.org \
--cc=pawel.moll@arm.com \
--cc=robh+dt@kernel.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
all inboxes | Powered by JetHome®