From 2ab5b48f99f9412934ba986b96248813a5ed20ff Mon Sep 17 00:00:00 2001 From: David Collins Date: Fri, 25 Aug 2023 16:35:43 -0700 Subject: [PATCH] dt-bindings: hwmon: add bindings for qcom,amoled-ecm Qualcomm Technologies, Inc. AMOLED ECM provides a method to measure OLED display power/current consumption. Add the bindings necessary to describe it. This is a snapshot of qcom,amoled-ecm.yaml taken as of qcom-6.1 commit f2d83cefcff8 ("dt-bindings: qcom,amoled-ecm: add display-panels property"). Change-Id: If2644e7f2a6ee39c7a2c866377012bbb208fd75b Signed-off-by: David Collins --- bindings/hwmon/qcom,amoled-ecm.yaml | 88 +++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 bindings/hwmon/qcom,amoled-ecm.yaml diff --git a/bindings/hwmon/qcom,amoled-ecm.yaml b/bindings/hwmon/qcom,amoled-ecm.yaml new file mode 100644 index 00000000..1a39b2fd --- /dev/null +++ b/bindings/hwmon/qcom,amoled-ecm.yaml @@ -0,0 +1,88 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/hwmon/qcom,amoled-ecm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. AMOLED ECM binding + +maintainers: + - David Collins + +description: | + Qualcomm Technologies, Inc. AMOLED ECM supports measurement of OLED display + power/current consumption with a time granularity of sub-frame or multiple + frames of image data. A power measurement can be for a shorter period or for + a longer period. + +properties: + compatible: + const: qcom,amoled-ecm + + reg: + maxItems: 1 + description: Base address of the PMIC AMOLED AB module. Registers of AMOLED + ECM are part of AMOLED AB module. + + nvmem: + minItems: 1 + items: + - description: AMOLED ECM SDAM0 nvmem device phandle + - description: AMOLED ECM SDAM1 nvmem device phandle + - description: AMOLED ECM SDAM2 nvmem device phandle + + nvmem-names: + minItems: 1 + items: + - const: amoled-ecm-sdam0 + - const: amoled-ecm-sdam1 + - const: amoled-ecm-sdam2 + + interrupts: + minItems: 1 + items: + - description: AMOLED ECM SDAM0 nvmem device interrupt + - description: AMOLED ECM SDAM1 nvmem device interrupt + - description: AMOLED ECM SDAM2 nvmem device interrupt + + interrupt-names: + minItems: 1 + items: + - const: ecm-sdam0 + - const: ecm-sdam1 + - const: ecm-sdam2 + + display-panels: + minItems: 1 + 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 + +required: + - compatible + - reg + - nvmem + - nvmem-names + - interrupts + - interrupt-names + +additionalProperties: false + +examples: + - | + #include + + pmic { + #address-cells = <1>; + #size-cells = <0>; + + qcom,amoled-ecm@f900 { + compatible = "qcom,amoled-ecm"; + reg = <0xf900>; + nvmem = <&pmk8350_sdam_13>, <&pmk8350_sdam_14>; + nvmem-names = "amoled-ecm-sdam0", "amoled-ecm-sdam1"; + interrupts = <0x0 0x7c 0x1 IRQ_TYPE_EDGE_RISING>, + <0x0 0x7d 0x1 IRQ_TYPE_EDGE_RISING>; + interrupt-names = "ecm-sdam0", "ecm-sdam1"; + }; + };