← Documents Documentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / USB

NXP i.MX8MP SoC USB Controller

i.MX8MP·i.MX95 DWC3 wrapper의 register·clock·wakeup·power 설정과 DWC3 child 예제를 설명합니다.

Source pathDocumentation/devicetree/bindings/usb/fsl,imx8mp-dwc3.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

fsl,imx8mp-dwc3.yaml:1-143

i.MX8MP·i.MX95 DWC3 wrapper의 register·clock·wakeup·power 설정과 DWC3 child 예제를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, compatible, register, clock, interrupt, reset, PHY, connector, source path와 원문 줄 좌표를 원형대로 보존합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 # Copyright (c) 2020 NXP
3 %YAML 1.2
4 ---
5 $id: http://devicetree.org/schemas/usb/fsl,imx8mp-dwc3.yaml#
6 $schema: http://devicetree.org/meta-schemas/core.yaml#
7
8 title: NXP iMX8MP Soc USB Controller
9
10 maintainers:
11 - Li Jun <[email protected]>
12
13 properties:
14 compatible:
15 oneOf:
16 - items:
17 - const: fsl,imx95-dwc3
18 - const: fsl,imx8mp-dwc3
19 - const: fsl,imx8mp-dwc3
20
21 reg:
22 items:
23 - description: Address and length of the register set for HSIO Block Control
24 - description: Address and length of the register set for the wrapper of dwc3 core on the SOC.
25
26 "#address-cells":
27 enum: [ 1, 2 ]
28
29 "#size-cells":
30 enum: [ 1, 2 ]
31
32 dma-ranges:
33 description:
34 See section 2.3.9 of the DeviceTree Specification.
35
36 ranges: true
37
38 interrupts:
39 maxItems: 1
40 description: The interrupt that is asserted when a wakeup event is
41 received.
42
43 clocks:
44 description:
45 A list of phandle and clock-specifier pairs for the clocks
46 listed in clock-names.
47 items:
48 - description: system hsio root clock.
49 - description: suspend clock, used for usb wakeup logic.
50
51 clock-names:
52 items:
53 - const: hsio
54 - const: suspend
55
56 fsl,permanently-attached:
57 type: boolean
58 description:
59 Indicates if the device attached to a downstream port is
60 permanently attached.
61
62 fsl,disable-port-power-control:
63 type: boolean
64 description:
65 Indicates whether the host controller implementation includes port
66 power control. Defines Bit 3 in capability register (HCCPARAMS).
67
68 fsl,over-current-active-low:
69 type: boolean
70 description:
71 Over current signal polarity is active low.
72
73 fsl,power-active-low:
74 type: boolean
75 description:
76 Power pad (PWR) polarity is active low.
77
78 power-domains:
79 maxItems: 1
80
81 # Required child node:
82
83 patternProperties:
84 "^usb@[0-9a-f]+$":
85 $ref: snps,dwc3.yaml#
86
87 required:
88 - compatible
89 - reg
90 - "#address-cells"
91 - "#size-cells"
92 - ranges
93 - clocks
94 - clock-names
95 - interrupts
96 - power-domains
97
98 allOf:
99 - if:
100 properties:
101 compatible:
102 const: fsl,imx8mp-dwc3
103 then:
104 required:
105 - dma-ranges
106
107 additionalProperties: false
108
109 examples:
110 - |
111 #include <dt-bindings/clock/imx8mp-clock.h>
112 #include <dt-bindings/power/imx8mp-power.h>
113 #include <dt-bindings/interrupt-controller/arm-gic.h>
114 usb3_0: usb@32f10100 {
115 compatible = "fsl,imx8mp-dwc3";
116 reg = <0x32f10100 0x8>,
117 <0x381f0000 0x20>;
118 clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
119 <&clk IMX8MP_CLK_USB_ROOT>;
120 clock-names = "hsio", "suspend";
121 interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
122 power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
123 #address-cells = <1>;
124 #size-cells = <1>;
125 dma-ranges = <0x40000000 0x40000000 0xc0000000>;
126 ranges;
127
128 usb@38100000 {
129 compatible = "snps,dwc3";
130 reg = <0x38100000 0x10000>;
131 clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
132 <&clk IMX8MP_CLK_USB_CORE_REF>,
133 <&clk IMX8MP_CLK_USB_ROOT>;
134 clock-names = "bus_early", "ref", "suspend";
135 assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>;
136 assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>;
137 assigned-clock-rates = <500000000>;
138 interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
139 phys = <&usb3_phy0>, <&usb3_phy0>;
140 phy-names = "usb2-phy", "usb3-phy";
141 snps,dis-u2-freeclk-exists-quirk;
142 };
143 };
144

3. 한국어 전문 번역

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

NXP i.MX8MP SoC USB controller

1-12

GPL-2.0-only 또는 BSD-2-Clause로 배포되는 이 schema는 NXP i.MX8MP SoC USB controller를 정의합니다. 저작권자는 NXP, 관리자는 Li Jun입니다.

Compatible, register와 wakeup interrupt

13-41

`compatible`은 `fsl,imx8mp-dwc3` 단독이거나 `fsl,imx95-dwc3` 뒤에 i.MX8MP fallback을 둔 조합입니다.

`reg`의 첫 영역은 HSIO Block Control register set, 둘째 영역은 SoC의 DWC3 core wrapper register set입니다. address cell과 size cell 수는 각각 1 또는 2입니다.

`dma-ranges`는 Devicetree Specification 2.3.9절을 따르고 `ranges`를 허용합니다. interrupt는 wakeup event 수신 시 assert되는 항목 하나입니다.

