st,stm32h7-rcc.txt 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. STMicroelectronics STM32H7 Reset and Clock Controller
  2. =====================================================
  3. The RCC IP is both a reset and a clock controller.
  4. Please refer to clock-bindings.txt for common clock controller binding usage.
  5. Please also refer to reset.txt for common reset controller binding usage.
  6. Required properties:
  7. - compatible: Should be:
  8. "st,stm32h743-rcc"
  9. - reg: should be register base and length as documented in the
  10. datasheet
  11. - #reset-cells: 1, see below
  12. - #clock-cells : from common clock binding; shall be set to 1
  13. - clocks: External oscillator clock phandle
  14. - high speed external clock signal (HSE)
  15. - low speed external clock signal (LSE)
  16. - external I2S clock (I2S_CKIN)
  17. Optional properties:
  18. - st,syscfg: phandle for pwrcfg, mandatory to disable/enable backup domain
  19. write protection (RTC clock).
  20. Example:
  21. rcc: reset-clock-controller@58024400 {
  22. compatible = "st,stm32h743-rcc", "st,stm32-rcc";
  23. reg = <0x58024400 0x400>;
  24. #reset-cells = <1>;
  25. #clock-cells = <1>;
  26. clocks = <&clk_hse>, <&clk_lse>, <&clk_i2s_ckin>;
  27. st,syscfg = <&pwrcfg>;
  28. };
  29. The peripheral clock consumer should specify the desired clock by
  30. having the clock ID in its "clocks" phandle cell.
  31. Example:
  32. timer5: timer@40000c00 {
  33. compatible = "st,stm32-timer";
  34. reg = <0x40000c00 0x400>;
  35. interrupts = <50>;
  36. clocks = <&rcc TIM5_CK>;
  37. };
  38. Specifying softreset control of devices
  39. =======================================
  40. Device nodes should specify the reset channel required in their "resets"
  41. property, containing a phandle to the reset device node and an index specifying
  42. which channel to use.
  43. The index is the bit number within the RCC registers bank, starting from RCC
  44. base address.
  45. It is calculated as: index = register_offset / 4 * 32 + bit_offset.
  46. Where bit_offset is the bit offset within the register.
  47. For example, for CRC reset:
  48. crc = AHB4RSTR_offset / 4 * 32 + CRCRST_bit_offset = 0x88 / 4 * 32 + 19 = 1107
  49. Example:
  50. timer2 {
  51. resets = <&rcc STM32H7_APB1L_RESET(TIM2)>;
  52. };