← Documents Documentation/devicetree/bindings/interrupt-controller/interrupts.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Device Tree Interrupt Information

Interrupt client, controller, specifier와 wakeup parent의 공통 바인딩입니다.

Source pathDocumentation/devicetree/bindings/interrupt-controller/interrupts.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

interrupts.txt:1-122

상속 parent, extended 형식, 1·2-cell flag와 wakeup 경로를 설명합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Specifying interrupt information for devices
2 ============================================
3
4 1) Interrupt client nodes
5 -------------------------
6
7 Nodes that describe devices which generate interrupts must contain an
8 "interrupts" property, an "interrupts-extended" property, or both. If both are
9 present, the latter should take precedence; the former may be provided simply
10 for compatibility with software that does not recognize the latter. These
11 properties contain a list of interrupt specifiers, one per output interrupt. The
12 format of the interrupt specifier is determined by the interrupt controller to
13 which the interrupts are routed; see section 2 below for details.
14
15 Example:
16 interrupt-parent = <&intc1>;
17 interrupts = <5 0>, <6 0>;
18
19 The "interrupt-parent" property is used to specify the controller to which
20 interrupts are routed and contains a single phandle referring to the interrupt
21 controller node. This property is inherited, so it may be specified in an
22 interrupt client node or in any of its parent nodes. Interrupts listed in the
23 "interrupts" property are always in reference to the node's interrupt parent.
24
25 The "interrupts-extended" property is a special form; useful when a node needs
26 to reference multiple interrupt parents or a different interrupt parent than
27 the inherited one. Each entry in this property contains both the parent phandle
28 and the interrupt specifier.
29
30 Example:
31 interrupts-extended = <&intc1 5 1>, <&intc2 1 0>;
32
33 2) Interrupt controller nodes
34 -----------------------------
35
36 A device is marked as an interrupt controller with the "interrupt-controller"
37 property. This is a empty, boolean property. An additional "#interrupt-cells"
38 property defines the number of cells needed to specify a single interrupt.
39
40 It is the responsibility of the interrupt controller's binding to define the
41 length and format of the interrupt specifier. The following two variants are
42 commonly used:
43
44 a) one cell
45 -----------
46 The #interrupt-cells property is set to 1 and the single cell defines the
47 index of the interrupt within the controller.
48
49 Example:
50
51 vic: intc@10140000 {
52 compatible = "arm,versatile-vic";
53 interrupt-controller;
54 #interrupt-cells = <1>;
55 reg = <0x10140000 0x1000>;
56 };
57
58 sic: intc@10003000 {
59 compatible = "arm,versatile-sic";
60 interrupt-controller;
61 #interrupt-cells = <1>;
62 reg = <0x10003000 0x1000>;
63 interrupt-parent = <&vic>;
64 interrupts = <31>; /* Cascaded to vic */
65 };
66
67 b) two cells
68 ------------
69 The #interrupt-cells property is set to 2 and the first cell defines the
70 index of the interrupt within the controller, while the second cell is used
71 to specify any of the following flags:
72 - bits[3:0] trigger type and level flags
73 1 = low-to-high edge triggered
74 2 = high-to-low edge triggered
75 4 = active high level-sensitive
76 8 = active low level-sensitive
77
78 Example:
79
80 i2c@7000c000 {
81 gpioext: gpio-adnp@41 {
82 compatible = "ad,gpio-adnp";
83 reg = <0x41>;
84
85 interrupt-parent = <&gpio>;
86 interrupts = <160 1>;
87
88 gpio-controller;
89 #gpio-cells = <1>;
90
91 interrupt-controller;
92 #interrupt-cells = <2>;
93
94 nr-gpios = <64>;
95 };
96
97 sx8634@2b {
98 compatible = "smtc,sx8634";
99 reg = <0x2b>;
100
101 interrupt-parent = <&gpioext>;
102 interrupts = <3 0x8>;
103
104 #address-cells = <1>;
105 #size-cells = <0>;
106
107 threshold = <0x40>;
108 sensitivity = <7>;
109 };
110 };
111
112 3) Interrupt wakeup parent
113 --------------------------
114
115 Some interrupt controllers in a SoC, are always powered on and have a select
116 interrupts routed to them, so that they can wakeup the SoC from suspend. These
117 interrupt controllers do not fall into the category of a parent interrupt
118 controller and can be specified by the "wakeup-parent" property and contain a
119 single phandle referring to the wakeup capable interrupt controller.
120
121 Example:
122 wakeup-parent = <&pdc_intc>;
123

3. 한국어 전문 번역

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

Interrupt client node

1-32

인터럽트를 생성하는 장치 노드는 `interrupts`, `interrupts-extended` 또는 둘 다를 포함해야 합니다. 둘 다 있으면 `interrupts-extended`가 우선하며, `interrupts`는 후자를 인식하지 못하는 소프트웨어와의 호환성을 위해 함께 제공할 수 있습니다. 두 속성은 출력 인터럽트마다 하나씩 interrupt specifier 목록을 담고, 형식은 인터럽트가 전달되는 컨트롤러의 바인딩이 정합니다.

