18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
28c2ecf20Sopenharmony_ci%YAML 1.2
38c2ecf20Sopenharmony_ci---
48c2ecf20Sopenharmony_ci$id: http://devicetree.org/schemas/clock/st,stm32mp1-rcc.yaml#
58c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cititle: Reset Clock Controller Binding
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cimaintainers:
108c2ecf20Sopenharmony_ci  - Gabriel Fernandez <gabriel.fernandez@st.com>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_cidescription: |
138c2ecf20Sopenharmony_ci  The RCC IP is both a reset and a clock controller.
148c2ecf20Sopenharmony_ci  RCC makes also power management (resume/supend and wakeup interrupt).
158c2ecf20Sopenharmony_ci  Please also refer to reset.txt for common reset controller binding usage.
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci  This binding uses common clock bindings
188c2ecf20Sopenharmony_ci  Documentation/devicetree/bindings/clock/clock-bindings.txt
198c2ecf20Sopenharmony_ci
208c2ecf20Sopenharmony_ci  Specifying clocks
218c2ecf20Sopenharmony_ci  =================
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci  All available clocks are defined as preprocessor macros in
248c2ecf20Sopenharmony_ci  dt-bindings/clock/stm32mp1-clks.h header and can be used in device
258c2ecf20Sopenharmony_ci  tree sources.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ci  Specifying softreset control of devices
288c2ecf20Sopenharmony_ci  =======================================
298c2ecf20Sopenharmony_ci
308c2ecf20Sopenharmony_ci  Device nodes should specify the reset channel required in their "resets"
318c2ecf20Sopenharmony_ci  property, containing a phandle to the reset device node and an index specifying
328c2ecf20Sopenharmony_ci  which channel to use.
338c2ecf20Sopenharmony_ci  The index is the bit number within the RCC registers bank, starting from RCC
348c2ecf20Sopenharmony_ci  base address.
358c2ecf20Sopenharmony_ci  It is calculated as: index = register_offset / 4 * 32 + bit_offset.
368c2ecf20Sopenharmony_ci  Where bit_offset is the bit offset within the register.
378c2ecf20Sopenharmony_ci
388c2ecf20Sopenharmony_ci  For example on STM32MP1, for LTDC reset:
398c2ecf20Sopenharmony_ci     ltdc = APB4_RSTSETR_offset / 4 * 32 + LTDC_bit_offset
408c2ecf20Sopenharmony_ci          = 0x180 / 4 * 32 + 0 = 3072
418c2ecf20Sopenharmony_ci
428c2ecf20Sopenharmony_ci  The list of valid indices for STM32MP1 is available in:
438c2ecf20Sopenharmony_ci  include/dt-bindings/reset-controller/stm32mp1-resets.h
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci  This file implements defines like:
468c2ecf20Sopenharmony_ci  #define LTDC_R	3072
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ciproperties:
498c2ecf20Sopenharmony_ci  "#clock-cells":
508c2ecf20Sopenharmony_ci    const: 1
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ci  "#reset-cells":
538c2ecf20Sopenharmony_ci    const: 1
548c2ecf20Sopenharmony_ci
558c2ecf20Sopenharmony_ci  compatible:
568c2ecf20Sopenharmony_ci    items:
578c2ecf20Sopenharmony_ci      - const: st,stm32mp1-rcc
588c2ecf20Sopenharmony_ci      - const: syscon
598c2ecf20Sopenharmony_ci
608c2ecf20Sopenharmony_ci  reg:
618c2ecf20Sopenharmony_ci    maxItems: 1
628c2ecf20Sopenharmony_ci
638c2ecf20Sopenharmony_cirequired:
648c2ecf20Sopenharmony_ci  - "#clock-cells"
658c2ecf20Sopenharmony_ci  - "#reset-cells"
668c2ecf20Sopenharmony_ci  - compatible
678c2ecf20Sopenharmony_ci  - reg
688c2ecf20Sopenharmony_ci
698c2ecf20Sopenharmony_ciadditionalProperties: false
708c2ecf20Sopenharmony_ci
718c2ecf20Sopenharmony_ciexamples:
728c2ecf20Sopenharmony_ci  - |
738c2ecf20Sopenharmony_ci    rcc: rcc@50000000 {
748c2ecf20Sopenharmony_ci        compatible = "st,stm32mp1-rcc", "syscon";
758c2ecf20Sopenharmony_ci        reg = <0x50000000 0x1000>;
768c2ecf20Sopenharmony_ci        #clock-cells = <1>;
778c2ecf20Sopenharmony_ci        #reset-cells = <1>;
788c2ecf20Sopenharmony_ci    };
798c2ecf20Sopenharmony_ci...
80