From: heiko@sntech.de (Heiko Stübner)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH v2 06/11] dt-bindings: add documentation for rk3188 clock and reset unit
Date: Wed, 07 May 2014 23:14:10 +0200 [thread overview]
Message-ID: <2003795.Fases3iJaR@diego> (raw)
In-Reply-To: <3477211.Gkyeur83TV@diego>
This add bindings documentation for the clock and reset unit found on
rk3188 SoCs from Rockchip.
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
---
.../bindings/clock/rockchip,rk3188-cru.txt | 74 ++++++++++++++++++++++
1 file changed, 74 insertions(+)
create mode 100644 Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt
diff --git a/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt b/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt
new file mode 100644
index 0000000..8165c0c
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/rockchip,rk3188-cru.txt
@@ -0,0 +1,74 @@
+* Rockchip RK3188 Clock and Reset Unit
+
+The RK3188 clock controller generates and supplies clock to various controllers
+within the SoC and also implements a reset controller for SoC peripherals.
+There exist two variants of the rk3188 SoC, the rk3188 and rk3188a, with
+slight differences in the pll handling.
+
+Required Properties:
+
+- compatible: should be "rockchip,rk3188-cru" or "rockchip,rk3188a-cru"
+- reg: physical base address of the controller and length of memory mapped
+ region. The first element should be the cru register space and the second
+ element should be the address of the GRF_SOC_STATUS register providing the
+ pll lock status.
+- #clock-cells: should be 1.
+- #reset-cells: should be 1.
+
+- rockchip,armclk-divider-table: when the frequency of the APLL is changed
+ some core divider clocks also need to be updated. These divider clocks have
+ SoC specific divider clock output requirements for a specific APLL clock
+ speeds. When APLL clock rate is changed, these divider clocks are
+ reprogrammed with pre-determined values in order to maintain the SoC
+ specific divider clock outputs. This property lists the divider values
+ for these clocks for supported APLL clock speeds.
+ The format of each entry included in the arm-frequency-table should be
+ defined as
+
+ cell #1: arm clock parent frequency
+ cell #2 ~ cell 3#: value of clock divider of core_peri and aclk_core.
+
+- #rockchip,armclk-cells: defines the number of cells in
+ rockchip,armclk-divider-table property. The value of this property depends on
+ the SoC type. For RK3188 SoCs it should be 3.
+
+Each clock is assigned an identifier and client nodes can use this identifier
+to specify the clock which they consume. All available clocks are defined as
+preprocessor macros in dt-bindings/clock/rk3188-cru.h header and can be used
+in device tree sources.
+
+External clocks:
+
+The basic input clock is generated outside the SoC. It is expected that it is
+defined using standard clock bindings with a clock-output-name of "xin24m".
+
+Example: Clock controller node:
+
+ cru: cru at 20000000 {
+ compatible = "rockchip,rk3188-cru";
+ reg = <0x20000000 0x1000>,
+ <0x200080ac 0x4>;
+
+ #clock-cells = <1>;
+
+ #rockchip,armclk-cells = <3>;
+ rockchip,armclk-divider-table = <1608000 2 3>,
+ <1416000 2 3>,
+ <1200000 2 3>,
+ <1008000 2 3>,
+ < 816000 2 3>,
+ < 504000 1 3>,
+ < 312000 0 1>;
+ };
+
+Example: UART controller node that consumes the clock generated by the clock
+ controller:
+
+ uart0: serial at 10124000 {
+ compatible = "snps,dw-apb-uart";
+ reg = <0x10124000 0x400>;
+ interrupts = <GIC_SPI 34 IRQ_TYPE_LEVEL_HIGH>;
+ reg-shift = <2>;
+ reg-io-width = <1>;
+ clocks = <&cru SCLK_UART0>;
+ };
--
1.9.0
next prev parent reply other threads:[~2014-05-07 21:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-07 21:09 [PATCH v2 00/11] Add real clock support for Rockchip's RK3188 Heiko Stübner
2014-05-07 21:10 ` [PATCH v2 01/11] clk: divider: add CLK_DIVIDER_READ_ONLY flag Heiko Stübner
2014-05-16 23:43 ` Tomasz Figa
2014-05-07 21:11 ` [PATCH v2 02/11] clk: rockchip: add basic infrastructure Heiko Stübner
2014-05-07 21:12 ` [PATCH v2 03/11] clk: rockchip: add clock type for pll clocks and pll used on rk3066 Heiko Stübner
2014-05-07 21:12 ` [PATCH v2 04/11] clk: rockchip: add special cpu clock type Heiko Stübner
2014-05-07 21:13 ` [PATCH v2 05/11] clk: rockchip: add reset controller Heiko Stübner
2014-05-07 21:14 ` Heiko Stübner [this message]
2014-05-07 21:14 ` [PATCH v2 07/11] clk: rockchip: add clock driver for rk3188 clocks Heiko Stübner
2014-05-07 21:15 ` [PATCH v2 08/11] ARM: rockchip: Select ARCH_HAS_RESET_CONTROLLER Heiko Stübner
2014-05-07 21:15 ` [PATCH v2 09/11] ARM: dts: rk3188: add cru node and update device clocks to use it Heiko Stübner
2014-05-07 21:15 ` [PATCH v2 10/11] ARM: dts: rockchip: move rk3188 core input clocks into main dtsi Heiko Stübner
2014-05-07 21:16 ` [PATCH v2 11/11] ARM: dts: rockchip: remove the now obsolete rk3188-clocks.dtsi Heiko Stübner
2014-05-19 10:09 ` [PATCH v2 00/11] Add real clock support for Rockchip's RK3188 Max Schwarz
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=2003795.Fases3iJaR@diego \
--to=heiko@sntech.de \
--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).