diff options
author | Gwendal Grignou <gwendal@chromium.org> | 2016-06-20 08:49:25 -0700 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2016-07-10 03:54:07 +0200 |
commit | 880b458bc97522d56ecc2ac0559326834ffbf516 (patch) | |
tree | 3a199006994388bd5dd10b2294004288f6493c27 /src | |
parent | 1f83ffac1b30e7b6ed59fb26ee2ba57cec4938eb (diff) | |
download | coreboot-880b458bc97522d56ecc2ac0559326834ffbf516.tar.xz |
google/chromeec: Update EC command header
In particular, update host_event the original value for MKBP was not
set in ToT.
CQ-DEPEND=CL:353634
BUG=b:27849483
BRANCH=none
TEST=Compile on Samus. Tested in Cyan branch.
Change-Id: I0184e4f0e45c3321742d3138ae0178c159cbdd0a
Signed-off-by: Martin Roth <martinroth@chromium.org>
Original-Commit-Id: cc6750b705300f5b94bf23fe5485d6e7a5f9e327
Original-Change-Id: I60df65bfd4053207fa90b1c2a8609eec09f3c475
Original-Signed-off-by: Gwendal Grignou <gwendal@chromium.org>
Original-Reviewed-on: https://chromium-review.googlesource.com/354040
Reviewed-on: https://review.coreboot.org/15567
Tested-by: build bot (Jenkins)
Reviewed-by: Furquan Shaikh <furquan@google.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/ec/google/chromeec/acpi/ec.asl | 2 | ||||
-rw-r--r-- | src/ec/google/chromeec/ec_commands.h | 84 |
2 files changed, 83 insertions, 3 deletions
diff --git a/src/ec/google/chromeec/acpi/ec.asl b/src/ec/google/chromeec/acpi/ec.asl index 232a5ccd0b..13317f6d4c 100644 --- a/src/ec/google/chromeec/acpi/ec.asl +++ b/src/ec/google/chromeec/acpi/ec.asl @@ -290,7 +290,7 @@ Device (EC0) } // MKBP interrupt. - Method (_Q1A, 0, NotSerialized) + Method (_Q1B, 0, NotSerialized) { Store ("EC: MKBP", Debug) Notify (CREC, 0x80) diff --git a/src/ec/google/chromeec/ec_commands.h b/src/ec/google/chromeec/ec_commands.h index 5c491cae9e..2e2a695966 100644 --- a/src/ec/google/chromeec/ec_commands.h +++ b/src/ec/google/chromeec/ec_commands.h @@ -459,8 +459,11 @@ enum host_event_code { /* Keyboard fastboot combo has been pressed */ EC_HOST_EVENT_KEYBOARD_FASTBOOT = 25, + /* EC RTC event occurred */ + EC_HOST_EVENT_RTC = 26, + /* Emulate MKBP event */ - EC_HOST_EVENT_MKBP = 26, + EC_HOST_EVENT_MKBP = 27, /* * The high bit of the event mask is not used as a host event code. If @@ -1201,6 +1204,7 @@ struct ec_params_pwm_set_fan_target_rpm_v1 { } __packed; /* Get keyboard backlight */ +/* OBSOLETE - Use EC_CMD_PWM_SET_DUTY */ #define EC_CMD_PWM_GET_KEYBOARD_BACKLIGHT 0x22 struct ec_response_pwm_get_keyboard_backlight { @@ -1209,6 +1213,7 @@ struct ec_response_pwm_get_keyboard_backlight { } __packed; /* Set keyboard backlight */ +/* OBSOLETE - Use EC_CMD_PWM_SET_DUTY */ #define EC_CMD_PWM_SET_KEYBOARD_BACKLIGHT 0x23 struct ec_params_pwm_set_keyboard_backlight { @@ -1229,6 +1234,37 @@ struct ec_params_pwm_set_fan_duty_v1 { uint8_t fan_idx; } __packed; +#define EC_CMD_PWM_SET_DUTY 0x25 +/* 16 bit duty cycle, 0xffff = 100% */ +#define EC_PWM_MAX_DUTY 0xffff + +enum ec_pwm_type { + /* All types, indexed by board-specific enum pwm_channel */ + EC_PWM_TYPE_GENERIC = 0, + /* Keyboard backlight */ + EC_PWM_TYPE_KB_LIGHT, + /* Display backlight */ + EC_PWM_TYPE_DISPLAY_LIGHT, + EC_PWM_TYPE_COUNT, +}; + +struct ec_params_pwm_set_duty { + uint16_t duty; /* Duty cycle, EC_PWM_MAX_DUTY = 100% */ + uint8_t pwm_type; /* ec_pwm_type */ + uint8_t index; /* Type-specific index, or 0 if unique */ +} __packed; + +#define EC_CMD_PWM_GET_DUTY 0x26 + +struct ec_params_pwm_get_duty { + uint8_t pwm_type; /* ec_pwm_type */ + uint8_t index; /* Type-specific index, or 0 if unique */ +} __packed; + +struct ec_response_pwm_get_duty { + uint16_t duty; /* Duty cycle, EC_PWM_MAX_DUTY = 100% */ +} __packed; + /*****************************************************************************/ /* * Lightbar commands. This looks worse than it is. Since we only use one HOST @@ -1780,6 +1816,7 @@ enum motionsensor_chip { MOTIONSENSE_CHIP_SI1143 = 5, MOTIONSENSE_CHIP_KX022 = 6, MOTIONSENSE_CHIP_L3GD20H = 7, + MOTIONSENSE_CHIP_BMA255 = 8, }; struct ec_response_motion_sensor_data { @@ -2509,6 +2546,13 @@ struct ec_response_get_next_event { union ec_response_get_next_data data; } __packed; +/* Run keyboard factory test scanning */ +#define EC_CMD_KEYBOARD_FACTORY_TEST 0x68 + +struct ec_response_keyboard_factory_test { + uint16_t shorted; /* Keyboard pins are shorted */ +} __packed; + /*****************************************************************************/ /* Temperature sensor commands */ @@ -3182,6 +3226,27 @@ struct ec_params_entering_mode { #define VBOOT_MODE_RECOVERY 2 /*****************************************************************************/ +/* + * I2C passthru protection command: Protects I2C tunnels against access on + * certain addresses (board-specific). + */ +#define EC_CMD_I2C_PASSTHRU_PROTECT 0xb7 + +enum ec_i2c_passthru_protect_subcmd { + EC_CMD_I2C_PASSTHRU_PROTECT_STATUS = 0x0, + EC_CMD_I2C_PASSTHRU_PROTECT_ENABLE = 0x1, +}; + +struct ec_params_i2c_passthru_protect { + uint8_t subcmd; + uint8_t port; /* I2C port number */ +} __packed; + +struct ec_response_i2c_passthru_protect { + uint8_t status; /* Status flags (0: unlocked, 1: locked) */ +} __packed; + +/*****************************************************************************/ /* System commands */ /* @@ -3609,8 +3674,23 @@ struct ec_params_pd_write_log_entry { uint8_t port; /* port#, or 0 for events unrelated to a given port */ } __packed; -#endif /* !__ACPI__ */ +/* Control USB-PD chip */ +#define EC_CMD_PD_CONTROL 0x119 + +enum ec_pd_control_cmd { + PD_SUSPEND = 0, /* Suspend the PD chip (EC: stop talking to PD) */ + PD_RESUME, /* Resume the PD chip (EC: start talking to PD) */ + PD_RESET, /* Force reset the PD chip */ + PD_CONTROL_DISABLE /* Disable further calls to this command */ +}; + +struct ec_params_pd_control { + uint8_t chip; /* chip id (should be 0) */ + uint8_t subcmd; +} __packed; + +#endif /* !__ACPI__ */ /*****************************************************************************/ /* |