요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: GPL-2.0
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/usb-drd.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Generic USB OTG Controller
maintainers:
- Greg Kroah-Hartman <gregkh@linuxfoundation.org>
properties:
otg-rev:
description:
Tells usb driver the release number of the OTG and EH supplement with
which the device and its descriptors are compliant, in binary-coded
decimal (i.e. 2.0 is 0200H). This property is used if any real OTG
features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be
0x0200 or above.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0x0100, 0x0120, 0x0130, 0x0200]
dr_mode:
description:
Tells Dual-Role USB controllers that we want to work on a particular
mode. In case this attribute isn't passed via DT, USB DRD controllers
should default to OTG.
$ref: /schemas/types.yaml#/definitions/string
enum: [host, peripheral, otg]
default: otg
hnp-disable:
description:
Tells OTG controllers we want to disable OTG HNP. Normally HNP is the
basic function of real OTG except you want it to be a srp-capable only B
device.
type: boolean
srp-disable:
description:
Tells OTG controllers we want to disable OTG SRP. SRP is optional for OTG
device.
type: boolean
adp-disable:
description:
Tells OTG controllers we want to disable OTG ADP. ADP is optional for OTG
device.
type: boolean
usb-role-switch:
description:
Indicates that the device is capable of assigning the USB data role
(USB host or USB device) for a given USB connector, such as Type-C,
Type-B(micro). See connector/usb-connector.yaml.
role-switch-default-mode:
description:
Indicates if usb-role-switch is enabled, the device default operation
mode of controller while usb role is USB_ROLE_NONE.
$ref: /schemas/types.yaml#/definitions/string
enum: [host, peripheral]
default: peripheral
additionalProperties: true
examples:
- |
usb@4a030000 {
compatible = "snps,dwc3";
reg = <0x4a030000 0xcfff>;
interrupts = <0 92 4>;
usb-phy = <&usb2_phy>, <&usb3_phy>;
maximum-speed = "super-speed";
dr_mode = "otg";
phy_type = "utmi_wide";
otg-rev = <0x0200>;
adp-disable;
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Generic USB OTG controller
1-11GPL-2.0으로 배포되는 이 스키마는 일반 USB OTG controller의 공통 속성을 정의합니다. 관리자는 Greg Kroah-Hartman입니다.
OTG revision과 dual-role mode
12-31`otg-rev`는 device와 descriptor가 준수하는 OTG 및 EH supplement release number를 binary-coded decimal로 나타냅니다. 예를 들어 2.0은 0200H입니다. HNP·SRP·ADP 같은 실제 OTG 기능을 사용할 때 필요하며 ADP가 필요하면 0x0200 이상이어야 합니다. 허용값은 0x0100, 0x0120, 0x0130, 0x0200입니다.
`dr_mode`는 dual-role controller를 host·peripheral·OTG 중 어느 mode로 동작시킬지 지정합니다. DT에 없으면 USB DRD controller는 OTG를 기본값으로 사용해야 합니다.
properties:
otg-rev:
description:
Tells usb driver the release number of the OTG and EH supplement with
which the device and its descriptors are compliant, in binary-coded
decimal (i.e. 2.0 is 0200H). This property is used if any real OTG
features (HNP/SRP/ADP) is enabled. If ADP is required, otg-rev should be
0x0200 or above.
$ref: /schemas/types.yaml#/definitions/uint32
enum: [0x0100, 0x0120, 0x0130, 0x0200]
dr_mode:
description:
Tells Dual-Role USB controllers that we want to work on a particular
mode. In case this attribute isn't passed via DT, USB DRD controllers
should default to OTG.
$ref: /schemas/types.yaml#/definitions/string
enum: [host, peripheral, otg]
default: otg
HNP·SRP·ADP 비활성화
32-50`hnp-disable`은 OTG HNP를 끕니다. HNP는 실제 OTG의 기본 기능이지만 SRP-capable-only B device로 제한할 때 비활성화할 수 있습니다.
`srp-disable`과 `adp-disable`은 각각 OTG의 선택 기능인 SRP와 ADP를 비활성화합니다.
hnp-disable:
description:
Tells OTG controllers we want to disable OTG HNP. Normally HNP is the
basic function of real OTG except you want it to be a srp-capable only B
device.
type: boolean
srp-disable:
description:
Tells OTG controllers we want to disable OTG SRP. SRP is optional for OTG
device.
type: boolean
adp-disable:
description:
Tells OTG controllers we want to disable OTG ADP. ADP is optional for OTG
device.
type: boolean
connector data role 전환
51-66`usb-role-switch`는 Type-C나 Type-B micro 같은 USB connector에 대해 host 또는 device data role을 할당할 수 있음을 나타냅니다. connector 형식은 `connector/usb-connector.yaml`을 참조합니다.
`role-switch-default-mode`는 role switch가 활성화됐지만 USB role이 `USB_ROLE_NONE`일 때 controller의 기본 동작 mode입니다. host 또는 peripheral을 선택하며 기본값은 peripheral입니다. controller별 확장 속성은 허용합니다.
usb-role-switch:
description:
Indicates that the device is capable of assigning the USB data role
(USB host or USB device) for a given USB connector, such as Type-C,
Type-B(micro). See connector/usb-connector.yaml.
role-switch-default-mode:
description:
Indicates if usb-role-switch is enabled, the device default operation
mode of controller while usb role is USB_ROLE_NONE.
$ref: /schemas/types.yaml#/definitions/string
enum: [host, peripheral]
default: peripheral
additionalProperties: true
DWC3 OTG 2.0 예제
67-79예제 DWC3 controller는 USB2·USB3 PHY, SuperSpeed, OTG mode와 wide UTMI를 사용합니다. `otg-rev = <0x0200>`으로 OTG 2.0을 표시하고 ADP는 비활성화합니다.
examples:
- |
usb@4a030000 {
compatible = "snps,dwc3";
reg = <0x4a030000 0xcfff>;
interrupts = <0 92 4>;
usb-phy = <&usb2_phy>, <&usb3_phy>;
maximum-speed = "super-speed";
dr_mode = "otg";
phy_type = "utmi_wide";
otg-rev = <0x0200>;
adp-disable;
};
요약과 해설
usb-drd.yaml:1-79USB DRD의 OTG revision, HNP·SRP·ADP와 connector role switch를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, property, enum, phandle, graph endpoint, example, source path와 원문 줄 좌표를 원형대로 보존합니다.