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

Linux 6.18.37 · Devicetree Bindings / USB

Qualcomm PMIC USB Type-C Block

Qualcomm PMIC Type-C의 variant별 register·interrupt, PDO와 HS·SS·SBU graph를 설명합니다.

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

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

1. 요약·해설

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

요약과 해설

qcom,pmic-typec.yaml:1-249

Qualcomm PMIC Type-C의 variant별 register·interrupt, PDO와 HS·SS·SBU graph를 설명합니다. 접을 수 있는 영어 원문 전체와 한국어 전문 번역을 함께 제공하며, compatible, register, interrupt, regulator, PDO, graph 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/qcom,pmic-typec.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Qualcomm PMIC based USB Type-C block
8
9 maintainers:
10 - Bryan O'Donoghue <bryan.odonoghue@linaro.org>
11
12 description:
13 Qualcomm PMIC Type-C block
14
15 properties:
16 compatible:
17 oneOf:
18 - enum:
19 - qcom,pmi632-typec
20 - qcom,pm8150b-typec
21 - items:
22 - enum:
23 - qcom,pm6150-typec
24 - qcom,pm7250b-typec
25 - const: qcom,pm8150b-typec
26 - items:
27 - enum:
28 - qcom,pm4125-typec
29 - const: qcom,pmi632-typec
30
31
32 connector:
33 type: object
34 $ref: /schemas/connector/usb-connector.yaml#
35 unevaluatedProperties: false
36
37 reg:
38 description: Type-C port and pdphy SPMI register base offsets
39 minItems: 1
40 maxItems: 2
41
42 interrupts:
43 minItems: 8
44 items:
45 - description: Type-C CC attach notification, VBUS error, tCCDebounce done
46 - description: Type-C VCONN powered
47 - description: Type-C CC state change
48 - description: Type-C VCONN over-current
49 - description: Type-C VBUS state change
50 - description: Type-C Attach/detach notification
51 - description: Type-C Legacy cable detect
52 - description: Type-C Try.Src Try.Snk state change
53 - description: Power Domain Signal TX - HardReset or CableReset signal TX
54 - description: Power Domain Signal RX - HardReset or CableReset signal RX
55 - description: Power Domain TX complete
56 - description: Power Domain RX complete
57 - description: Power Domain TX fail
58 - description: Power Domain TX message discard
59 - description: Power Domain RX message discard
60 - description: Power Domain Fast Role Swap event
61
62 interrupt-names:
63 minItems: 8
64 items:
65 - const: or-rid-detect-change
66 - const: vpd-detect
67 - const: cc-state-change
68 - const: vconn-oc
69 - const: vbus-change
70 - const: attach-detach
71 - const: legacy-cable-detect
72 - const: try-snk-src-detect
73 - const: sig-tx
74 - const: sig-rx
75 - const: msg-tx
76 - const: msg-rx
77 - const: msg-tx-failed
78 - const: msg-tx-discarded
79 - const: msg-rx-discarded
80 - const: fr-swap
81
82 vdd-vbus-supply:
83 description: VBUS power supply.
84
85 vdd-pdphy-supply:
86 description: VDD regulator supply to the PDPHY.
87
88 port:
89 $ref: /schemas/graph.yaml#/properties/port
90 description:
91 Contains a port which produces data-role switching messages.
92
93 required:
94 - compatible
95 - reg
96 - interrupts
97 - interrupt-names
98 - vdd-vbus-supply
99
100 allOf:
101 - if:
102 properties:
103 compatible:
104 contains:
105 enum:
106 - qcom,pmi632-typec
107 then:
108 properties:
109 reg:
110 maxItems: 1
111 interrupts:
112 maxItems: 8
113 interrupt-names:
114 maxItems: 8
115 vdd-pdphy-supply: false
116 else:
117 properties:
118 reg:
119 maxItems: 2
120 interrupts:
121 minItems: 16
122 interrupt-names:
123 maxItems: 16
124 required:
125 - vdd-pdphy-supply
126
127 additionalProperties: false
128
129 examples:
130 - |
131 #include <dt-bindings/interrupt-controller/arm-gic.h>
132 #include <dt-bindings/usb/pd.h>
133
134 pmic {
135 #address-cells = <1>;
136 #size-cells = <0>;
137
138 pm8150b_typec: typec@1500 {
139 compatible = "qcom,pm8150b-typec";
140 reg = <0x1500>,
141 <0x1700>;
142
143 interrupts = <0x2 0x15 0x00 IRQ_TYPE_EDGE_RISING>,
144 <0x2 0x15 0x01 IRQ_TYPE_EDGE_BOTH>,
145 <0x2 0x15 0x02 IRQ_TYPE_EDGE_RISING>,
146 <0x2 0x15 0x03 IRQ_TYPE_EDGE_BOTH>,
147 <0x2 0x15 0x04 IRQ_TYPE_EDGE_RISING>,
148 <0x2 0x15 0x05 IRQ_TYPE_EDGE_RISING>,
149 <0x2 0x15 0x06 IRQ_TYPE_EDGE_BOTH>,
150 <0x2 0x15 0x07 IRQ_TYPE_EDGE_RISING>,
151 <0x2 0x17 0x00 IRQ_TYPE_EDGE_RISING>,
152 <0x2 0x17 0x01 IRQ_TYPE_EDGE_RISING>,
153 <0x2 0x17 0x02 IRQ_TYPE_EDGE_RISING>,
154 <0x2 0x17 0x03 IRQ_TYPE_EDGE_RISING>,
155 <0x2 0x17 0x04 IRQ_TYPE_EDGE_RISING>,
156 <0x2 0x17 0x05 IRQ_TYPE_EDGE_RISING>,
157 <0x2 0x17 0x06 IRQ_TYPE_EDGE_RISING>,
158 <0x2 0x17 0x07 IRQ_TYPE_EDGE_RISING>;
159
160 interrupt-names = "or-rid-detect-change",
161 "vpd-detect",
162 "cc-state-change",
163 "vconn-oc",
164 "vbus-change",
165 "attach-detach",
166 "legacy-cable-detect",
167 "try-snk-src-detect",
168 "sig-tx",
169 "sig-rx",
170 "msg-tx",
171 "msg-rx",
172 "msg-tx-failed",
173 "msg-tx-discarded",
174 "msg-rx-discarded",
175 "fr-swap";
176
177 vdd-vbus-supply = <&pm8150b_vbus>;
178 vdd-pdphy-supply = <&vreg_l2a_3p1>;
179
180 connector {
181 compatible = "usb-c-connector";
182
183 power-role = "source";
184 data-role = "dual";
185 self-powered;
186
187 source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_DUAL_ROLE |
188 PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>;
189
190 ports {
191 #address-cells = <1>;
192 #size-cells = <0>;
193
194 port@0 {
195 reg = <0>;
196 pmic_typec_hs_in: endpoint {
197 remote-endpoint = <&usb_hs_out>;
198 };
199 };
200
201 port@1 {
202 reg = <1>;
203 pmic_typec_ss_in: endpoint {
204 remote-endpoint = <&usb_phy_typec_ss_out>;
205 };
206 };
207
208 port@2 {
209 reg = <2>;
210 pmic_typec_sbu: endpoint {
211 remote-endpoint = <&usb_mux_sbu>;
212 };
213 };
214 };
215 };
216 };
217 };
218
219 usb {
220 dr_mode = "otg";
221 usb-role-switch;
222 port {
223 usb_hs_out: endpoint {
224 remote-endpoint = <&pmic_typec_hs_in>;
225 };
226 };
227 };
228
229 usb-phy {
230 orientation-switch;
231 port {
232 usb_phy_typec_ss_out: endpoint {
233 remote-endpoint = <&pmic_typec_ss_in>;
234 };
235 };
236 };
237
238 usb-mux {
239 orientation-switch;
240 mode-switch;
241
242 port {
243 usb_mux_sbu: endpoint {
244 remote-endpoint = <&pmic_typec_sbu>;
245 };
246 };
247 };
248
249 ...
250

