← Documents Documentation/devicetree/bindings/usb/cdns,usb3.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / USB

Cadence USBSS-DRD Controller

Cadence USBSS-DRD의 OTG·XHCI·device resource, Type-C role switch, PHY와 endpoint buffer 속성을 설명합니다.

Source pathDocumentation/devicetree/bindings/usb/cdns,usb3.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

cdns,usb3.yaml:1-111

Cadence USBSS-DRD의 OTG·XHCI·device resource, Type-C role switch, PHY와 endpoint buffer 속성을 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, compatible, register, clock, interrupt, GPIO, PHY, endpoint, 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/cdns,usb3.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Cadence USBSS-DRD controller
8
9 maintainers:
10 - Pawel Laszczak <[email protected]>
11
12 properties:
13 compatible:
14 const: cdns,usb3
15
16 reg:
17 items:
18 - description: OTG controller registers
19 - description: XHCI Host controller registers
20 - description: DEVICE controller registers
21
22 reg-names:
23 items:
24 - const: otg
25 - const: xhci
26 - const: dev
27
28 interrupts:
29 minItems: 3
30 items:
31 - description: XHCI host controller interrupt
32 - description: Device controller interrupt
33 - description: OTG/DRD controller interrupt
34 - description: interrupt used to wake up core, e.g when usbcmd.rs is
35 cleared by xhci core, this interrupt is optional
36
37 interrupt-names:
38 minItems: 3
39 items:
40 - const: host
41 - const: peripheral
42 - const: otg
43 - const: wakeup
44
45 port:
46 $ref: /schemas/graph.yaml#/properties/port
47 description:
48 This port is used with the 'usb-role-switch' property to connect the
49 cdns3 to type C connector.
50
51 maximum-speed:
52 enum: [super-speed, high-speed, full-speed]
53
54 phys:
55 minItems: 1
56 maxItems: 2
57
58 phy-names:
59 minItems: 1
60 maxItems: 2
61 items:
62 anyOf:
63 - const: cdns3,usb2-phy
64 - const: cdns3,usb3-phy
65
66 cdns,on-chip-buff-size:
67 description:
68 size of memory intended as internal memory for endpoints
69 buffers expressed in KB
70 $ref: /schemas/types.yaml#/definitions/uint16
71
72 cdns,phyrst-a-enable:
73 description: Enable resetting of PHY if Rx fail is detected
74 type: boolean
75
76 dependencies:
77 port: [ usb-role-switch ]
78
79 required:
80 - compatible
81 - reg
82 - reg-names
83 - interrupts
84 - interrupt-names
85
86 allOf:
87 - $ref: usb-drd.yaml#
88
89 unevaluatedProperties: false
90
91 examples:
92 - |
93 #include <dt-bindings/interrupt-controller/arm-gic.h>
94 bus {
95 #address-cells = <2>;
96 #size-cells = <2>;
97
98 usb@6000000 {
99 compatible = "cdns,usb3";
100 reg = <0x00 0x6000000 0x00 0x10000>,
101 <0x00 0x6010000 0x00 0x10000>,
102 <0x00 0x6020000 0x00 0x10000>;
103 reg-names = "otg", "xhci", "dev";
104 interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
105 <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
106 <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
107 interrupt-names = "host", "peripheral", "otg";
108 maximum-speed = "super-speed";
109 dr_mode = "otg";
110 };
111 };
112

3. 한국어 전문 번역

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

Cadence USBSS-DRD controller

1-11

GPL-2.0-only 또는 BSD-2-Clause 라이선스의 이 schema는 Cadence USBSS-DRD controller를 정의합니다. 관리자는 Pawel Laszczak입니다.

세 register 영역과 interrupt

12-44

`compatible`은 `cdns,usb3`입니다. `reg`는 OTG, XHCI host, DEVICE controller register 영역 3개이고 `reg-names`는 `otg`, `xhci`, `dev` 순서입니다.

