Zephyr Project API
4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
arm-mps2-pinctrl.h
Go to the documentation of this file.
1
/*
2
* Copyright 2025 Arm Limited and/or its affiliates <open-source-office@arm.com>
3
*
4
* SPDX-License-Identifier: Apache-2.0
5
*/
6
7
#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_ARM_MPS2_PINCTRL_H_
8
#define ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_ARM_MPS2_PINCTRL_H_
9
10
#define MPS2_ALT_FUNC_POS 0
11
#define MPS2_ALT_FUNC_MASK 0x3
12
13
#define MPS2_EXP_NUM_POS 2
14
#define MPS2_EXP_NUM_MASK 0x3F
15
16
#define MPS2_PINCTRL_FUNC_UART 0
17
#define MPS2_PINCTRL_FUNC_GPIO 1
18
#define MPS2_PINCTRL_FUNC_I2C 2
19
#define MPS2_PINCTRL_FUNC_SPI 3
20
21
22
#define MPS2_PINMUX(alt_func, exp_num) (exp_num << MPS2_EXP_NUM_POS | \
23
alt_func << MPS2_ALT_FUNC_POS)
24
25
26
27
/*
28
* This is the mapping from the ARM MPS2 Board pins to GPIO
29
* controllers.
30
*
31
* D0 : EXT_0
32
* D1 : EXT_4
33
* D2 : EXT_2
34
* D3 : EXT_3
35
* D4 : EXT_1
36
* D5 : EXT_6
37
* D6 : EXT_7
38
* D7 : EXT_8
39
* D8 : EXT_9
40
* D9 : EXT_10
41
* D10 : EXT_12
42
* D11 : EXT_13
43
* D12 : EXT_14
44
* D13 : EXT_11
45
* D14 : EXT_15
46
* D15 : EXT_5
47
* D16 : EXT_16
48
* D17 : EXT_17
49
* D18 : EXT_18
50
* D19 : EXT_19
51
* D20 : EXT_20
52
* D21 : EXT_21
53
* D22 : EXT_22
54
* D23 : EXT_23
55
* D24 : EXT_24
56
* D25 : EXT_25
57
* D26 : EXT_26
58
* D27 : EXT_30
59
* D28 : EXT_28
60
* D29 : EXT_29
61
* D30 : EXT_27
62
* D31 : EXT_32
63
* D32 : EXT_33
64
* D33 : EXT_34
65
* D34 : EXT_35
66
* D35 : EXT_36
67
* D36 : EXT_38
68
* D37 : EXT_39
69
* D38 : EXT_40
70
* D39 : EXT_44
71
* D40 : EXT_41
72
* D41 : EXT_31
73
* D42 : EXT_37
74
* D43 : EXT_42
75
* D44 : EXT_43
76
* D45 : EXT_45
77
* D46 : EXT_46
78
* D47 : EXT_47
79
* D48 : EXT_48
80
* D49 : EXT_49
81
* D50 : EXT_50
82
* D51 : EXT_51
83
*
84
* UART_3_RX : D0
85
* UART_3_TX : D1
86
* SPI_3_CS : D10
87
* SPI_3_MOSI : D11
88
* SPI_3_MISO : D12
89
* SPI_3_SCLK : D13
90
* I2C_3_SDA : D14
91
* I2C_3_SCL : D15
92
* UART_4_RX : D26
93
* UART_4_TX : D30
94
* SPI_4_CS : D36
95
* SPI_4_MOSI : D37
96
* SPI_4_MISO : D38
97
* SPI_4_SCK : D39
98
* I2C_4_SDA : D40
99
* I2C_4_SCL : D41
100
*
101
*/
102
103
/* GPIO 0 */
104
#define UART3_RXD_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_UART, 0)
105
#define UART3_TXD_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_UART, 4)
106
#define SBCON2_SCL_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_I2C, 5)
107
#define SBCON2_SDA_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_I2C, 15)
108
#define SPI3_SCK_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 11)
109
#define SPI3_SS_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 12)
110
#define SPI3_MOSI_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 13)
111
#define SPI3_MISO_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 14)
112
113
/* GPIO 1 */
114
#define SPI2_SS_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 16)
115
#define SPI2_MISO_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 17)
116
#define SPI2_MOSI_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 18)
117
#define SPI2_SCK_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 19)
118
#define UART4_RXD_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_UART, 26)
119
#define UART4_TXD_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_UART, 30)
120
#define SBCON3_SCL_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_I2C, 31)
121
122
/* GPIO 2 */
123
#define SBCON3_SDA_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_I2C, 41)
124
#define SPI4_SS_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 38)
125
#define SPI4_MOSI_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 39)
126
#define SPI4_MISO_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 40)
127
#define SPI4_SCK_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 44)
128
129
#endif
/* ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_ARM_MPS2_PINCTRL_H_ */
include
zephyr
dt-bindings
pinctrl
arm-mps2-pinctrl.h
Generated on
for Zephyr Project API by
1.16.1