xref: /linux/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml (revision db4a3f0fbedb0398f77b9047e8b8bb2b49f355bb)
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    oneOf:
24      - items:
25          - enum:
26              - qcom,qcm6490-pmic-glink
27              - qcom,sc8180x-pmic-glink
28              - qcom,sc8280xp-pmic-glink
29              - qcom,sm8350-pmic-glink
30              - qcom,sm8450-pmic-glink
31              - qcom,sm8550-pmic-glink
32          - const: qcom,pmic-glink
33      - items:
34          - enum:
35              - qcom,sm7325-pmic-glink
36          - const: qcom,qcm6490-pmic-glink
37          - const: qcom,pmic-glink
38      - items:
39          - enum:
40              - qcom,milos-pmic-glink
41              - qcom,sm8650-pmic-glink
42              - qcom,sm8750-pmic-glink
43              - qcom,x1e80100-pmic-glink
44          - const: qcom,sm8550-pmic-glink
45          - const: qcom,pmic-glink
46
47  '#address-cells':
48    const: 1
49
50  '#size-cells':
51    const: 0
52
53  orientation-gpios:
54    description: Array of input gpios for the Type-C connector orientation indication.
55      The GPIO indication is used to detect the orientation of the Type-C connector.
56      The array should contain a gpio entry for each PMIC Glink connector, in reg order.
57      It is defined that GPIO active level means "CC2" or Reversed/Flipped orientation.
58
59  nvmem-cells:
60    minItems: 3
61    maxItems: 3
62    description:
63      The nvmem cells contain the charge control settings, including the charge control
64      enable status, the battery state of charge (SoC) threshold for stopping charging,
65      and the battery SoC delta required to restart charging.
66
67  nvmem-cell-names:
68    items:
69      - const: charge_limit_en
70      - const: charge_limit_end
71      - const: charge_limit_delta
72
73patternProperties:
74  '^connector@\d$':
75    $ref: /schemas/connector/usb-connector.yaml#
76    required:
77      - reg
78
79required:
80  - compatible
81
82additionalProperties: false
83
84examples:
85  - |+
86    pmic-glink {
87        compatible = "qcom,sc8280xp-pmic-glink", "qcom,pmic-glink";
88
89        #address-cells = <1>;
90        #size-cells = <0>;
91
92        connector@0 {
93            compatible = "usb-c-connector";
94            reg = <0>;
95            power-role = "dual";
96            data-role = "dual";
97
98            ports {
99                #address-cells = <1>;
100                #size-cells = <0>;
101
102                port@0 {
103                    reg = <0>;
104                    endpoint {
105                        remote-endpoint = <&usb_role>;
106                    };
107                };
108
109                port@1 {
110                    reg = <1>;
111                    endpoint {
112                        remote-endpoint = <&ss_phy_out>;
113                    };
114                };
115
116                port@2 {
117                    reg = <2>;
118                    endpoint {
119                        remote-endpoint = <&sbu_mux>;
120                    };
121                };
122            };
123        };
124    };
125...
126
127