diff options
| author | Gabriel Fernandez <gabriel.fernandez@st.com> | 2018-03-08 11:53:54 -0500 |
|---|---|---|
| committer | Michael Turquette <mturquette@baylibre.com> | 2018-03-11 18:40:32 -0400 |
| commit | 605add0c7bbf5ecb9eeef02c605e47dfd2980acb (patch) | |
| tree | 05c576d3ac592a54748844c0e161c59018badb04 /Documentation/devicetree | |
| parent | 7928b2cbe55b2a410a0f5c1f154610059c57b1b2 (diff) | |
dt-bindings: Document STM32MP1 Reset Clock Controller (RCC) bindings
The RCC block is responsible of the management of the clock and reset
generation for the complete circuit.
Signed-off-by: Gabriel Fernandez <gabriel.fernandez@st.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Michael Turquette <mturquette@baylibre.com>
Diffstat (limited to 'Documentation/devicetree')
| -rw-r--r-- | Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt | 60 |
1 files changed, 60 insertions, 0 deletions
diff --git a/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt new file mode 100644 index 000000000000..fb9495ea582c --- /dev/null +++ b/Documentation/devicetree/bindings/clock/st,stm32mp1-rcc.txt | |||
| @@ -0,0 +1,60 @@ | |||
| 1 | STMicroelectronics STM32 Peripheral Reset Clock Controller | ||
| 2 | ========================================================== | ||
| 3 | |||
| 4 | The RCC IP is both a reset and a clock controller. | ||
| 5 | |||
| 6 | RCC makes also power management (resume/supend and wakeup interrupt). | ||
| 7 | |||
| 8 | Please also refer to reset.txt for common reset controller binding usage. | ||
| 9 | |||
| 10 | Please also refer to clock-bindings.txt for common clock controller | ||
| 11 | binding usage. | ||
| 12 | |||
| 13 | |||
| 14 | Required properties: | ||
| 15 | - compatible: "st,stm32mp1-rcc", "syscon" | ||
| 16 | - reg: should be register base and length as documented in the datasheet | ||
| 17 | - #clock-cells: 1, device nodes should specify the clock in their | ||
| 18 | "clocks" property, containing a phandle to the clock device node, | ||
| 19 | an index specifying the clock to use. | ||
| 20 | - #reset-cells: Shall be 1 | ||
| 21 | - interrupts: Should contain a general interrupt line and a interrupt line | ||
| 22 | to the wake-up of processor (CSTOP). | ||
| 23 | |||
| 24 | Example: | ||
| 25 | rcc: rcc@50000000 { | ||
| 26 | compatible = "st,stm32mp1-rcc", "syscon"; | ||
| 27 | reg = <0x50000000 0x1000>; | ||
| 28 | #clock-cells = <1>; | ||
| 29 | #reset-cells = <1>; | ||
| 30 | interrupts = <GIC_SPI 5 IRQ_TYPE_NONE>, | ||
| 31 | <GIC_SPI 145 IRQ_TYPE_NONE>; | ||
| 32 | }; | ||
| 33 | |||
| 34 | Specifying clocks | ||
| 35 | ================= | ||
| 36 | |||
| 37 | All available clocks are defined as preprocessor macros in | ||
| 38 | dt-bindings/clock/stm32mp1-clks.h header and can be used in device | ||
| 39 | tree sources. | ||
| 40 | |||
| 41 | Specifying softreset control of devices | ||
| 42 | ======================================= | ||
| 43 | |||
| 44 | Device nodes should specify the reset channel required in their "resets" | ||
| 45 | property, containing a phandle to the reset device node and an index specifying | ||
| 46 | which channel to use. | ||
| 47 | The index is the bit number within the RCC registers bank, starting from RCC | ||
| 48 | base address. | ||
| 49 | It is calculated as: index = register_offset / 4 * 32 + bit_offset. | ||
| 50 | Where bit_offset is the bit offset within the register. | ||
| 51 | |||
| 52 | For example on STM32MP1, for LTDC reset: | ||
| 53 | ltdc = APB4_RSTSETR_offset / 4 * 32 + LTDC_bit_offset | ||
| 54 | = 0x180 / 4 * 32 + 0 = 3072 | ||
| 55 | |||
| 56 | The list of valid indices for STM32MP1 is available in: | ||
| 57 | include/dt-bindings/reset-controller/stm32mp1-resets.h | ||
| 58 | |||
| 59 | This file implements defines like: | ||
| 60 | #define LTDC_R 3072 | ||
