← Documents Documentation/devicetree/bindings/timer/sifive,clint.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Timer

SiFive Core Local Interruptor

SiFive CLINT의 HART별 interrupt 연결과 v0·v2 조건을 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

sifive,clint.yaml:1-105

SiFive CLINT의 HART별 interrupt 연결과 v0·v2 조건을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며 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/sifive,clint.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: SiFive Core Local Interruptor
8
9 maintainers:
10 - Palmer Dabbelt <[email protected]>
11 - Anup Patel <[email protected]>
12
13 description:
14 SiFive (and other RISC-V) SOCs include an implementation of the SiFive
15 Core Local Interruptor (CLINT) for M-mode timer and M-mode inter-processor
16 interrupts. It directly connects to the timer and inter-processor interrupt
17 lines of various HARTs (or CPUs) so RISC-V per-HART (or per-CPU) local
18 interrupt controller is the parent interrupt controller for CLINT device.
19 The clock frequency of CLINT is specified via "timebase-frequency" DT
20 property of "/cpus" DT node. The "timebase-frequency" DT property is
21 described in Documentation/devicetree/bindings/riscv/cpus.yaml
22
23 T-Head C906/C910 CPU cores include an implementation of CLINT too, however
24 their implementation lacks a memory-mapped MTIME register, thus not
25 compatible with SiFive ones.
26
27 properties:
28 compatible:
29 oneOf:
30 - items:
31 - enum:
32 - canaan,k210-clint # Canaan Kendryte K210
33 - eswin,eic7700-clint # ESWIN EIC7700
34 - sifive,fu540-c000-clint # SiFive FU540
35 - spacemit,k1-clint # SpacemiT K1
36 - starfive,jh7100-clint # StarFive JH7100
37 - starfive,jh7110-clint # StarFive JH7110
38 - starfive,jh8100-clint # StarFive JH8100
39 - const: sifive,clint0 # SiFive CLINT v0 IP block
40 - items:
41 - {}
42 - const: sifive,clint2 # SiFive CLINT v2 IP block
43 description:
44 SiFive CLINT v2 is the HRT that supports the Zicntr. The control of sifive,clint2
45 differs from that of sifive,clint0, making them incompatible.
46 - items:
47 - enum:
48 - allwinner,sun20i-d1-clint
49 - sophgo,cv1800b-clint
50 - sophgo,cv1812h-clint
51 - sophgo,sg2002-clint
52 - thead,th1520-clint
53 - const: thead,c900-clint
54 - items:
55 - const: sifive,clint0
56 - const: riscv,clint0
57 deprecated: true
58 description: For the QEMU virt machine only
59
60 description:
61 Should be "<vendor>,<chip>-clint", followed by "sifive,clint<version>"
62 when compatible with a SiFive CLINT. Please refer to
63 sifive-blocks-ip-versioning.txt for details regarding the latter.
64
65 reg:
66 maxItems: 1
67
68 interrupts-extended:
69 minItems: 1
70 maxItems: 4095
71
72 sifive,fine-ctr-bits:
73 maximum: 15
74 description: The width in bits of the fine counter.
75
76 if:
77 properties:
78 compatible:
79 contains:
80 const: sifive,clint2
81 then:
82 required:
83 - sifive,fine-ctr-bits
84 else:
85 properties:
86 sifive,fine-ctr-bits: false
87
88 additionalProperties: false
89
90 required:
91 - compatible
92 - reg
93 - interrupts-extended
94
95 examples:
96 - |
97 timer@2000000 {
98 compatible = "sifive,fu540-c000-clint", "sifive,clint0";
99 interrupts-extended = <&cpu1intc 3>, <&cpu1intc 7>,
100 <&cpu2intc 3>, <&cpu2intc 7>,
101 <&cpu3intc 3>, <&cpu3intc 7>,
102 <&cpu4intc 3>, <&cpu4intc 7>;
103 reg = <0x2000000 0x10000>;
104 };
105 ...
106

3. 한국어 전문 번역

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

SiFive Core Local Interruptor

1-25

GPL-2.0-only 또는 BSD-2-Clause 라이선스의 이 스키마는 SiFive Core Local Interruptor(CLINT)를 정의합니다. SiFive와 그 밖의 RISC-V SoC는 M-mode timer interrupt와 M-mode inter-processor interrupt를 위해 CLINT를 구현합니다. CLINT는 여러 HART(CPU)의 timer 및 inter-processor interrupt 선에 직접 연결되므로, RISC-V의 per-HART(per-CPU) local interrupt controller가 CLINT device의 parent interrupt controller가 됩니다.

