요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/usb-hub.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic USB Hub
maintainers:
- Pin-yen Lin <[email protected]>
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
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
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>;
};
};
};
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Generic USB hub
1-11GPL-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-45hub 아래의 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>;
};
};
};
};
};
요약과 해설
usb-hub.yaml:1-84USB hub의 peer hub, downstream port graph와 고정 연결 device를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, property, enum, phandle, graph endpoint, example, source path와 원문 줄 좌표를 원형대로 보존합니다.