summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/clock/ti/ti,gate-clock.yaml
blob: eaa727ab0d7fb609a86afc17d5ac6474fce091bc (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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
# SPDX-License-Identifier: GPL-2.0-only
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/ti/ti,gate-clock.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Texas Instruments gate clock

maintainers:
  - Tero Kristo <kristo@kernel.org>

description: |
  *Deprecated design pattern: one node per clock*

  This clock is quite much similar to the basic gate-clock [1], however,
  it supports a number of additional features. If no register
  is provided for this clock, the code assumes that a clockdomain
  will be controlled instead and the corresponding hw-ops for
  that is used.

  [1] Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
  [2] Documentation/devicetree/bindings/clock/ti/clockdomain.txt

properties:
  compatible:
    enum:
      - ti,gate-clock           # basic gate clock
      - ti,wait-gate-clock      # gate clock which waits until clock is
                                # active before returning from clk_enable()
      - ti,dss-gate-clock       # gate clock with DSS specific hardware
                                # handling
      - ti,am35xx-gate-clock    # gate clock with AM35xx specific hardware
                                # handling
      - ti,clkdm-gate-clock     # clockdomain gate clock, which derives its
                                # functional clock directly from a
                                # clockdomain, see [2] how to map
                                # clockdomains properly
      - ti,hsdiv-gate-clock     # gate clock with OMAP36xx specific hardware
                                # handling, required for a hardware errata
      - ti,composite-gate-clock # composite gate clock, to be part of
                                # composite clock
      - ti,composite-no-wait-gate-clock # composite gate clock that does not
                                        # wait for clock to be active before
                                        # returning from clk_enable()
  "#clock-cells":
    const: 0

  clocks: true

  clock-output-names:
    maxItems: 1

  reg:
    maxItems: 1

  ti,bit-shift:
    $ref: /schemas/types.yaml#/definitions/uint32
    description:
      Number of bits to shift the bit-mask
    maximum: 31
    default: 0

  ti,set-bit-to-disable:
    type: boolean
    description:
      Inverts default gate programming. Setting the bit
      gates the clock and clearing the bit ungates the clock.

  ti,set-rate-parent:
    type: boolean
    description:
      clk_set_rate is propagated to parent clock,

if:
  properties:
    compatible:
      contains:
        const: ti,clkdm-gate-clock
then:
  properties:
    reg: false
  required:
    - compatible
    - "#clock-cells"
    - clocks
else:
  required:
    - compatible
    - "#clock-cells"
    - clocks
    - reg

additionalProperties: false

examples:
  - |
    bus {
      #address-cells = <1>;
      #size-cells = <0>;

      clock-controller@a00 {
        #clock-cells = <0>;
        compatible = "ti,gate-clock";
        clocks = <&core_96m_fck>;
        reg = <0x0a00>;
        ti,bit-shift = <25>;
      };

      clock-controller@d00 {
        compatible = "ti,hsdiv-gate-clock";
        reg = <0x0d00>;
        #clock-cells = <0>;
        clocks = <&dpll4_m2x2_mul_ck>;
        ti,bit-shift = <0x1b>;
        ti,set-bit-to-disable;
      };
    };

  - |
    clock-controller {
      #clock-cells = <0>;
      compatible = "ti,clkdm-gate-clock";
      clocks = <&emu_src_mux_ck>;
    };