xref: /linux/Documentation/devicetree/bindings/soc/qcom/qcom,pmic-glink.yaml (revision 6677138d7310697b69f8842f95c1d8c06da2b689)
168d868adSBjorn Andersson# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
268d868adSBjorn Andersson%YAML 1.2
368d868adSBjorn Andersson---
468d868adSBjorn Andersson$id: http://devicetree.org/schemas/soc/qcom/qcom,pmic-glink.yaml#
568d868adSBjorn Andersson$schema: http://devicetree.org/meta-schemas/core.yaml#
668d868adSBjorn Andersson
768d868adSBjorn Anderssontitle: Qualcomm PMIC GLINK firmware interface for battery management, USB
868d868adSBjorn Andersson  Type-C and other things.
968d868adSBjorn Andersson
1068d868adSBjorn Anderssonmaintainers:
1168d868adSBjorn Andersson  - Bjorn Andersson <andersson@kernel.org>
1268d868adSBjorn Andersson
1368d868adSBjorn Anderssondescription:
1468d868adSBjorn Andersson  The PMIC GLINK service, running on a coprocessor on some modern Qualcomm
1568d868adSBjorn Andersson  platforms and implement USB Type-C handling and battery management. This
1668d868adSBjorn Andersson  binding describes the component in the OS used to communicate with the
1768d868adSBjorn Andersson  firmware and connect it's resources to those described in the Devicetree,
1868d868adSBjorn Andersson  particularly the USB Type-C controllers relationship with USB and DisplayPort
1968d868adSBjorn Andersson  components.
2068d868adSBjorn Andersson
2168d868adSBjorn Anderssonproperties:
2268d868adSBjorn Andersson  compatible:
2398e8bc43SNeil Armstrong    oneOf:
2498e8bc43SNeil Armstrong      - items:
2568d868adSBjorn Andersson          - enum:
26*6677138dSLuca Weiss              - qcom,qcm6490-pmic-glink
2768d868adSBjorn Andersson              - qcom,sc8180x-pmic-glink
2868d868adSBjorn Andersson              - qcom,sc8280xp-pmic-glink
2968d868adSBjorn Andersson              - qcom,sm8350-pmic-glink
3014bc45c4SNeil Armstrong              - qcom,sm8450-pmic-glink
3184a33413SNeil Armstrong              - qcom,sm8550-pmic-glink
3268d868adSBjorn Andersson          - const: qcom,pmic-glink
3398e8bc43SNeil Armstrong      - items:
3498e8bc43SNeil Armstrong          - enum:
3598e8bc43SNeil Armstrong              - qcom,sm8650-pmic-glink
3698e8bc43SNeil Armstrong          - const: qcom,sm8550-pmic-glink
3798e8bc43SNeil Armstrong          - const: qcom,pmic-glink
3868d868adSBjorn Andersson
3968d868adSBjorn Andersson  '#address-cells':
4068d868adSBjorn Andersson    const: 1
4168d868adSBjorn Andersson
4268d868adSBjorn Andersson  '#size-cells':
4368d868adSBjorn Andersson    const: 0
4468d868adSBjorn Andersson
4565682407SNeil Armstrong  orientation-gpios:
4665682407SNeil Armstrong    description: Array of input gpios for the Type-C connector orientation indication.
4765682407SNeil Armstrong      The GPIO indication is used to detect the orientation of the Type-C connector.
4865682407SNeil Armstrong      The array should contain a gpio entry for each PMIC Glink connector, in reg order.
4965682407SNeil Armstrong      It is defined that GPIO active level means "CC2" or Reversed/Flipped orientation.
5065682407SNeil Armstrong
5168d868adSBjorn AnderssonpatternProperties:
5268d868adSBjorn Andersson  '^connector@\d$':
5368d868adSBjorn Andersson    $ref: /schemas/connector/usb-connector.yaml#
5468d868adSBjorn Andersson    required:
5568d868adSBjorn Andersson      - reg
5668d868adSBjorn Andersson
5768d868adSBjorn Anderssonrequired:
5868d868adSBjorn Andersson  - compatible
5968d868adSBjorn Andersson
6065682407SNeil ArmstrongallOf:
6165682407SNeil Armstrong  - if:
6265682407SNeil Armstrong      not:
6365682407SNeil Armstrong        properties:
6465682407SNeil Armstrong          compatible:
6565682407SNeil Armstrong            contains:
6665682407SNeil Armstrong              enum:
6765682407SNeil Armstrong                - qcom,sm8450-pmic-glink
6865682407SNeil Armstrong                - qcom,sm8550-pmic-glink
6965682407SNeil Armstrong    then:
7065682407SNeil Armstrong      properties:
7165682407SNeil Armstrong        orientation-gpios: false
7265682407SNeil Armstrong
7368d868adSBjorn AnderssonadditionalProperties: false
7468d868adSBjorn Andersson
7568d868adSBjorn Anderssonexamples:
7668d868adSBjorn Andersson  - |+
7768d868adSBjorn Andersson    pmic-glink {
7868d868adSBjorn Andersson        compatible = "qcom,sc8280xp-pmic-glink", "qcom,pmic-glink";
7968d868adSBjorn Andersson
8068d868adSBjorn Andersson        #address-cells = <1>;
8168d868adSBjorn Andersson        #size-cells = <0>;
8268d868adSBjorn Andersson
8368d868adSBjorn Andersson        connector@0 {
8468d868adSBjorn Andersson            compatible = "usb-c-connector";
8568d868adSBjorn Andersson            reg = <0>;
8668d868adSBjorn Andersson            power-role = "dual";
8768d868adSBjorn Andersson            data-role = "dual";
8868d868adSBjorn Andersson
8968d868adSBjorn Andersson            ports {
9068d868adSBjorn Andersson                #address-cells = <1>;
9168d868adSBjorn Andersson                #size-cells = <0>;
9268d868adSBjorn Andersson
9368d868adSBjorn Andersson                port@0 {
9468d868adSBjorn Andersson                    reg = <0>;
9568d868adSBjorn Andersson                    endpoint {
9668d868adSBjorn Andersson                        remote-endpoint = <&usb_role>;
9768d868adSBjorn Andersson                    };
9868d868adSBjorn Andersson                };
9968d868adSBjorn Andersson
10068d868adSBjorn Andersson                port@1 {
10168d868adSBjorn Andersson                    reg = <1>;
10268d868adSBjorn Andersson                    endpoint {
10368d868adSBjorn Andersson                        remote-endpoint = <&ss_phy_out>;
10468d868adSBjorn Andersson                    };
10568d868adSBjorn Andersson                };
10668d868adSBjorn Andersson
10768d868adSBjorn Andersson                port@2 {
10868d868adSBjorn Andersson                    reg = <2>;
10968d868adSBjorn Andersson                    endpoint {
11068d868adSBjorn Andersson                        remote-endpoint = <&sbu_mux>;
11168d868adSBjorn Andersson                    };
11268d868adSBjorn Andersson                };
11368d868adSBjorn Andersson            };
11468d868adSBjorn Andersson        };
11568d868adSBjorn Andersson    };
11668d868adSBjorn Andersson...
11768d868adSBjorn Andersson
118