15def4c47SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 25def4c47SEmmanuel Vadot%YAML 1.2 35def4c47SEmmanuel Vadot--- 45def4c47SEmmanuel Vadot$id: http://devicetree.org/schemas/iio/adc/qcom,spmi-iadc.yaml# 55def4c47SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 65def4c47SEmmanuel Vadot 75def4c47SEmmanuel Vadottitle: Qualcomm's SPMI PMIC current ADC 85def4c47SEmmanuel Vadot 95def4c47SEmmanuel Vadotmaintainers: 105def4c47SEmmanuel Vadot - Jonathan Cameron <jic23@kernel.org> 115def4c47SEmmanuel Vadot 125def4c47SEmmanuel Vadotdescription: | 135def4c47SEmmanuel Vadot QPNP PMIC current ADC (IADC) provides interface to clients to read current. 145def4c47SEmmanuel Vadot A 16 bit ADC is used for current measurements. IADC can measure the current 155def4c47SEmmanuel Vadot through an external resistor (channel 1) or internal (built-in) resistor 165def4c47SEmmanuel Vadot (channel 0). When using an external resistor it is to be described by 175def4c47SEmmanuel Vadot qcom,external-resistor-micro-ohms property. 185def4c47SEmmanuel Vadot 195def4c47SEmmanuel Vadotproperties: 205def4c47SEmmanuel Vadot compatible: 218bab661aSEmmanuel Vadot items: 228bab661aSEmmanuel Vadot - enum: 23cb7aa33aSEmmanuel Vadot - qcom,pm8226-iadc 248bab661aSEmmanuel Vadot - qcom,pm8941-iadc 258bab661aSEmmanuel Vadot - const: qcom,spmi-iadc 265def4c47SEmmanuel Vadot 275def4c47SEmmanuel Vadot reg: 28*8d13bc63SEmmanuel Vadot description: IADC base address in the SPMI PMIC register map 295def4c47SEmmanuel Vadot maxItems: 1 305def4c47SEmmanuel Vadot 315def4c47SEmmanuel Vadot qcom,external-resistor-micro-ohms: 325def4c47SEmmanuel Vadot description: 335def4c47SEmmanuel Vadot Sensor resistor value. If not defined value of 10000 micro Ohms 345def4c47SEmmanuel Vadot will be used. 355def4c47SEmmanuel Vadot 365def4c47SEmmanuel Vadot interrupts: 375def4c47SEmmanuel Vadot maxItems: 1 385def4c47SEmmanuel Vadot description: 395def4c47SEmmanuel Vadot End of conversion interrupt. 405def4c47SEmmanuel Vadot 415def4c47SEmmanuel Vadot "#io-channel-cells": 425def4c47SEmmanuel Vadot const: 1 435def4c47SEmmanuel Vadot 445def4c47SEmmanuel Vadotrequired: 455def4c47SEmmanuel Vadot - compatible 465def4c47SEmmanuel Vadot - reg 475def4c47SEmmanuel Vadot 485def4c47SEmmanuel VadotadditionalProperties: false 495def4c47SEmmanuel Vadot 505def4c47SEmmanuel Vadotexamples: 515def4c47SEmmanuel Vadot - | 525def4c47SEmmanuel Vadot #include <dt-bindings/interrupt-controller/irq.h> 53*8d13bc63SEmmanuel Vadot 54*8d13bc63SEmmanuel Vadot pmic { 555def4c47SEmmanuel Vadot #address-cells = <1>; 565def4c47SEmmanuel Vadot #size-cells = <0>; 57*8d13bc63SEmmanuel Vadot 58*8d13bc63SEmmanuel Vadot adc@3600 { 598bab661aSEmmanuel Vadot compatible = "qcom,pm8941-iadc", "qcom,spmi-iadc"; 60c9ccf3a3SEmmanuel Vadot reg = <0x3600>; 615def4c47SEmmanuel Vadot interrupts = <0x0 0x36 0x0 IRQ_TYPE_EDGE_RISING>; 625def4c47SEmmanuel Vadot qcom,external-resistor-micro-ohms = <10000>; 635def4c47SEmmanuel Vadot #io-channel-cells = <1>; 645def4c47SEmmanuel Vadot }; 655def4c47SEmmanuel Vadot }; 665def4c47SEmmanuel Vadot... 67