diff options
| author | Jorge Ramirez-Ortiz <jorge@foundries.io> | 2021-01-25 14:28:40 +0200 |
|---|---|---|
| committer | Tom Rini <trini@konsulko.com> | 2021-02-16 11:48:20 -0500 |
| commit | 4e9635618529e0e404b641e155513ad7f313f423 (patch) | |
| tree | b10aa37f03c9fdfa9cb268a2b2684a51cb0cb43c /drivers/tee/optee/optee_private.h | |
| parent | eb5fd9e46c11ea41430d9c5bcc81d4583424216e (diff) | |
drivers: tee: i2c trampoline driver
This commit gives the secure world access to the I2C bus so it can
communicate with I2C slaves (typically those would be secure elements
like the NXP SE050).
A similar service implementation has been merged in linux:
c05210ab ("drivers: optee: allow op-tee to access devices on the i2c
bus")
Signed-off-by: Jorge Ramirez-Ortiz <jorge@foundries.io>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Etienne Carriere <etienne.carriere@linaro.org>
Diffstat (limited to 'drivers/tee/optee/optee_private.h')
| -rw-r--r-- | drivers/tee/optee/optee_private.h | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/drivers/tee/optee/optee_private.h b/drivers/tee/optee/optee_private.h index 9442d1c176b..1f07a27ee4b 100644 --- a/drivers/tee/optee/optee_private.h +++ b/drivers/tee/optee/optee_private.h @@ -60,6 +60,23 @@ static inline void optee_suppl_rpmb_release(struct udevice *dev) } #endif +#ifdef CONFIG_DM_I2C +/** + * optee_suppl_cmd_i2c_transfer() - route I2C requests to an I2C chip + * @arg: OP-TEE message (layout specified in optee_msg.h) defining the + * transfer mode (read/write), adapter, chip and control flags. + * + * Handles OP-TEE requests to transfer data to the I2C chip on the I2C adapter. + */ +void optee_suppl_cmd_i2c_transfer(struct optee_msg_arg *arg); +#else +static inline void optee_suppl_cmd_i2c_transfer(struct optee_msg_arg *arg) +{ + debug("OPTEE_MSG_RPC_CMD_I2C_TRANSFER not implemented\n"); + arg->ret = TEE_ERROR_NOT_IMPLEMENTED; +} +#endif + void *optee_alloc_and_init_page_list(void *buf, ulong len, u64 *phys_buf_ptr); #endif /* __OPTEE_PRIVATE_H */ |
