developer | 01abd6d | 2024-09-19 18:52:33 +0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2024, MediaTek Inc. All rights reserved. |
| 3 | * |
| 4 | * SPDX-License-Identifier: BSD-3-Clause |
| 5 | */ |
| 6 | |
| 7 | #ifndef RNG_PLAT_H |
| 8 | #define RNG_PLAT_H |
| 9 | |
| 10 | #define TRNG_TIME_OUT 1000 |
| 11 | #define MTK_TRNG_MAX_ROUND 4 |
| 12 | |
| 13 | /******************************************************************************* |
| 14 | * TRNG related constants |
| 15 | ******************************************************************************/ |
| 16 | #define TRNG_BASE_SIZE 0x1000 |
| 17 | #define TRNG_CTRL (TRNG_BASE + 0x0000) |
| 18 | #define TRNG_TIME (TRNG_BASE + 0x0004) |
| 19 | #define TRNG_DATA (TRNG_BASE + 0x0008) |
| 20 | #define TRNG_CONF (TRNG_BASE + 0x000C) |
| 21 | #define TRNG_CTRL_RDY 0x80000000 |
| 22 | #define TRNG_CTRL_START 0x00000001 |
| 23 | #define TRNG_CONF_VON_EN 0x00000020 |
| 24 | #define TRNG_PDN_BASE_SIZE 0x1000 |
| 25 | #define TRNG_PDN_SET (INFRACFG_AO_BASE + 0x0088) |
| 26 | #define TRNG_PDN_CLR (INFRACFG_AO_BASE + 0x008C) |
| 27 | #define TRNG_PDN_STATUS (INFRACFG_AO_BASE + 0x0094) |
| 28 | #define TRNG_PDN_VALUE 0x200 |
| 29 | |
| 30 | #endif /* RNG_PLAT_H */ |