← Documents Documentation/devicetree/bindings/timer/cdns,ttc.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Timer

Cadence Triple Timer Counter

Cadence TTC의 세 channel, 16·32-bit width와 PWM mode를 설명합니다.

Source pathDocumentation/devicetree/bindings/timer/cdns,ttc.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.

1. 요약·해설

원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.

요약과 해설

cdns,ttc.yaml:1-72

Cadence TTC의 세 channel, 16·32-bit width와 PWM mode를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며 compatible, interrupt, clock, register, phandle, 수치와 줄 좌표를 원형대로 보존합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/timer/cdns,ttc.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Cadence TTC - Triple Timer Counter
8
9 maintainers:
10 - Michal Simek <[email protected]>
11
12 properties:
13 compatible:
14 const: cdns,ttc
15
16 reg:
17 maxItems: 1
18
19 interrupts:
20 maxItems: 3
21 description: |
22 A list of 3 interrupts; one per timer channel.
23
24 clocks:
25 maxItems: 1
26
27 power-domains:
28 maxItems: 1
29
30 timer-width:
31 $ref: /schemas/types.yaml#/definitions/uint32
32 description: |
33 Bit width of the timer, necessary if not 16.
34
35 "#pwm-cells":
36 const: 3
37
38 required:
39 - compatible
40 - reg
41 - clocks
42
43 allOf:
44 - if:
45 not:
46 required:
47 - "#pwm-cells"
48 then:
49 required:
50 - interrupts
51
52 additionalProperties: false
53
54 examples:
55 - |
56 ttc0: ttc0@f8001000 {
57 interrupt-parent = <&intc>;
58 interrupts = <0 10 4>, <0 11 4>, <0 12 4>;
59 compatible = "cdns,ttc";
60 reg = <0xF8001000 0x1000>;
61 clocks = <&cpu_clk 3>;
62 timer-width = <32>;
63 };
64
65 - |
66 pwm: pwm@f8002000 {
67 compatible = "cdns,ttc";
68 reg = <0xf8002000 0x1000>;
69 clocks = <&cpu_clk 3>;
70 timer-width = <32>;
71 #pwm-cells = <3>;
72 };
73

3. 한국어 전문 번역

영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.

Cadence Triple Timer Counter

1-11

GPL-2.0-only 또는 BSD-2-Clause 라이선스의 이 스키마는 Cadence TTC, 즉 Triple Timer Counter를 정의합니다. Maintainer는 Michal Simek입니다.

세 channel, timer width와 PWM cells

12-42

`compatible`은 `cdns,ttc`, `reg`, `clocks`, `power-domains`는 각각 최대 한 항목입니다. `interrupts`는 timer channel마다 하나씩 최대 세 개입니다. `timer-width`는 기본 16-bit가 아닌 경우 필요한 timer bit width입니다. PWM provider로 사용할 때 `#pwm-cells`는 3입니다. 공통 필수 속성은 `compatible`, `reg`, `clocks`입니다.

properties:
  compatible:
    const: cdns,ttc

  reg:
    maxItems: 1

  interrupts:
    maxItems: 3
    description: |
      A list of 3 interrupts; one per timer channel.

  clocks:
    maxItems: 1

  power-domains:
    maxItems: 1

  timer-width:
    $ref: /schemas/types.yaml#/definitions/uint32
    description: |
      Bit width of the timer, necessary if not 16.

  "#pwm-cells":
    const: 3

required:
  - compatible
  - reg
  - clocks

Timer 모드의 interrupt 요구

43-53

`#pwm-cells`가 없으면 일반 timer mode이므로 `interrupts`가 반드시 필요합니다. PWM mode에서는 interrupt 요구가 적용되지 않습니다. 정의되지 않은 추가 속성은 허용되지 않습니다.

allOf:
  - if:
      not:
        required:
          - "#pwm-cells"
    then:
      required:
        - interrupts

additionalProperties: false

32-bit timer와 PWM 예제

54-72

첫 예제 `ttc0@f8001000`은 interrupt 10, 11, 12 세 개, `cpu_clk` index 3, 32-bit timer width를 지정합니다. 둘째 `pwm@f8002000`은 같은 32-bit width와 clock을 사용하고 `#pwm-cells = <3>`을 선언하며 interrupt는 생략합니다.

- |
  ttc0: ttc0@f8001000 {
      interrupt-parent = <&intc>;
      interrupts = <0 10 4>, <0 11 4>, <0 12 4>;
      compatible = "cdns,ttc";
      reg = <0xF8001000 0x1000>;
      clocks = <&cpu_clk 3>;
      timer-width = <32>;
  };

- |
  pwm: pwm@f8002000 {
      compatible = "cdns,ttc";
      reg = <0xf8002000 0x1000>;
      clocks = <&cpu_clk 3>;
      timer-width = <32>;
      #pwm-cells = <3>;
  };