aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/devicetree/bindings/clock/tesla,fsd-clock.yaml
blob: dc808e2f83272a6eedd46ccec21f4c4e6e45ce96 (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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/clock/tesla,fsd-clock.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Tesla FSD (Full Self-Driving) SoC clock controller

maintainers:
  - Alim Akhtar <alim.akhtar@samsung.com>
  - linux-fsd@tesla.com

description: |
  FSD clock controller consist of several clock management unit
  (CMU), which generates clocks for various inteernal SoC blocks.
  The root clock comes from external OSC clock (24 MHz).

  All available clocks are defined as preprocessor macros in
  'dt-bindings/clock/fsd-clk.h' header.

properties:
  compatible:
    enum:
      - tesla,fsd-clock-cmu
      - tesla,fsd-clock-imem
      - tesla,fsd-clock-peric
      - tesla,fsd-clock-fsys0
      - tesla,fsd-clock-fsys1
      - tesla,fsd-clock-mfc
      - tesla,fsd-clock-cam_csi

  clocks:
    minItems: 1
    maxItems: 6

  clock-names:
    minItems: 1
    maxItems: 6

  "#clock-cells":
    const: 1

  reg:
    maxItems: 1

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: tesla,fsd-clock-cmu
    then:
      properties:
        clocks:
          items:
            - description: External reference clock (24 MHz)
        clock-names:
          items:
            - const: fin_pll

  - if:
      properties:
        compatible:
          contains:
            const: tesla,fsd-clock-imem
    then:
      properties:
        clocks:
          items:
            - description: External reference clock (24 MHz)
            - description: IMEM TCU clock (from CMU_CMU)
            - description: IMEM bus clock (from CMU_CMU)
            - description: IMEM DMA clock (from CMU_CMU)
        clock-names:
          items:
            - const: fin_pll
            - const: dout_cmu_imem_tcuclk
            - const: dout_cmu_imem_aclk
            - const: dout_cmu_imem_dmaclk

  - if:
      properties:
        compatible:
          contains:
            const: tesla,fsd-clock-peric
    then:
      properties:
        clocks:
          items:
            - description: External reference clock (24 MHz)
            - description: Shared0 PLL div4 clock (from CMU_CMU)
            - description: PERIC shared1 div36 clock (from CMU_CMU)
            - description: PERIC shared0 div3 TBU clock (from CMU_CMU)
            - description: PERIC shared0 div20 clock (from CMU_CMU)
            - description: PERIC shared1 div4 DMAclock (from CMU_CMU)
        clock-names:
          items:
            - const: fin_pll
            - const: dout_cmu_pll_shared0_div4
            - const: dout_cmu_peric_shared1div36
            - const: dout_cmu_peric_shared0div3_tbuclk
            - const: dout_cmu_peric_shared0div20
            - const: dout_cmu_peric_shared1div4_dmaclk

  - if:
      properties:
        compatible:
          contains:
            const: tesla,fsd-clock-fsys0
    then:
      properties:
        clocks:
          items:
            - description: External reference clock (24 MHz)
            - description: Shared0 PLL div6 clock (from CMU_CMU)
            - description: FSYS0 shared1 div4 clock (from CMU_CMU)
            - description: FSYS0 shared0 div4 clock (from CMU_CMU)
        clock-names:
          items:
            - const: fin_pll
            - const: dout_cmu_pll_shared0_div6
            - const: dout_cmu_fsys0_shared1div4
            - const: dout_cmu_fsys0_shared0div4

  - if:
      properties:
        compatible:
          contains:
            const: tesla,fsd-clock-fsys1
    then:
      properties:
        clocks:
          items:
            - description: External reference clock (24 MHz)
            - description: FSYS1 shared0 div8 clock (from CMU_CMU)
            - description: FSYS1 shared0 div4 clock (from CMU_CMU)
        clock-names:
          items:
            - const: fin_pll
            - const: dout_cmu_fsys1_shared0div8
            - const: dout_cmu_fsys1_shared0div4

  - if:
      properties:
        compatible:
          contains:
            const: tesla,fsd-clock-mfc
    then:
      properties:
        clocks:
          items:
            - description: External reference clock (24 MHz)
        clock-names:
          items:
            - const: fin_pll

  - if:
      properties:
        compatible:
          contains:
            const: tesla,fsd-clock-cam_csi
    then:
      properties:
        clocks:
          items:
            - description: External reference clock (24 MHz)
        clock-names:
          items:
            - const: fin_pll

required:
  - compatible
  - "#clock-cells"
  - clocks
  - clock-names
  - reg

additionalProperties: false

examples:
  # Clock controller node for CMU_FSYS1
  - |
    #include <dt-bindings/clock/fsd-clk.h>

    clock_fsys1: clock-controller@16810000 {
          compatible = "tesla,fsd-clock-fsys1";
          reg = <0x16810000 0x3000>;
          #clock-cells = <1>;

          clocks = <&fin_pll>,
                   <&clock_cmu DOUT_CMU_FSYS1_SHARED0DIV8>,
                   <&clock_cmu DOUT_CMU_FSYS1_SHARED0DIV4>;
          clock-names = "fin_pll",
                        "dout_cmu_fsys1_shared0div8",
                        "dout_cmu_fsys1_shared0div4";
    };

...