hc
2023-10-16 def2367077573b56f9fc4f824e5c0377a3a4175a
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Binding for TI/National Semiconductor LP8727 Charger
 
Required properties:
- compatible: "ti,lp8727"
- reg: I2C slave address 27h
 
Optional properties:
- interrupts: interrupt specifier (see interrupt binding[0])
- debounce-ms: interrupt debounce time. (u32)
 
AC and USB charging parameters
- charger-type: "ac" or "usb" (string)
- eoc-level: value of 'enum lp8727_eoc_level' (u8)
- charging-current: value of 'enum lp8727_ichg' (u8)
 
[0]: Documentation/devicetree/bindings/interrupt-controller/interrupts.txt
 
Example)
 
lp8727@27 {
   compatible = "ti,lp8727";
   reg = <0x27>;
 
   /* GPIO 134 is used for LP8728 interrupt pin */
   interrupt-parent = <&gpio5>;     /* base = 128 */
   interrupts = <6 0x2>;        /* offset = 6, falling edge type */
 
   debounce-ms = <300>;
 
   /* AC charger: 5% EOC and 500mA charging current */
   ac {
       charger-type = "ac";
       eoc-level = /bits/ 8 <0>;
       charging-current = /bits/ 8 <4>;
   };
 
   /* USB charger: 10% EOC and 400mA charging current */
   usb {
       charger-type = "usb";
       eoc-level = /bits/ 8 <1>;
       charging-current = /bits/ 8 <2>;
   };
};