Lines Matching +full:0 +full:x8ff
31 #define EC_PROTO_VERSION 0x00000002
37 #define EC_LPC_ADDR_ACPI_DATA 0x62
38 #define EC_LPC_ADDR_ACPI_CMD 0x66
41 #define EC_LPC_ADDR_HOST_DATA 0x200
42 #define EC_LPC_ADDR_HOST_CMD 0x204
46 #define EC_LPC_ADDR_HOST_ARGS 0x800 /* And 0x801, 0x802, 0x803 */
47 #define EC_LPC_ADDR_HOST_PARAM 0x804 /* For version 2 params; size is
50 #define EC_LPC_ADDR_HOST_PACKET 0x800 /* Offset of version 3 packet */
51 #define EC_LPC_HOST_PACKET_SIZE 0x100 /* Max size of version 3 packet */
53 /* The actual block is 0x800-0x8ff, but some BIOSes think it's 0x880-0x8ff
55 #define EC_HOST_CMD_REGION0 0x800
56 #define EC_HOST_CMD_REGION1 0x880
57 #define EC_HOST_CMD_REGION_SIZE 0x80
60 #define EC_LPC_CMDR_DATA (1 << 0) /* Data ready for host to read */
68 #define EC_LPC_ADDR_MEMMAP 0x900
73 #define EC_MEMMAP_TEMP_SENSOR 0x00 /* Temp sensors */
74 #define EC_MEMMAP_FAN 0x10 /* Fan speeds */
75 #define EC_MEMMAP_TEMP_SENSOR_B 0x18 /* Temp sensors (second set) */
76 #define EC_MEMMAP_ID 0x20 /* 'E' 'C' */
77 #define EC_MEMMAP_ID_VERSION 0x22 /* Version of data in 0x20 - 0x2f */
78 #define EC_MEMMAP_THERMAL_VERSION 0x23 /* Version of data in 0x00 - 0x1f */
79 #define EC_MEMMAP_BATTERY_VERSION 0x24 /* Version of data in 0x40 - 0x7f */
80 #define EC_MEMMAP_SWITCHES_VERSION 0x25 /* Version of data in 0x30 - 0x33 */
81 #define EC_MEMMAP_EVENTS_VERSION 0x26 /* Version of data in 0x34 - 0x3f */
82 #define EC_MEMMAP_HOST_CMD_FLAGS 0x27 /* Host command interface flags */
83 #define EC_MEMMAP_SWITCHES 0x30
84 #define EC_MEMMAP_HOST_EVENTS 0x34
85 #define EC_MEMMAP_BATT_VOLT 0x40 /* Battery Present Voltage */
86 #define EC_MEMMAP_BATT_RATE 0x44 /* Battery Present Rate */
87 #define EC_MEMMAP_BATT_CAP 0x48 /* Battery Remaining Capacity */
88 #define EC_MEMMAP_BATT_FLAG 0x4c /* Battery State, defined below */
89 #define EC_MEMMAP_BATT_DCAP 0x50 /* Battery Design Capacity */
90 #define EC_MEMMAP_BATT_DVLT 0x54 /* Battery Design Voltage */
91 #define EC_MEMMAP_BATT_LFCC 0x58 /* Battery Last Full Charge Capacity */
92 #define EC_MEMMAP_BATT_CCNT 0x5c /* Battery Cycle Count */
93 #define EC_MEMMAP_BATT_MFGR 0x60 /* Battery Manufacturer String */
94 #define EC_MEMMAP_BATT_MODEL 0x68 /* Battery Model Number String */
95 #define EC_MEMMAP_BATT_SERIAL 0x70 /* Battery Serial Number String */
96 #define EC_MEMMAP_BATT_TYPE 0x78 /* Battery Type String */
106 #define EC_TEMP_SENSOR_NOT_PRESENT 0xff
107 #define EC_TEMP_SENSOR_ERROR 0xfe
108 #define EC_TEMP_SENSOR_NOT_POWERED 0xfd
109 #define EC_TEMP_SENSOR_NOT_CALIBRATED 0xfc
117 #define EC_FAN_SPEED_NOT_PRESENT 0xffff /* Entry not present */
118 #define EC_FAN_SPEED_STALLED 0xfffe /* Fan stalled */
121 #define EC_BATT_FLAG_AC_PRESENT 0x01
122 #define EC_BATT_FLAG_BATT_PRESENT 0x02
123 #define EC_BATT_FLAG_DISCHARGING 0x04
124 #define EC_BATT_FLAG_CHARGING 0x08
125 #define EC_BATT_FLAG_LEVEL_CRITICAL 0x10
128 #define EC_SWITCH_LID_OPEN 0x01
129 #define EC_SWITCH_POWER_BUTTON_PRESSED 0x02
130 #define EC_SWITCH_WRITE_PROTECT_DISABLED 0x04
132 #define EC_SWITCH_IGNORE1 0x08
134 #define EC_SWITCH_DEDICATED_RECOVERY 0x10
136 #define EC_SWITCH_IGNORE0 0x20
140 #define EC_HOST_CMD_FLAG_LPC_ARGS_SUPPORTED 0x01
142 #define EC_HOST_CMD_FLAG_VERSION_3 0x02
145 #define EC_WIRELESS_SWITCH_WLAN 0x01
146 #define EC_WIRELESS_SWITCH_BLUETOOTH 0x02
147 #define EC_WIRELESS_SWITCH_WWAN 0x04
166 #define EC_LPC_STATUS_TO_HOST 0x01
168 #define EC_LPC_STATUS_FROM_HOST 0x02
170 #define EC_LPC_STATUS_PROCESSING 0x04
172 #define EC_LPC_STATUS_LAST_CMD 0x08
174 #define EC_LPC_STATUS_BURST_MODE 0x10
176 #define EC_LPC_STATUS_SCI_PENDING 0x20
178 #define EC_LPC_STATUS_SMI_PENDING 0x40
180 #define EC_LPC_STATUS_RESERVED 0x80
191 EC_RES_SUCCESS = 0,
209 * Host event codes. Note these are 1-based, not 0-based, because ACPI query
210 * EC command uses code 0 to mean "no event pending". We explicitly specify
273 * Command version is 0 and params from host are at EC_LPC_ADDR_OLD_PARAM with
277 #define EC_HOST_ARGS_FLAG_FROM_HOST 0x01
282 * response. Command version is 0 and response data from EC is at
285 #define EC_HOST_ARGS_FLAG_TO_HOST 0x02
292 * 0 EC_CMD_VERSION0 + (command version)
296 * N+3 8-bit checksum of bytes 0..N+2
300 * 0 Result code (EC_RES_*)
303 * M+2 8-bit checksum of bytes 0..M+1
316 #define EC_PROTO2_MAX_PARAM_SIZE 0xfc
330 #define EC_COMMAND_PROTOCOL_3 0xda
345 * should total to 0.
355 /* Unused byte in current protocol version; set to 0 */
371 * should total to 0.
381 /* Unused bytes in current protocol version; set to 0 */
404 #define EC_CMD_PROTO_VERSION 0x00
414 #define EC_CMD_HELLO 0x01
421 uint32_t out_data; /* Output will be in_data + 0x01020304 */
425 #define EC_CMD_GET_VERSION 0x02
428 EC_IMAGE_UNKNOWN = 0,
442 #define EC_CMD_READ_TEST 0x03
458 #define EC_CMD_GET_BUILD_INFO 0x04
461 #define EC_CMD_GET_CHIP_INFO 0x05
471 #define EC_CMD_GET_BOARD_VERSION 0x06
485 #define EC_CMD_READ_MEMMAP 0x07
493 #define EC_CMD_GET_CMD_VERSIONS 0x08
514 #define EC_CMD_GET_COMMS_STATUS 0x09
518 EC_COMMS_STATUS_PROCESSING = 1 << 0, /* Processing cmd */
529 #define EC_CMD_TEST_PROTOCOL 0x0a
544 #define EC_CMD_GET_PROTOCOL_INFO 0x0b
548 #define EC_PROTOCOL_INFO_IN_PROGRESS_SUPPORTED (1 << 0)
570 #define EC_CMD_FLASH_INFO 0x10
597 #define EC_CMD_FLASH_READ 0x11
605 #define EC_CMD_FLASH_WRITE 0x12
608 /* Version 0 of the flash command supported only 64 bytes of data */
618 #define EC_CMD_FLASH_ERASE 0x13
628 * If mask!=0, sets/clear the requested bits of flags. Depending on the
633 * If mask=0, simply returns the current flags state.
635 #define EC_CMD_FLASH_PROTECT 0x15
640 #define EC_FLASH_PROTECT_RO_AT_BOOT (1 << 0)
680 * Note: commands 0x14 - 0x19 version 0 were old commands to get/set flash
681 * write protect. These commands may be reused with version > 0.
685 #define EC_CMD_FLASH_REGION_INFO 0x16
690 EC_FLASH_REGION_RO = 0,
712 #define EC_CMD_VBNV_CONTEXT 0x17
734 #define EC_CMD_PWM_GET_FAN_TARGET_RPM 0x20
741 #define EC_CMD_PWM_SET_FAN_TARGET_RPM 0x21
748 #define EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT 0x22
756 #define EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT 0x23
763 #define EC_CMD_PWM_SET_FAN_DUTY 0x24
776 #define EC_CMD_LIGHTBAR_CMD 0x28
791 int s0_tick_delay[2]; /* AC=0/1 */
792 int s0a_tick_delay[2]; /* AC=0/1 */
800 uint8_t osc_min[2]; /* AC=0/1 */
801 uint8_t osc_max[2]; /* AC=0/1 */
802 uint8_t w_ofs[2]; /* AC=0/1 */
805 uint8_t bright_bl_off_fixed[2]; /* AC=0/1 */
806 uint8_t bright_bl_on_min[2]; /* AC=0/1 */
807 uint8_t bright_bl_on_max[2]; /* AC=0/1 */
817 struct rgb_s color[8]; /* 0-3 are Google colors */
867 LIGHTBAR_CMD_DUMP = 0,
885 #define EC_CMD_LED_CONTROL 0x29
888 EC_LED_ID_BATTERY_LED = 0,
894 #define EC_LED_FLAGS_QUERY (1 << 0) /* Query LED capability only */
898 EC_LED_COLOR_RED = 0,
918 * Range 0 means color channel not present.
929 * Note: command code 0x29 version 0 was VBOOT_CMD in Link EVT; it may be
930 * reused for other purposes with version > 0.
934 #define EC_CMD_VBOOT_HASH 0x2A
939 uint8_t nonce_size; /* Nonce size; may be 0 */
940 uint8_t reserved0; /* Reserved; set 0 */
943 uint8_t nonce_data[64]; /* Nonce data; ignored if nonce_size=0 */
950 uint8_t reserved0; /* Ignore; will be 0 */
957 EC_VBOOT_HASH_GET = 0, /* Get current hash status */
964 EC_VBOOT_HASH_TYPE_SHA256 = 0, /* SHA-256 */
968 EC_VBOOT_HASH_STATUS_NONE = 0, /* No hash (not started, or aborted) */
978 #define EC_VBOOT_HASH_OFFSET_RO 0xfffffffe
979 #define EC_VBOOT_HASH_OFFSET_RW 0xfffffffd
985 #define EC_CMD_USB_CHARGE_SET_MODE 0x30
999 #define EC_CMD_PSTORE_INFO 0x40
1013 #define EC_CMD_PSTORE_READ 0x41
1021 #define EC_CMD_PSTORE_WRITE 0x42
1042 #define EC_CMD_RTC_GET_VALUE 0x44
1043 #define EC_CMD_RTC_GET_ALARM 0x45
1046 #define EC_CMD_RTC_SET_VALUE 0x46
1047 #define EC_CMD_RTC_SET_ALARM 0x47
1053 #define EC_CMD_PORT80_LAST_BOOT 0x48
1063 #define EC_CMD_THERMAL_SET_THRESHOLD 0x50
1072 #define EC_CMD_THERMAL_GET_THRESHOLD 0x51
1084 #define EC_CMD_THERMAL_AUTO_FAN_CTRL 0x52
1087 #define EC_CMD_TMP006_GET_CALIBRATION 0x53
1101 #define EC_CMD_TMP006_SET_CALIBRATION 0x54
1105 uint8_t reserved[3]; /* Reserved; set 0 */
1121 #define EC_CMD_MKBP_STATE 0x60
1124 #define EC_CMD_MKBP_INFO 0x61
1133 #define EC_CMD_MKBP_SIMULATE_KEY 0x62
1142 #define EC_CMD_MKBP_SET_CONFIG 0x64
1143 #define EC_CMD_MKBP_GET_CONFIG 0x65
1151 EC_MKBP_VALID_SCAN_PERIOD = 1 << 0,
1178 /* maximum depth to allow for fifo (0 = no keyscan output) */
1191 #define EC_CMD_KEYSCAN_SEQ_CTRL 0x66
1194 EC_KEYSCAN_SEQ_STATUS = 0, /* Get status information */
1206 EC_KEYSCAN_SEQ_FLAG_DONE = 1 << 0,
1228 uint8_t scan[0]; /* keyscan data */
1242 struct ec_collect_item item[0];
1251 #define EC_CMD_TEMP_SENSOR_GET_INFO 0x70
1265 * Note: host commands 0x80 - 0x87 are reserved to avoid conflict with ACPI
1286 #define EC_CMD_HOST_EVENT_GET_B 0x87
1287 #define EC_CMD_HOST_EVENT_GET_SMI_MASK 0x88
1288 #define EC_CMD_HOST_EVENT_GET_SCI_MASK 0x89
1289 #define EC_CMD_HOST_EVENT_GET_WAKE_MASK 0x8d
1292 #define EC_CMD_HOST_EVENT_SET_SMI_MASK 0x8a
1293 #define EC_CMD_HOST_EVENT_SET_SCI_MASK 0x8b
1294 #define EC_CMD_HOST_EVENT_CLEAR 0x8c
1295 #define EC_CMD_HOST_EVENT_SET_WAKE_MASK 0x8e
1296 #define EC_CMD_HOST_EVENT_CLEAR_B 0x8f
1302 #define EC_CMD_SWITCH_ENABLE_BKLIGHT 0x90
1309 #define EC_CMD_SWITCH_ENABLE_WIRELESS 0x91
1319 #define EC_CMD_GPIO_SET 0x92
1327 #define EC_CMD_GPIO_GET 0x93
1340 #define EC_CMD_I2C_READ 0x94
1353 #define EC_CMD_I2C_WRITE 0x95
1367 #define EC_CMD_CHARGE_FORCE_IDLE 0x96
1377 #define EC_CMD_CONSOLE_SNAPSHOT 0x97
1385 #define EC_CMD_CONSOLE_READ 0x98
1395 #define EC_CMD_BATTERY_CUT_OFF 0x99
1403 #define EC_CMD_USB_MUX 0x9a
1413 EC_LDO_STATE_OFF = 0, /* the LDO / FET is shut down */
1420 #define EC_CMD_LDO_SET 0x9b
1430 #define EC_CMD_LDO_GET 0x9c
1446 #define EC_CMD_POWER_INFO 0x9d
1459 #define EC_CMD_I2C_PASSTHRU 0x9e
1468 #define EC_I2C_ADDR_MASK 0x3ff
1470 #define EC_I2C_STATUS_NAK (1 << 0) /* Transfer was not acknowledged */
1503 #define EC_CMD_CHARGE_DUMP 0xa0
1508 #define EC_CMD_CHARGE_CURRENT_LIMIT 0xa1
1517 #define EC_CMD_EXT_POWER_CURRENT_LIMIT 0xa2
1527 #define EC_CMD_SB_READ_WORD 0xb0
1528 #define EC_CMD_SB_WRITE_WORD 0xb1
1533 #define EC_CMD_SB_READ_BLOCK 0xb2
1534 #define EC_CMD_SB_WRITE_BLOCK 0xb3
1563 #define EC_CMD_ENTERING_MODE 0xb6
1569 #define VBOOT_MODE_NORMAL 0
1580 #define EC_CMD_REBOOT_EC 0xd2
1584 EC_REBOOT_CANCEL = 0, /* Cancel a pending reboot */
1594 #define EC_REBOOT_FLAG_RESERVED0 (1 << 0) /* Was recovery request */
1608 #define EC_CMD_GET_PANIC_INFO 0xd3
1630 #define EC_CMD_ACPI_READ 0x80
1645 #define EC_CMD_ACPI_WRITE 0x81
1651 * sets the result code to the 1-based index of the bit (event 0x00000001 = 1,
1652 * event 0x80000000 = 32), or 0 if no event was pending.
1654 #define EC_CMD_ACPI_QUERY_EVENT 0x84
1658 #define EC_ACPI_MEM_VERSION 0x00
1660 * Test location; writing value here updates test compliment byte to (0xff -
1663 #define EC_ACPI_MEM_TEST 0x01
1665 #define EC_ACPI_MEM_TEST_COMPLIMENT 0x02
1666 /* Keyboard backlight brightness percent (0 - 100) */
1667 #define EC_ACPI_MEM_KEYBOARD_BACKLIGHT 0x03
1690 #define EC_CMD_REBOOT 0xd1 /* Think "die" */
1699 #define EC_CMD_RESEND_RESPONSE 0xdb
1702 * This header byte on a command indicate version 0. Any header byte less
1704 * versioning. In that case, we assume version 0.
1709 * The old EC interface must not use commands 0dc or higher.
1711 #define EC_CMD_VERSION0 0xdc