Interrupt는 최소 3개입니다. 순서대로 XHCI host, device, OTG/DRD interrupt가 필수이고 네 번째 wakeup interrupt는 선택 사항입니다. Wakeup interrupt는 예를 들어 XHCI core가 `usbcmd.rs`를 clear할 때 core를 깨우는 데 사용합니다. 이름은 `host`, `peripheral`, `otg`, 선택적인 `wakeup` 순서입니다.

properties:
  compatible:
    const: cdns,usb3

  reg:
    items:
      - description: OTG controller registers
      - description: XHCI Host controller registers
      - description: DEVICE controller registers

  reg-names:
    items:
      - const: otg
      - const: xhci
      - const: dev

  interrupts:
    minItems: 3
    items:
      - description: XHCI host controller interrupt
      - description: Device controller interrupt
      - description: OTG/DRD controller interrupt
      - description: interrupt used to wake up core, e.g when usbcmd.rs is
                     cleared by xhci core, this interrupt is optional

  interrupt-names:
    minItems: 3
    items:
      - const: host
      - const: peripheral
      - const: otg
      - const: wakeup

Role switch, 속도, PHY와 endpoint buffer

45-75

`port`는 graph schema의 port를 따르며 `usb-role-switch`와 함께 Cadence USB3 controller를 Type-C connector에 연결합니다. `maximum-speed`는 `super-speed`, `high-speed`, `full-speed` 중 하나입니다.

PHY는 1~2개이고 이름도 1~2개입니다. 각 이름은 `cdns3,usb2-phy` 또는 `cdns3,usb3-phy`입니다. `cdns,on-chip-buff-size`는 endpoint buffer용 내부 memory 크기를 KB 단위 uint16으로 지정합니다. Boolean `cdns,phyrst-a-enable`은 RX 실패를 감지했을 때 PHY reset을 활성화합니다.

port:
  $ref: /schemas/graph.yaml#/properties/port
  description:
    This port is used with the 'usb-role-switch' property to connect the
    cdns3 to type C connector.

maximum-speed:
  enum: [super-speed, high-speed, full-speed]

phys:
  minItems: 1
  maxItems: 2

phy-names:
  minItems: 1
  maxItems: 2
  items:
    anyOf:
      - const: cdns3,usb2-phy
      - const: cdns3,usb3-phy

cdns,on-chip-buff-size:
  description:
    size of memory intended as internal memory for endpoints
    buffers expressed in KB
  $ref: /schemas/types.yaml#/definitions/uint16

cdns,phyrst-a-enable:
  description: Enable resetting of PHY if Rx fail is detected
  type: boolean

Dependency와 DRD 공통 schema

76-90

`port`를 사용하려면 `usb-role-switch`가 필요합니다. 필수 속성은 `compatible`, `reg`, `reg-names`, `interrupts`, `interrupt-names`입니다. 공통 `usb-drd.yaml`을 참조하며 평가되지 않은 추가 속성은 허용하지 않습니다.

dependencies:
  port: [ usb-role-switch ]

required:
  - compatible
  - reg
  - reg-names
  - interrupts
  - interrupt-names

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

unevaluatedProperties: false

Cadence DRD 예제

91-111

예제 `usb@6000000`은 OTG, XHCI, device에 각각 0x10000-byte register 영역을 배정합니다. Level-high GIC SPI 96, 102, 120은 각각 `host`, `peripheral`, `otg` interrupt입니다.

최대 속도는 `super-speed`이고 `dr_mode`는 `otg`입니다. 예제에는 선택적인 wakeup interrupt나 PHY가 없습니다.

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    bus {
        #address-cells = <2>;
        #size-cells = <2>;

        usb@6000000 {
            compatible = "cdns,usb3";
            reg = <0x00 0x6000000 0x00 0x10000>,
                  <0x00 0x6010000 0x00 0x10000>,
                  <0x00 0x6020000 0x00 0x10000>;
            reg-names = "otg", "xhci", "dev";
            interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
                         <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
            interrupt-names = "host", "peripheral", "otg";
            maximum-speed = "super-speed";
            dr_mode = "otg";
        };
    };