1# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/soc/qcom/qcom,pmic-glink.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Qualcomm PMIC GLINK firmware interface for battery management, USB
8  Type-C and other things.
9
10maintainers:
11  - Bjorn Andersson <andersson@kernel.org>
12
13description:
14  The PMIC GLINK service, running on a coprocessor on some modern Qualcomm
15  platforms and implement USB Type-C handling and battery management. This
16  binding describes the component in the OS used to communicate with the
17  firmware and connect it's resources to those described in the Devicetree,
18  particularly the USB Type-C controllers relationship with USB and DisplayPort
19  components.
20
21properties:
22  compatible:
23    items:
24      - enum:
25          - qcom,sc8180x-pmic-glink
26          - qcom,sc8280xp-pmic-glink
27          - qcom,sm8350-pmic-glink
28          - qcom,sm8450-pmic-glink
29          - qcom,sm8550-pmic-glink
30      - const: qcom,pmic-glink
31
32  '#address-cells':
33    const: 1
34
35  '#size-cells':
36    const: 0
37
38patternProperties:
39  '^connector@\d$':
40    $ref: /schemas/connector/usb-connector.yaml#
41    required:
42      - reg
43
44required:
45  - compatible
46
47additionalProperties: false
48
49examples:
50  - |+
51    pmic-glink {
52        compatible = "qcom,sc8280xp-pmic-glink", "qcom,pmic-glink";
53
54        #address-cells = <1>;
55        #size-cells = <0>;
56
57        connector@0 {
58            compatible = "usb-c-connector";
59            reg = <0>;
60            power-role = "dual";
61            data-role = "dual";
62
63            ports {
64                #address-cells = <1>;
65                #size-cells = <0>;
66
67                port@0 {
68                    reg = <0>;
69                    endpoint {
70                        remote-endpoint = <&usb_role>;
71                    };
72                };
73
74                port@1 {
75                    reg = <1>;
76                    endpoint {
77                        remote-endpoint = <&ss_phy_out>;
78                    };
79                };
80
81                port@2 {
82                    reg = <2>;
83                    endpoint {
84                        remote-endpoint = <&sbu_mux>;
85                    };
86                };
87            };
88        };
89    };
90...
91
92