From 8dd209e5664433adc780b0ae4da2c1162c7fbce4 Mon Sep 17 00:00:00 2001 From: David Collins Date: Thu, 15 Jun 2023 16:39:02 -0700 Subject: [PATCH] bindings: power: supply: add QTI battery charger Add DT bindings for QTI battery charger which gets and sets power supply properties by communicating with charger firmware running on the remote subsystem (e.g. DSP) over PMIC Glink. This is a snapshot taken as of qcom-6.1 commit 7b5e13f9043d ("dt-bindings: power: supply: qcom,battery-charger: Add display panel property") which was then converted to yaml. Change-Id: I8e3aedfb70c627807388db3c449c283f35ecfd59 Signed-off-by: David Collins --- .../power/supply/qcom,battery-charger.yaml | 86 +++++++++++++++++++ 1 file changed, 86 insertions(+) create mode 100644 bindings/power/supply/qcom,battery-charger.yaml 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>; + }; + };