Commit a47bc8a4 authored by Gwendal Grignou's avatar Gwendal Grignou Committed by Lee Jones

mfd: cros_ec: Add I2C passthru protection API

Prevent direct i2c access to device behind EC when not in development mode.
Signed-off-by: default avatarGwendal Grignou <gwendal@chromium.org>
Acked-by: default avatarEnric Balletbo i Serra <enric.balletbo@collabora.com>
Acked-by: default avatarBenson Leung <bleung@chromium.org>
Reviewed-by: default avatarFabien Lahoudere <fabien.lahoudere@collabora.com>
Signed-off-by: default avatarLee Jones <lee.jones@linaro.org>
parent 77c48c76
...@@ -4316,6 +4316,28 @@ struct ec_params_entering_mode { ...@@ -4316,6 +4316,28 @@ struct ec_params_entering_mode {
#define VBOOT_MODE_DEVELOPER 1 #define VBOOT_MODE_DEVELOPER 1
#define VBOOT_MODE_RECOVERY 2 #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 0x00B7
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 */
} __ec_align1;
struct ec_response_i2c_passthru_protect {
uint8_t status; /* Status flags (0: unlocked, 1: locked) */
} __ec_align1;
/*****************************************************************************/ /*****************************************************************************/
/* /*
* HDMI CEC commands * HDMI CEC commands
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment