brintos

brintos / linux-shallow public Read only

0
0
Text · 2.9 KiB · 377cbb2 Raw
129 lines · yaml
1# SPDX-License-Identifier: GPL-2.02%YAML 1.23---4$id: http://devicetree.org/schemas/power/supply/maxim,max17040.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Maxim 17040 fuel gauge series8 9maintainers:10  - Sebastian Reichel <sre@kernel.org>11 12allOf:13  - $ref: power-supply.yaml#14 15properties:16  compatible:17    enum:18      - maxim,max1704019      - maxim,max1704120      - maxim,max1704321      - maxim,max1704422      - maxim,max1704823      - maxim,max1704924      - maxim,max1705825      - maxim,max1705926      - maxim,max77836-battery27 28  reg:29    maxItems: 130 31  maxim,alert-low-soc-level:32    $ref: /schemas/types.yaml#/definitions/uint3233    minimum: 134    maximum: 3235    description: |36      The alert threshold that sets the state of charge level (%) where an interrupt is generated.37      If skipped the power up default value of 4 (%) will be used.38 39  maxim,double-soc:40    type: boolean41    description: |42      Certain devices return double the capacity.43      Specify this to divide the reported value in 2 and thus normalize it.44      SoC == State of Charge == Capacity.45 46  maxim,rcomp:47    $ref: /schemas/types.yaml#/definitions/uint8-array48    minItems: 149    maxItems: 250    description: |51      A value to compensate readings for various battery chemistries and operating temperatures.52      max17040,41 have 2 byte rcomp, default to 0x97 0x00.53      All other devices have one byte rcomp, default to 0x97.54 55  interrupts:56    maxItems: 157 58  io-channels:59    items:60      - description: battery temperature61 62  io-channel-names:63    items:64      - const: temp65 66  wakeup-source:67    type: boolean68    description: |69      Use this property to use alert low SoC level interrupt as wake up source.70 71required:72  - compatible73  - reg74 75unevaluatedProperties: false76 77examples:78  - |79    i2c {80      #address-cells = <1>;81      #size-cells = <0>;82 83      battery@36 {84        compatible = "maxim,max17048";85        reg = <0x36>;86        maxim,rcomp = /bits/ 8 <0x56>;87        maxim,alert-low-soc-level = <10>;88        maxim,double-soc;89      };90    };91  - |92    #include <dt-bindings/interrupt-controller/irq.h>93    i2c {94      #address-cells = <1>;95      #size-cells = <0>;96 97      battery@36 {98        compatible = "maxim,max77836-battery";99        reg = <0x36>;100        maxim,alert-low-soc-level = <10>;101        interrupt-parent = <&gpio7>;102        interrupts = <2 IRQ_TYPE_LEVEL_LOW>;103        wakeup-source;104      };105    };106  - |107    #include <dt-bindings/interrupt-controller/irq.h>108    i2c {109      #address-cells = <1>;110      #size-cells = <0>;111 112      fuel-gauge@36 {113        compatible = "maxim,max17043";114        reg = <0x36>;115 116        interrupt-parent = <&gpio>;117        interrupts = <144 IRQ_TYPE_EDGE_FALLING>;118 119        monitored-battery = <&battery>;120        power-supplies = <&charger>;121 122        io-channels = <&adc 8>;123        io-channel-names = "temp";124 125        maxim,alert-low-soc-level = <10>;126        wakeup-source;127      };128    };129