Ye Li | 0db17f4 | 2021-08-07 16:00:41 +0800 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0+ */ |
| 2 | /* |
| 3 | * Copyright 2021 NXP |
| 4 | */ |
| 5 | |
| 6 | #ifndef __S400_API_H__ |
| 7 | #define __S400_API_H__ |
| 8 | |
| 9 | #define AHAB_VERSION 0x6 |
| 10 | #define AHAB_CMD_TAG 0x17 |
| 11 | #define AHAB_RESP_TAG 0xe1 |
| 12 | |
| 13 | #define AHAB_LOG_CID 0x21 |
| 14 | #define AHAB_AUTH_OEM_CTNR_CID 0x87 |
| 15 | #define AHAB_VERIFY_IMG_CID 0x88 |
| 16 | #define AHAB_RELEASE_CTNR_CID 0x89 |
| 17 | #define AHAB_RELEASE_RDC_REQ_CID 0xC4 |
Ye Li | a61f267 | 2021-08-07 16:00:52 +0800 | [diff] [blame^] | 18 | #define AHAB_FWD_LIFECYCLE_UP_REQ_CID 0x95 |
Ye Li | 0db17f4 | 2021-08-07 16:00:41 +0800 | [diff] [blame] | 19 | |
| 20 | #define S400_MAX_MSG 8U |
| 21 | |
| 22 | struct imx8ulp_s400_msg { |
| 23 | u8 version; |
| 24 | u8 size; |
| 25 | u8 command; |
| 26 | u8 tag; |
| 27 | u32 data[(S400_MAX_MSG - 1U)]; |
| 28 | }; |
| 29 | |
Ye Li | a61f267 | 2021-08-07 16:00:52 +0800 | [diff] [blame^] | 30 | int ahab_release_rdc(u8 core_id, u32 *response); |
| 31 | int ahab_auth_oem_ctnr(ulong ctnr_addr, u32 *response); |
| 32 | int ahab_release_container(u32 *response); |
| 33 | int ahab_verify_image(u32 img_id, u32 *response); |
| 34 | int ahab_forward_lifecycle(u16 life_cycle, u32 *response); |
| 35 | |
Ye Li | 0db17f4 | 2021-08-07 16:00:41 +0800 | [diff] [blame] | 36 | #endif |