diff options
author | Ye Li <ye.li@nxp.com> | 2022-07-26 16:40:49 +0800 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2022-07-26 11:29:00 +0200 |
commit | 03fcf966511d11aa67c7b52d9d68c7bf18edade6 (patch) | |
tree | 2d82426ed58d741001fc1acb8d84df72f5af9751 /arch/arm/include/asm/mach-imx/s400_api.h | |
parent | 636c95f82b9a184a9b45a8965488cea2dedcd78e (diff) |
misc: imx: S400_API: Move S400 MU and API to a common place
Since iMX9 uses S401 which shares the API with iMX8ULP. So move S400
MU driver and API to a common place and selected by CONFIG_IMX_SENTINEL
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'arch/arm/include/asm/mach-imx/s400_api.h')
-rw-r--r-- | arch/arm/include/asm/mach-imx/s400_api.h | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/arch/arm/include/asm/mach-imx/s400_api.h b/arch/arm/include/asm/mach-imx/s400_api.h new file mode 100644 index 0000000000..b3e6b3fa45 --- /dev/null +++ b/arch/arm/include/asm/mach-imx/s400_api.h @@ -0,0 +1,46 @@ +/* SPDX-License-Identifier: GPL-2.0+ */ +/* + * Copyright 2021 NXP + */ + +#ifndef __S400_API_H__ +#define __S400_API_H__ + +#define AHAB_VERSION 0x6 +#define AHAB_CMD_TAG 0x17 +#define AHAB_RESP_TAG 0xe1 + +#define AHAB_LOG_CID 0x21 +#define AHAB_AUTH_OEM_CTNR_CID 0x87 +#define AHAB_VERIFY_IMG_CID 0x88 +#define AHAB_RELEASE_CTNR_CID 0x89 +#define AHAB_WRITE_SECURE_FUSE_REQ_CID 0x91 +#define AHAB_FWD_LIFECYCLE_UP_REQ_CID 0x95 +#define AHAB_READ_FUSE_REQ_CID 0x97 +#define AHAB_GET_FW_VERSION_CID 0x9D +#define AHAB_RELEASE_RDC_REQ_CID 0xC4 +#define AHAB_WRITE_FUSE_REQ_CID 0xD6 +#define AHAB_CAAM_RELEASE_CID 0xD7 + +#define S400_MAX_MSG 255U + +struct imx8ulp_s400_msg { + u8 version; + u8 size; + u8 command; + u8 tag; + u32 data[(S400_MAX_MSG - 1U)]; +}; + +int ahab_release_rdc(u8 core_id, bool xrdc, u32 *response); +int ahab_auth_oem_ctnr(ulong ctnr_addr, u32 *response); +int ahab_release_container(u32 *response); +int ahab_verify_image(u32 img_id, u32 *response); +int ahab_forward_lifecycle(u16 life_cycle, u32 *response); +int ahab_write_fuse(u16 fuse_id, u32 fuse_val, bool lock, u32 *response); +int ahab_read_common_fuse(u16 fuse_id, u32 *fuse_words, u32 fuse_num, u32 *response); +int ahab_release_caam(u32 core_did, u32 *response); +int ahab_get_fw_version(u32 *fw_version, u32 *sha1, u32 *response); +int ahab_dump_buffer(u32 *buffer, u32 buffer_length); + +#endif |