summaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/clock/st,stm32h7-rcc.txt
blob: a135504c7d57148b938285919130d8dfc8fa18d3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
STMicroelectronics STM32H7 Reset and Clock Controller
=====================================================

The RCC IP is both a reset and a clock controller.

Please refer to clock-bindings.txt for common clock controller binding usage.
Please also refer to reset.txt for common reset controller binding usage.

Required properties:
- compatible: Should be:
  "st,stm32h743-rcc"

- reg: should be register base and length as documented in the
  datasheet

- #reset-cells: 1, see below

- #clock-cells : from common clock binding; shall be set to 1

- clocks: External oscillator clock phandle
  - high speed external clock signal (HSE)
  - low speed external clock signal (LSE)
  - external I2S clock (I2S_CKIN)

Optional properties:
- st,syscfg: phandle for pwrcfg, mandatory to disable/enable backup domain
  write protection (RTC clock).

Example:

	rcc: reset-clock-controller@58024400 {
		compatible = "st,stm32h743-rcc", "st,stm32-rcc";
		reg = <0x58024400 0x400>;
		#reset-cells = <1>;
		#clock-cells = <2>;
		clocks = <&clk_hse>, <&clk_lse>, <&clk_i2s_ckin>;

		st,syscfg = <&pwrcfg>;
};

The peripheral clock consumer should specify the desired clock by
having the clock ID in its "clocks" phandle cell.

Example:

		timer5: timer@40000c00 {
			compatible = "st,stm32-timer";
			reg = <0x40000c00 0x400>;
			interrupts = <50>;
			clocks = <&rcc TIM5_CK>;
		};

Specifying softreset control of devices
=======================================

Device nodes should specify the reset channel required in their "resets"
property, containing a phandle to the reset device node and an index specifying
which channel to use.
The index is the bit number within the RCC registers bank, starting from RCC
base address.
It is calculated as: index = register_offset / 4 * 32 + bit_offset.
Where bit_offset is the bit offset within the register.

For example, for CRC reset:
  crc = AHB4RSTR_offset / 4 * 32 + CRCRST_bit_offset = 0x88 / 4 * 32 + 19 = 1107

Example:

	timer2 {
		resets	= <&rcc STM32H7_APB1L_RESET(TIM2)>;
	};