3. 한국어 전문 번역

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

Qualcomm PMIC USB Type-C block

1-14

GPL-2.0-only 또는 BSD-2-Clause로 배포되는 이 schema는 Qualcomm PMIC 기반 USB Type-C block을 정의합니다. 관리자는 Bryan O'Donoghue입니다.

PMIC compatible, connector와 register

15-40

직접 호환 variant는 `qcom,pmi632-typec`와 `qcom,pm8150b-typec`입니다. PM6150·PM7250B는 각각 SoC-specific 문자열 뒤에 `qcom,pm8150b-typec` fallback을 사용하고, PM4125는 `qcom,pm4125-typec`, `qcom,pmi632-typec` 순서입니다.

`connector` child는 공통 `usb-connector.yaml`을 따르며 평가되지 않은 추가 속성을 허용하지 않습니다. `reg`는 Type-C port와 PDPHY의 SPMI register base offset을 1~2개 지정합니다.

properties:
  compatible:
    oneOf:
      - enum:
          - qcom,pmi632-typec
          - qcom,pm8150b-typec
      - items:
          - enum:
              - qcom,pm6150-typec
              - qcom,pm7250b-typec
          - const: qcom,pm8150b-typec
      - items:
          - enum:
              - qcom,pm4125-typec
          - const: qcom,pmi632-typec


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

  reg:
    description: Type-C port and pdphy SPMI register base offsets
    minItems: 1
    maxItems: 2

