요약·해설과 원문, 전문 번역을 서로 분리했습니다. 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/dwc2.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: DesignWare HS OTG USB 2.0 controller
maintainers:
- Rob Herring <[email protected]>
allOf:
- $ref: usb-drd.yaml#
- $ref: usb-hcd.yaml#
properties:
compatible:
oneOf:
- const: brcm,bcm2835-usb
- const: hisilicon,hi6220-usb
- const: ingenic,jz4775-otg
- const: ingenic,jz4780-otg
- const: ingenic,x1000-otg
- const: ingenic,x1600-otg
- const: ingenic,x1700-otg
- const: ingenic,x1830-otg
- const: ingenic,x2000-otg
- items:
- const: rockchip,rk3066-usb
- const: snps,dwc2
- items:
- enum:
- rockchip,px30-usb
- rockchip,rk3036-usb
- rockchip,rk3128-usb
- rockchip,rk3188-usb
- rockchip,rk3228-usb
- rockchip,rk3288-usb
- rockchip,rk3308-usb
- rockchip,rk3328-usb
- rockchip,rk3368-usb
- rockchip,rv1108-usb
- const: rockchip,rk3066-usb
- const: snps,dwc2
- const: lantiq,arx100-usb
- const: lantiq,ase-usb
- const: lantiq,danube-usb
- const: lantiq,xrx200-usb
- const: lantiq,xrx300-usb
- items:
- enum:
- amlogic,meson8-usb
- amlogic,meson8b-usb
- amlogic,meson-gxbb-usb
- amlogic,meson-g12a-usb
- amlogic,meson-a1-usb
- intel,socfpga-agilex-hsotg
- const: snps,dwc2
- const: amcc,dwc-otg
- const: apm,apm82181-dwc-otg
- const: snps,dwc2
- const: sophgo,cv1800b-usb
- const: st,stm32f4x9-fsotg
- const: st,stm32f4x9-hsotg
- const: st,stm32f7-hsotg
- const: st,stm32mp15-fsotg
- items:
- const: st,stm32mp15-hsotg
- const: snps,dwc2
- const: samsung,s3c6400-hsotg
- const: intel,socfpga-agilex-hsotg
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
minItems: 1
maxItems: 2
clock-names:
items:
- const: otg
- const: utmi
minItems: 1
disable-over-current:
type: boolean
description: whether to disable detection of over-current condition.
iommus:
maxItems: 1
resets:
items:
- description: common reset
- description: ecc reset
minItems: 1
reset-names:
items:
- const: dwc2
- const: dwc2-ecc
minItems: 1
phys:
maxItems: 1
phy-names:
const: usb2-phy
power-domains:
maxItems: 1
vbus-supply:
description: reference to the VBUS regulator. Depending on the current mode
this is enabled (in "host" mode") or disabled (in "peripheral" mode). The
regulator is updated if the controller is configured in "otg" mode and the
status changes between "host" and "peripheral".
vusb_d-supply:
description: phandle to voltage regulator of digital section,
vusb_a-supply:
description: phandle to voltage regulator of analog section.
usb33d-supply:
description: reference to the VBUS and ID sensing comparators supply, in
order to perform OTG operation, used on STM32MP15 SoCs.
dr_mode: true
otg-rev: true
hnp-disable: true
srp-disable: true
usb-role-switch: true
role-switch-default-mode: true
g-rx-fifo-size:
$ref: /schemas/types.yaml#/definitions/uint32
description: size of rx fifo size in gadget mode.
g-np-tx-fifo-size:
$ref: /schemas/types.yaml#/definitions/uint32
description: size of non-periodic tx fifo size in gadget mode.
g-tx-fifo-size:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
snps,need-phy-for-wake:
$ref: /schemas/types.yaml#/definitions/flag
description: If present indicates that the phy needs to be left on for
remote wakeup during suspend.
snps,reset-phy-on-wake:
$ref: /schemas/types.yaml#/definitions/flag
description: If present indicates that we need to reset the PHY when we
detect a wakeup. This is due to a hardware errata.
port:
description:
Any connector to the data bus of this controller should be modelled
using the OF graph bindings specified, if the "usb-role-switch"
property is used.
$ref: /schemas/graph.yaml#/properties/port
tpl-support: true
access-controllers:
minItems: 1
maxItems: 2
dependencies:
port: [ usb-role-switch ]
role-switch-default-mode: [ usb-role-switch ]
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
unevaluatedProperties: false
examples:
- |
usb@101c0000 {
compatible = "rockchip,rk3066-usb", "snps,dwc2";
reg = <0x10180000 0x40000>;
interrupts = <18>;
clocks = <&usb_otg_ahb_clk>;
clock-names = "otg";
phys = <&usbphy>;
phy-names = "usb2-phy";
};
...
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
DesignWare HS OTG USB 2.0 컨트롤러
1-15이 GPL-2.0 스키마는 DesignWare HS OTG USB 2.0 컨트롤러를 정의합니다. 관리자는 Rob Herring입니다.
공통 dual-role USB와 USB host controller 제약을 각각 `usb-drd.yaml`과 `usb-hcd.yaml`에서 상속합니다.
SoC별 compatible과 fallback
16-72단독 compatible에는 Broadcom BCM2835, HiSilicon Hi6220, Ingenic JZ4775·JZ4780·X1000·X1600·X1700·X1830·X2000, Lantiq ARX100·ASE·Danube·XRX200·XRX300이 포함됩니다.
Rockchip RK3066은 `snps,dwc2`를 fallback으로 둡니다. PX30, RK3036, RK3128, RK3188, RK3228, RK3288, RK3308, RK3328, RK3368, RV1108은 `rockchip,rk3066-usb`, `snps,dwc2` 순서의 두 단계 fallback을 사용합니다.
Amlogic Meson8·Meson8b·GXBB·G12A·A1과 Intel SoCFPGA Agilex HSOTG도 `snps,dwc2` fallback을 사용합니다. 그 밖에 AMCC, APM82181, generic Synopsys, Sophgo CV1800B, STM32F4x9 FS/HS·STM32F7 HS·STM32MP15 FS/HS, Samsung S3C6400, Intel Agilex compatible을 허용합니다. STM32MP15 HS는 `snps,dwc2`와 함께 표기합니다.
properties:
compatible:
oneOf:
- const: brcm,bcm2835-usb
- const: hisilicon,hi6220-usb
- const: ingenic,jz4775-otg
- const: ingenic,jz4780-otg
- const: ingenic,x1000-otg
- const: ingenic,x1600-otg
- const: ingenic,x1700-otg
- const: ingenic,x1830-otg
- const: ingenic,x2000-otg
- items:
- const: rockchip,rk3066-usb
- const: snps,dwc2
- items:
- enum:
- rockchip,px30-usb
- rockchip,rk3036-usb
- rockchip,rk3128-usb
- rockchip,rk3188-usb
- rockchip,rk3228-usb
- rockchip,rk3288-usb
- rockchip,rk3308-usb
- rockchip,rk3328-usb
- rockchip,rk3368-usb
- rockchip,rv1108-usb
- const: rockchip,rk3066-usb
- const: snps,dwc2
- const: lantiq,arx100-usb
- const: lantiq,ase-usb
- const: lantiq,danube-usb
- const: lantiq,xrx200-usb
- const: lantiq,xrx300-usb
- items:
- enum:
- amlogic,meson8-usb
- amlogic,meson8b-usb
- amlogic,meson-gxbb-usb
- amlogic,meson-g12a-usb
- amlogic,meson-a1-usb
- intel,socfpga-agilex-hsotg
- const: snps,dwc2
- const: amcc,dwc-otg
- const: apm,apm82181-dwc-otg
- const: snps,dwc2
- const: sophgo,cv1800b-usb
- const: st,stm32f4x9-fsotg
- const: st,stm32f4x9-hsotg
- const: st,stm32f7-hsotg
- const: st,stm32mp15-fsotg
- items:
- const: st,stm32mp15-hsotg
- const: snps,dwc2
- const: samsung,s3c6400-hsotg
- const: intel,socfpga-agilex-hsotg
Register, interrupt, clock, reset과 PHY
73-116register 영역과 interrupt는 각각 최대 하나입니다. clock은 1~2개이며 순서대로 `otg`, `utmi` 이름을 사용하고 최소 `otg` clock 하나가 필요합니다.
`disable-over-current`는 과전류 감지를 끄는 boolean입니다. IOMMU는 최대 하나입니다. reset은 최소 하나이며 첫 항목은 common reset, 둘째 항목은 ECC reset이고 이름은 `dwc2`, `dwc2-ecc`입니다.
PHY는 최대 하나이며 이름은 `usb2-phy`입니다. power domain도 최대 하나를 지정합니다.
reg:
maxItems: 1
interrupts:
maxItems: 1
clocks:
minItems: 1
maxItems: 2
clock-names:
items:
- const: otg
- const: utmi
minItems: 1
disable-over-current:
type: boolean
description: whether to disable detection of over-current condition.
iommus:
maxItems: 1
resets:
items:
- description: common reset
- description: ecc reset
minItems: 1
reset-names:
items:
- const: dwc2
- const: dwc2-ecc
minItems: 1
phys:
maxItems: 1
phy-names:
const: usb2-phy
power-domains:
maxItems: 1
전원 공급과 USB 역할 설정
117-144`vbus-supply`는 VBUS regulator 참조입니다. host mode에서는 켜지고 peripheral mode에서는 꺼지며, OTG mode에서는 역할이 host와 peripheral 사이에서 바뀔 때 regulator 상태도 갱신됩니다.
`vusb_d-supply`와 `vusb_a-supply`는 각각 digital section과 analog section의 voltage regulator phandle입니다. `usb33d-supply`는 STM32MP15에서 OTG 동작에 필요한 VBUS·ID sensing comparator 전원입니다.
`dr_mode`, `otg-rev`, `hnp-disable`, `srp-disable`, `usb-role-switch`, `role-switch-default-mode`의 공통 정의를 그대로 허용합니다.
vbus-supply:
description: reference to the VBUS regulator. Depending on the current mode
this is enabled (in "host" mode") or disabled (in "peripheral" mode). The
regulator is updated if the controller is configured in "otg" mode and the
status changes between "host" and "peripheral".
vusb_d-supply:
description: phandle to voltage regulator of digital section,
vusb_a-supply:
description: phandle to voltage regulator of analog section.
usb33d-supply:
description: reference to the VBUS and ID sensing comparators supply, in
order to perform OTG operation, used on STM32MP15 SoCs.
dr_mode: true
otg-rev: true
hnp-disable: true
srp-disable: true
usb-role-switch: true
role-switch-default-mode: true
Gadget FIFO, wakeup과 OF graph
145-179gadget mode에서 `g-rx-fifo-size`는 RX FIFO 크기, `g-np-tx-fifo-size`는 non-periodic TX FIFO 크기입니다. `g-tx-fifo-size` 배열은 endpoint 0을 제외한 각 endpoint의 periodic TX FIFO 크기를 지정합니다.
`snps,need-phy-for-wake`가 있으면 suspend 중 remote wakeup을 위해 PHY를 켜 둡니다. `snps,reset-phy-on-wake`가 있으면 hardware errata 때문에 wakeup 감지 시 PHY를 reset합니다.
`usb-role-switch`를 사용할 때 controller data bus에 연결된 connector는 `port` OF graph binding으로 모델링해야 합니다. `tpl-support`를 허용하고 access controller는 1~2개를 받습니다.
g-rx-fifo-size:
$ref: /schemas/types.yaml#/definitions/uint32
description: size of rx fifo size in gadget mode.
g-np-tx-fifo-size:
$ref: /schemas/types.yaml#/definitions/uint32
description: size of non-periodic tx fifo size in gadget mode.
g-tx-fifo-size:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: size of periodic tx fifo per endpoint (except ep0) in gadget mode.
snps,need-phy-for-wake:
$ref: /schemas/types.yaml#/definitions/flag
description: If present indicates that the phy needs to be left on for
remote wakeup during suspend.
snps,reset-phy-on-wake:
$ref: /schemas/types.yaml#/definitions/flag
description: If present indicates that we need to reset the PHY when we
detect a wakeup. This is due to a hardware errata.
port:
description:
Any connector to the data bus of this controller should be modelled
using the OF graph bindings specified, if the "usb-role-switch"
property is used.
$ref: /schemas/graph.yaml#/properties/port
tpl-support: true
access-controllers:
minItems: 1
maxItems: 2
의존성과 필수 속성
180-192`port`와 `role-switch-default-mode`는 모두 `usb-role-switch`에 의존합니다. 필수 속성은 `compatible`, `reg`, `interrupts`, `clocks`, `clock-names`입니다.
공통 schema까지 평가한 뒤 남는 추가 속성은 허용하지 않습니다.
dependencies:
port: [ usb-role-switch ]
role-switch-default-mode: [ usb-role-switch ]
required:
- compatible
- reg
- interrupts
- clocks
- clock-names
unevaluatedProperties: false
Rockchip RK3066 예제
193-205예제 `usb@101c0000`은 RK3066 compatible과 generic DWC2 fallback, 0x40000-byte register 영역, interrupt 18, `usb_otg_ahb_clk`, `usbphy`를 사용합니다. clock 이름은 `otg`, PHY 이름은 `usb2-phy`입니다.
examples:
- |
usb@101c0000 {
compatible = "rockchip,rk3066-usb", "snps,dwc2";
reg = <0x10180000 0x40000>;
interrupts = <18>;
clocks = <&usb_otg_ahb_clk>;
clock-names = "otg";
phys = <&usbphy>;
phy-names = "usb2-phy";
};
...
요약과 해설
dwc2.yaml:1-205DWC2 controller의 SoC별 compatible, clock·reset·PHY·전원, gadget FIFO, role switch와 RK3066 예제를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, compatible, register, clock, interrupt, reset, PHY, power, source path와 원문 줄 좌표를 원형대로 보존합니다.