`interrupt-parent`는 인터럽트가 전달되는 컨트롤러 노드를 가리키는 단일 phandle입니다. 이 속성은 상속되므로 client node 또는 그 부모 노드 어디에나 둘 수 있습니다. `interrupts`에 나열한 항목은 언제나 해당 노드의 interrupt parent를 기준으로 해석됩니다.

`interrupts-extended`는 여러 interrupt parent를 참조하거나 상속된 parent와 다른 컨트롤러를 지정할 때 유용한 특수 형식입니다. 각 항목에 parent phandle과 interrupt specifier를 함께 넣습니다.

Interrupt client 속성 비교
속성Parent 지정우선순위
interrupts상속된 interrupt-parent호환용
interrupts-extended각 항목에 phandle 포함둘 다 있으면 우선
interrupt-parent단일 controller phandle부모 노드에서 상속 가능

기본 parent 상속과 항목별 parent 지정의 차이를 정리합니다.

interrupt-parent = <&intc1>;
interrupts = <5 0>, <6 0>;
interrupts-extended = <&intc1 5 1>, <&intc2 1 0>;

Interrupt controller와 1-cell 지정자

33-66

장치는 비어 있는 불리언 `interrupt-controller` 속성으로 인터럽트 컨트롤러임을 표시합니다. 추가 `#interrupt-cells`는 인터럽트 하나를 지정하는 데 필요한 cell 수를 정의합니다. Specifier의 길이와 형식을 정의할 책임은 각 interrupt controller 바인딩에 있습니다.

널리 쓰는 1-cell 형식에서는 `#interrupt-cells = <1>`이고 단일 cell이 컨트롤러 내부의 인터럽트 인덱스를 나타냅니다. 예제의 VIC는 root 컨트롤러이고 SIC는 자체 인터럽트를 제공하면서 VIC의 인터럽트 31에 cascade됩니다.

1-cell cascade 예제
SIC child sourcesSIC #interrupt-cells = 1
SIC outputinterrupts = <31>
VIC interrupt 31VIC controller
CPU최종 interrupt delivery

SIC의 출력이 VIC의 한 인터럽트 입력으로 연결됩니다.

vic: intc@10140000 {
        compatible = "arm,versatile-vic";
        interrupt-controller;
        #interrupt-cells = <1>;
        reg = <0x10140000 0x1000>;
};

sic: intc@10003000 {
        compatible = "arm,versatile-sic";
        interrupt-controller;
        #interrupt-cells = <1>;
        reg = <0x10003000 0x1000>;
        interrupt-parent = <&vic>;
        interrupts = <31>; /* Cascaded to vic */
};

2-cell 지정자와 trigger flag

67-111

2-cell 형식에서는 `#interrupt-cells = <2>`이고 첫 번째 cell은 컨트롤러 내부 인터럽트 인덱스, 두 번째 cell은 flag입니다. Flag의 bits[3:0]에서 1은 low-to-high edge trigger, 2는 high-to-low edge trigger, 4는 active-high level-sensitive, 8은 active-low level-sensitive를 뜻합니다.

Interrupt trigger flag
형식
1low-to-high edge triggered
2high-to-low edge triggered
4active high level-sensitive
8active low level-sensitive

2-cell specifier의 두 번째 cell에서 쓰는 공통 flag 값입니다.

예제에서 GPIO 확장기는 SoC GPIO의 인터럽트 160을 flag 1로 사용하면서 다시 2-cell interrupt controller가 됩니다. SX8634는 확장기의 인터럽트 3에 flag `0x8`, 즉 active-low level-sensitive를 지정합니다.

i2c@7000c000 {
        gpioext: gpio-adnp@41 {
                compatible = "ad,gpio-adnp";
                reg = <0x41>;

                interrupt-parent = <&gpio>;
                interrupts = <160 1>;

                gpio-controller;
                #gpio-cells = <1>;

                interrupt-controller;
                #interrupt-cells = <2>;

                nr-gpios = <64>;
        };

        sx8634@2b {
                compatible = "smtc,sx8634";
                reg = <0x2b>;

                interrupt-parent = <&gpioext>;
                interrupts = <3 0x8>;

                #address-cells = <1>;
                #size-cells = <0>;

                threshold = <0x40>;
                sensitivity = <7>;
        };
};

Interrupt wakeup parent

112-122

일부 SoC 인터럽트 컨트롤러는 항상 전원이 켜져 있고 suspend 상태에서 SoC를 깨울 수 있도록 선택된 인터럽트를 전달받습니다. 이 컨트롤러는 일반적인 parent interrupt controller 범주에 들지 않으며 `wakeup-parent` 속성으로 지정합니다. 속성 값은 wakeup 기능이 있는 interrupt controller를 가리키는 단일 phandle입니다.

Suspend wakeup 경로
Wake-capable device선택 interrupt
Always-on controllerwakeup-parent
Suspended SoCWake request
Resume일반 interrupt 처리 복귀

항상 켜진 wakeup controller가 선택된 신호로 SoC를 깨웁니다.

wakeup-parent = <&pdc_intc>;