← Documents Documentation/devicetree/bindings/usb/gpio-sbu-mux.yaml GitHub 원문 ↗

Linux 6.18.37 · Devicetree Bindings / USB

GPIO-based SBU Mux

GPIO SBU mux의 device fallback, enable·orientation GPIO 의존성과 Type-C graph 예제를 설명합니다.

Source pathDocumentation/devicetree/bindings/usb/gpio-sbu-mux.yaml
Source versionLinux v6.18.37
TranslationDUJINLABS 전문 번역 + 해설

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

1. 요약·해설

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

요약과 해설

gpio-sbu-mux.yaml:1-116

GPIO SBU mux의 device fallback, enable·orientation GPIO 의존성과 Type-C graph 예제를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, compatible, register, clock, interrupt, GPIO, PHY, 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/gpio-sbu-mux.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: GPIO-based SBU mux
8
9 maintainers:
10 - Bjorn Andersson <andersson@kernel.org>
11
12 description:
13 In USB Type-C applications the SBU lines needs to be connected, disconnected
14 and swapped depending on the altmode and orientation. This binding describes
15 a family of hardware solutions which switches between these modes using GPIO
16 signals.
17
18 properties:
19 compatible:
20 items:
21 - enum:
22 - nxp,cbdtu02043
23 - onnn,fsusb42
24 - onnn,fsusb43l10x
25 - pericom,pi3usb102
26 - ti,tmuxhs4212
27 - const: gpio-sbu-mux
28
29 enable-gpios:
30 description: Switch enable GPIO
31
32 select-gpios:
33 description: Orientation select
34
35 vcc-supply:
36 description: power supply
37
38 mode-switch: true
39 orientation-switch: true
40
41 port:
42 $ref: /schemas/graph.yaml#/properties/port
43 description:
44 A port node to link the SBU mux to a TypeC controller for the purpose of
45 handling altmode muxing and orientation switching.
46
47 required:
48 - compatible
49 - select-gpios
50 - orientation-switch
51 - port
52
53 allOf:
54 - $ref: usb-switch.yaml#
55 - $ref: usb-switch-ports.yaml#
56 - if:
57 required:
58 - mode-switch
59 then:
60 required:
61 - enable-gpios
62
63 additionalProperties: false
64
65 examples:
66 - |
67 #include <dt-bindings/gpio/gpio.h>
68
69 tcpm {
70 connector {
71 compatible = "usb-c-connector";
72
73 ports {
74 #address-cells = <1>;
75 #size-cells = <0>;
76
77 port@0 {
78 reg = <0>;
79 tcpm_hs_out: endpoint {
80 remote-endpoint = <&usb_hs_phy_in>;
81 };
82 };
83
84 port@1 {
85 reg = <1>;
86 tcpm_ss_out: endpoint {
87 remote-endpoint = <&usb_ss_phy_in>;
88 };
89 };
90
91 port@2 {
92 reg = <2>;
93 tcpm_sbu_out: endpoint {
94 remote-endpoint = <&sbu_mux_in>;
95 };
96 };
97 };
98 };
99 };
100
101 sbu-mux {
102 compatible = "pericom,pi3usb102", "gpio-sbu-mux";
103
104 enable-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>;
105 select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>;
106
107 mode-switch;
108 orientation-switch;
109
110 port {
111 sbu_mux_in: endpoint {
112 remote-endpoint = <&tcpm_sbu_out>;
113 };
114 };
115 };
116 ...
117

3. 한국어 전문 번역

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

GPIO 기반 SBU mux

1-17

GPL-2.0-only 또는 BSD-2-Clause로 배포되는 이 schema는 GPIO 기반 SBU mux를 정의합니다. 관리자는 Bjorn Andersson입니다.

USB Type-C application에서는 altmode와 orientation에 따라 SBU line을 연결·분리·교환해야 합니다. 이 binding은 GPIO signal로 그 mode를 전환하는 hardware 계열을 설명합니다.

Compatible, GPIO, supply와 graph port

18-46

NXP CBDTU02043, onsemi FSUSB42·FSUSB43L10X, Pericom PI3USB102, TI TMUXHS4212는 각 device compatible 뒤에 `gpio-sbu-mux` fallback을 둡니다.

`enable-gpios`는 switch enable, `select-gpios`는 orientation 선택 GPIO이고 `vcc-supply`는 전원입니다. mode switch와 orientation switch 기능을 지원합니다.

`port`는 altmode muxing과 orientation switching을 위해 SBU mux를 Type-C controller에 연결하는 OF graph node입니다.

properties:
  compatible:
    items:
      - enum:
          - nxp,cbdtu02043
          - onnn,fsusb42
          - onnn,fsusb43l10x
          - pericom,pi3usb102
          - ti,tmuxhs4212
      - const: gpio-sbu-mux

  enable-gpios:
    description: Switch enable GPIO

  select-gpios:
    description: Orientation select

  vcc-supply:
    description: power supply

  mode-switch: true
  orientation-switch: true

  port:
    $ref: /schemas/graph.yaml#/properties/port
    description:
      A port node to link the SBU mux to a TypeC controller for the purpose of
      handling altmode muxing and orientation switching.

필수 속성과 mode-switch 의존성

47-64

필수 속성은 `compatible`, `select-gpios`, `orientation-switch`, `port`입니다. 공통 `usb-switch.yaml`과 `usb-switch-ports.yaml`을 상속합니다.

`mode-switch`가 있으면 `enable-gpios`도 반드시 필요합니다. 정의되지 않은 추가 속성은 허용하지 않습니다.

required:
  - compatible
  - select-gpios
  - orientation-switch
  - port

allOf:
  - $ref: usb-switch.yaml#
  - $ref: usb-switch-ports.yaml#
  - if:
      required:
        - mode-switch
    then:
      required:
        - enable-gpios

additionalProperties: false

Type-C connector와 SBU mux graph

65-116

예제 Type-C connector는 port 0을 USB HS PHY, port 1을 USB SS PHY, port 2를 SBU mux에 연결합니다. 각 endpoint는 대응하는 remote endpoint를 가리킵니다.

`sbu-mux`는 Pericom PI3USB102과 generic GPIO SBU mux fallback, active-low enable GPIO 101, active-high select GPIO 164를 사용하고 mode·orientation switch를 활성화합니다.

mux endpoint `sbu_mux_in`은 connector의 `tcpm_sbu_out`과 상호 연결됩니다.

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>

    tcpm {
        connector {
            compatible = "usb-c-connector";

            ports {
                #address-cells = <1>;
                #size-cells = <0>;

                port@0 {
                    reg = <0>;
                    tcpm_hs_out: endpoint {
                        remote-endpoint = <&usb_hs_phy_in>;
                    };
                };

                port@1 {
                    reg = <1>;
                    tcpm_ss_out: endpoint {
                        remote-endpoint = <&usb_ss_phy_in>;
                    };
                };

                port@2 {
                    reg = <2>;
                    tcpm_sbu_out: endpoint {
                        remote-endpoint = <&sbu_mux_in>;
                    };
                };
            };
        };
    };

    sbu-mux {
        compatible = "pericom,pi3usb102", "gpio-sbu-mux";

        enable-gpios = <&tlmm 101 GPIO_ACTIVE_LOW>;
        select-gpios = <&tlmm 164 GPIO_ACTIVE_HIGH>;

        mode-switch;
        orientation-switch;

        port {
            sbu_mux_in: endpoint {
                remote-endpoint = <&tcpm_sbu_out>;
            };
        };
    };
...