Jacky Bai | 3bf04a5 | 2019-06-12 17:41:47 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2019, NXP. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef IMX8M_CAAM_H |
| 8 | #define IMX8M_CAAM_H |
| 9 | |
| 10 | #include <lib/utils_def.h> |
| 11 | |
| 12 | #include <platform_def.h> |
| 13 | |
| 14 | #define CAAM_JR0MID (IMX_CAAM_BASE + 0x10) |
| 15 | #define CAAM_JR1MID (IMX_CAAM_BASE + 0x18) |
| 16 | #define CAAM_JR2MID (IMX_CAAM_BASE + 0x20) |
| 17 | #define CAAM_NS_MID (0x1) |
| 18 | |
| 19 | #define JR0_BASE (IMX_CAAM_BASE + 0x1000) |
| 20 | |
| 21 | #define SM_P0_PERM (JR0_BASE + 0xa04) |
| 22 | #define SM_P0_SMAG2 (JR0_BASE + 0xa08) |
| 23 | #define SM_P0_SMAG1 (JR0_BASE + 0xa0c) |
| 24 | #define SM_CMD (JR0_BASE + 0xbe4) |
| 25 | |
| 26 | /* secure memory command */ |
| 27 | #define SMC_PAGE_SHIFT 16 |
| 28 | #define SMC_PART_SHIFT 8 |
| 29 | |
| 30 | #define SMC_CMD_ALLOC_PAGE 0x01 /* allocate page to this partition */ |
| 31 | #define SMC_CMD_DEALLOC_PART 0x03 /* deallocate partition */ |
| 32 | |
| 33 | void imx8m_caam_init(void); |
| 34 | |
| 35 | #endif /* IMX8M_CAAM_H */ |