← Documents Documentation/devicetree/bindings/usb/renesas,usb3-peri.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / USB

Renesas USB 3.0 Peripheral Controller

Renesas USB3 peripheral의 role switch, companion과 HS·SS graph를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

renesas,usb3-peri.yaml:1-150

Renesas USB3 peripheral의 role switch, companion과 HS·SS graph를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, compatible, register, interrupt, clock, PHY, graph endpoint, source path와 원문 줄 좌표를 원형대로 보존합니다.

2. 영어 원문 전체

번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.

원문 전체 펼치기
1 # SPDX-License-Identifier: GPL-2.0-only
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/usb/renesas,usb3-peri.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Renesas USB 3.0 Peripheral controller
8
9 maintainers:
10 - Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
11
12 properties:
13 compatible:
14 oneOf:
15 - items:
16 - enum:
17 - renesas,r8a774a1-usb3-peri # RZ/G2M
18 - renesas,r8a774b1-usb3-peri # RZ/G2N
19 - renesas,r8a774c0-usb3-peri # RZ/G2E
20 - renesas,r8a774e1-usb3-peri # RZ/G2H
21 - renesas,r8a7795-usb3-peri # R-Car H3
22 - renesas,r8a7796-usb3-peri # R-Car M3-W
23 - renesas,r8a77961-usb3-peri # R-Car M3-W+
24 - renesas,r8a77965-usb3-peri # R-Car M3-N
25 - renesas,r8a77990-usb3-peri # R-Car E3
26 - const: renesas,rcar-gen3-usb3-peri
27
28 - items:
29 - enum:
30 - renesas,r9a09g011-usb3-peri # RZ/V2M
31 - renesas,r9a09g055-usb3-peri # RZ/V2MA
32 - const: renesas,rzv2m-usb3-peri
33
34 reg:
35 maxItems: 1
36
37 interrupts:
38 maxItems: 1
39
40 clocks:
41 minItems: 1
42 items:
43 - description: Main clock
44 - description: Register access clock
45
46 clock-names:
47 minItems: 1
48 items:
49 - const: axi
50 - const: reg
51
52 phys:
53 maxItems: 1
54
55 phy-names:
56 const: usb
57
58 power-domains:
59 maxItems: 1
60
61 resets:
62 maxItems: 1
63
64 usb-role-switch:
65 $ref: /schemas/types.yaml#/definitions/flag
66 description: Support role switch.
67
68 companion:
69 $ref: /schemas/types.yaml#/definitions/phandle
70 description: phandle of a companion.
71
72 ports:
73 $ref: /schemas/graph.yaml#/properties/ports
74 description: |
75 any connector to the data bus of this controller should be modelled
76 using the OF graph bindings specified, if the "usb-role-switch"
77 property is used.
78
79 properties:
80 port@0:
81 $ref: /schemas/graph.yaml#/properties/port
82 description: High Speed (HS) data bus.
83
84 port@1:
85 $ref: /schemas/graph.yaml#/properties/port
86 description: Super Speed (SS) data bus.
87
88 required:
89 - port@0
90 - port@1
91
92 required:
93 - compatible
94 - interrupts
95 - clocks
96
97 allOf:
98 - if:
99 properties:
100 compatible:
101 contains:
102 enum:
103 - renesas,rzv2m-usb3-peri
104 then:
105 properties:
106 clocks:
107 minItems: 2
108 clock-names:
109 minItems: 2
110 required:
111 - clock-names
112 - resets
113 else:
114 properties:
115 clocks:
116 maxItems: 1
117
118 additionalProperties: false
119
120 examples:
121 - |
122 #include <dt-bindings/clock/r8a774c0-cpg-mssr.h>
123 #include <dt-bindings/interrupt-controller/arm-gic.h>
124 #include <dt-bindings/power/r8a774c0-sysc.h>
125
126 usb3_peri0: usb@ee020000 {
127 compatible = "renesas,r8a774c0-usb3-peri", "renesas,rcar-gen3-usb3-peri";
128 reg = <0xee020000 0x400>;
129 interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
130 clocks = <&cpg CPG_MOD 328>;
131 companion = <&xhci0>;
132 usb-role-switch;
133
134 ports {
135 #address-cells = <1>;
136 #size-cells = <0>;
137 port@0 {
138 reg = <0>;
139 usb3_hs_ep: endpoint {
140 remote-endpoint = <&hs_ep>;
141 };
142 };
143 port@1 {
144 reg = <1>;
145 usb3_role_switch: endpoint {
146 remote-endpoint = <&hd3ss3220_out_ep>;
147 };
148 };
149 };
150 };
151

3. 한국어 전문 번역

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

Renesas USB 3.0 peripheral controller

1-11

GPL-2.0-only로 배포되는 이 스키마는 Renesas USB 3.0 Peripheral controller를 정의합니다. 관리자는 Yoshihiro Shimoda입니다.

compatible, clock과 role switch

12-71

