Lines Matching +full:ec +full:- +full:codec

1 /* SPDX-License-Identifier: GPL-2.0-only */
3 * Host communication command constants for ChromeOS EC
7 * NOTE: This file is auto-generated from ChromeOS EC Open Source code from
8 * https://chromium.googlesource.com/chromiumos/platform/ec/+/master/include/ec_commands.h
11 /* Host communication command constants for Chrome EC */
52 * The actual block is 0x800-0x8ff, but some BIOSes think it's 0x880-0x8ff
56 * MEC series EC; an attempt to address a larger region may fail.
63 /* EC command register bit functions */
65 #define EC_LPC_CMDR_PENDING BIT(1) /* Write pending to EC */
66 #define EC_LPC_CMDR_BUSY BIT(2) /* EC is busy processing a command */
77 #define EC_MEMMAP_TEMP_SENSOR 0x00 /* Temp sensors 0x00 - 0x0f */
78 #define EC_MEMMAP_FAN 0x10 /* Fan speeds 0x10 - 0x17 */
79 #define EC_MEMMAP_TEMP_SENSOR_B 0x18 /* More temp sensors 0x18 - 0x1f */
81 #define EC_MEMMAP_ID_VERSION 0x22 /* Version of data in 0x20 - 0x2f */
82 #define EC_MEMMAP_THERMAL_VERSION 0x23 /* Version of data in 0x00 - 0x1f */
83 #define EC_MEMMAP_BATTERY_VERSION 0x24 /* Version of data in 0x40 - 0x7f */
84 #define EC_MEMMAP_SWITCHES_VERSION 0x25 /* Version of data in 0x30 - 0x33 */
85 #define EC_MEMMAP_EVENTS_VERSION 0x26 /* Version of data in 0x34 - 0x3f */
87 /* Unused 0x28 - 0x2f */
89 /* Unused 0x31 - 0x33 */
95 #define EC_MEMMAP_BATT_FLAG 0x4c /* Battery State, see below (8-bit) */
96 #define EC_MEMMAP_BATT_COUNT 0x4d /* Battery Count (8-bit) */
97 #define EC_MEMMAP_BATT_INDEX 0x4e /* Current Battery Data Index (8-bit) */
109 /* Unused 0x84 - 0x8f */
112 #define EC_MEMMAP_ACC_DATA 0x92 /* Accelerometers data 0x92 - 0x9f */
114 /* 0x94 - 0x99: 1st Accelerometer */
115 /* 0x9a - 0x9f: 2nd Accelerometer */
116 #define EC_MEMMAP_GYRO_DATA 0xa0 /* Gyroscope data 0xa0 - 0xa5 */
117 /* Unused 0xa6 - 0xdf */
121 * limitations of the ACPI protocol. Do not place data in the range 0xe0 - 0xfe
147 * reporting a temperature range of 200K to 454K = -73C to 181C.
161 #define EC_TEMP_SENSOR_DEFAULT (296 - EC_TEMP_SENSOR_OFFSET)
210 * This reads from ACPI memory space on the EC (EC_ACPI_MEM_*).
214 * - Write EC_CMD_ACPI_READ to EC_LPC_ADDR_ACPI_CMD
215 * - Wait for EC_LPC_CMDR_PENDING bit to clear
216 * - Write address to EC_LPC_ADDR_ACPI_DATA
217 * - Wait for EC_LPC_CMDR_DATA bit to set
218 * - Read value from EC_LPC_ADDR_ACPI_DATA
225 * This reads from ACPI memory space on the EC (EC_ACPI_MEM_*).
229 * - Write EC_CMD_ACPI_WRITE to EC_LPC_ADDR_ACPI_CMD
230 * - Wait for EC_LPC_CMDR_PENDING bit to clear
231 * - Write address to EC_LPC_ADDR_ACPI_DATA
232 * - Wait for EC_LPC_CMDR_PENDING bit to clear
233 * - Write value to EC_LPC_ADDR_ACPI_DATA
240 * This enables burst mode on the EC to allow the host to issue several
241 * commands back-to-back. While in this mode, writes to mapped multi-byte
249 * This disables burst mode on the EC and stops preventing EC writes to mapped
250 * multi-byte data.
257 * This clears the lowest-order bit in the currently pending host events, and
258 * sets the result code to the 1-based index of the bit (event 0x00000001 = 1,
268 * Test location; writing value here updates test compliment byte to (0xff -
275 /* Keyboard backlight brightness percent (0 - 100) */
277 /* DPTF Target Fan Duty (0-100, 0xff for auto/none) */
281 * DPTF temp thresholds. Any of the EC's temp sensors can have up to two
285 * as the memory-mapped sensors. The COMMIT register applies those settings.
310 * write 2 to [0x05] -- select temp sensor 2
311 * write 0x7b to [0x06] -- C_TO_K(50) - EC_TEMP_SENSOR_OFFSET
312 * write 0x2 to [0x07] -- enable threshold 0 with this value
313 * write 0x85 to [0x06] -- C_TO_K(60) - EC_TEMP_SENSOR_OFFSET
314 * write 0x3 to [0x07] -- enable threshold 1 with this value
317 * write 2 to [0x05] -- select temp sensor 2
318 * write 0x1 to [0x07] -- disable threshold 1
348 * bit 0 (EC_FEATURE_LIMITED) changes meaning from "EC code has a limited set
350 * interpreting ACPI bytecode, to "EC_FEATURES[0-7] is not supported". Since
353 * the EC codebase would simply return 0xff to that unknown address. Check
378 * ACPI addresses 0x20 - 0xff map to EC_MEMMAP offset 0x00 - 0xdf. This data
379 * is read-only from the AP. Added in EC_ACPI_MEM_VERSION 2.
390 * is pre-processed to handle constants but the ASL compiler is unable to
396 * Attributes for EC request and response packets. Just defining __packed
398 * 32-bit aligned, as it should be for all buffers.
405 * the parent structure. This is particularly important if the sub-structure
409 * Also be very careful using __packed - particularly when nesting non-packed
416 * "__packed" - generates inefficient code; all sub-structs must also be packed
418 * "struct [^_]" - all structs should be annotated, except for structs that are
425 * byte-wise reads.
438 /* EC has written a byte in the data register and host hasn't read it yet */
440 /* Host has written a command/data byte and the EC hasn't read it yet */
442 /* EC is processing a command */
444 /* Last write to EC was a command, not data */
446 /* EC is in burst mode */
456 * EC is busy. This covers both the EC processing a command, and the host has
457 * written a new command but the EC hasn't picked it up yet.
463 * Host command response codes (16-bit). Note that response codes should be
491 * Host event codes. Note these are 1-based, not 0-based, because ACPI query
492 * EC command uses code 0 to mean "no event pending". We explicitly specify
507 /* Event generated by a device attached to the EC */
513 * EC has finished initializing the host interface. The host can check
515 * determine when the EC is ready to accept subsequent commands.
542 /* EC encountered a panic, triggering a reset */
548 /* EC RTC event occurred */
554 /* EC desires to change state of host-controlled USB mux */
571 * not initialized on the EC, or improperly configured on the host.
576 #define EC_HOST_EVENT_MASK(event_code) BIT_ULL((event_code) - 1)
579 * struct ec_lpc_host_args - Arguments at EC_LPC_ADDR_HOST_ARGS
598 * If EC gets a command and this flag is not set, this is an old-style command.
600 * unknown length. EC must respond with an old-style response (that is,
605 * Args are from EC. Data area at EC_LPC_ADDR_HOST_PARAM contains response.
607 * If EC responds to a command and this flag is not set, this is an old-style
608 * response. Command version is 0 and response data from EC is at
615 * Byte codes returned by EC over SPI interface.
617 * These can be used by the AP to debug the EC interface, and to determine
618 * when the EC is not in a state where it will ever get around to responding
621 * Example of sequence of bytes read from EC for a current good transfer:
622 * 1. - - AP asserts chip select (CS#)
623 * 2. EC_SPI_OLD_READY - AP sends first byte(s) of request
624 * 3. - - EC starts handling CS# interrupt
625 * 4. EC_SPI_RECEIVING - AP sends remaining byte(s) of request
626 * 5. EC_SPI_PROCESSING - EC starts processing request; AP is clocking in
628 * 6. - - EC finishes processing and sets up response
629 * 7. EC_SPI_FRAME_START - AP reads frame byte
630 * 8. (response packet) - AP reads response packet
631 * 9. EC_SPI_PAST_END - Any additional bytes read by AP
632 * 10 - - AP deasserts chip select
633 * 11 - - EC processes CS# interrupt and sets up DMA for
643 * Then the EC found an error in the request, or was not ready for the request
645 * because the EC is unable to tell when the AP is done sending its request.
649 * Framing byte which precedes a response packet from the EC. After sending a
661 * EC is ready to receive, and has ignored the byte sent by the AP. EC expects
668 * EC has started receiving the request from the AP, but hasn't started
673 /* EC has received the entire request from the AP and is processing it. */
677 * EC received bad data from the AP, such as a packet header with an invalid
678 * length. EC will ignore all data until chip select deasserts.
683 * EC received data from the AP before it was ready. That is, the AP asserted
684 * chip select and started clocking data before the EC was ready to receive it.
685 * EC will ignore all data until chip select deasserts.
690 * EC was ready to receive a request from the AP. EC has treated the byte sent
691 * by the AP as part of a request packet, or (for old-style ECs) is processing
705 * N+3 8-bit checksum of bytes 0..N+2
712 * M+2 8-bit checksum of bytes 0..M+1
737 * 3+ structs are being used. Usage is bus-dependent.
744 * struct ec_host_request - Version 3 request from host.
745 * @struct_version: Should be 3. The EC will return EC_RES_INVALID_HEADER if it
767 * struct ec_host_response - Version 3 response from EC.
771 * @result: EC's response to the command (separate from communication failure)
790 * bytes are followed by a CRC-8 of that data, using x^8 + x^2 + x + 1
799 * 105) Send request q to EC.
810 * 301) If --tries_left <= 0, return error.
815 * EC algorithm when receiving a request q.
816 * EC has response buffer r, error buffer e.
846 * bits 0-3: struct_version: Structure version (=4)
848 * bits 5-6: seq_num: Sequence number
854 * bits 0-4: command_version: Command version
855 * bits 5-6: Reserved (set 0, ignore on read)
869 /* CRC-8 of above fields, using x^8 + x^2 + x + 1 polynomial */
873 /* Version 4 response from EC */
876 * bits 0-3: struct_version: Structure version (=4)
878 * bits 5-6: seq_num: Sequence number
884 * bits 0-6: Reserved (set 0, ignore on read)
898 /* CRC-8 of above fields, using x^8 + x^2 + x + 1 polynomial */
917 * Each command is an 16-bit command value. Commands which take params or
922 * those are implementation-dependent and not defined here.
924 * All commands MUST be #defined to be 4-digit UPPER CASE hex values
932 * Get protocol version, used to deal with non-backward compatible protocol
938 * struct ec_response_proto_version - Response to the proto version command.
946 * Hello. This is a simple command to test the EC is responsive to
952 * struct ec_params_hello - Parameters to the hello command.
960 * struct ec_response_hello - Response to the hello command.
977 * struct ec_response_get_version - Response to the get version command.
978 * @version_string_ro: Null-terminated RO firmware version string.
979 * @version_string_rw: Null-terminated RW firmware version string.
980 * @reserved: Unused bytes; was previously RW-B firmware version string.
994 * struct ec_params_read_test - Parameters for the read test command.
1004 * struct ec_response_read_test - Response to the read test command.
1014 * Response is null-terminated string.
1022 * struct ec_response_get_chip_info - Response to the get chip info command.
1023 * @vendor: Null-terminated string for chip vendor.
1024 * @name: Null-terminated string for chip name.
1025 * @revision: Null-terminated string for chip mask version.
1037 * struct ec_response_board_version - Response to the board version command.
1045 * Read memory-mapped data.
1047 * This is an alternate interface to memory-mapped data for bus protocols
1048 * which don't support direct-mapped memory - I2C, SPI, etc.
1055 * struct ec_params_read_memmap - Parameters for the read memory map command.
1068 * struct ec_params_get_cmd_versions - Parameters for the get command versions.
1076 * struct ec_params_get_cmd_versions_v1 - Parameters for the get command
1085 * struct ec_response_get_cmd_versions - Response to the get command versions.
1094 * Check EC communications status (busy). This is needed on i2c/spi but not
1095 * on lpc since it has its own out-of-band busy indicator.
1108 * struct ec_response_get_comms_status - Response to the get comms status
1119 /* Tell the EC what to send back to us. */
1139 * struct ec_response_get_protocol_info - Response to the get protocol info.
1193 * EC are present.
1211 * The host goes through the EC to access these sensors.
1212 * In addition, the EC may provide composite sensors, like lid angle.
1215 /* The keyboard is controlled by the EC */
1217 /* The AP can use part of the EC flash as persistent storage. */
1219 /* The EC monitors BIOS port 80h, and can return POST codes. */
1232 /* The EC exposes GPIO commands to control/monitor connected devices. */
1234 /* The EC can send i2c messages to downstream devices. */
1245 /* EC can detect when the host hangs. */
1249 /* Another Cros EC device is present downstream of this one */
1259 /* EC decides on USB-C SS mux state, muxes configured by host */
1261 /* EC has RTC feature that can be controlled by host commands */
1269 /* EC has device events support */
1271 /* EC supports the unified wake masks for LPC/eSPI systems */
1273 /* EC supports 64-bit host events */
1275 /* EC runs code in RAM (not in place, a.k.a. XIP) */
1277 /* EC supports CEC commands */
1279 /* EC supports tight sensor timestamping. */
1282 * EC supports tablet mode detection aligned to Chrome and allows
1294 * The EC will wait for direction from the AP to enter Type-C alternate
1299 * The EC will wait for an acknowledge from the AP after setting the
1304 * The EC supports entering and residing in S4.
1308 * The EC supports the AP directing mux sets for the board.
1312 * The EC supports the AP composing VDMs for us to send.
1318 #define EC_FEATURE_MASK_1(event_code) BIT(event_code - 32)
1325 /* Get the board's SKU ID from EC */
1343 * struct ec_response_flash_info - Response to the flash info command.
1363 * EC flash erases bits to 0 instead of 1.
1377 * struct ec_response_flash_info_1 - Response to the flash info v1 command.
1387 * For example, an EC may have a write buffer which can do
1388 * half-page operations if data is aligned, and a slower
1389 * word-at-a-time write mode.
1396 * if they did we'd define the version 0 structure as a sub-structure of this
1402 * The EC returns the number of banks describing the flash memory.
1427 /* Size in power of 2 of each sector (8 --> 256 bytes) */
1440 /* Total flash in the EC. */
1444 /* Maximum size to use to send data to write to the EC. */
1446 /* Number of banks present in the EC. */
1461 * struct ec_params_flash_read - Parameters for the flash read command.
1478 * struct ec_params_flash_write - Parameters for the flash write command.
1492 * struct ec_params_flash_erase - Parameters for the flash erase command, v0.
1515 * ERASE_GET_RESULT command may timeout on EC where flash access is not
1525 * struct ec_params_flash_erase_v1 - Parameters for the flash erase command, v1.
1552 /* RO flash code protected when the EC boots */
1555 * RO flash code protected now. If this bit is set, at-boot status cannot
1563 /* Error - at least one bank of flash is stuck locked, and cannot be unlocked */
1566 * Error - flash protection is in inconsistent state. At least one bank of
1568 * re-requesting the desired flags, or by a hard reset if that fails.
1571 /* Entire flash code protected when the EC boots */
1573 /* RW flash code protected when the EC boots */
1577 /* Rollback information flash region protected when the EC boots */
1584 * struct ec_params_flash_protect - Parameters for the flash protect command.
1594 * struct ec_response_flash_protect - Response to the flash protect command.
1609 * Note: commands 0x14 - 0x19 version 0 were old commands to get/set flash
1618 /* Region which holds read-only EC image */
1622 * 'running'. Active means 'scheduled-to-run'. Since RO image always
1623 * scheduled to run, active/non-active applies only to RW images (for
1631 * Region which should be write-protected in the factory (a superset of
1635 /* Region which holds updatable (non-active) RW image */
1647 * struct ec_params_flash_region_info - Parameters for the flash region info
1702 * struct ec_params_flash_select - Parameters for the flash select command.
1735 /* OBSOLETE - Use EC_CMD_PWM_SET_DUTY */
1744 /* OBSOLETE - Use EC_CMD_PWM_SET_DUTY */
1770 /* All types, indexed by board-specific enum pwm_channel */
1782 uint8_t index; /* Type-specific index, or 0 if unique */
1789 uint8_t index; /* Type-specific index, or 0 if unique */
1839 uint8_t battery_threshold[LB_BATTERY_LEVELS - 1];
1846 struct rgb_s color[8]; /* 0-3 are Google colors */
1866 /* Tap-for-battery params */
1885 uint8_t battery_threshold[LB_BATTERY_LEVELS - 1];
1891 /* s5: single color pulse on inhibited power-up */
1895 struct rgb_s color[8]; /* 0-3 are Google colors */
1926 /* Tap-for-battery params */
1951 uint8_t battery_threshold[LB_BATTERY_LEVELS - 1];
1959 /* s5: single color pulse on inhibited power-up */
1963 struct rgb_s color[8]; /* 0-3 are Google colors */
2117 * May be on power button or on C-panel.
2206 EC_VBOOT_HASH_TYPE_SHA256 = 0, /* SHA-256 */
2217 * If one of these is specified, the EC will automatically update offset and
2232 * Motion sense commands. We'll make separate structs for sub-commands with
2253 * EC Rate command is a setter/getter command for the EC sampling rate
2255 * It is per sensor, the EC run sample task at the minimum of all
2272 * a specified motion sensor in +/-G's or +/- deg/s.
2281 * un-calibrated value, hence the wake angle isn't exact.
2359 /* Number of motionsense sub-commands. */
2423 /* Each sensor is up to 3-axis. */
2475 /* Module flag masks used for the dump sub-command. */
2478 /* Sensor flag masks used for the dump sub-command. */
2493 * send any other value, the EC will interpret it as data to set and will
2496 #define EC_MOTION_SENSE_NO_VALUE -1
2531 * of sensors controlled by the EC.
2562 /* Rounding flag, true for round-up, false for down. */
2577 * the calibration information in the EC.
2606 * the calibration information in the EC.
2637 * EC may return less or 0 if none available.
2683 * lid_angle - hys_degree to trigger clamshell mode.
2697 /* Number of sensors managed directly by the EC. */
2881 /* Real-time clock */
3002 /* Version 0 - set */
3009 /* Version 0 - get */
3038 * EC will throttle ap when temperature >= 301 K, and release throttling when
3045 * EC will throttle ap when temperature >= 301 K, and release throttling when
3048 * Note that this structure is a sub-structure of
3058 /* Version 1 - get config for one sensor. */
3065 * Version 1 - set config for one sensor.
3066 * Use read-modify-write for best results!
3092 * and how many params it requires. That way we can change the EC code without
3149 /* MKBP - Matrix KeyBoard Protocol */
3261 * Note that this is used as a sub-structure of
3272 * minimum post-scan relax time. Once we finish a scan we check
3306 * Indicates this scan was processed by the EC. Due to timing, some
3361 * that the EC has more MKBP events available to provide.
3366 #define EC_MKBP_EVENT_TYPE_MASK (BIT(EC_MKBP_HAS_MORE_EVENTS_SHIFT) - 1)
3378 /* The state of the non-matrixed buttons have changed. */
3394 * New 64-bit host event.
3587 * Note: host commands 0x80 - 0x87 are reserved to avoid conflict with ACPI
3623 * Unified host event programming interface - Should be used by newer versions
3629 /* Action requested by host - one of enum ec_host_event_action. */
3633 * Mask type that the host requested the action on - one of
3730 * Flags to leave enabled in S3, if they're on at the S0->S3
3731 * transition. (Other flags will be disabled by the S0->S3
3750 /* GPIO commands. Only available on EC if write protect has been disabled. */
3808 * CAUTION: These commands are deprecated, and are not supported anymore in EC
3818 uint16_t addr; /* 8-bit address (7-bit shifted << 1) */
3833 uint16_t addr; /* 8-bit address (7-bit shifted << 1) */
3884 * lower=-1, upper=-1.
3917 * Response is null-terminated string. Empty string, if there is no more
4049 /* EC hang detect commands */
4062 /* Get last hang status - whether the AP boot was clear or not */
4078 * detected and EC has reset AP
4093 * This is the single catch-all host command to exchange data regarding the
4107 * Known param numbers are defined here. Ranges are reserved for board-specific
4114 CS_PARAM_CHG_STATUS, /* charger-specific status */
4115 CS_PARAM_CHG_OPTION, /* charger-specific options */
4226 * state. This value is reset if the EC transitions out of G3.
4231 * The current time remaining in seconds until the EC should hibernate.
4232 * This value is also reset if the EC transitions out of G3.
4237 * The current time in seconds that the EC should wait in G3 before
4243 /* Inform the EC when entering a sleep state */
4279 * is received and when the EC will declare sleep
4286 /* No parameters for non-suspend messages. */
4312 /* No response fields for non-resume messages. */
4348 /* Smart battery pass-through */
4350 /* Get / Set 16-bit smart battery registers */
4385 * Get or set vendor-specific parameters in the battery. Implementations may
4468 * Default mode is VBOOT_MODE_NORMAL if EC did not receive this command.
4484 * certain addresses (board-specific).
4528 * struct ec_params_cec_write - Message to write to the CEC bus
4536 * struct ec_params_cec_write_v1 - Message to write to the CEC bus
4551 * struct ec_params_cec_read - Read a message from the CEC bus
4559 * struct ec_response_cec_read - Message read from the CEC bus
4572 * struct ec_params_cec_set - CEC parameters set
4590 * struct ec_params_cec_get - CEC parameters get
4600 * struct ec_response_cec_get - CEC parameters get response
4614 * struct ec_response_cec_port_count - CEC port count response
4641 /* Commands for audio codec. */
4705 /* Commands for DMIC on audio codec. */
4760 /* Commands for I2S RX on audio codec. */
4822 /* Commands for WoV on audio codec. */
4888 * necessarily reboot the EC. Rename to "image" or something similar?
4897 /* (command 3 was jump to RW-B) */
4898 EC_REBOOT_COLD = 4, /* Cold-reboot */
4900 EC_REBOOT_HIBERNATE = 6, /* Hibernate EC */
4902 EC_REBOOT_COLD_AP_OFF = 8, /* Cold-reboot and don't boot AP */
4916 * Get information on last EC panic.
4918 * Returns variable-length platform-dependent panic information. See panic.h
4934 * This command will work even when the EC LPC interface is busy, because the
4935 * reboot command is processed at interrupt level. Note that when the EC
4938 * Use EC_CMD_REBOOT_EC to reboot the EC more politely.
4945 * Returns EC_RES_UNAVAILABLE if there is no response available - for example,
4953 * than this means that we are talking to an old EC which doesn't support
4959 * The old EC interface must not use commands 0xdc or higher.
4970 /* EC to PD MCU exchange status command */
4981 /* Status of EC being sent to PD */
4985 uint8_t status; /* EC status */
4990 /* Status of PD being sent back to EC */
5019 /* Set USB type-C port role and muxes */
5093 /* Optical/Non-optical cable */
5097 /* Active Link Uni-Direction */
5106 uint8_t dp_mode; /* Current DP pin mode (MODE_DP_PIN_[A-E]) */
5176 /* Write USB-PD device FW */
5194 /* Write USB-PD Accessory RW_HASH table entry */
5196 /* RW hash is first 20 bytes of SHA-256 of RW section */
5209 /* Read USB-PD Accessory info */
5216 /* Read USB-PD Device discovery info */
5219 uint16_t vid; /* USB-IF VID */
5220 uint16_t pid; /* USB-IF PID */
5229 OVERRIDE_DONT_CHARGE = -2,
5230 OVERRIDE_OFF = -1,
5241 * future non-PD logs that use the same internal EC event_log.
5249 uint16_t data; /* type-defined data payload */
5330 /* Get/Set USB-PD Alternate mode info */
5368 /* Control USB-PD chip */
5372 PD_SUSPEND = 0, /* Suspend the PD chip (EC: stop talking to PD) */
5373 PD_RESUME, /* Resume the PD chip (EC: start talking to PD) */
5384 /* Get info about USB-C SS muxes */
5388 uint8_t port; /* USB-C port number */
5403 uint8_t flags; /* USB_PD_MUX_*-encoded USB mux state */
5409 uint8_t port; /* USB-C port number */
5471 * hardware write-protect enabled.
5501 * NO_SYNC: Makes EC update data in RAM but skip writing to EEPROM. It's
5517 * Information about resets of the AP by the EC and the EC's own uptime.
5523 * Number of milliseconds since the last EC boot. Sysjump resets
5524 * typically do not restart the EC's time_since_boot epoch.
5526 * WARNING: The EC's sense of time is much less accurate than the AP's
5533 * Number of times the AP was reset by the EC since the last EC boot.
5534 * Note that the AP may be held in reset by the EC during the initial
5541 * The set of flags which describe the EC's most recent reset. See
5559 * last EC boot, in the same epoch as time_since_ec_boot_ms.
5696 & GENMASK(EC_MKBP_PCHG_PORT_SHIFT-1, 0))
5738 < BIT(sizeof(((struct ec_params_pchg_update *)0)->cmd)*8));
5866 /* USB Type-C commands for AP-controlled device policy. */
5887 uint8_t mux_flags; /* USB_PD_MUX_*-encoded USB mux state to set */
5895 /* Number of 32-bit fields filled in */
5897 /* Partner to address - see enum typec_partner_type */
5909 * the command version when adding new sub-commands.
6008 uint8_t pd_enabled; /* PD communication enabled - bool */
6009 uint8_t dev_connected; /* Device connected - bool */
6010 uint8_t sop_connected; /* Device is SOP PD capable - bool */
6020 uint8_t dp_pin; /* DP pin mode (MODE_DP_IN_[A-E]) */
6021 uint8_t mux_state; /* USB_PD_MUX* - encoded mux state */
6056 /* Number of 32-bit fields filled in */
6058 /* Partner to address - see enum typec_partner_type */
6064 /* Number of 32-bit Attention fields filled in */
6077 /* The command range 0x200-0x2FF is reserved for Rotor. */
6087 /* Fingerprint MCU commands: range 0x0400-0x040x */
6111 /* Finger enrollment session on-going */
6117 /* Reset and re-initialize the sensor. */
6140 /* Full blown vendor-defined capture (produces 'frame_size' bytes) */
6327 /* Touchpad MCU commands: range 0x0500-0x05FF */
6353 /* EC-EC communication commands: range 0x0600-0x06FF */
6364 * struct ec_params_battery_static_info - Battery static info parameters
6372 * struct ec_response_battery_static_info - Battery static info response
6399 * struct ec_params_battery_dynamic_info - Battery dynamic info parameters
6407 * struct ec_response_battery_dynamic_info - Battery dynamic info response
6432 * struct ec_params_charger_control - Charger control parameters
6447 /* Get ACK from the USB-C SS muxes */
6451 uint8_t port; /* USB-C port number */
6456 * Reserve a range of host commands for board-specific, experimental, or
6460 * their EC commands for easier development, testing, debugging, and support.
6462 * All commands MUST be #defined to be 4-digit UPPER CASE hex values
6494 * Some platforms have sub-processors chained to each other. For example.
6496 * AP <--> EC <--> PD MCU
6500 * command; other device mapping is board-specific.
6502 * When a device receives a command to be passed to a sub-processor, it passes
6503 * it on with the device number set back to 0. This allows the sub-processor
6508 * AP sends command 0x4002 to the EC
6509 * EC sends command 0x0002 to the PD MCU
6510 * EC forwards PD MCU response back to the AP
6513 /* Offset and max command number for sub-device n */