요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
# Copyright 2019 BayLibre, SAS
%YAML 1.2
---
$id: http://devicetree.org/schemas/usb/amlogic,meson-g12a-usb-ctrl.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#
title: Amlogic Meson G12A DWC3 USB SoC Controller Glue
maintainers:
- Neil Armstrong <neil.armstrong@linaro.org>
description: |
The Amlogic G12A embeds a DWC3 USB IP Core configured for USB2 and USB3
in host-only mode, and a DWC2 IP Core configured for USB2 peripheral mode
only.
A glue connects the DWC3 core to USB2 PHYs and optionally to an USB3 PHY.
One of the USB2 PHYs can be re-routed in peripheral mode to a DWC2 USB IP.
The DWC3 Glue controls the PHY routing and power, an interrupt line is
connected to the Glue to serve as OTG ID change detection.
The Amlogic A1 embeds a DWC3 USB IP Core configured for USB2 in
host-only mode.
The Amlogic GXL, GXM & AXG SoCs doesn't embed an USB3 PHY.
properties:
compatible:
enum:
- amlogic,meson-gxl-usb-ctrl
- amlogic,meson-gxm-usb-ctrl
- amlogic,meson-axg-usb-ctrl
- amlogic,meson-g12a-usb-ctrl
- amlogic,meson-a1-usb-ctrl
ranges: true
"#address-cells":
enum: [ 1, 2 ]
"#size-cells":
enum: [ 1, 2 ]
clocks:
minItems: 1
maxItems: 3
clock-names:
minItems: 1
maxItems: 3
resets:
minItems: 1
reg:
maxItems: 1
interrupts:
maxItems: 1
phy-names:
minItems: 1
maxItems: 3
phys:
minItems: 1
maxItems: 3
dr_mode: true
power-domains:
maxItems: 1
vbus-supply:
description: VBUS power supply when used in OTG switchable mode
patternProperties:
"^usb@[0-9a-f]+$":
oneOf:
- $ref: dwc2.yaml#
- $ref: snps,dwc3.yaml#
additionalProperties: false
required:
- compatible
- "#address-cells"
- "#size-cells"
- ranges
- clocks
- resets
- reg
- interrupts
- phy-names
- phys
- dr_mode
allOf:
- if:
properties:
compatible:
enum:
- amlogic,meson-g12a-usb-ctrl
then:
properties:
phy-names:
minItems: 2
items:
- const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used
- const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
- const: usb3-phy0 # USB3 PHY if USB3_0 is used
- if:
properties:
compatible:
enum:
- amlogic,meson-gxl-usb-ctrl
then:
properties:
clocks:
minItems: 2
clock-names:
items:
- const: usb_ctrl
- const: ddr
phy-names:
items:
- const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used
- const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
required:
- clock-names
- if:
properties:
compatible:
enum:
- amlogic,meson-gxm-usb-ctrl
then:
properties:
clocks:
minItems: 2
clock-names:
items:
- const: usb_ctrl
- const: ddr
phy-names:
items:
- const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used
- const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
- const: usb2-phy2 # USB2 PHY2 if USBOTG_C port is used
required:
- clock-names
- if:
properties:
compatible:
enum:
- amlogic,meson-axg-usb-ctrl
then:
properties:
phy-names:
items:
- const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
clocks:
minItems: 2
clock-names:
items:
- const: usb_ctrl
- const: ddr
required:
- clock-names
- if:
properties:
compatible:
enum:
- amlogic,meson-a1-usb-ctrl
then:
properties:
phy-names:
items:
- const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
clocks:
minItems: 3
clock-names:
items:
- const: usb_ctrl
- const: usb_bus
- const: xtal_usb_ctrl
required:
- clock-names
examples:
- |
usb: usb@ffe09000 {
compatible = "amlogic,meson-g12a-usb-ctrl";
reg = <0xffe09000 0xa0>;
interrupts = <16>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
clocks = <&clkc_usb>;
resets = <&reset_usb>;
dr_mode = "otg";
phys = <&usb2_phy0>, <&usb2_phy1>, <&usb3_phy0>;
phy-names = "usb2-phy0", "usb2-phy1", "usb3-phy0";
dwc2: usb@ff400000 {
compatible = "amlogic,meson-g12a-usb", "snps,dwc2";
reg = <0xff400000 0x40000>;
interrupts = <31>;
clocks = <&clkc_usb1>;
clock-names = "otg";
phys = <&usb2_phy1>;
dr_mode = "peripheral";
g-rx-fifo-size = <192>;
g-np-tx-fifo-size = <128>;
g-tx-fifo-size = <128 128 16 16 16>;
};
dwc3: usb@ff500000 {
compatible = "snps,dwc3";
reg = <0xff500000 0x100000>;
interrupts = <30>;
dr_mode = "host";
snps,dis_u2_susphy_quirk;
snps,quirk-frame-length-adjustment = <0x20>;
};
};
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
Amlogic Meson USB controller glue
1-29GPL-2.0 또는 BSD-2-Clause 라이선스의 이 schema는 Amlogic Meson G12A DWC3 USB SoC controller glue를 정의합니다. Copyright는 2019 BayLibre, SAS이고 관리자는 Neil Armstrong입니다.
G12A에는 USB2와 USB3의 host-only mode로 구성한 DWC3 IP core와 USB2 peripheral-only mode로 구성한 DWC2 IP core가 들어갑니다. Glue는 DWC3 core를 USB2 PHY들과 선택적인 USB3 PHY에 연결하며, USB2 PHY 하나를 peripheral mode에서 DWC2 IP로 다시 경로 설정할 수 있습니다.
DWC3 glue는 PHY 경로와 전원을 제어하고 OTG ID 변경을 감지하는 interrupt line을 받습니다. A1은 USB2 host-only mode의 DWC3 core를 포함합니다. GXL, GXM, AXG SoC에는 USB3 PHY가 없습니다.
공통 resource와 PHY
30-79지원 `compatible`은 `amlogic,meson-gxl-usb-ctrl`, `amlogic,meson-gxm-usb-ctrl`, `amlogic,meson-axg-usb-ctrl`, `amlogic,meson-g12a-usb-ctrl`, `amlogic,meson-a1-usb-ctrl`입니다. `ranges`를 사용하며 `#address-cells`와 `#size-cells`는 각각 1 또는 2입니다.
Clock은 1~3개이고 `clock-names`도 1~3개입니다. Reset은 최소 1개, `reg`와 `interrupts`는 각각 최대 1개입니다. `phys`와 `phy-names`는 각각 1~3개이며 `dr_mode`를 지원합니다. `power-domains`는 최대 한 항목이고 `vbus-supply`는 OTG 전환 가능 mode에서 쓰는 VBUS 전원입니다.
properties:
compatible:
enum:
- amlogic,meson-gxl-usb-ctrl
- amlogic,meson-gxm-usb-ctrl
- amlogic,meson-axg-usb-ctrl
- amlogic,meson-g12a-usb-ctrl
- amlogic,meson-a1-usb-ctrl
ranges: true
"#address-cells":
enum: [ 1, 2 ]
"#size-cells":
enum: [ 1, 2 ]
clocks:
minItems: 1
maxItems: 3
clock-names:
minItems: 1
maxItems: 3
resets:
minItems: 1
reg:
maxItems: 1
interrupts:
maxItems: 1
phy-names:
minItems: 1
maxItems: 3
phys:
minItems: 1
maxItems: 3
dr_mode: true
power-domains:
maxItems: 1
vbus-supply:
description: VBUS power supply when used in OTG switchable mode
DWC2·DWC3 child와 필수 속성
80-100이름이 `usb@[0-9a-f]+` pattern과 일치하는 child node는 `dwc2.yaml` 또는 `snps,dwc3.yaml` 중 하나를 따라야 합니다. 정의되지 않은 추가 속성은 허용하지 않습니다.
필수 속성은 `compatible`, `#address-cells`, `#size-cells`, `ranges`, `clocks`, `resets`, `reg`, `interrupts`, `phy-names`, `phys`, `dr_mode`입니다.
patternProperties:
"^usb@[0-9a-f]+$":
oneOf:
- $ref: dwc2.yaml#
- $ref: snps,dwc3.yaml#
additionalProperties: false
required:
- compatible
- "#address-cells"
- "#size-cells"
- ranges
- clocks
- resets
- reg
- interrupts
- phy-names
- phys
- dr_mode
G12A PHY 이름
101-116G12A compatible에서는 PHY가 최소 2개입니다. 순서대로 USBHOST_A port용 `usb2-phy0`, USBOTG_B port용 `usb2-phy1`을 두고, USB3_0을 사용하면 세 번째 `usb3-phy0`을 둡니다.
allOf:
- if:
properties:
compatible:
enum:
- amlogic,meson-g12a-usb-ctrl
then:
properties:
phy-names:
minItems: 2
items:
- const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used
- const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
- const: usb3-phy0 # USB3 PHY if USB3_0 is used
- if:
GXL clock과 PHY
117-136GXL compatible에서는 clock이 최소 2개이며 이름은 `usb_ctrl`, `ddr` 순서입니다. PHY 이름은 USBHOST_A용 `usb2-phy0`, USBOTG_B용 `usb2-phy1` 순서이고 `clock-names`가 필수입니다.
properties:
compatible:
enum:
- amlogic,meson-gxl-usb-ctrl
then:
properties:
clocks:
minItems: 2
clock-names:
items:
- const: usb_ctrl
- const: ddr
phy-names:
items:
- const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used
- const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
required:
- clock-names
- if:
GXM clock과 세 USB2 PHY
137-158GXM compatible에서도 clock은 최소 2개이고 이름은 `usb_ctrl`, `ddr`입니다. PHY 이름은 USBHOST_A의 `usb2-phy0`, USBOTG_B의 `usb2-phy1`, USBOTG_C의 `usb2-phy2` 순서이며 `clock-names`가 필수입니다.
properties:
compatible:
enum:
- amlogic,meson-gxm-usb-ctrl
then:
properties:
clocks:
minItems: 2
clock-names:
items:
- const: usb_ctrl
- const: ddr
phy-names:
items:
- const: usb2-phy0 # USB2 PHY0 if USBHOST_A port is used
- const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
- const: usb2-phy2 # USB2 PHY2 if USBOTG_C port is used
required:
- clock-names
- if:
AXG clock과 PHY
159-177AXG compatible의 PHY 이름은 USBOTG_B용 `usb2-phy1` 하나입니다. Clock은 최소 2개이고 이름은 `usb_ctrl`, `ddr` 순서이며 `clock-names`가 필수입니다.
properties:
compatible:
enum:
- amlogic,meson-axg-usb-ctrl
then:
properties:
phy-names:
items:
- const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
clocks:
minItems: 2
clock-names:
items:
- const: usb_ctrl
- const: ddr
required:
- clock-names
- if:
A1의 세 clock
178-197A1 compatible의 PHY 이름은 USBOTG_B용 `usb2-phy1`입니다. Clock은 최소 3개이고 이름은 `usb_ctrl`, `usb_bus`, `xtal_usb_ctrl` 순서이며 `clock-names`가 필수입니다.
properties:
compatible:
enum:
- amlogic,meson-a1-usb-ctrl
then:
properties:
phy-names:
items:
- const: usb2-phy1 # USB2 PHY1 if USBOTG_B port is used
clocks:
minItems: 3
clock-names:
items:
- const: usb_ctrl
- const: usb_bus
- const: xtal_usb_ctrl
required:
- clock-names
G12A glue 예제
198-215예제 `usb: usb@ffe09000` wrapper는 G12A compatible, 0xa0-byte register 영역, interrupt 16, 한 개의 address/size cell과 빈 `ranges`를 사용합니다. `clkc_usb` clock과 `reset_usb` reset을 연결하고 mode는 `otg`입니다.
PHY는 `usb2_phy0`, `usb2_phy1`, `usb3_phy0`을 순서대로 연결하며 이름도 `usb2-phy0`, `usb2-phy1`, `usb3-phy0` 순서입니다.
examples:
- |
usb: usb@ffe09000 {
compatible = "amlogic,meson-g12a-usb-ctrl";
reg = <0xffe09000 0xa0>;
interrupts = <16>;
#address-cells = <1>;
#size-cells = <1>;
ranges;
clocks = <&clkc_usb>;
resets = <&reset_usb>;
dr_mode = "otg";
phys = <&usb2_phy0>, <&usb2_phy1>, <&usb3_phy0>;
phy-names = "usb2-phy0", "usb2-phy1", "usb3-phy0";
DWC2 peripheral과 DWC3 host child
216-237DWC2 child `usb@ff400000`은 Amlogic G12A USB와 Synopsys DWC2 compatible을 함께 사용하고 0x40000-byte 영역, interrupt 31, `otg` 이름의 `clkc_usb1` clock, 두 번째 USB2 PHY를 연결합니다. Mode는 `peripheral`이며 RX FIFO 192, non-periodic TX FIFO 128, TX FIFO 배열 128·128·16·16·16을 지정합니다.
DWC3 child `usb@ff500000`은 Synopsys DWC3 compatible, 0x100000-byte 영역, interrupt 30, `host` mode를 사용합니다. USB2 suspend PHY quirk를 끄고 frame length 조정값을 0x20으로 지정합니다.
dwc2: usb@ff400000 {
compatible = "amlogic,meson-g12a-usb", "snps,dwc2";
reg = <0xff400000 0x40000>;
interrupts = <31>;
clocks = <&clkc_usb1>;
clock-names = "otg";
phys = <&usb2_phy1>;
dr_mode = "peripheral";
g-rx-fifo-size = <192>;
g-np-tx-fifo-size = <128>;
g-tx-fifo-size = <128 128 16 16 16>;
};
dwc3: usb@ff500000 {
compatible = "snps,dwc3";
reg = <0xff500000 0x100000>;
interrupts = <30>;
dr_mode = "host";
snps,dis_u2_susphy_quirk;
snps,quirk-frame-length-adjustment = <0x20>;
};
};
요약과 해설
amlogic,meson-g12a-usb-ctrl.yaml:1-237Amlogic G12A 계열 USB glue의 DWC2·DWC3 경로, SoC별 clock·PHY 조건과 host·peripheral 예제를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, compatible, register, clock, interrupt, PHY, endpoint, source path와 원문 줄 좌표를 원형대로 보존합니다.