← Documents Documentation/devicetree/bindings/usb/st,typec-stm32g0.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / USB

STMicroelectronics STM32G0 Type-C PD Controller

STM32G0의 UCSI-over-I2C, firmware, alert와 role-switch graph를 설명합니다.

Source pathDocumentation/devicetree/bindings/usb/st,typec-stm32g0.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

st,typec-stm32g0.yaml:1-91

STM32G0의 UCSI-over-I2C, firmware, alert와 role-switch graph를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, compatible, interrupt, clock, reset, regulator, graph endpoint, source path와 원문 줄 좌표를 원형대로 보존합니다.

2. 영어 원문 전체

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

원문 전체 펼치기
1 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/usb/st,typec-stm32g0.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: STMicroelectronics STM32G0 USB Type-C PD controller
8
9 description: |
10 The STM32G0 MCU can be programmed to control Type-C connector(s) through I2C
11 typically using the UCSI protocol over I2C, with a dedicated alert
12 (interrupt) pin.
13
14 maintainers:
15 - Fabrice Gasnier <[email protected]>
16
17 properties:
18 compatible:
19 const: st,stm32g0-typec
20
21 reg:
22 maxItems: 1
23
24 interrupts:
25 maxItems: 1
26
27 connector:
28 type: object
29 $ref: /schemas/connector/usb-connector.yaml#
30 unevaluatedProperties: false
31
32 firmware-name:
33 description: |
34 Should contain the name of the default firmware image
35 file located on the firmware search path
36
37 wakeup-source: true
38
39 power-domains:
40 maxItems: 1
41
42 required:
43 - compatible
44 - reg
45 - interrupts
46 - connector
47
48 additionalProperties: false
49
50 examples:
51 - |
52 #include <dt-bindings/interrupt-controller/irq.h>
53 i2c {
54 #address-cells = <1>;
55 #size-cells = <0>;
56
57 typec@53 {
58 compatible = "st,stm32g0-typec";
59 reg = <0x53>;
60 /* Alert pin on GPIO PE12 */
61 interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
62 interrupt-parent = <&gpioe>;
63
64 /* Example with one type-C connector */
65 connector {
66 compatible = "usb-c-connector";
67 label = "USB-C";
68
69 ports {
70 #address-cells = <1>;
71 #size-cells = <0>;
72 port@0 {
73 reg = <0>;
74 con_usb_c_ep: endpoint {
75 remote-endpoint = <&usb_ep>;
76 };
77 };
78 };
79 };
80 };
81 };
82
83 usb {
84 usb-role-switch;
85 port {
86 usb_ep: endpoint {
87 remote-endpoint = <&con_usb_c_ep>;
88 };
89 };
90 };
91 ...
92

3. 한국어 전문 번역

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

STM32G0 USB Type-C PD controller

1-16

GPL-2.0 또는 BSD-2-Clause로 배포되는 이 스키마는 STMicroelectronics STM32G0 USB Type-C PD controller를 정의합니다. STM32G0 MCU는 전용 alert interrupt pin과 보통 I2C상의 UCSI protocol을 이용해 하나 이상의 Type-C connector를 제어하도록 programming할 수 있습니다. 관리자는 Fabrice Gasnier입니다.

connector, firmware와 wakeup

17-41

compatible은 `st,stm32g0-typec`이고 register와 interrupt는 각각 하나입니다. `connector` child는 공통 USB connector schema를 따릅니다. `firmware-name`은 firmware search path에 있는 기본 image 파일 이름입니다. wakeup source와 power domain 하나를 사용할 수 있습니다.

properties:
  compatible:
    const: st,stm32g0-typec

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  connector:
    type: object
    $ref: /schemas/connector/usb-connector.yaml#
    unevaluatedProperties: false

  firmware-name:
    description: |
      Should contain the name of the default firmware image
      file located on the firmware search path

  wakeup-source: true

  power-domains:
    maxItems: 1

필수 속성

42-49

필수 속성은 `compatible`, `reg`, `interrupts`, `connector`이며 추가 속성은 허용하지 않습니다.

required:
  - compatible
  - reg
  - interrupts
  - connector

additionalProperties: false

STM32G0 alert와 role-switch graph

50-91

예제 `typec@53`은 I2C 주소 0x53과 GPIOE 12 falling-edge alert interrupt를 사용합니다. USB-C connector의 `port@0` endpoint `con_usb_c_ep`는 USB controller의 `usb-role-switch` port endpoint `usb_ep`와 상호 연결됩니다.

examples:
  - |
    #include <dt-bindings/interrupt-controller/irq.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;

      typec@53 {
        compatible = "st,stm32g0-typec";
        reg = <0x53>;
        /* Alert pin on GPIO PE12 */
        interrupts = <12 IRQ_TYPE_EDGE_FALLING>;
        interrupt-parent = <&gpioe>;

        /* Example with one type-C connector */
        connector {
          compatible = "usb-c-connector";
          label = "USB-C";

          ports {
            #address-cells = <1>;
            #size-cells = <0>;
            port@0 {
              reg = <0>;
              con_usb_c_ep: endpoint {
                remote-endpoint = <&usb_ep>;
              };
            };
          };
        };
      };
    };

    usb {
      usb-role-switch;
      port {
        usb_ep: endpoint {
          remote-endpoint = <&con_usb_c_ep>;
        };
      };
    };
...