summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml
blob: 61df97ffe1e409b49c35e4c219d85a98ca563e74 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/soc/qcom/qcom,pmic-glink.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm PMIC GLINK firmware interface for battery management, USB
  Type-C and other things.

maintainers:
  - Bjorn Andersson <andersson@kernel.org>

description:
  The PMIC GLINK service, running on a coprocessor on some modern Qualcomm
  platforms and implement USB Type-C handling and battery management. This
  binding describes the component in the OS used to communicate with the
  firmware and connect it's resources to those described in the Devicetree,
  particularly the USB Type-C controllers relationship with USB and DisplayPort
  components.

properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - qcom,sc8180x-pmic-glink
              - qcom,sc8280xp-pmic-glink
              - qcom,sm8350-pmic-glink
              - qcom,sm8450-pmic-glink
              - qcom,sm8550-pmic-glink
          - const: qcom,pmic-glink
      - items:
          - enum:
              - qcom,sm8650-pmic-glink
          - const: qcom,sm8550-pmic-glink
          - const: qcom,pmic-glink

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

  orientation-gpios:
    description: Array of input gpios for the Type-C connector orientation indication.
      The GPIO indication is used to detect the orientation of the Type-C connector.
      The array should contain a gpio entry for each PMIC Glink connector, in reg order.
      It is defined that GPIO active level means "CC2" or Reversed/Flipped orientation.

patternProperties:
  '^connector@\d$':
    $ref: /schemas/connector/usb-connector.yaml#
    required:
      - reg

required:
  - compatible

allOf:
  - if:
      not:
        properties:
          compatible:
            contains:
              enum:
                - qcom,sm8450-pmic-glink
                - qcom,sm8550-pmic-glink
    then:
      properties:
        orientation-gpios: false

additionalProperties: false

examples:
  - |+
    pmic-glink {
        compatible = "qcom,sc8280xp-pmic-glink", "qcom,pmic-glink";

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

        connector@0 {
            compatible = "usb-c-connector";
            reg = <0>;
            power-role = "dual";
            data-role = "dual";

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

                port@0 {
                    reg = <0>;
                    endpoint {
                        remote-endpoint = <&usb_role>;
                    };
                };

                port@1 {
                    reg = <1>;
                    endpoint {
                        remote-endpoint = <&ss_phy_out>;
                    };
                };

                port@2 {
                    reg = <2>;
                    endpoint {
                        remote-endpoint = <&sbu_mux>;
                    };
                };
            };
        };
    };
...