Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/adc/ti,palmas-gpadc.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Palmas general purpose ADC IP block devicetree bindings
0008 
0009 maintainers:
0010   - Tony Lindgren <tony@atomide.com>
0011 
0012 description: |
0013   This ADC is often used to provide channels via the io-channels
0014   consumer framework.
0015   Channels list:
0016     0 battery type
0017     1 battery temp NTC (optional current source)
0018     2 GP
0019     3 temp (with ext. diode, optional current source)
0020     4 GP
0021     5 GP
0022     6 VBAT_SENSE
0023     7 VCC_SENSE
0024     8 Backup Battery voltage
0025     9 external charger (VCHG)
0026     10 VBUS
0027     11 DC-DC current probe (how does this work?)
0028     12 internal die temp
0029     13 internal die temp
0030     14 USB ID pin voltage
0031     15 test network
0032 
0033 properties:
0034   compatible:
0035     const: ti,palmas-gpadc
0036 
0037   interrupts:
0038     minItems: 1
0039     maxItems: 3
0040 
0041   "#io-channel-cells":
0042     const: 1
0043 
0044   ti,channel0-current-microamp:
0045     description: Channel 0 current in uA.
0046     enum:
0047       - 0
0048       - 5
0049       - 15
0050       - 20
0051 
0052   ti,channel3-current-microamp:
0053     description: Channel 3 current in uA.
0054     enum:
0055       - 0
0056       - 10
0057       - 400
0058       - 800
0059 
0060   ti,enable-extended-delay:
0061     $ref: /schemas/types.yaml#/definitions/flag
0062     description: Enable extended delay.
0063 
0064 additionalProperties: false
0065 
0066 required:
0067   - compatible
0068   - "#io-channel-cells"
0069 
0070 examples:
0071   - |
0072     #include <dt-bindings/clock/mt8183-clk.h>
0073     pmic {
0074         compatible = "ti,twl6035-pmic", "ti,palmas-pmic";
0075         adc {
0076             compatible = "ti,palmas-gpadc";
0077             interrupts = <18 0>,
0078                          <16 0>,
0079                          <17 0>;
0080             #io-channel-cells = <1>;
0081             ti,channel0-current-microamp = <5>;
0082             ti,channel3-current-microamp = <10>;
0083         };
0084     };
0085 ...