RZ/G2 및 R-Car Gen3 SoC별 compatible은 `renesas,rcar-gen3-usb3-peri`로 fallback합니다. RZ/V2M과 RZ/V2MA의 SoC별 compatible은 `renesas,rzv2m-usb3-peri`로 fallback합니다.

register와 interrupt는 각각 하나입니다. clock은 main `axi`와 register access `reg` 순서이며 최소 하나를 사용합니다. 선택 가능한 PHY는 하나이고 이름은 `usb`입니다. power domain과 reset도 각각 하나입니다.

`usb-role-switch`는 role switching 지원 flag이고, `companion`은 함께 동작하는 controller를 가리키는 phandle입니다.

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - renesas,r8a774a1-usb3-peri # RZ/G2M
              - renesas,r8a774b1-usb3-peri # RZ/G2N
              - renesas,r8a774c0-usb3-peri # RZ/G2E
              - renesas,r8a774e1-usb3-peri # RZ/G2H
              - renesas,r8a7795-usb3-peri  # R-Car H3
              - renesas,r8a7796-usb3-peri  # R-Car M3-W
              - renesas,r8a77961-usb3-peri # R-Car M3-W+
              - renesas,r8a77965-usb3-peri # R-Car M3-N
              - renesas,r8a77990-usb3-peri # R-Car E3
          - const: renesas,rcar-gen3-usb3-peri

      - items:
          - enum:
              - renesas,r9a09g011-usb3-peri # RZ/V2M
              - renesas,r9a09g055-usb3-peri # RZ/V2MA
          - const: renesas,rzv2m-usb3-peri

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  clocks:
    minItems: 1
    items:
      - description: Main clock
      - description: Register access clock

  clock-names:
    minItems: 1
    items:
      - const: axi
      - const: reg

  phys:
    maxItems: 1

  phy-names:
    const: usb

  power-domains:
    maxItems: 1

  resets:
    maxItems: 1

  usb-role-switch:
    $ref: /schemas/types.yaml#/definitions/flag
    description: Support role switch.

  companion:
    $ref: /schemas/types.yaml#/definitions/phandle
    description: phandle of a companion.

HS·SS graph port와 필수 속성

72-96

`usb-role-switch`를 사용할 때 controller data bus의 connector는 OF graph로 표현해야 합니다. `port@0`은 High Speed(HS) data bus, `port@1`은 Super Speed(SS) data bus이며 두 port 모두 필수입니다.

controller 자체의 필수 속성은 `compatible`, `interrupts`, `clocks`입니다.

  ports:
    $ref: /schemas/graph.yaml#/properties/ports
    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.

    properties:
      port@0:
        $ref: /schemas/graph.yaml#/properties/port
        description: High Speed (HS) data bus.

      port@1:
        $ref: /schemas/graph.yaml#/properties/port
        description: Super Speed (SS) data bus.

    required:
      - port@0
      - port@1

required:
  - compatible
  - interrupts
  - clocks

RZ/V2M clock·reset 조건

97-119

`renesas,rzv2m-usb3-peri`가 포함되면 clock 두 개와 이름 두 개가 필요하며 `clock-names`와 `resets`가 필수입니다. 그 밖의 compatible은 clock을 최대 하나만 사용합니다. 정의되지 않은 추가 속성은 허용하지 않습니다.

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - renesas,rzv2m-usb3-peri
    then:
      properties:
        clocks:
          minItems: 2
        clock-names:
          minItems: 2
      required:
        - clock-names
        - resets
    else:
      properties:
        clocks:
          maxItems: 1

additionalProperties: false

RZ/G2E USB3 peripheral 예제

120-150

예제 `usb3_peri0: usb@ee020000`은 RZ/G2E compatible과 R-Car Gen3 fallback, 0x400-byte register 영역, level-high GIC SPI 104, CPG clock 328을 사용합니다. `companion`은 `xhci0`이고 role switch를 활성화합니다.

graph의 `port@0` HS endpoint는 `hs_ep`에, `port@1` SS endpoint `usb3_role_switch`는 `hd3ss3220_out_ep`에 연결됩니다.

examples:
  - |
    #include <dt-bindings/clock/r8a774c0-cpg-mssr.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/power/r8a774c0-sysc.h>

    usb3_peri0: usb@ee020000 {
        compatible = "renesas,r8a774c0-usb3-peri", "renesas,rcar-gen3-usb3-peri";
        reg = <0xee020000 0x400>;
        interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_HIGH>;
        clocks = <&cpg CPG_MOD 328>;
        companion = <&xhci0>;
        usb-role-switch;

        ports {
            #address-cells = <1>;
            #size-cells = <0>;
            port@0 {
                reg = <0>;
                usb3_hs_ep: endpoint {
                    remote-endpoint = <&hs_ep>;
                };
            };
            port@1 {
                reg = <1>;
                usb3_role_switch: endpoint {
                    remote-endpoint = <&hd3ss3220_out_ep>;
                };
            };
        };
    };