CLINT clock frequency는 `/cpus` DT node의 `timebase-frequency` 속성으로 지정하며, 해당 속성은 `Documentation/devicetree/bindings/riscv/cpus.yaml`에 설명되어 있습니다. T-Head C906/C910 CPU core도 CLINT를 구현하지만 memory-mapped `MTIME` register가 없어서 SiFive 구현과 호환되지 않습니다. Maintainer는 Palmer Dabbelt와 Anup Patel입니다.

CLINT v0·v2와 T-Head variant

26-64

SiFive CLINT v0 계열은 Canaan K210, ESWIN EIC7700, SiFive FU540, SpacemiT K1, StarFive JH7100·JH7110·JH8100의 SoC별 compatible 뒤에 `sifive,clint0`을 둡니다. CLINT v2 계열은 vendor·chip compatible 뒤에 `sifive,clint2`를 둡니다. CLINT v2는 Zicntr를 지원하는 HRT이며 제어 방식이 `sifive,clint0`과 달라 서로 호환되지 않습니다.

Allwinner D1, Sophgo CV1800B·CV1812H·SG2002, T-Head TH1520은 SoC별 compatible 뒤에 `thead,c900-clint`를 사용합니다. QEMU virt machine 전용의 `sifive,clint0`, `riscv,clint0` 조합은 deprecated입니다. SiFive CLINT와 호환되는 일반 형식은 `<vendor>,<chip>-clint` 다음에 `sifive,clint<version>`을 두며, versioning 세부 사항은 `sifive-blocks-ip-versioning.txt`를 참조합니다.

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - canaan,k210-clint       # Canaan Kendryte K210
              - eswin,eic7700-clint     # ESWIN EIC7700
              - sifive,fu540-c000-clint # SiFive FU540
              - spacemit,k1-clint       # SpacemiT K1
              - starfive,jh7100-clint   # StarFive JH7100
              - starfive,jh7110-clint   # StarFive JH7110
              - starfive,jh8100-clint   # StarFive JH8100
          - const: sifive,clint0        # SiFive CLINT v0 IP block
      - items:
          - {}
          - const: sifive,clint2        # SiFive CLINT v2 IP block
        description:
          SiFive CLINT v2 is the HRT that supports the Zicntr. The control of sifive,clint2
          differs from that of sifive,clint0, making them incompatible.
      - items:
          - enum:
              - allwinner,sun20i-d1-clint
              - sophgo,cv1800b-clint
              - sophgo,cv1812h-clint
              - sophgo,sg2002-clint
              - thead,th1520-clint
          - const: thead,c900-clint
      - items:
          - const: sifive,clint0
          - const: riscv,clint0
        deprecated: true
        description: For the QEMU virt machine only

    description:
      Should be "<vendor>,<chip>-clint", followed by "sifive,clint<version>"
      when compatible with a SiFive CLINT.  Please refer to
      sifive-blocks-ip-versioning.txt for details regarding the latter.

Register·extended interrupt·fine counter

65-88

`reg`는 최대 한 영역입니다. `interrupts-extended`는 최소 1개, 최대 4095개 항목으로 각 HART의 local interrupt controller와 CLINT interrupt 선의 관계를 기술합니다. `sifive,fine-ctr-bits`는 fine counter의 bit width이며 최댓값은 15입니다.

`compatible`에 `sifive,clint2`가 포함되면 `sifive,fine-ctr-bits`가 필수입니다. 그 밖의 구현에서는 이 속성을 허용하지 않습니다. 정의되지 않은 추가 속성도 허용하지 않습니다.

  reg:
    maxItems: 1

  interrupts-extended:
    minItems: 1
    maxItems: 4095

  sifive,fine-ctr-bits:
    maximum: 15
    description: The width in bits of the fine counter.

if:
  properties:
    compatible:
      contains:
        const: sifive,clint2
then:
  required:
    - sifive,fine-ctr-bits
else:
  properties:
    sifive,fine-ctr-bits: false

additionalProperties: false

FU540의 HART별 software·timer interrupt

89-105

`compatible`, `reg`, `interrupts-extended`가 필수입니다. 예제 `timer@2000000`은 `sifive,fu540-c000-clint`, `sifive,clint0` compatible과 0x10000-byte register 영역을 사용합니다. CPU1부터 CPU4까지 각 local interrupt controller에 interrupt 3과 7을 한 쌍씩 연결합니다. RISC-V에서 이 값은 각각 machine software interrupt와 machine timer interrupt를 나타냅니다.

required:
  - compatible
  - reg
  - interrupts-extended

examples:
  - |
    timer@2000000 {
      compatible = "sifive,fu540-c000-clint", "sifive,clint0";
      interrupts-extended = <&cpu1intc 3>, <&cpu1intc 7>,
                            <&cpu2intc 3>, <&cpu2intc 7>,
                            <&cpu3intc 3>, <&cpu3intc 7>,
                            <&cpu4intc 3>, <&cpu4intc 7>;
      reg = <0x2000000 0x10000>;
    };
...