1 # SPDX-License-Identifier: GPL-2.0 1 # SPDX-License-Identifier: GPL-2.0 2 %YAML 1.2 2 %YAML 1.2 3 --- 3 --- 4 $id: http://devicetree.org/schemas/power/suppl 4 $id: http://devicetree.org/schemas/power/supply/maxim,max17040.yaml# 5 $schema: http://devicetree.org/meta-schemas/co 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 title: Maxim 17040 fuel gauge series 7 title: Maxim 17040 fuel gauge series 8 8 9 maintainers: 9 maintainers: 10 - Sebastian Reichel <sre@kernel.org> 10 - Sebastian Reichel <sre@kernel.org> 11 11 12 allOf: 12 allOf: 13 - $ref: power-supply.yaml# 13 - $ref: power-supply.yaml# 14 14 15 properties: 15 properties: 16 compatible: 16 compatible: 17 enum: 17 enum: 18 - maxim,max17040 18 - maxim,max17040 19 - maxim,max17041 19 - maxim,max17041 20 - maxim,max17043 20 - maxim,max17043 21 - maxim,max17044 21 - maxim,max17044 22 - maxim,max17048 22 - maxim,max17048 23 - maxim,max17049 23 - maxim,max17049 24 - maxim,max17058 24 - maxim,max17058 25 - maxim,max17059 25 - maxim,max17059 26 - maxim,max77836-battery 26 - maxim,max77836-battery 27 27 28 reg: 28 reg: 29 maxItems: 1 29 maxItems: 1 30 30 31 maxim,alert-low-soc-level: 31 maxim,alert-low-soc-level: 32 $ref: /schemas/types.yaml#/definitions/uin 32 $ref: /schemas/types.yaml#/definitions/uint32 33 minimum: 1 33 minimum: 1 34 maximum: 32 34 maximum: 32 35 description: | 35 description: | 36 The alert threshold that sets the state 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 37 If skipped the power up default value of 4 (%) will be used. 38 38 39 maxim,double-soc: 39 maxim,double-soc: 40 type: boolean 40 type: boolean 41 description: | 41 description: | 42 Certain devices return double the capaci 42 Certain devices return double the capacity. 43 Specify this to divide the reported valu 43 Specify this to divide the reported value in 2 and thus normalize it. 44 SoC == State of Charge == Capacity. 44 SoC == State of Charge == Capacity. 45 45 46 maxim,rcomp: 46 maxim,rcomp: 47 $ref: /schemas/types.yaml#/definitions/uin 47 $ref: /schemas/types.yaml#/definitions/uint8-array 48 minItems: 1 48 minItems: 1 49 maxItems: 2 49 maxItems: 2 50 description: | 50 description: | 51 A value to compensate readings for vario 51 A value to compensate readings for various battery chemistries and operating temperatures. 52 max17040,41 have 2 byte rcomp, default t 52 max17040,41 have 2 byte rcomp, default to 0x97 0x00. 53 All other devices have one byte rcomp, d 53 All other devices have one byte rcomp, default to 0x97. 54 54 55 interrupts: 55 interrupts: 56 maxItems: 1 56 maxItems: 1 57 57 58 io-channels: 58 io-channels: 59 items: 59 items: 60 - description: battery temperature 60 - description: battery temperature 61 61 62 io-channel-names: 62 io-channel-names: 63 items: 63 items: 64 - const: temp 64 - const: temp 65 65 66 wakeup-source: 66 wakeup-source: 67 type: boolean 67 type: boolean 68 description: | 68 description: | 69 Use this property to use alert low SoC l 69 Use this property to use alert low SoC level interrupt as wake up source. 70 70 71 required: 71 required: 72 - compatible 72 - compatible 73 - reg 73 - reg 74 74 75 unevaluatedProperties: false 75 unevaluatedProperties: false 76 76 77 examples: 77 examples: 78 - | 78 - | 79 i2c { 79 i2c { 80 #address-cells = <1>; 80 #address-cells = <1>; 81 #size-cells = <0>; 81 #size-cells = <0>; 82 82 83 battery@36 { 83 battery@36 { 84 compatible = "maxim,max17048"; 84 compatible = "maxim,max17048"; 85 reg = <0x36>; 85 reg = <0x36>; 86 maxim,rcomp = /bits/ 8 <0x56>; 86 maxim,rcomp = /bits/ 8 <0x56>; 87 maxim,alert-low-soc-level = <10>; 87 maxim,alert-low-soc-level = <10>; 88 maxim,double-soc; 88 maxim,double-soc; 89 }; 89 }; 90 }; 90 }; 91 - | 91 - | 92 #include <dt-bindings/interrupt-controller 92 #include <dt-bindings/interrupt-controller/irq.h> 93 i2c { 93 i2c { 94 #address-cells = <1>; 94 #address-cells = <1>; 95 #size-cells = <0>; 95 #size-cells = <0>; 96 96 97 battery@36 { 97 battery@36 { 98 compatible = "maxim,max77836-battery"; 98 compatible = "maxim,max77836-battery"; 99 reg = <0x36>; 99 reg = <0x36>; 100 maxim,alert-low-soc-level = <10>; 100 maxim,alert-low-soc-level = <10>; 101 interrupt-parent = <&gpio7>; 101 interrupt-parent = <&gpio7>; 102 interrupts = <2 IRQ_TYPE_LEVEL_LOW>; 102 interrupts = <2 IRQ_TYPE_LEVEL_LOW>; 103 wakeup-source; 103 wakeup-source; 104 }; 104 }; 105 }; 105 }; 106 - | 106 - | 107 #include <dt-bindings/interrupt-controller 107 #include <dt-bindings/interrupt-controller/irq.h> 108 i2c { 108 i2c { 109 #address-cells = <1>; 109 #address-cells = <1>; 110 #size-cells = <0>; 110 #size-cells = <0>; 111 111 112 fuel-gauge@36 { 112 fuel-gauge@36 { 113 compatible = "maxim,max17043"; 113 compatible = "maxim,max17043"; 114 reg = <0x36>; 114 reg = <0x36>; 115 115 116 interrupt-parent = <&gpio>; 116 interrupt-parent = <&gpio>; 117 interrupts = <144 IRQ_TYPE_EDGE_FALLIN 117 interrupts = <144 IRQ_TYPE_EDGE_FALLING>; 118 118 119 monitored-battery = <&battery>; 119 monitored-battery = <&battery>; 120 power-supplies = <&charger>; 120 power-supplies = <&charger>; 121 121 122 io-channels = <&adc 8>; 122 io-channels = <&adc 8>; 123 io-channel-names = "temp"; 123 io-channel-names = "temp"; 124 124 125 maxim,alert-low-soc-level = <10>; 125 maxim,alert-low-soc-level = <10>; 126 wakeup-source; 126 wakeup-source; 127 }; 127 }; 128 }; 128 };
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.