← Documents Documentation/devicetree/bindings/timer/actions,owl-timer.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Timer

Actions Semi Owl Timer

Owl SoC timer의 compatible별 interrupt 개수와 S500 예제를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

actions,owl-timer.yaml:1-107

Owl SoC timer의 compatible별 interrupt 개수와 S500 예제를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며 compatible, clock, interrupt, 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/actions,owl-timer.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Actions Semi Owl timer
8
9 maintainers:
10 - Andreas Färber <[email protected]>
11
12 description:
13 Actions Semi Owl SoCs provide 32bit and 2Hz timers.
14 The 32bit timers support dynamic irq, as well as one-shot mode.
15
16 properties:
17 compatible:
18 enum:
19 - actions,s500-timer
20 - actions,s700-timer
21 - actions,s900-timer
22
23 clocks:
24 maxItems: 1
25
26 interrupts:
27 minItems: 1
28 maxItems: 6
29
30 interrupt-names:
31 minItems: 1
32 maxItems: 6
33 items:
34 enum:
35 - 2hz0
36 - 2hz1
37 - timer0
38 - timer1
39 - timer2
40 - timer3
41
42 reg:
43 maxItems: 1
44
45 required:
46 - compatible
47 - clocks
48 - interrupts
49 - interrupt-names
50 - reg
51
52 allOf:
53 - if:
54 properties:
55 compatible:
56 contains:
57 enum:
58 - actions,s500-timer
59 then:
60 properties:
61 interrupts:
62 minItems: 4
63 maxItems: 4
64 interrupt-names:
65 items:
66 - const: 2hz0
67 - const: 2hz1
68 - const: timer0
69 - const: timer1
70
71 - if:
72 properties:
73 compatible:
74 contains:
75 enum:
76 - actions,s700-timer
77 - actions,s900-timer
78 then:
79 properties:
80 interrupts:
81 minItems: 1
82 maxItems: 1
83 interrupt-names:
84 items:
85 - const: timer1
86
87 additionalProperties: false
88
89 examples:
90 - |
91 #include <dt-bindings/interrupt-controller/arm-gic.h>
92 #include <dt-bindings/interrupt-controller/irq.h>
93 soc {
94 #address-cells = <1>;
95 #size-cells = <1>;
96 timer@b0168000 {
97 compatible = "actions,s500-timer";
98 reg = <0xb0168000 0x100>;
99 clocks = <&hosc>;
100 interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
101 <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
102 <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
103 <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
104 interrupt-names = "2hz0", "2hz1", "timer0", "timer1";
105 };
106 };
107 ...
108

3. 한국어 전문 번역

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

Actions Semi Owl timer

1-15

GPL-2.0-only 또는 BSD-2-Clause 라이선스의 이 스키마는 Actions Semi Owl timer를 정의합니다. Owl SoC는 32-bit timer와 2Hz timer를 제공하며, 32-bit timer는 dynamic IRQ와 one-shot mode를 지원합니다. Maintainer는 Andreas Färber입니다.

공통 속성과 interrupt 이름

16-51

지원 compatible은 `actions,s500-timer`, `actions,s700-timer`, `actions,s900-timer`입니다. `clocks`와 `reg`는 각각 최대 한 항목입니다. `interrupts`와 `interrupt-names`는 기본적으로 1개 이상 6개 이하이며 이름은 `2hz0`, `2hz1`, `timer0`, `timer1`, `timer2`, `timer3` 중 하나입니다. `compatible`, `clocks`, `interrupts`, `interrupt-names`, `reg`가 모두 필수입니다.

properties:
  compatible:
    enum:
      - actions,s500-timer
      - actions,s700-timer
      - actions,s900-timer

  clocks:
    maxItems: 1

  interrupts:
    minItems: 1
    maxItems: 6

  interrupt-names:
    minItems: 1
    maxItems: 6
    items:
      enum:
        - 2hz0
        - 2hz1
        - timer0
        - timer1
        - timer2
        - timer3

  reg:
    maxItems: 1

required:
  - compatible
  - clocks
  - interrupts
  - interrupt-names
  - reg

S500과 S700·S900의 IRQ 구성

52-88

`actions,s500-timer`는 interrupt가 정확히 4개이며 이름 순서는 `2hz0`, `2hz1`, `timer0`, `timer1`입니다. 반면 `actions,s700-timer`와 `actions,s900-timer`는 interrupt 하나만 사용하고 이름은 `timer1`입니다. 정의되지 않은 추가 속성은 허용되지 않습니다.

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - actions,s500-timer
    then:
      properties:
        interrupts:
          minItems: 4
          maxItems: 4
        interrupt-names:
          items:
            - const: 2hz0
            - const: 2hz1
            - const: timer0
            - const: timer1

  - if:
      properties:
        compatible:
          contains:
            enum:
              - actions,s700-timer
              - actions,s900-timer
    then:
      properties:
        interrupts:
          minItems: 1
          maxItems: 1
        interrupt-names:
          items:
            - const: timer1

additionalProperties: false

S500 timer node 예제

89-107

예제는 `timer@b0168000`에 0x100-byte register 영역과 `hosc` clock을 연결합니다. GIC SPI 8부터 GIC SPI 11까지 네 level-high interrupt를 앞서 정의한 `2hz0`, `2hz1`, `timer0`, `timer1` 순서로 지정합니다.

  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    soc {
      #address-cells = <1>;
      #size-cells = <1>;
      timer@b0168000 {
        compatible = "actions,s500-timer";
        reg = <0xb0168000 0x100>;
        clocks = <&hosc>;
        interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>,
                     <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "2hz0", "2hz1", "timer0", "timer1";
      };
    };
...