0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/adc/qcom,spmi-iadc.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: Qualcomm's SPMI PMIC current ADC
0008
0009 maintainers:
0010 - Jonathan Cameron <jic23@kernel.org>
0011
0012 description: |
0013 QPNP PMIC current ADC (IADC) provides interface to clients to read current.
0014 A 16 bit ADC is used for current measurements. IADC can measure the current
0015 through an external resistor (channel 1) or internal (built-in) resistor
0016 (channel 0). When using an external resistor it is to be described by
0017 qcom,external-resistor-micro-ohms property.
0018
0019 properties:
0020 compatible:
0021 const: qcom,spmi-iadc
0022
0023 reg:
0024 description: IADC base address and length in the SPMI PMIC register map
0025 maxItems: 1
0026
0027 qcom,external-resistor-micro-ohms:
0028 description:
0029 Sensor resistor value. If not defined value of 10000 micro Ohms
0030 will be used.
0031
0032 interrupts:
0033 maxItems: 1
0034 description:
0035 End of conversion interrupt.
0036
0037 "#io-channel-cells":
0038 const: 1
0039
0040 required:
0041 - compatible
0042 - reg
0043
0044 additionalProperties: false
0045
0046 examples:
0047 - |
0048 #include <dt-bindings/interrupt-controller/irq.h>
0049 spmi_bus {
0050 #address-cells = <1>;
0051 #size-cells = <0>;
0052 pmic_iadc: adc@3600 {
0053 compatible = "qcom,spmi-iadc";
0054 reg = <0x3600>;
0055 interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>;
0056 qcom,external-resistor-micro-ohms = <10000>;
0057 #io-channel-cells = <1>;
0058 };
0059 };
0060 ...