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/imx7ulp-scg-clock.yaml#
58c2ecf20Sopenharmony_ci$schema: http://devicetree.org/meta-schemas/core.yaml#
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_cititle: Clock bindings for Freescale i.MX7ULP System Clock Generation (SCG) modules
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_cimaintainers:
108c2ecf20Sopenharmony_ci  - A.s. Dong <aisheng.dong@nxp.com>
118c2ecf20Sopenharmony_ci
128c2ecf20Sopenharmony_cidescription: |
138c2ecf20Sopenharmony_ci  i.MX7ULP Clock functions are under joint control of the System
148c2ecf20Sopenharmony_ci  Clock Generation (SCG) modules, Peripheral Clock Control (PCC)
158c2ecf20Sopenharmony_ci  modules, and Core Mode Controller (CMC)1 blocks
168c2ecf20Sopenharmony_ci
178c2ecf20Sopenharmony_ci  The clocking scheme provides clear separation between M4 domain
188c2ecf20Sopenharmony_ci  and A7 domain. Except for a few clock sources shared between two
198c2ecf20Sopenharmony_ci  domains, such as the System Oscillator clock, the Slow IRC (SIRC),
208c2ecf20Sopenharmony_ci  and and the Fast IRC clock (FIRCLK), clock sources and clock
218c2ecf20Sopenharmony_ci  management are separated and contained within each domain.
228c2ecf20Sopenharmony_ci
238c2ecf20Sopenharmony_ci  M4 clock management consists of SCG0, PCC0, PCC1, and CMC0 modules.
248c2ecf20Sopenharmony_ci  A7 clock management consists of SCG1, PCC2, PCC3, and CMC1 modules.
258c2ecf20Sopenharmony_ci
268c2ecf20Sopenharmony_ci  Note: this binding doc is only for A7 clock domain.
278c2ecf20Sopenharmony_ci
288c2ecf20Sopenharmony_ci  The System Clock Generation (SCG) is responsible for clock generation
298c2ecf20Sopenharmony_ci  and distribution across this device. Functions performed by the SCG
308c2ecf20Sopenharmony_ci  include: clock reference selection, generation of clock used to derive
318c2ecf20Sopenharmony_ci  processor, system, peripheral bus and external memory interface clocks,
328c2ecf20Sopenharmony_ci  source selection for peripheral clocks and control of power saving
338c2ecf20Sopenharmony_ci  clock gating mode.
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_ci  The clock consumer should specify the desired clock by having the clock
368c2ecf20Sopenharmony_ci  ID in its "clocks" phandle cell.
378c2ecf20Sopenharmony_ci  See include/dt-bindings/clock/imx7ulp-clock.h for the full list of
388c2ecf20Sopenharmony_ci  i.MX7ULP clock IDs of each module.
398c2ecf20Sopenharmony_ci
408c2ecf20Sopenharmony_ciproperties:
418c2ecf20Sopenharmony_ci  compatible:
428c2ecf20Sopenharmony_ci    const: fsl,imx7ulp-scg1
438c2ecf20Sopenharmony_ci
448c2ecf20Sopenharmony_ci  reg:
458c2ecf20Sopenharmony_ci    maxItems: 1
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci  '#clock-cells':
488c2ecf20Sopenharmony_ci    const: 1
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ci  clocks:
518c2ecf20Sopenharmony_ci    items:
528c2ecf20Sopenharmony_ci      - description: rtc osc
538c2ecf20Sopenharmony_ci      - description: system osc
548c2ecf20Sopenharmony_ci      - description: slow internal reference clock
558c2ecf20Sopenharmony_ci      - description: fast internal reference clock
568c2ecf20Sopenharmony_ci      - description: usb PLL
578c2ecf20Sopenharmony_ci
588c2ecf20Sopenharmony_ci  clock-names:
598c2ecf20Sopenharmony_ci    items:
608c2ecf20Sopenharmony_ci      - const: rosc
618c2ecf20Sopenharmony_ci      - const: sosc
628c2ecf20Sopenharmony_ci      - const: sirc
638c2ecf20Sopenharmony_ci      - const: firc
648c2ecf20Sopenharmony_ci      - const: upll
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_cirequired:
678c2ecf20Sopenharmony_ci  - compatible
688c2ecf20Sopenharmony_ci  - reg
698c2ecf20Sopenharmony_ci  - '#clock-cells'
708c2ecf20Sopenharmony_ci  - clocks
718c2ecf20Sopenharmony_ci  - clock-names
728c2ecf20Sopenharmony_ci
738c2ecf20Sopenharmony_ciadditionalProperties: false
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ciexamples:
768c2ecf20Sopenharmony_ci  - |
778c2ecf20Sopenharmony_ci    #include <dt-bindings/clock/imx7ulp-clock.h>
788c2ecf20Sopenharmony_ci    #include <dt-bindings/interrupt-controller/arm-gic.h>
798c2ecf20Sopenharmony_ci
808c2ecf20Sopenharmony_ci    clock-controller@403e0000 {
818c2ecf20Sopenharmony_ci        compatible = "fsl,imx7ulp-scg1";
828c2ecf20Sopenharmony_ci        reg = <0x403e0000 0x10000>;
838c2ecf20Sopenharmony_ci        clocks = <&rosc>, <&sosc>, <&sirc>,
848c2ecf20Sopenharmony_ci                 <&firc>, <&upll>;
858c2ecf20Sopenharmony_ci        clock-names = "rosc", "sosc", "sirc",
868c2ecf20Sopenharmony_ci                      "firc", "upll";
878c2ecf20Sopenharmony_ci        #clock-cells = <1>;
888c2ecf20Sopenharmony_ci    };
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ci    mmc@40380000 {
918c2ecf20Sopenharmony_ci        compatible = "fsl,imx7ulp-usdhc";
928c2ecf20Sopenharmony_ci        reg = <0x40380000 0x10000>;
938c2ecf20Sopenharmony_ci        interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
948c2ecf20Sopenharmony_ci        clocks = <&scg1 IMX7ULP_CLK_NIC1_BUS_DIV>,
958c2ecf20Sopenharmony_ci                 <&scg1 IMX7ULP_CLK_NIC1_DIV>,
968c2ecf20Sopenharmony_ci                 <&pcc2 IMX7ULP_CLK_USDHC1>;
978c2ecf20Sopenharmony_ci        clock-names ="ipg", "ahb", "per";
988c2ecf20Sopenharmony_ci        bus-width = <4>;
998c2ecf20Sopenharmony_ci    };
100