aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Thompson <daniel.thompson@linaro.org>2015-06-10 16:09:36 -0400
committerStephen Boyd <sboyd@codeaurora.org>2015-06-22 18:46:10 -0400
commit41655239eaed741ac8da066bc43c2483c78e61ec (patch)
tree221950a4486bda018384926dd8f0b777bc0f343b
parent2cd7b0432888ef2e1f8b54c1c6f8751e1e0e9b5e (diff)
dt-bindings: Document the STM32F4 clock bindings
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> Acked-by: Maxime Coquelin <maxime.coquelin@st.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org>
-rw-r--r--Documentation/devicetree/bindings/clock/st,stm32-rcc.txt65
1 files changed, 65 insertions, 0 deletions
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 000000000000..fee3205cdff9
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt
@@ -0,0 +1,65 @@
1STMicroelectronics STM32 Reset and Clock Controller
2===================================================
3
4The RCC IP is both a reset and a clock controller. This documentation only
5describes the clock part.
6
7Please also refer to clock-bindings.txt in this directory for common clock
8controller binding usage.
9
10Required properties:
11- compatible: Should be "st,stm32f42xx-rcc"
12- reg: should be register base and length as documented in the
13 datasheet
14- #clock-cells: 2, device nodes should specify the clock in their "clocks"
15 property, containing a phandle to the clock device node, an index selecting
16 between gated clocks and other clocks and an index specifying the clock to
17 use.
18
19Example:
20
21 rcc: rcc@40023800 {
22 #clock-cells = <2>
23 compatible = "st,stm32f42xx-rcc", "st,stm32-rcc";
24 reg = <0x40023800 0x400>;
25 };
26
27Specifying gated clocks
28=======================
29
30The primary index must be set to 0.
31
32The secondary index is the bit number within the RCC register bank, starting
33from the first RCC clock enable register (RCC_AHB1ENR, address offset 0x30).
34
35It is calculated as: index = register_offset / 4 * 32 + bit_offset.
36Where bit_offset is the bit offset within the register (LSB is 0, MSB is 31).
37
38Example:
39
40 /* Gated clock, AHB1 bit 0 (GPIOA) */
41 ... {
42 clocks = <&rcc 0 0>
43 };
44
45 /* Gated clock, AHB2 bit 4 (CRYP) */
46 ... {
47 clocks = <&rcc 0 36>
48 };
49
50Specifying other clocks
51=======================
52
53The primary index must be set to 1.
54
55The secondary index is bound with the following magic numbers:
56
57 0 SYSTICK
58 1 FCLK
59
60Example:
61
62 /* Misc clock, FCLK */
63 ... {
64 clocks = <&rcc 1 1>
65 };