1 #ifndef _DT_BINDINGS_STM32_PINFUNC_H
2 #define _DT_BINDINGS_STM32_PINFUNC_H
3 
4 /*  define PIN modes */
5 #define GPIO	0x0
6 #define AF0	0x1
7 #define AF1	0x2
8 #define AF2	0x3
9 #define AF3	0x4
10 #define AF4	0x5
11 #define AF5	0x6
12 #define AF6	0x7
13 #define AF7	0x8
14 #define AF8	0x9
15 #define AF9	0xa
16 #define AF10	0xb
17 #define AF11	0xc
18 #define AF12	0xd
19 #define AF13	0xe
20 #define AF14	0xf
21 #define AF15	0x10
22 #define ANALOG	0x11
23 
24 /* define Pins number*/
25 #define PIN_NO(port, line)	(((port) - 'A') * 0x10 + (line))
26 
27 #define STM32_PINMUX(port, line, mode) (((PIN_NO(port, line)) << 8) | (mode))
28 
29 #endif /* _DT_BINDINGS_STM32_PINFUNC_H */
30 
31