From 318b1892d905b6f4e7e9579dc29c9f2a4533ad9a Mon Sep 17 00:00:00 2001 From: Shyam Kumar Thella Date: Wed, 18 Mar 2020 18:14:35 +0530 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. Change-Id: I6909c0cc5326639ed73baf3a8fb10f62b3d2b1e4 --- bindings/hwmon/qcom,amoled-ecm.yaml | 74 +++++++++++++++++++++++++++++ 1 file changed, 74 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..1cc8c2d1 --- /dev/null +++ b/bindings/hwmon/qcom,amoled-ecm.yaml @@ -0,0 +1,74 @@ +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/bindings/hwmon/qcom,amoled-ecm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Qualcomm Technologies, Inc. AMOLED ECM binding + +maintainers: + - Shyam Kumar Thella + +description: | + Qualcomm Technologies, Inc. AMOLED ECM supports measurement of OLED + display power/current consumption with a time granularity in 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: + description: Base address of AMOLED AB module. Registers of + AMOLED ECM are part of AMOLED AB module. + maxItems: 1 + + nvmem-names: + minItems: 1 + description: Array of one or more nvmem device name(s) for ECM + measurement. + items: + - const: amoled-ecm-sdam0 + - const: amoled-ecm-sdam1 + $ref: /schemas/types.yaml#/definitions/string-array + + nvmem: + minItems: 1 + description: Array of one or more phandles of the nvmem device(s) + for ECM measurement. + $ref: /schemas/nvmem/nvmem.yaml + + interrupts: + description: Specifies the interrupts for nvmem devices used by + AMOLED ECM. + minItems: 1 + $ref: /schemas/interrupts.yaml + + interrupt-names: + description: Specifies the interrupt names for nvmem devices used + by AMOLED ECM. + minItems: 1 + items: + - const: ecm-sdam0 + - const: ecm-sdam1 + $ref: /schemas/types.yaml#/definitions/string-array + +required: + - compatible + - reg + - nvmem-names + - nvmem + - interrupt-names + - interrupts + +examples: + - | + qcom,amoled-ecm@f900 { + compatible = "qcom,amoled-ecm"; + reg = <0xf900>; + nvmem-names = "amoled-ecm-sdam0", "amoled-ecm-sdam1"; + nvmem = <&pmk8350_sdam_13>, <&pmk8350_sdam_14>; + interrupt-names = "ecm-sdam0", "ecm-sdam1"; + interrupts = <0x0 0x7c 0x1 IRQ_TYPE_EDGE_RISING>, + <0x0 0x7d 0x1 IRQ_TYPE_EDGE_RISING>; + };