blob: 6e3fec1ea749bf3ab444582f6c6350773b735819 [file] [log] [blame]
Etienne Carrieree5bed892019-12-08 08:15:15 +01001/*
2 * Copyright (c) 2017-2020, STMicroelectronics - All Rights Reserved
3 *
4 * SPDX-License-Identifier: BSD-3-Clause
5 */
6
7#ifndef DRIVERS_ST_ETZPC_H
8#define DRIVERS_ST_ETZPC_H
9
10/* Define security level for each peripheral (DECPROT) */
11enum etzpc_decprot_attributes {
12 ETZPC_DECPROT_S_RW = 0,
13 ETZPC_DECPROT_NS_R_S_W = 1,
14 ETZPC_DECPROT_MCU_ISOLATION = 2,
15 ETZPC_DECPROT_NS_RW = 3,
16 ETZPC_DECPROT_MAX = 4,
17};
18
19void etzpc_configure_decprot(uint32_t decprot_id,
20 enum etzpc_decprot_attributes decprot_attr);
21enum etzpc_decprot_attributes etzpc_get_decprot(uint32_t decprot_id);
22void etzpc_lock_decprot(uint32_t decprot_id);
23
24void etzpc_configure_tzma(uint32_t tzma_id, uint16_t tzma_value);
25uint16_t etzpc_get_tzma(uint32_t tzma_id);
26void etzpc_lock_tzma(uint32_t tzma_id);
27bool etzpc_get_lock_tzma(uint32_t tzma_id);
28
29uint8_t etzpc_get_num_per_sec(void);
30uint8_t etzpc_get_revision(void);
31uintptr_t etzpc_get_base_address(void);
32
33int etzpc_init(void);
34
35#endif /* DRIVERS_ST_ETZPC_H */