diff --git a/bindings/power/supply/qcom,battery-charger.yaml b/bindings/power/supply/qcom,battery-charger.yaml new file mode 100644 index 00000000..b3de6112 --- /dev/null +++ b/bindings/power/supply/qcom,battery-charger.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/power/supply/qcom,battery-charger.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. Battery Charger Glink Device + +maintainers: + - Subbaraman Narayanamurthy + +description: | + This binding describes the Qualcomm Technologies, Inc. battery charger device. + The QTI battery charger gets and sets power supply properties by communicating + with charger firmware running on a remote subsystem (e.g. DSP) over PMIC + Glink. + +properties: + compatible: + const: qcom,battery-charger + + qcom,thermal-mitigation: + description: | + Array of fast charge current limit values for different system thermal + mitigation levels. This should be a flat array that denotes the maximum + charging current (in uA) for each thermal level. Elements should be listed + in monotonically decreasing (non-increasing) order. + $ref: /schemas/types.yaml#/definitions/uint32-array + + qcom,thermal-mitigation-step: + description: | + Fast charging current step (in uA) which if specified would be used to + calculate different system thermal mitigation levels based on the maximum + charging current provided by the charger firmware. This property can be + specified only if "qcom,thermal-mitigation" property is not specified. + $ref: /schemas/types.yaml#/definitions/uint32 + minimum: 500000 + + qcom,wireless-fw-name: + description: | + Firmware name that is used for updating wireless charger firmware. + $ref: /schemas/types.yaml#/definitions/string + + qcom,shutdown-voltage: + description: | + Battery voltage (in mV) when shutdown needs to be initiated when battery + SOC reaches 0 and device is not charging. + $ref: /schemas/types.yaml#/definitions/uint32 + + qcom,display-panels: + description: | + Array of one or more phandles of the display panel(s) that sends the DRM + blank/unblank notifications. + $ref: /schemas/types.yaml#/definitions/phandle-array + minItems: 1 + +required: + - compatible + +allOf: + - if: + required: + - qcom,thermal-mitigation + then: + properties: + qcom,thermal-mitigation-step: false + + - if: + required: + - qcom,thermal-mitigation-step + then: + properties: + qcom,thermal-mitigation: false + +additionalProperties: false + +examples: + - | + pmic_glink { + battery_charger { + compatible = "qcom,battery-charger"; + qcom,thermal-mitigation = <3000000 1500000 1000000 500000>; + qcom,wireless-fw-name = "idt9412.bin"; + qcom,shutdown-voltage = <3100>; + }; + }; diff --git a/bindings/soc/qcom/qcom,altmode-glink.yaml b/bindings/soc/qcom/qcom,altmode-glink.yaml new file mode 100644 index 00000000..76dca762 --- /dev/null +++ b/bindings/soc/qcom/qcom,altmode-glink.yaml @@ -0,0 +1,41 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/qcom/qcom,altmode-glink.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. Type-C Alternate Mode GLINK device + +maintainers: + - Subbaraman Narayanamurthy + +description: | + The Qualcomm Technologies, Inc. Type-C Alternate (Alt) Mode GLINK device + provides an interface for Type-C alternate mode clients to receive data such + as Pin Assignment Notifications from the Type-C stack running on a remote + subsystem (e.g. DSP) via the PMIC GLINK interface. + +properties: + compatible: + const: qcom,altmode-glink + + qcom,altmode-name: + description: Alt-mode name + $ref: /schemas/types.yaml#/definitions/string + enum: [altmode_0, altmode_1, altmode_2, altmode_3, altmode_4, + altmode_5, altmode_6, altmode_7, altmode_8, altmode_9] + +required: + - compatible + - qcom,altmode-name + +additionalProperties: false + +examples: + - | + pmic_glink { + altmode { + compatible = "qcom,altmode-glink"; + qcom,altmode-name = "altmode_0"; + }; + }; diff --git a/bindings/soc/qcom/qcom,qti-pmic-glink.yaml b/bindings/soc/qcom/qcom,qti-pmic-glink.yaml new file mode 100644 index 00000000..217870de --- /dev/null +++ b/bindings/soc/qcom/qcom,qti-pmic-glink.yaml @@ -0,0 +1,50 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/qcom/qcom,qti-pmic-glink.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. PMIC Glink Firmware Interface Device + +maintainers: + - Subbaraman Narayanamurthy + +description: | + This binding describes the Qualcomm Technologies, Inc. PMIC GLink device. + PMIC Glink handles the communication between different clients (e.g. battery + charger, UCSI PPM) on the Application processor and charger firmware running + on a remote subsystem (e.g. DSP) over Glink channel. + + Each subnode specifies a client of PMIC Glink device that will be instantiated + after the PMIC Glink device initializes. + +properties: + compatible: + const: qcom,qti-pmic-glink + + qcom,pmic-glink-channel: + description: Glink channel name + $ref: /schemas/types.yaml#/definitions/string + + qcom,subsys-name: + description: Subsystem name used for subsystem restart. + $ref: /schemas/types.yaml#/definitions/string + + qcom,protection-domain: + description: Protection domain names used for protection domain restart. + $ref: /schemas/types.yaml#/definitions/string-array + +required: + - compatible + - qcom,pmic-glink-channel + +additionalProperties: false + +examples: + - | + pmic_glink { + compatible = "qcom,qti-pmic-glink"; + qcom,pmic-glink-channel = "PMIC_RTR_ADSP_APPS"; + qcom,subsys-name = "lpass"; + qcom,protection-domain = "tms/servreg", "msm/adsp/charger_pd"; + }; diff --git a/bindings/usb/qcom,ucsi-glink.yaml b/bindings/usb/qcom,ucsi-glink.yaml new file mode 100644 index 00000000..396d25e8 --- /dev/null +++ b/bindings/usb/qcom,ucsi-glink.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/qcom/qcom,ucsi-glink.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. UCSI Glink Device + +maintainers: + - Subbaraman Narayanamurthy + +description: | + This binding describes the Qualcomm Technologies, Inc. UCSI device. UCSI + handles the communication between OPM on the Application processor and PPM + which is charger firmware running on a remote subsystem (e.g. DSP) over + PMIC Glink. + +properties: + compatible: + const: qcom,ucsi-glink + +required: + - compatible + +additionalProperties: false + +examples: + - | + pmic_glink { + ucsi { + compatible = "qcom,ucsi-glink"; + }; + };