← Documents Documentation/devicetree/bindings/usb/usb-hub.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / USB

Generic USB Hub

USB hub의 peer hub, downstream port graph와 고정 연결 device를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

usb-hub.yaml:1-84

USB hub의 peer hub, downstream port graph와 고정 연결 device를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, property, enum, phandle, graph endpoint, 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/usb/usb-hub.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Generic USB Hub
8
9 maintainers:
10 - Pin-yen Lin <[email protected]>
11
12 allOf:
13 - $ref: usb-device.yaml#
14
15 properties:
16 '#address-cells':
17 const: 1
18
19 peer-hub:
20 $ref: /schemas/types.yaml#/definitions/phandle
21 description:
22 phandle to the peer hub on the controller.
23
24 ports:
25 $ref: /schemas/graph.yaml#/properties/ports
26 description:
27 The downstream facing USB ports
28
29 patternProperties:
30 "^port@[1-9a-f][0-9a-f]*$":
31 $ref: /schemas/graph.yaml#/properties/port
32
33 patternProperties:
34 '^.*@[1-9a-f][0-9a-f]*$':
35 description: The hard wired USB devices
36 type: object
37 $ref: /schemas/usb/usb-device.yaml
38 additionalProperties: true
39
40 required:
41 - compatible
42 - reg
43
44 additionalProperties: true
45
46 examples:
47 - |
48 usb {
49 #address-cells = <1>;
50 #size-cells = <0>;
51
52 /* 2.0 hub on port 1 */
53 hub_2_0: hub@1 {
54 compatible = "usb123,4567";
55 reg = <1>;
56 peer-hub = <&hub_3_0>;
57 #address-cells = <1>;
58 #size-cells = <0>;
59 /* USB 2.0 device on port 5 */
60 device@5 {
61 reg = <5>;
62 compatible = "usb765,4321";
63 };
64 };
65
66 /* 3.0 hub on port 2 */
67 hub_3_0: hub@2 {
68 compatible = "usb123,abcd";
69 reg = <2>;
70 peer-hub = <&hub_2_0>;
71
72 ports {
73 #address-cells = <1>;
74 #size-cells = <0>;
75 /* Type-A connector on port 3 */
76 port@3 {
77 reg = <3>;
78 endpoint {
79 remote-endpoint = <&usb_a0_ss>;
80 };
81 };
82 };
83 };
84 };
85

3. 한국어 전문 번역

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

Generic USB hub

1-11

GPL-2.0-only 또는 BSD-2-Clause로 배포되는 이 스키마는 일반 USB hub를 정의합니다. 관리자는 Pin-yen Lin입니다.

peer hub와 downstream port graph

12-32

공통 `usb-device.yaml`을 상속하고 address cell 수는 1입니다. `peer-hub`는 같은 controller에 있는 반대 속도 hub의 phandle입니다.

`ports`는 downstream-facing USB port를 나타내는 graph container입니다. `port@` 뒤에는 1 이상의 16진수 port number를 사용하며 각 node는 공통 graph port schema를 따릅니다.

allOf:
  - $ref: usb-device.yaml#

properties:
  '#address-cells':
    const: 1

  peer-hub:
    $ref: /schemas/types.yaml#/definitions/phandle
    description:
      phandle to the peer hub on the controller.

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    description:
      The downstream facing USB ports

    patternProperties:
      "^port@[1-9a-f][0-9a-f]*$":
        $ref: /schemas/graph.yaml#/properties/port

hard-wired child와 필수 속성

33-45

hub 아래의 1 이상 port unit address child는 hard-wired USB device이고 `usb-device.yaml`을 따릅니다. hub의 compatible과 register는 필수이며 device·hub별 추가 속성을 허용합니다.

patternProperties:
  '^.*@[1-9a-f][0-9a-f]*$':
    description: The hard wired USB devices
    type: object
    $ref: /schemas/usb/usb-device.yaml
    additionalProperties: true

required:
  - compatible
  - reg

additionalProperties: true

dual-speed peer hub와 connector 예제

46-84

예제 port 1의 USB 2.0 hub와 port 2의 USB 3.0 hub는 서로를 `peer-hub`로 참조합니다. USB 2.0 hub의 port 5에는 compatible `usb765,4321` device가 고정 연결됩니다.

USB 3.0 hub의 graph `port@3` endpoint는 Type-A connector의 SuperSpeed endpoint `usb_a0_ss`와 연결됩니다.

examples:
  - |
    usb {
        #address-cells = <1>;
        #size-cells = <0>;

        /* 2.0 hub on port 1 */
        hub_2_0: hub@1 {
            compatible = "usb123,4567";
            reg = <1>;
            peer-hub = <&hub_3_0>;
            #address-cells = <1>;
            #size-cells = <0>;
            /* USB 2.0 device on port 5 */
            device@5 {
                reg = <5>;
                compatible = "usb765,4321";
            };
        };

        /* 3.0 hub on port 2 */
        hub_3_0: hub@2 {
            compatible = "usb123,abcd";
            reg = <2>;
            peer-hub = <&hub_2_0>;

            ports {
                #address-cells = <1>;
                #size-cells = <0>;
                /* Type-A connector on port 3 */
                port@3 {
                    reg = <3>;
                    endpoint {
                        remote-endpoint = <&usb_a0_ss>;
                    };
                };
            };
        };
    };