1c44242f0SSebastian Reichel# SPDX-License-Identifier: GPL-2.0 2c44242f0SSebastian Reichel%YAML 1.2 3c44242f0SSebastian Reichel--- 4c44242f0SSebastian Reichel$id: http://devicetree.org/schemas/power/supply/ti,lp8727.yaml# 5c44242f0SSebastian Reichel$schema: http://devicetree.org/meta-schemas/core.yaml# 6c44242f0SSebastian Reichel 79d69d47fSKrzysztof Kozlowskititle: TI/National Semiconductor LP8727 Charger 8c44242f0SSebastian Reichel 9c44242f0SSebastian Reichelmaintainers: 10c44242f0SSebastian Reichel - Sebastian Reichel <sre@kernel.org> 11c44242f0SSebastian Reichel 12c44242f0SSebastian ReichelallOf: 13c44242f0SSebastian Reichel - $ref: power-supply.yaml# 14c44242f0SSebastian Reichel 15c44242f0SSebastian Reichelproperties: 16c44242f0SSebastian Reichel compatible: 17c44242f0SSebastian Reichel const: ti,lp8727 18c44242f0SSebastian Reichel 19c44242f0SSebastian Reichel reg: 20c44242f0SSebastian Reichel const: 0x27 21c44242f0SSebastian Reichel 22c44242f0SSebastian Reichel interrupts: 23c44242f0SSebastian Reichel maxItems: 1 24c44242f0SSebastian Reichel 25c44242f0SSebastian Reichel debounce-ms: 26c44242f0SSebastian Reichel description: interrupt debounce time in ms 27c44242f0SSebastian Reichel 28c44242f0SSebastian ReichelpatternProperties: 29c44242f0SSebastian Reichel '^(ac|usb)$': 30c44242f0SSebastian Reichel type: object 31*e62fc182SRob Herring additionalProperties: false 32c44242f0SSebastian Reichel description: USB/AC charging parameters 33c44242f0SSebastian Reichel properties: 34c44242f0SSebastian Reichel charger-type: 35c44242f0SSebastian Reichel enum: 36c44242f0SSebastian Reichel - ac 37c44242f0SSebastian Reichel - usb 38c44242f0SSebastian Reichel 39c44242f0SSebastian Reichel eoc-level: 40c44242f0SSebastian Reichel $ref: /schemas/types.yaml#/definitions/uint8 41c44242f0SSebastian Reichel minimum: 0 42c44242f0SSebastian Reichel maximum: 6 43c44242f0SSebastian Reichel description: | 44c44242f0SSebastian Reichel End of Charge Percentage with the following mapping: 45c44242f0SSebastian Reichel 0 = 5%, 1 = 10%, 2 = 16%, 3 = 20%, 4 = 25%, 5 = 33%, 6 = 50% 46c44242f0SSebastian Reichel 47c44242f0SSebastian Reichel charging-current: 48c44242f0SSebastian Reichel $ref: /schemas/types.yaml#/definitions/uint8 49c44242f0SSebastian Reichel minimum: 0 50c44242f0SSebastian Reichel maximum: 9 51c44242f0SSebastian Reichel description: | 52c44242f0SSebastian Reichel Charging current with the following mapping: 53c44242f0SSebastian Reichel 0 = 90mA, 1 = 100mA, 2 = 400mA, 3 = 450mA, 4 = 500mA, 5 = 600mA, 54c44242f0SSebastian Reichel 6 = 700mA, 7 = 800mA, 8 = 900mA, 9 = 1000mA 55c44242f0SSebastian Reichel 56c44242f0SSebastian Reichelrequired: 57c44242f0SSebastian Reichel - compatible 58c44242f0SSebastian Reichel - reg 59c44242f0SSebastian Reichel 60c44242f0SSebastian ReicheladditionalProperties: false 61c44242f0SSebastian Reichel 62c44242f0SSebastian Reichelexamples: 63c44242f0SSebastian Reichel - | 64c44242f0SSebastian Reichel #include <dt-bindings/interrupt-controller/irq.h> 6520a72af1SRob Herring i2c { 66c44242f0SSebastian Reichel #address-cells = <1>; 67c44242f0SSebastian Reichel #size-cells = <0>; 68c44242f0SSebastian Reichel 69c44242f0SSebastian Reichel lp8727: charger@27 { 70c44242f0SSebastian Reichel compatible = "ti,lp8727"; 71c44242f0SSebastian Reichel reg = <0x27>; 72c44242f0SSebastian Reichel interrupt-parent = <&gpio5>; 73c44242f0SSebastian Reichel interrupts = <6 IRQ_TYPE_EDGE_FALLING>; 74c44242f0SSebastian Reichel debounce-ms = <300>; 75c44242f0SSebastian Reichel 76c44242f0SSebastian Reichel /* AC charger: 5% EOC and 500mA charging current */ 77c44242f0SSebastian Reichel ac { 78c44242f0SSebastian Reichel charger-type = "ac"; 79c44242f0SSebastian Reichel eoc-level = /bits/ 8 <0>; 80c44242f0SSebastian Reichel charging-current = /bits/ 8 <4>; 81c44242f0SSebastian Reichel }; 82c44242f0SSebastian Reichel 83c44242f0SSebastian Reichel /* USB charger: 10% EOC and 400mA charging current */ 84c44242f0SSebastian Reichel usb { 85c44242f0SSebastian Reichel charger-type = "usb"; 86c44242f0SSebastian Reichel eoc-level = /bits/ 8 <1>; 87c44242f0SSebastian Reichel charging-current = /bits/ 8 <2>; 88c44242f0SSebastian Reichel }; 89c44242f0SSebastian Reichel }; 90c44242f0SSebastian Reichel }; 91