properties:
  compatible:
    oneOf:
      - items:
          - const: fsl,imx95-dwc3
          - const: fsl,imx8mp-dwc3
      - const: fsl,imx8mp-dwc3

  reg:
    items:
      - description: Address and length of the register set for HSIO Block Control
      - description: Address and length of the register set for the wrapper of dwc3 core on the SOC.

  "#address-cells":
    enum: [ 1, 2 ]

  "#size-cells":
    enum: [ 1, 2 ]

  dma-ranges:
    description:
      See section 2.3.9 of the DeviceTree Specification.

  ranges: true

  interrupts:
    maxItems: 1
    description: The interrupt that is asserted when a wakeup event is
      received.

Clock, platform boolean과 power domain

42-80

clock은 두 개입니다. `hsio`는 system HSIO root clock이고 `suspend`는 USB wakeup logic에 사용하는 suspend clock입니다.

`fsl,permanently-attached`는 downstream port의 device가 영구 연결됐음을 나타냅니다. `fsl,disable-port-power-control`은 host controller가 port power control을 포함하는지 나타내며 capability register HCCPARAMS의 bit 3을 정의합니다.

`fsl,over-current-active-low`는 over-current signal이 active-low임을, `fsl,power-active-low`는 power pad PWR polarity가 active-low임을 뜻합니다. power domain은 최대 하나입니다.


clocks:
  description:
    A list of phandle and clock-specifier pairs for the clocks
    listed in clock-names.
  items:
    - description: system hsio root clock.
    - description: suspend clock, used for usb wakeup logic.

clock-names:
  items:
    - const: hsio
    - const: suspend

fsl,permanently-attached:
  type: boolean
  description:
    Indicates if the device attached to a downstream port is
    permanently attached.

fsl,disable-port-power-control:
  type: boolean
  description:
    Indicates whether the host controller implementation includes port
    power control. Defines Bit 3 in capability register (HCCPARAMS).

fsl,over-current-active-low:
  type: boolean
  description:
    Over current signal polarity is active low.

fsl,power-active-low:
  type: boolean
  description:
    Power pad (PWR) polarity is active low.

power-domains:
  maxItems: 1

DWC3 child, 필수 속성과 조건

81-108

16진 주소를 이름에 넣은 `usb@...` child node는 `snps,dwc3.yaml`을 따라야 합니다.

필수 속성은 `compatible`, `reg`, `#address-cells`, `#size-cells`, `ranges`, `clocks`, `clock-names`, `interrupts`, `power-domains`입니다.

`compatible`이 `fsl,imx8mp-dwc3`이면 `dma-ranges`도 반드시 필요합니다. 정의되지 않은 추가 속성은 허용하지 않습니다.

# Required child node:

patternProperties:
  "^usb@[0-9a-f]+$":
    $ref: snps,dwc3.yaml#

required:
  - compatible
  - reg
  - "#address-cells"
  - "#size-cells"
  - ranges
  - clocks
  - clock-names
  - interrupts
  - power-domains

allOf:
  - if:
      properties:
        compatible:
          const: fsl,imx8mp-dwc3
    then:
      required:
        - dma-ranges

additionalProperties: false

i.MX8MP wrapper와 DWC3 core 예제

109-143

예제 wrapper `usb@32f10100`은 HSIO control과 DWC3 wrapper 두 register 영역, HSIO root·USB root clock, GIC SPI 148 wakeup interrupt, USB power domain, `dma-ranges`와 빈 `ranges`를 사용합니다.

child `usb@38100000`은 `snps,dwc3`, 0x10000-byte register 영역, `bus_early`·`ref`·`suspend` clock을 지정합니다. HSIO AXI clock parent를 SYS PLL2 500M으로 정하고 rate를 500 MHz로 설정합니다.

DWC3 core interrupt는 GIC SPI 40입니다. 같은 `usb3_phy0`를 USB2·USB3 PHY로 참조하고 `snps,dis-u2-freeclk-exists-quirk`를 활성화합니다.

examples:
  - |
    #include <dt-bindings/clock/imx8mp-clock.h>
    #include <dt-bindings/power/imx8mp-power.h>
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    usb3_0: usb@32f10100 {
      compatible = "fsl,imx8mp-dwc3";
      reg = <0x32f10100 0x8>,
            <0x381f0000 0x20>;
      clocks = <&clk IMX8MP_CLK_HSIO_ROOT>,
               <&clk IMX8MP_CLK_USB_ROOT>;
      clock-names = "hsio", "suspend";
      interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
      power-domains = <&hsio_blk_ctrl IMX8MP_HSIOBLK_PD_USB>;
      #address-cells = <1>;
      #size-cells = <1>;
      dma-ranges = <0x40000000 0x40000000 0xc0000000>;
      ranges;

      usb@38100000 {
        compatible = "snps,dwc3";
        reg = <0x38100000 0x10000>;
        clocks = <&clk IMX8MP_CLK_HSIO_AXI>,
                 <&clk IMX8MP_CLK_USB_CORE_REF>,
                 <&clk IMX8MP_CLK_USB_ROOT>;
        clock-names = "bus_early", "ref", "suspend";
        assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>;
        assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>;
        assigned-clock-rates = <500000000>;
        interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>;
        phys = <&usb3_phy0>, <&usb3_phy0>;
        phy-names = "usb2-phy", "usb3-phy";
        snps,dis-u2-freeclk-exists-quirk;
      };
    };