Type-C·Power Delivery 16개 event

41-80

interrupt는 최소 8개입니다. 앞의 여덟 event는 CC attach/VBUS error/tCCDebounce, VCONN powered, CC state change, VCONN over-current, VBUS state change, attach/detach, legacy cable detect, Try.Src/Try.Snk state change입니다.

뒤의 여덟 event는 HardReset 또는 CableReset signal TX·RX, PD message TX·RX complete, TX fail, TX·RX discard, Fast Role Swap입니다.

이름은 `or-rid-detect-change`, `vpd-detect`, `cc-state-change`, `vconn-oc`, `vbus-change`, `attach-detach`, `legacy-cable-detect`, `try-snk-src-detect`, `sig-tx`, `sig-rx`, `msg-tx`, `msg-rx`, `msg-tx-failed`, `msg-tx-discarded`, `msg-rx-discarded`, `fr-swap` 순서입니다.


interrupts:
  minItems: 8
  items:
    - description: Type-C CC attach notification, VBUS error, tCCDebounce done
    - description: Type-C VCONN powered
    - description: Type-C CC state change
    - description: Type-C VCONN over-current
    - description: Type-C VBUS state change
    - description: Type-C Attach/detach notification
    - description: Type-C Legacy cable detect
    - description: Type-C Try.Src Try.Snk state change
    - description: Power Domain Signal TX - HardReset or CableReset signal TX
    - description: Power Domain Signal RX - HardReset or CableReset signal RX
    - description: Power Domain TX complete
    - description: Power Domain RX complete
    - description: Power Domain TX fail
    - description: Power Domain TX message discard
    - description: Power Domain RX message discard
    - description: Power Domain Fast Role Swap event

interrupt-names:
  minItems: 8
  items:
    - const: or-rid-detect-change
    - const: vpd-detect
    - const: cc-state-change
    - const: vconn-oc
    - const: vbus-change
    - const: attach-detach
    - const: legacy-cable-detect
    - const: try-snk-src-detect
    - const: sig-tx
    - const: sig-rx
    - const: msg-tx
    - const: msg-rx
    - const: msg-tx-failed
    - const: msg-tx-discarded
    - const: msg-rx-discarded
    - const: fr-swap

VBUS·PDPHY supply와 필수 속성

81-99

`vdd-vbus-supply`는 VBUS 전원이고 `vdd-pdphy-supply`는 PDPHY의 VDD regulator입니다. graph `port`는 data-role switching message를 생성합니다.

공통 필수 속성은 `compatible`, `reg`, `interrupts`, `interrupt-names`, `vdd-vbus-supply`의 다섯 개입니다.


  vdd-vbus-supply:
    description: VBUS power supply.

  vdd-pdphy-supply:
    description: VDD regulator supply to the PDPHY.

  port:
    $ref: /schemas/graph.yaml#/properties/port
    description:
      Contains a port which produces data-role switching messages.

required:
  - compatible
  - reg
  - interrupts
  - interrupt-names
  - vdd-vbus-supply

PMI632 8-IRQ와 PD-capable 16-IRQ

100-128

`compatible`에 `qcom,pmi632-typec`가 포함되면 register는 하나, interrupt와 이름은 최대 8개이고 `vdd-pdphy-supply`를 둘 수 없습니다.

그 밖의 PM8150B 계열은 register 최대 두 개, interrupt 최소 16개, 이름 최대 16개이며 `vdd-pdphy-supply`가 추가로 필수입니다. 정의되지 않은 추가 속성은 허용하지 않습니다.

allOf:
  - if:
      properties:
        compatible:
          contains:
            enum:
              - qcom,pmi632-typec
    then:
      properties:
        reg:
          maxItems: 1
        interrupts:
          maxItems: 8
        interrupt-names:
          maxItems: 8
        vdd-pdphy-supply: false
    else:
      properties:
        reg:
          maxItems: 2
        interrupts:
          minItems: 16
        interrupt-names:
          maxItems: 16
      required:
        - vdd-pdphy-supply

additionalProperties: false

PM8150B register·interrupt와 source PDO

129-189

예제 `typec@1500`은 `qcom,pm8150b-typec`, Type-C 0x1500과 PDPHY 0x1700 register base를 사용합니다. SPMI peripheral 0x15의 여덟 Type-C interrupt와 0x17의 여덟 PD interrupt를 정의하고 이름도 같은 16개 순서로 지정합니다.

