mainboard/intel/avenuecity_crb: Update full IIO configuration
[coreboot2.git] / src / mainboard / 51nb / x210 / acpi / battery.asl
blob4eb8a678c3719f13479bebed90879c3e37ff098e
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
3 Device (BAT)
5         Name (_HID, EisaId ("PNP0C0A"))
6         Name (_UID, 1)
7         Name (_PCL, Package () { \_SB })
9         Method (_STA, 0, NotSerialized)
10         {
11                 If (B1SS)
12                 {
13                         Return (0x1F)
14                 }
15                 Else
16                 {
17                         Return (0x0F)
18                 }
19         }
21         Name (PBIF, Package () {
22                 0x00000001,  /* 0x00: Power Unit: mAH */
23                 0xFFFFFFFF,  /* 0x01: Design Capacity */
24                 0xFFFFFFFF,  /* 0x02: Last Full Charge Capacity */
25                 0x00000001,  /* 0x03: Battery Technology: Rechargeable */
26                 0xFFFFFFFF,  /* 0x04: Design Voltage */
27                 0x00000000,  /* 0x05: Design Capacity of Warning */
28                 0xFFFFFFFF,  /* 0x06: Design Capacity of Low */
29                 0x00000001,  /* 0x07: Capacity Granularity 1 */
30                 0x00000001,  /* 0x08: Capacity Granularity 2 */
31                 "Y91",       /* 0x09: Model Number */
32                 "",          /* 0x0a: Serial Number */
33                 "LION",      /* 0x0b: Battery Type */
34                 "CJOYIN"     /* 0x0c: OEM Information */
35         })
37         Method (_BIF, 0, Serialized)
38         {
39                 /* Design Capacity */
40                 PBIF[1] = DGCP * 10000 / DGVO
42                 /* Last Full Charge Capacity */
43                 PBIF[2] = FLCP * 10000 / DGVO
45                 /* Design Voltage */
46                 PBIF[4] = DGVO
48                 /* Design Capacity of Warning */
49                 PBIF[5] = BDW * 10000 / DGVO
51                 /* Design Capacity of Low */
52                 PBIF[6] = BDL
54                 Return (PBIF)
55         }
57         Name (PBST, Package () {
58                 0x00000000,  /* 0x00: Battery State */
59                 0xFFFFFFFF,  /* 0x01: Battery Present Rate */
60                 0xFFFFFFFF,  /* 0x02: Battery Remaining Capacity */
61                 0xFFFFFFFF,  /* 0x03: Battery Present Voltage */
62         })
64         Method (_BST, 0, NotSerialized)  // _BST: Battery Status
65         {
66                 /*
67                 * 0: BATTERY STATE
68                 *
69                 * bit 0 = discharging
70                 * bit 1 = charging
71                 * bit 2 = critical level
72                 */
73                 PBST[0] = BSTS
75                 /*
76                 * 1: BATTERY PRESENT RATE
77                 */
78                 PBST[1] = BPR
80                 /*
81                 * 2: BATTERY REMAINING CAPACITY
82                 */
83                 PBST[2] = BRC * 10000 / DGVO
85                 /*
86                 * 3: BATTERY PRESENT VOLTAGE
87                 */
88                 PBST[3] = BPV
90                 Return (PBST)
91         }