← Documents Documentation/devicetree/bindings/timer/sprd,sc9860-timer.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Timer

Spreadtrum SC9860 Timer

SC9860 일반·suspend timer의 counter mode와 interrupt 조건을 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

sprd,sc9860-timer.yaml:1-68

SC9860 일반·suspend timer의 counter mode와 interrupt 조건을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며 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/sprd,sc9860-timer.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Spreadtrum SC9860 timer
8
9 maintainers:
10 - Orson Zhai <[email protected]>
11 - Baolin Wang <[email protected]>
12 - Chunyan Zhang <[email protected]>
13
14 description:
15 The Spreadtrum SC9860 platform provides 3 general-purpose timers.
16 These timers can support 32bit or 64bit counter, as well as supporting
17 period mode or one-shot mode, and they can be a wakeup source
18 during deep sleep.
19
20 properties:
21 compatible:
22 enum:
23 - sprd,sc9860-timer
24 - sprd,sc9860-suspend-timer
25
26 reg:
27 maxItems: 1
28
29 interrupts:
30 maxItems: 1
31
32 clocks:
33 maxItems: 1
34
35 required:
36 - compatible
37 - reg
38 - clocks
39
40 allOf:
41 - if:
42 properties:
43 compatible:
44 contains:
45 const: sprd,sc9860-timer
46 then:
47 required:
48 - interrupts
49
50 additionalProperties: false
51
52 examples:
53 - |
54 #include <dt-bindings/interrupt-controller/arm-gic.h>
55 #include <dt-bindings/interrupt-controller/irq.h>
56
57 soc {
58 #address-cells = <2>;
59 #size-cells = <2>;
60
61 timer@40050000 {
62 compatible = "sprd,sc9860-timer";
63 reg = <0 0x40050000 0 0x20>;
64 interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
65 clocks = <&ext_32k>;
66 };
67 };
68 ...
69

3. 한국어 전문 번역

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

Spreadtrum SC9860 timer

1-19

GPL-2.0-only 또는 BSD-2-Clause 라이선스의 이 스키마는 Spreadtrum SC9860 timer를 정의합니다. SC9860 platform은 general-purpose timer 세 개를 제공합니다. 각 timer는 32-bit 또는 64-bit counter, periodic mode 또는 one-shot mode를 지원하며 deep sleep 중 wakeup source로도 사용할 수 있습니다. Maintainer는 Orson Zhai, Baolin Wang, Chunyan Zhang입니다.

일반 timer와 suspend timer

20-39

`compatible`은 `sprd,sc9860-timer` 또는 `sprd,sc9860-suspend-timer`입니다. `reg`, `interrupts`, `clocks`는 각각 최대 한 항목입니다. 공통 필수 속성은 `compatible`, `reg`, `clocks`입니다.

properties:
  compatible:
    enum:
      - sprd,sc9860-timer
      - sprd,sc9860-suspend-timer

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    maxItems: 1

required:
  - compatible
  - reg
  - clocks

일반 timer의 interrupt 필수 조건

40-50

`compatible`에 `sprd,sc9860-timer`가 포함되면 `interrupts`도 필수입니다. Suspend timer에는 이 조건이 적용되지 않습니다. 정의되지 않은 추가 속성은 허용하지 않습니다.

allOf:
  - if:
      properties:
        compatible:
          contains:
            const: sprd,sc9860-timer
    then:
      required:
        - interrupts

additionalProperties: false

32 kHz 일반 timer 예제

51-68

예제는 ARM GIC와 IRQ binding을 포함하고 64-bit address·size cell을 사용하는 `soc` 아래에 `timer@40050000`을 둡니다. 이 일반 timer는 0x20-byte register 영역, GIC SPI 26 level-high interrupt, `ext_32k` clock을 사용합니다.

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>

    soc {
      #address-cells = <2>;
      #size-cells = <2>;

      timer@40050000 {
        compatible = "sprd,sc9860-timer";
        reg = <0 0x40050000 0 0x20>;
        interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&ext_32k>;
      };
    };
...