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
42    properties:
43      reg: true
44
45    required:
46      - reg
47
48    unevaluatedProperties: false
49
50required:
51  - compatible
52
53additionalProperties: false
54
55examples:
56  - |+
57    pmic-glink {
58        compatible = "qcom,sc8280xp-pmic-glink", "qcom,pmic-glink";
59
60        #address-cells = <1>;
61        #size-cells = <0>;
62
63        connector@0 {
64            compatible = "usb-c-connector";
65            reg = <0>;
66            power-role = "dual";
67            data-role = "dual";
68
69            ports {
70                #address-cells = <1>;
71                #size-cells = <0>;
72
73                port@0 {
74                    reg = <0>;
75                    endpoint {
76                        remote-endpoint = <&usb_role>;
77                    };
78                };
79
80                port@1 {
81                    reg = <1>;
82                    endpoint {
83                        remote-endpoint = <&ss_phy_out>;
84                    };
85                };
86
87                port@2 {
88                    reg = <2>;
89                    endpoint {
90                        remote-endpoint = <&sbu_mux>;
91                    };
92                };
93            };
94        };
95    };
96...
97
98