Back to home page

OSCL-LXR

 
 

    


0001 /* SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause) */
0002 /*
0003  * Copyright (C) STMicroelectronics 2017 - All Rights Reserved
0004  * Author: Torgue Alexandre <alexandre.torgue@st.com> for STMicroelectronics.
0005  */
0006 
0007 #ifndef _DT_BINDINGS_STM32_PINFUNC_H
0008 #define _DT_BINDINGS_STM32_PINFUNC_H
0009 
0010 /*  define PIN modes */
0011 #define GPIO    0x0
0012 #define AF0 0x1
0013 #define AF1 0x2
0014 #define AF2 0x3
0015 #define AF3 0x4
0016 #define AF4 0x5
0017 #define AF5 0x6
0018 #define AF6 0x7
0019 #define AF7 0x8
0020 #define AF8 0x9
0021 #define AF9 0xa
0022 #define AF10    0xb
0023 #define AF11    0xc
0024 #define AF12    0xd
0025 #define AF13    0xe
0026 #define AF14    0xf
0027 #define AF15    0x10
0028 #define ANALOG  0x11
0029 
0030 /* define Pins number*/
0031 #define PIN_NO(port, line)  (((port) - 'A') * 0x10 + (line))
0032 
0033 #define STM32_PINMUX(port, line, mode) (((PIN_NO(port, line)) << 8) | (mode))
0034 
0035 /*  package information */
0036 #define STM32MP_PKG_AA  0x1
0037 #define STM32MP_PKG_AB  0x2
0038 #define STM32MP_PKG_AC  0x4
0039 #define STM32MP_PKG_AD  0x8
0040 
0041 #endif /* _DT_BINDINGS_STM32_PINFUNC_H */
0042