← Documents Documentation/devicetree/bindings/resource-names.txt GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings

Devicetree resource names

resource 목록과 reg·clock·interrupt names 속성의 대응 규칙을 설명합니다.

Source pathDocumentation/devicetree/bindings/resource-names.txt
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

resource-names.txt:1-54

장치의 연결 방식과 필수·선택 속성을 먼저 해설하고, 접을 수 있는 영어 원문 전체와 원문 줄 좌표를 보존한 한국어 전문 번역을 제공합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 Some properties contain an ordered list of 1 or more datum which are
2 normally accessed by index. However, some devices will have multiple
3 values which are more naturally accessed by name. Device nodes can
4 include a supplemental property for assigning names to each of the list
5 items. The names property consists of a list of strings in the same
6 order as the data in the resource property.
7
8 The following supplemental names properties are defined.
9
10 Resource Property Supplemental Names Property
11 ----------------- ---------------------------
12 reg reg-names
13 clocks clock-names
14 interrupts interrupt-names
15
16 Usage:
17
18 The -names property must be used in conjunction with the normal resource
19 property. If not it will be ignored.
20
21 Examples:
22
23 l4-abe {
24 compatible = "simple-bus";
25 #address-cells = <2>;
26 #size-cells = <1>;
27 ranges = <0 0 0x48000000 0x00001000>, /* MPU path */
28 <1 0 0x49000000 0x00001000>; /* L3 path */
29 mcasp {
30 compatible = "ti,mcasp";
31 reg = <0 0x10 0x10>, <0 0x20 0x10>,
32 <1 0x10 0x10>, <1 0x20 0x10>;
33 reg-names = "mpu", "dat",
34 "dma", "dma_dat";
35 interrupts = <11>, <12>;
36 interrupt-names = "rx", "tx";
37 };
38
39 timer {
40 compatible = "ti,timer";
41 reg = <0 0x40 0x10>, <1 0x40 0x10>;
42 reg-names = "mpu", "dma";
43 };
44 };
45
46
47 usb {
48 compatible = "ti,usb-host";
49 reg = <0x4a064000 0x800>, <0x4a064800 0x200>,
50 <0x4a064c00 0x200>;
51 reg-names = "config", "ohci", "ehci";
52 interrupts = <14>, <15>;
53 interrupt-names = "ohci", "ehci";
54 };
55

3. 한국어 전문 번역

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

resource 이름 속성

1-6

일부 속성은 보통 인덱스로 접근하는 하나 이상의 datum을 순서 있는 목록으로 담습니다. 그러나 값이 여러 개인 장치에서는 이름으로 접근하는 편이 더 자연스러울 수 있습니다.

장치 노드는 목록의 각 항목에 이름을 부여하는 보조 속성을 포함할 수 있습니다. names 속성은 resource 속성의 데이터와 같은 순서로 문자열 목록을 담습니다.

resource와 names 대응

7-14

정의된 보조 names 속성의 대응 관계는 다음과 같습니다.

resource 속성보조 names 속성
regreg-names
clocksclock-names
interruptsinterrupt-names

사용 규칙

15-19

`-names` 속성은 반드시 일반 resource 속성과 함께 사용해야 합니다. 대응하는 resource 속성이 없으면 무시됩니다.

버스·McASP·timer 예제

20-44

첫 예제는 McASP의 네 register range를 `mpu`, `dat`, `dma`, `dma_dat`로 이름 붙이고 두 interrupt를 `rx`, `tx`로 구분합니다. timer의 두 register range는 `mpu`와 `dma`로 구분합니다.

l4-abe {
        compatible = "simple-bus";
        #address-cells = <2>;
        #size-cells = <1>;
        ranges = <0 0 0x48000000 0x00001000>, /* MPU path */
                 <1 0 0x49000000 0x00001000>; /* L3 path */
        mcasp {
                compatible = "ti,mcasp";
                reg = <0 0x10 0x10>, <0 0x20 0x10>,
                      <1 0x10 0x10>, <1 0x20 0x10>;
                reg-names = "mpu", "dat",
                            "dma", "dma_dat";
                interrupts = <11>, <12>;
                interrupt-names = "rx", "tx";
        };

        timer {
                compatible = "ti,timer";
                reg = <0 0x40 0x10>, <1 0x40 0x10>;
                reg-names = "mpu", "dma";
        };
};

USB host 예제

45-54

USB host는 세 register range를 `config`, `ohci`, `ehci`로, 두 interrupt를 `ohci`, `ehci`로 이름 붙입니다.

usb {
        compatible = "ti,usb-host";
        reg = <0x4a064000 0x800>, <0x4a064800 0x200>,
              <0x4a064c00 0x200>;
        reg-names = "config", "ohci", "ehci";
        interrupts = <14>, <15>;
        interrupt-names = "ohci", "ehci";
};