diff options
-rw-r--r-- | Documentation/devicetree/bindings/clock/st,stm32-rcc.txt | 17 | ||||
-rw-r--r-- | include/dt-bindings/clock/stm32fx-clock.h | 39 |
2 files changed, 56 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt index 0532d815dae3..8f19d87cbf24 100644 --- a/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt +++ b/Documentation/devicetree/bindings/clock/st,stm32-rcc.txt | |||
@@ -17,6 +17,9 @@ Required properties: | |||
17 | property, containing a phandle to the clock device node, an index selecting | 17 | property, containing a phandle to the clock device node, an index selecting |
18 | between gated clocks and other clocks and an index specifying the clock to | 18 | between gated clocks and other clocks and an index specifying the clock to |
19 | use. | 19 | use. |
20 | - clocks: External oscillator clock phandle | ||
21 | - high speed external clock signal (HSE) | ||
22 | - external I2S clock (I2S_CKIN) | ||
20 | 23 | ||
21 | Example: | 24 | Example: |
22 | 25 | ||
@@ -25,6 +28,7 @@ Example: | |||
25 | #clock-cells = <2> | 28 | #clock-cells = <2> |
26 | compatible = "st,stm32f42xx-rcc", "st,stm32-rcc"; | 29 | compatible = "st,stm32f42xx-rcc", "st,stm32-rcc"; |
27 | reg = <0x40023800 0x400>; | 30 | reg = <0x40023800 0x400>; |
31 | clocks = <&clk_hse>, <&clk_i2s_ckin>; | ||
28 | }; | 32 | }; |
29 | 33 | ||
30 | Specifying gated clocks | 34 | Specifying gated clocks |
@@ -66,6 +70,19 @@ The secondary index is bound with the following magic numbers: | |||
66 | 70 | ||
67 | 0 SYSTICK | 71 | 0 SYSTICK |
68 | 1 FCLK | 72 | 1 FCLK |
73 | 2 CLK_LSI (low-power clock source) | ||
74 | 3 CLK_LSE (generated from a 32.768 kHz low-speed external | ||
75 | crystal or ceramic resonator) | ||
76 | 4 CLK_HSE_RTC (HSE division factor for RTC clock) | ||
77 | 5 CLK_RTC (real-time clock) | ||
78 | 6 PLL_VCO_I2S (vco frequency of I2S pll) | ||
79 | 7 PLL_VCO_SAI (vco frequency of SAI pll) | ||
80 | 8 CLK_LCD (LCD-TFT) | ||
81 | 9 CLK_I2S (I2S clocks) | ||
82 | 10 CLK_SAI1 (audio clocks) | ||
83 | 11 CLK_SAI2 | ||
84 | 12 CLK_I2SQ_PDIV (post divisor of pll i2s q divisor) | ||
85 | 13 CLK_SAIQ_PDIV (post divisor of pll sai q divisor) | ||
69 | 86 | ||
70 | Example: | 87 | Example: |
71 | 88 | ||
diff --git a/include/dt-bindings/clock/stm32fx-clock.h b/include/dt-bindings/clock/stm32fx-clock.h new file mode 100644 index 000000000000..08bcab61b714 --- /dev/null +++ b/include/dt-bindings/clock/stm32fx-clock.h | |||
@@ -0,0 +1,39 @@ | |||
1 | /* | ||
2 | * stm32fx-clock.h | ||
3 | * | ||
4 | * Copyright (C) 2016 STMicroelectronics | ||
5 | * Author: Gabriel Fernandez for STMicroelectronics. | ||
6 | * License terms: GNU General Public License (GPL), version 2 | ||
7 | */ | ||
8 | |||
9 | /* | ||
10 | * List of clocks wich are not derived from system clock (SYSCLOCK) | ||
11 | * | ||
12 | * The index of these clocks is the secondary index of DT bindings | ||
13 | * (see Documentatoin/devicetree/bindings/clock/st,stm32-rcc.txt) | ||
14 | * | ||
15 | * e.g: | ||
16 | <assigned-clocks = <&rcc 1 CLK_LSE>; | ||
17 | */ | ||
18 | |||
19 | #ifndef _DT_BINDINGS_CLK_STMFX_H | ||
20 | #define _DT_BINDINGS_CLK_STMFX_H | ||
21 | |||
22 | #define SYSTICK 0 | ||
23 | #define FCLK 1 | ||
24 | #define CLK_LSI 2 | ||
25 | #define CLK_LSE 3 | ||
26 | #define CLK_HSE_RTC 4 | ||
27 | #define CLK_RTC 5 | ||
28 | #define PLL_VCO_I2S 6 | ||
29 | #define PLL_VCO_SAI 7 | ||
30 | #define CLK_LCD 8 | ||
31 | #define CLK_I2S 9 | ||
32 | #define CLK_SAI1 10 | ||
33 | #define CLK_SAI2 11 | ||
34 | #define CLK_I2SQ_PDIV 12 | ||
35 | #define CLK_SAIQ_PDIV 13 | ||
36 | |||
37 | #define END_PRIMARY_CLK 14 | ||
38 | |||
39 | #endif | ||