xref: /optee_os/core/include/dt-bindings/gpio/stm32mp_gpio.h (revision c3deb3d6f3b13d0e17fc9efe5880aec039e47594)
1 /* SPDX-License-Identifier: (GPL-2.0-or-later OR BSD-3-Clause) */
2 /*
3  * Copyright (C) STMicroelectronics 2023 - All Rights Reserved
4  */
5 
6 #ifndef _DT_BINDINGS_GPIO_STM32MP_GPIO_H
7 #define _DT_BINDINGS_GPIO_STM32MP_GPIO_H
8 
9 #include <dt-bindings/gpio/gpio.h>
10 
11 /* Macro to define the security for GPIO */
12 #ifdef __ASSEMBLER__
13 #define TZPROT(id)	(1 << (id))
14 #else
15 #define TZPROT(id)	(UINT32_C(1) << (id))
16 #endif
17 
18 /* GPIO phandle argument bitmask for a non-secure GPIO */
19 #ifdef __ASSEMBLER__
20 #define GPIO_STM32_NSEC	(1 << 31)
21 #else
22 #define GPIO_STM32_NSEC	(UINT32_C(1) << 31)
23 #endif
24 
25 #endif
26