| 1 |
/* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 |
|
| 3 |
/* |
| 4 |
* Labeling: |
| 5 |
* - just offset bits |
| 6 |
* ? unknown / not fully understood, used by vendor fw / ec fw |
| 7 |
*/ |
| 8 |
|
| 9 |
/* |
| 10 |
* Note: not all fields are used by all mainboards. Also some bits/fields are |
| 11 |
* still unknown and will be amended as soon as more details are known. |
| 12 |
* Naming differs from vendor firmware, since there were many completely |
| 13 |
* wrong/misleading names. Fields unused by the vendor EC fw have been |
| 14 |
* dropped, since they just were present due to vendor doing copy-pasting. |
| 15 |
*/ |
| 16 |
|
| 17 |
OperationRegion (RAM1, SystemMemory, CONFIG_EC_CLEVO_IT5570E_MEM_BASE + 0x100, 0x400) |
| 18 |
Field (RAM1, ByteAcc, Lock, Preserve) |
| 19 |
{ |
| 20 |
Offset (0x03), |
| 21 |
LSTE, 1, // Lid open 3h.0 |
| 22 |
, 1, // - 3h.1 |
| 23 |
LWKE, 1, // Lid wake enable 3h.2 |
| 24 |
|
| 25 |
Offset (0x04), |
| 26 |
AC0, 8, // Active cooling temp 0 4h |
| 27 |
PSV, 8, // Passive cooling temp 5h |
| 28 |
CRT, 8, // Critical temp 6h |
| 29 |
TMP, 8, // CPU temp read from PECI 7h |
| 30 |
AC1, 8, // Active cooling temp 1 8h |
| 31 |
BBST, 8, // ? dGPU related (BatteryBooST?) 9h |
| 32 |
BTMP, 8, // Board temperature ah |
| 33 |
|
| 34 |
Offset (0x10), |
| 35 |
ADP, 1, // AC connected 10h.0 |
| 36 |
, 1, // - 10h.1 |
| 37 |
BAT0, 1, // BAT0 connected 10h.2 |
| 38 |
|
| 39 |
Offset (0x11), |
| 40 |
WFNO, 8, // Wake cause 11h |
| 41 |
// 0x01 = lid |
| 42 |
// 0x04 = sleep button |
| 43 |
// 0x05 = timer |
| 44 |
// 0x10 = battery low |
| 45 |
|
| 46 |
Offset (0x16), |
| 47 |
BDC0, 32, // BAT0 design capacity 16h-19h |
| 48 |
BFC0, 32, // BAT0 last full charge capacity 1ah-1dh |
| 49 |
|
| 50 |
Offset (0x22), |
| 51 |
BDV0, 32, // BAT0 design voltage 22h-25h |
| 52 |
BST0, 8, // BAT0 status 26h |
| 53 |
// BST0[0] : discharging |
| 54 |
// BST0[1] : charging |
| 55 |
// BST0[2] : critical low |
| 56 |
|
| 57 |
Offset (0x2a), |
| 58 |
BPR0, 32, // BAT0 present current 2ah-2dh |
| 59 |
BRC0, 32, // BAT0 remaining capacity 2eh-31h |
| 60 |
BPV0, 32, // BAT0 present voltage 32h-35h |
| 61 |
|
| 62 |
Offset (0x38), |
| 63 |
BRS0, 8, // BAT0 relative charge 38h |
| 64 |
|
| 65 |
Offset (0x3a), |
| 66 |
BCW0, 32, // Design capacity of warning 3ah-3dh |
| 67 |
BCL0, 32, // Design capacity of low 3eh-41h |
| 68 |
|
| 69 |
Offset (0x4a), |
| 70 |
BMO0, 64, // Model 4ah-51h |
| 71 |
BIF0, 64, // Vendor 52h-59h |
| 72 |
BSN0, 32, // Serial number 5ah-5dh |
| 73 |
BTY0, 64, // Type 5eh-65h |
| 74 |
|
| 75 |
Offset (0x68), |
| 76 |
ECOS, 8, // ACPI OS support 68h |
| 77 |
// 0 = no ACPI |
| 78 |
// 1 = ACPI w/o driver |
| 79 |
// 2 = ACPI w/ driver |
| 80 |
|
| 81 |
Offset (0x78), |
| 82 |
/* |
| 83 |
* PECI |
| 84 |
* Maybe usable for debugging. Must never be written directly! |
| 85 |
*/ |
| 86 |
PCAD, 8, // PECI address 78h |
| 87 |
PEWL, 8, // PECI write length 79h |
| 88 |
PWRL, 8, // PECI read length 7ah |
| 89 |
PECD, 8, // PECI command 7bh |
| 90 |
PEHI, 8, // PECI host ID 7ch |
| 91 |
PECI, 8, // PECI index 7dh |
| 92 |
PEPL, 8, // PECI LSB 7eh |
| 93 |
PEPM, 8, // PECI MSB 7fh |
| 94 |
PWFC, 8, // ? 80h |
| 95 |
PECC, 8, // PECI completion code 81h |
| 96 |
PDT0, 8, // PECI data 82h |
| 97 |
PDT1, 8, // PECI data 83h |
| 98 |
PDT2, 8, // PECI data 84h |
| 99 |
PDT3, 8, // PECI data 85h |
| 100 |
|
| 101 |
Offset (0x92), |
| 102 |
BMD0, 16, // BAT0 manufacturing date 92h-93h |
| 103 |
// BMD0[4:0] : day |
| 104 |
// BMD0[8:5] : month |
| 105 |
// BMD0[15:9] : year - 1980 |
| 106 |
CYC0, 16, // BAT0 cycle count 94h-95h |
| 107 |
|
| 108 |
Offset (0xc7), |
| 109 |
VOFF, 8, // VGA fan base offset c7h |
| 110 |
FANC, 8, // FAN count (FANC == FANQ) c8h |
| 111 |
BLVL, 8, // Legacy display brightness level (unused) c9h |
| 112 |
|
| 113 |
Offset (0xca), |
| 114 |
, 1, // - cah.0 |
| 115 |
, 1, // ? cah.1 |
| 116 |
CAMK, 1, // Enable webcam hotkey cah.2 |
| 117 |
, 2, // - cah.3-4 |
| 118 |
WWAN, 1, // WWAN/3G/LTE present (enables WWAN) cah.5 |
| 119 |
|
| 120 |
Offset (0xcb), |
| 121 |
, 5, // - cbh.0-4 |
| 122 |
B15C, 1, // ? cbh.5 |
| 123 |
, 1, // - cbh.6 |
| 124 |
SLFG, 1, // silent fan mode flag cbh.7 |
| 125 |
|
| 126 |
Offset (0xcc), |
| 127 |
SCIE, 8, // SCI extra value cch |
| 128 |
|
| 129 |
Offset (0xce), |
| 130 |
DUT1, 8, // Fan 1 duty ceh |
| 131 |
DUT2, 8, // Fan 2 duty cfh |
| 132 |
|
| 133 |
Offset (0xd0), |
| 134 |
RPM1, 16, // Fan 1 RPM d0h-d1h |
| 135 |
RPM2, 16, // Fan 2 RPM d2h-d3h |
| 136 |
RPM4, 16, // Fan 4 RPM d4h-d5h |
| 137 |
|
| 138 |
Offset (0xd7), |
| 139 |
DTHL, 8, // ? d7h |
| 140 |
DTBP, 8, // ? d8h |
| 141 |
, 1, // - d9h.0 |
| 142 |
WOLD, 1, // ? Disable Wake-on-LAN d9h.1 |
| 143 |
PWRM, 2, // current performance profile d9h.2-3 |
| 144 |
// 0 = entertainment |
| 145 |
// 1 = performance |
| 146 |
// 2 = quiet |
| 147 |
// 3 = powersave |
| 148 |
FN3E, 1, // Fn + 3 enable (power profile toggle) d9h.4 |
| 149 |
, 1, // ? d9h.5 |
| 150 |
AIRP, 1, // airplane mode status (in non-ACPI mode) d9h.6 |
| 151 |
GPUP, 1, // dGPU power status d9h.7 |
| 152 |
|
| 153 |
Offset (0xda), |
| 154 |
BLCT, 1, // ACPI backlight control dah.0 |
| 155 |
DBGP, 1, // 3IN1 debug card present flag dah.1 |
| 156 |
, 1, // WINF[2] ? dah.2 |
| 157 |
MEUL, 1, // ME/IFD unlock (ACPI usage unclear) dah.3 |
| 158 |
|
| 159 |
Offset (0xdb), |
| 160 |
RINF, 8, // dbh |
| 161 |
// RINF[0] : set when EC cmd A8 was called |
| 162 |
// RINF[1] : - |
| 163 |
// RINF[2] : ? TP |
| 164 |
// RINF[3] : ? |
| 165 |
// RINF[4] : I2C TP SupportSandTPScanCode |
| 166 |
// RINF[5] : ? |
| 167 |
// RINF[6] : set on first airplane mode activation |
| 168 |
// RINF[7] : ? |
| 169 |
DBG, 8, // P80 + 3in1 debug dch |
| 170 |
|
| 171 |
Offset (0xdd), |
| 172 |
, 1, // ddh.0 |
| 173 |
, 1, // INF2[1] : ? ddh.1 |
| 174 |
, 4, // - ddh.2-5 |
| 175 |
BWKE, 1, // S3 wake on low battery ddh.6 |
| 176 |
FF2D, 1, // Fn + F2 (LCD off) disable ddh.7 |
| 177 |
EID2, 8, // EC CHIPID LSB deh |
| 178 |
BWKT, 8, // threshold for S3 wake on low battery dfh |
| 179 |
|
| 180 |
Offset (0xe0), |
| 181 |
RPM3, 16, // Fan 3 RPM e0h-e1h |
| 182 |
|
| 183 |
Offset (0xe2), |
| 184 |
, 3, // - e2h.0-2 |
| 185 |
SWFN, 1, // swap Fn and left Win key e2h.3 |
| 186 |
LWIN, 1, // enable left Win key e2h.4 |
| 187 |
, 2, // - e2h.5-6 |
| 188 |
AIRK, 1, // enable airplane hotkey support e2h.7 |
| 189 |
|
| 190 |
Offset (0xe4), |
| 191 |
, 1, // ? e4h.0 |
| 192 |
, 2, // - e4h.1-2 |
| 193 |
, 1, // ? e4h.3 |
| 194 |
, 1, // - e4h.4 |
| 195 |
EP12, 1, // ? (gpu related) e4h.5 |
| 196 |
FN_G, 1, // Fn + G pressed (GPU reset on vendor fw) e4h.6 |
| 197 |
, 1, // ? e4h.7 |
| 198 |
|
| 199 |
Offset (0xe5), |
| 200 |
ECSZ, 8, // EC eFlash size e5h |
| 201 |
|
| 202 |
Offset (0xe6), |
| 203 |
, 2, // - e6h.0-1 |
| 204 |
G3FG, 1, // Enter G3 (all power off) in S4/S5 e6h.2 |
| 205 |
, 3, // - e6h.3-5 |
| 206 |
FOAC, 1, // Fan always on when AC connected e6h.6 |
| 207 |
|
| 208 |
Offset (0xe7), |
| 209 |
FOFF, 8, // Fan base offset e7h |
| 210 |
|
| 211 |
Offset (0xe8), |
| 212 |
, 1, // ? static 1; vendor: if 1: eccmd c6, val 0 e8h.0 |
| 213 |
CNVI, 1, // CNVI card present e8h.1 |
| 214 |
, 3, // - e8h.2-4 |
| 215 |
FN_D, 1, // Fn + D pressed (CMOS reset on vendor fw) e8h.5 |
| 216 |
, 1, // ? fan related e8h.6 |
| 217 |
|
| 218 |
Offset (0xe9), |
| 219 |
KBBO, 1, // KB LED supports boot effect override e9h.0 |
| 220 |
|
| 221 |
Offset (0xea), |
| 222 |
, 3, // - eah.0-2 |
| 223 |
PDFG, 1, // Power supplied via USB-C eah.3 |
| 224 |
MSFG, 1, // Modern standby flag eah.4 |
| 225 |
RCHG, 1, // ? eah.5 |
| 226 |
ACOT, 1, // ? eah.6 |
| 227 |
S5FG, 1, // ? eah.7 |
| 228 |
|
| 229 |
Offset (0xeb), |
| 230 |
, 1, // ? (unknown keypress status, NV4x only) ebh.0 |
| 231 |
, 1, // ? (unknown keypress status, NV4x only) ebh.1 |
| 232 |
, 1, // - ebh.2 |
| 233 |
DGPT, 1, // ? ebh.3 |
| 234 |
TOPN, 1, // ? ebh.4 |
| 235 |
, 1, // ? (kbc beep related?) ebh.5 |
| 236 |
, 1, // ? (kbc beep related?) ebh.6 |
| 237 |
APRD, 1, // AP ready ebh.7 |
| 238 |
|
| 239 |
Offset (0xf0), |
| 240 |
PL2B, 16, // Power Limit 2 set when on battery f0h-f1h |
| 241 |
PL2T, 16, // Power Limit 2 (note: never enabled by EC!) f2h-f3h |
| 242 |
TAUT, 8, // Tau (for PL1, not effective) f4h |
| 243 |
|
| 244 |
/* FCMD interface */ |
| 245 |
Offset (0xf8), |
| 246 |
FCMD, 8, // Command f8h |
| 247 |
FDAT, 8, // Data f9h |
| 248 |
FBUF, 8, // Buffer[0] fah |
| 249 |
FBF1, 8, // Buffer[1] fbh |
| 250 |
FBF2, 8, // Buffer[2] fch |
| 251 |
FBF3, 8, // Buffer[3] fdh |
| 252 |
|
| 253 |
Offset (0xff), |
| 254 |
, 8, // ? static, l14xcu/mu: 0xe0, nv4x 0x22 ffh |
| 255 |
|
| 256 |
Offset (0x28a), |
| 257 |
FANQ, 8, // FAN count (FANC == FANQ) 28ah |
| 258 |
KBTP, 8, // Keyboard backlight type 28bh |
| 259 |
// 0x00 = none |
| 260 |
// 0x01 = white |
| 261 |
// 0x02 = RGB |
| 262 |
// 0x*3 = per-key RGB |
| 263 |
// 0x06 = RGB15Color |
| 264 |
// 0x16 = RGB15ColorCustom |
| 265 |
} |