VBUS는 `pm8150b_vbus`, PDPHY는 `vreg_l2a_3p1` regulator에서 공급받습니다. USB-C connector는 source power role, dual data role, self-powered입니다.

source PDO는 5 V 3 A fixed PDO이며 dual-role power, USB communication, data swap capability를 광고합니다.

examples:
  - |
    #include <dt-bindings/interrupt-controller/arm-gic.h>
    #include <dt-bindings/usb/pd.h>

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

        pm8150b_typec: typec@1500 {
            compatible = "qcom,pm8150b-typec";
            reg = <0x1500>,
                  <0x1700>;

            interrupts = <0x2 0x15 0x00 IRQ_TYPE_EDGE_RISING>,
                         <0x2 0x15 0x01 IRQ_TYPE_EDGE_BOTH>,
                         <0x2 0x15 0x02 IRQ_TYPE_EDGE_RISING>,
                         <0x2 0x15 0x03 IRQ_TYPE_EDGE_BOTH>,
                         <0x2 0x15 0x04 IRQ_TYPE_EDGE_RISING>,
                         <0x2 0x15 0x05 IRQ_TYPE_EDGE_RISING>,
                         <0x2 0x15 0x06 IRQ_TYPE_EDGE_BOTH>,
                         <0x2 0x15 0x07 IRQ_TYPE_EDGE_RISING>,
                         <0x2 0x17 0x00 IRQ_TYPE_EDGE_RISING>,
                         <0x2 0x17 0x01 IRQ_TYPE_EDGE_RISING>,
                         <0x2 0x17 0x02 IRQ_TYPE_EDGE_RISING>,
                         <0x2 0x17 0x03 IRQ_TYPE_EDGE_RISING>,
                         <0x2 0x17 0x04 IRQ_TYPE_EDGE_RISING>,
                         <0x2 0x17 0x05 IRQ_TYPE_EDGE_RISING>,
                         <0x2 0x17 0x06 IRQ_TYPE_EDGE_RISING>,
                         <0x2 0x17 0x07 IRQ_TYPE_EDGE_RISING>;

            interrupt-names = "or-rid-detect-change",
                              "vpd-detect",
                              "cc-state-change",
                              "vconn-oc",
                              "vbus-change",
                              "attach-detach",
                              "legacy-cable-detect",
                              "try-snk-src-detect",
                              "sig-tx",
                              "sig-rx",
                              "msg-tx",
                              "msg-rx",
                              "msg-tx-failed",
                              "msg-tx-discarded",
                              "msg-rx-discarded",
                              "fr-swap";

            vdd-vbus-supply = <&pm8150b_vbus>;
            vdd-pdphy-supply = <&vreg_l2a_3p1>;

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

                power-role = "source";
                data-role = "dual";
                self-powered;

                source-pdos = <PDO_FIXED(5000, 3000, PDO_FIXED_DUAL_ROLE |
                               PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>;

HS·SS·SBU graph 연결

190-249

connector `port@0`의 HS endpoint는 USB controller의 `usb_hs_out`, `port@1`의 SS endpoint는 PHY의 `usb_phy_typec_ss_out`, `port@2`의 SBU endpoint는 mux의 `usb_mux_sbu`에 각각 연결됩니다.

USB controller는 OTG mode와 `usb-role-switch`를 사용합니다. USB PHY는 `orientation-switch`, USB mux는 `orientation-switch`와 `mode-switch`를 제공하며 각 graph endpoint가 PMIC Type-C block으로 되돌아갑니다.

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

                    port@0 {
                        reg = <0>;
                        pmic_typec_hs_in: endpoint {
                            remote-endpoint = <&usb_hs_out>;
                        };
                    };

                    port@1 {
                        reg = <1>;
                        pmic_typec_ss_in: endpoint {
                            remote-endpoint = <&usb_phy_typec_ss_out>;
                        };
                    };

                    port@2 {
                        reg = <2>;
                        pmic_typec_sbu: endpoint {
                            remote-endpoint = <&usb_mux_sbu>;
                        };
                    };
                };
            };
        };
    };

    usb {
        dr_mode = "otg";
        usb-role-switch;
        port {
            usb_hs_out: endpoint {
                remote-endpoint = <&pmic_typec_hs_in>;
            };
        };
    };

    usb-phy {
        orientation-switch;
        port {
            usb_phy_typec_ss_out: endpoint {
                remote-endpoint = <&pmic_typec_ss_in>;
            };
        };
    };

    usb-mux {
        orientation-switch;
        mode-switch;

        port {
            usb_mux_sbu: endpoint {
                remote-endpoint = <&pmic_typec_sbu>;
            };
        };
    };

...