← Documents Documentation/devicetree/bindings/virtio/virtio-device.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / Virtio

Virtio Device

Bus와 독립적인 Virtio child device compatible과 device ID 형식을 설명합니다.

Source pathDocumentation/devicetree/bindings/virtio/virtio-device.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

virtio-device.yaml:1-41

Bus와 독립적인 Virtio child device compatible과 device ID 형식을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, property, PCI BDF·RID, phandle, example, source path와 원문 줄 좌표를 원형대로 보존합니다.

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/virtio/virtio-device.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Virtio device
8
9 maintainers:
10 - Viresh Kumar <[email protected]>
11
12 description:
13 These bindings are applicable to virtio devices irrespective of the bus they
14 are bound to, like mmio or pci.
15
16 # We need a select here so we don't match all nodes with 'virtio,mmio'
17 properties:
18 compatible:
19 pattern: "^virtio,device[0-9a-f]{1,8}$"
20 description: Virtio device nodes.
21 "virtio,deviceID", where ID is the virtio device id. The textual
22 representation of ID shall be in lower case hexadecimal with leading
23 zeroes suppressed.
24
25 required:
26 - compatible
27
28 additionalProperties: true
29
30 examples:
31 - |
32 virtio@3000 {
33 compatible = "virtio,mmio";
34 reg = <0x3000 0x100>;
35 interrupts = <43>;
36
37 i2c {
38 compatible = "virtio,device22";
39 };
40 };
41 ...
42

3. 한국어 전문 번역

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

Bus-independent Virtio device

1-15

GPL-2.0-only 또는 BSD-2-Clause로 배포되는 이 binding은 MMIO나 PCI처럼 연결 bus와 관계없이 모든 Virtio device에 적용됩니다. 관리자는 Viresh Kumar입니다.

Virtio device ID compatible

16-29

모든 `virtio,mmio` node와 잘못 일치하지 않도록 명시적 selector가 필요합니다. child device의 compatible은 `virtio,deviceID` 형식이며 ID는 Virtio device ID입니다.

ID의 문자열 표현은 선행 zero를 제거한 1~8자리 소문자 hexadecimal이어야 합니다. compatible은 필수이고 device별 추가 속성은 허용합니다.

# We need a select here so we don't match all nodes with 'virtio,mmio'
properties:
  compatible:
    pattern: "^virtio,device[0-9a-f]{1,8}$"
    description: Virtio device nodes.
      "virtio,deviceID", where ID is the virtio device id. The textual
      representation of ID shall be in lower case hexadecimal with leading
      zeroes suppressed.

required:
  - compatible

additionalProperties: true

Virtio MMIO의 I2C child 예제

30-41

예제 MMIO transport node 안의 I2C Virtio child는 `compatible = "virtio,device22"`를 사용해 device ID 0x22를 나타냅니다.

examples:
  - |
    virtio@3000 {
        compatible = "virtio,mmio";
        reg = <0x3000 0x100>;
        interrupts = <43>;

        i2c {
            compatible = "virtio,device22";
        };
    };
...