xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/clock/imx7ulp-pcc-clock.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/clock/imx7ulp-pcc-clock.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: Clock bindings for Freescale i.MX7ULP Peripheral Clock Control (PCC) modules
8*4882a593Smuzhiyun
9*4882a593Smuzhiyunmaintainers:
10*4882a593Smuzhiyun  - A.s. Dong <aisheng.dong@nxp.com>
11*4882a593Smuzhiyun
12*4882a593Smuzhiyundescription: |
13*4882a593Smuzhiyun  i.MX7ULP Clock functions are under joint control of the System
14*4882a593Smuzhiyun  Clock Generation (SCG) modules, Peripheral Clock Control (PCC)
15*4882a593Smuzhiyun  modules, and Core Mode Controller (CMC)1 blocks
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun  The clocking scheme provides clear separation between M4 domain
18*4882a593Smuzhiyun  and A7 domain. Except for a few clock sources shared between two
19*4882a593Smuzhiyun  domains, such as the System Oscillator clock, the Slow IRC (SIRC),
20*4882a593Smuzhiyun  and and the Fast IRC clock (FIRCLK), clock sources and clock
21*4882a593Smuzhiyun  management are separated and contained within each domain.
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun  M4 clock management consists of SCG0, PCC0, PCC1, and CMC0 modules.
24*4882a593Smuzhiyun  A7 clock management consists of SCG1, PCC2, PCC3, and CMC1 modules.
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun  Note: this binding doc is only for A7 clock domain.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun  The Peripheral Clock Control (PCC) is responsible for clock selection,
29*4882a593Smuzhiyun  optional division and clock gating mode for peripherals in their
30*4882a593Smuzhiyun  respected power domain.
31*4882a593Smuzhiyun
32*4882a593Smuzhiyun  The clock consumer should specify the desired clock by having the clock
33*4882a593Smuzhiyun  ID in its "clocks" phandle cell.
34*4882a593Smuzhiyun  See include/dt-bindings/clock/imx7ulp-clock.h for the full list of
35*4882a593Smuzhiyun  i.MX7ULP clock IDs of each module.
36*4882a593Smuzhiyun
37*4882a593Smuzhiyunproperties:
38*4882a593Smuzhiyun  compatible:
39*4882a593Smuzhiyun    enum:
40*4882a593Smuzhiyun      - fsl,imx7ulp-pcc2
41*4882a593Smuzhiyun      - fsl,imx7ulp-pcc3
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun  reg:
44*4882a593Smuzhiyun    maxItems: 1
45*4882a593Smuzhiyun
46*4882a593Smuzhiyun  '#clock-cells':
47*4882a593Smuzhiyun    const: 1
48*4882a593Smuzhiyun
49*4882a593Smuzhiyun  clocks:
50*4882a593Smuzhiyun    items:
51*4882a593Smuzhiyun      - description: nic1 bus clock
52*4882a593Smuzhiyun      - description: nic1 clock
53*4882a593Smuzhiyun      - description: ddr clock
54*4882a593Smuzhiyun      - description: apll pfd2
55*4882a593Smuzhiyun      - description: apll pfd1
56*4882a593Smuzhiyun      - description: apll pfd0
57*4882a593Smuzhiyun      - description: usb pll
58*4882a593Smuzhiyun      - description: system osc bus clock
59*4882a593Smuzhiyun      - description: fast internal reference clock bus
60*4882a593Smuzhiyun      - description: rtc osc
61*4882a593Smuzhiyun      - description: system pll bus clock
62*4882a593Smuzhiyun
63*4882a593Smuzhiyun  clock-names:
64*4882a593Smuzhiyun    items:
65*4882a593Smuzhiyun      - const: nic1_bus_clk
66*4882a593Smuzhiyun      - const: nic1_clk
67*4882a593Smuzhiyun      - const: ddr_clk
68*4882a593Smuzhiyun      - const: apll_pfd2
69*4882a593Smuzhiyun      - const: apll_pfd1
70*4882a593Smuzhiyun      - const: apll_pfd0
71*4882a593Smuzhiyun      - const: upll
72*4882a593Smuzhiyun      - const: sosc_bus_clk
73*4882a593Smuzhiyun      - const: firc_bus_clk
74*4882a593Smuzhiyun      - const: rosc
75*4882a593Smuzhiyun      - const: spll_bus_clk
76*4882a593Smuzhiyun
77*4882a593Smuzhiyunrequired:
78*4882a593Smuzhiyun  - compatible
79*4882a593Smuzhiyun  - reg
80*4882a593Smuzhiyun  - '#clock-cells'
81*4882a593Smuzhiyun  - clocks
82*4882a593Smuzhiyun  - clock-names
83*4882a593Smuzhiyun
84*4882a593SmuzhiyunadditionalProperties: false
85*4882a593Smuzhiyun
86*4882a593Smuzhiyunexamples:
87*4882a593Smuzhiyun  - |
88*4882a593Smuzhiyun    #include <dt-bindings/clock/imx7ulp-clock.h>
89*4882a593Smuzhiyun    #include <dt-bindings/interrupt-controller/arm-gic.h>
90*4882a593Smuzhiyun
91*4882a593Smuzhiyun    clock-controller@403f0000 {
92*4882a593Smuzhiyun        compatible = "fsl,imx7ulp-pcc2";
93*4882a593Smuzhiyun        reg = <0x403f0000 0x10000>;
94*4882a593Smuzhiyun        #clock-cells = <1>;
95*4882a593Smuzhiyun        clocks = <&scg1 IMX7ULP_CLK_NIC1_BUS_DIV>,
96*4882a593Smuzhiyun                 <&scg1 IMX7ULP_CLK_NIC1_DIV>,
97*4882a593Smuzhiyun                 <&scg1 IMX7ULP_CLK_DDR_DIV>,
98*4882a593Smuzhiyun                 <&scg1 IMX7ULP_CLK_APLL_PFD2>,
99*4882a593Smuzhiyun                 <&scg1 IMX7ULP_CLK_APLL_PFD1>,
100*4882a593Smuzhiyun                 <&scg1 IMX7ULP_CLK_APLL_PFD0>,
101*4882a593Smuzhiyun                 <&scg1 IMX7ULP_CLK_UPLL>,
102*4882a593Smuzhiyun                 <&scg1 IMX7ULP_CLK_SOSC_BUS_CLK>,
103*4882a593Smuzhiyun                 <&scg1 IMX7ULP_CLK_FIRC_BUS_CLK>,
104*4882a593Smuzhiyun                 <&scg1 IMX7ULP_CLK_ROSC>,
105*4882a593Smuzhiyun                 <&scg1 IMX7ULP_CLK_SPLL_BUS_CLK>;
106*4882a593Smuzhiyun         clock-names = "nic1_bus_clk", "nic1_clk", "ddr_clk",
107*4882a593Smuzhiyun                       "apll_pfd2", "apll_pfd1", "apll_pfd0",
108*4882a593Smuzhiyun                       "upll", "sosc_bus_clk", "firc_bus_clk",
109*4882a593Smuzhiyun                       "rosc", "spll_bus_clk";
110*4882a593Smuzhiyun    };
111*4882a593Smuzhiyun
112*4882a593Smuzhiyun    mmc@40380000 {
113*4882a593Smuzhiyun        compatible = "fsl,imx7ulp-usdhc";
114*4882a593Smuzhiyun        reg = <0x40380000 0x10000>;
115*4882a593Smuzhiyun        interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
116*4882a593Smuzhiyun        clocks = <&scg1 IMX7ULP_CLK_NIC1_BUS_DIV>,
117*4882a593Smuzhiyun                 <&scg1 IMX7ULP_CLK_NIC1_DIV>,
118*4882a593Smuzhiyun                 <&pcc2 IMX7ULP_CLK_USDHC1>;
119*4882a593Smuzhiyun        clock-names ="ipg", "ahb", "per";
120*4882a593Smuzhiyun        bus-width = <4>;
121*4882a593Smuzhiyun    };
122