Zephyr API Documentation
4.2.99
A Scalable Open Source RTOS
4.2.99
Toggle main menu visibility
Main Page
Related Pages
Topics
Data Structures
Data Structures
Data Structure Index
Data Fields
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Functions
Variables
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Enumerations
Enumerator
Files
File List
Globals
All
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Variables
$
a
b
c
d
f
g
h
i
k
l
m
n
o
p
r
s
t
u
x
z
Typedefs
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Enumerations
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Enumerator
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
r
s
t
u
v
w
x
z
Macros
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Zephyr API Documentation
Introduction
Deprecated List
Topics
Data Structures
Files
File List
doc
kernel
lib
modules
subsys
zephyr
acpi
app_memory
arch
audio
bluetooth
canbus
console
crypto
data
debug
devicetree
dfu
display
drivers
dsp
dt-bindings
acpi
adc
battery
clock
comparator
dac
dai
display
dma
espi
ethernet
flash_controller
gnss
gpio
i2c
input
inputmux
interrupt-controller
ipc_service
led
lora
lvgl
memory-attr
memory-controller
mfd
mipi_dbi
mipi_dsi
misc
pcie
pinctrl
renesas
silabs
ambiq-apollo3-pinctrl.h
ambiq-apollo4-pinctrl.h
ambiq-apollo5-pinctrl.h
arm-mps2-pinctrl.h
arm-mps3-pinctrl.h
arm-mps4-pinctrl.h
arm-v2m_beetle-pinctrl.h
b91-pinctrl.h
cc13xx_cc26xx-pinctrl.h
cc23x0-pinctrl.h
ch32v003-pinctrl.h
ch32v00x-pinctrl.h
ch32v20x_30x-pinctrl.h
emsdp-pinctrl.h
ene-kb106x-pinctrl.h
ene-kb1200-pinctrl.h
esp-pinctrl-common.h
esp32-gpio-sigmap.h
esp32-pinctrl.h
esp32c2-gpio-sigmap.h
esp32c2-pinctrl.h
esp32c3-gpio-sigmap.h
esp32c3-pinctrl.h
esp32c6-gpio-sigmap.h
esp32c6-pinctrl.h
esp32s2-gpio-sigmap.h
esp32s2-pinctrl.h
esp32s3-gpio-sigmap.h
esp32s3-pinctrl.h
gecko-pinctrl-s1.h
gecko-pinctrl.h
ifx_cat1-pinctrl.h
imx8qm-pinctrl.h
imx8qxp-pinctrl.h
it8xxx2-pinctrl.h
lpc11u6x-pinctrl.h
max32-pinctrl.h
mchp-xec-pinctrl.h
mspm0-pinctrl.h
npcx-pinctrl.h
nrf-pinctrl.h
numaker-m46x-pinctrl.h
numicro-pinctrl.h
nxp-s32-pinctrl.h
pinctrl-zynq.h
pinctrl-zynqmp.h
quicklogic-eos-s3-pinctrl.h
realtek-rts5912-pinctrl.h
renesas-rzt2m-pinctrl.h
rpi-pico-pinctrl-common.h
rpi-pico-rp2040-pinctrl.h
rpi-pico-rp2350-pinctrl-common.h
rpi-pico-rp2350a-pinctrl.h
rpi-pico-rp2350b-pinctrl.h
rv32m1-pinctrl.h
si32-pinctrl.h
sifive-pinctrl.h
silabs-pinctrl-dbus.h
silabs-pinctrl-siwx91x.h
smartbond-pinctrl.h
stm32-pinctrl-common.h
stm32-pinctrl.h
stm32f1-afio.h
stm32f1-pinctrl.h
sy1xx-pinctrl.h
ti-cc32xx-pinctrl.h
ti-k3-pinctrl.h
xmc4xxx-pinctrl.h
power
pwm
qspi
rdc
regulator
reserved-memory
reset
sensor
sent
spi
timer
usb
usb-c
video
dt-util.h
fs
input
internal
ipc
kernel
linker
llext
logging
lorawan
math
mem_mgmt
mgmt
misc
modbus
modem
multi_heap
net
platform
pm
pmci
portability
posix
psa
random
retention
rtio
sd
sensing
settings
shell
sip_svc
stats
storage
sys
task_wdt
timing
toolchain
tracing
usb
usb_c
xen
zbus
zvfs
bindesc.h
cache.h
device.h
devicetree.h
fatal.h
fatal_types.h
init.h
irq.h
irq_multilevel.h
irq_nextlevel.h
irq_offload.h
kernel.h
kernel_includes.h
kernel_structs.h
kernel_version.h
net_buf.h
shared_irq.h
smf.h
spinlock.h
sw_isr_table.h
sys_clock.h
syscall.h
toolchain.h
types.h
Globals
•
All
Data Structures
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Modules
Pages
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
#define MPS2_ALT_FUNC_POS 0
8
#define MPS2_ALT_FUNC_MASK 0x3
9
10
#define MPS2_EXP_NUM_POS 2
11
#define MPS2_EXP_NUM_MASK 0x3F
12
13
#define MPS2_PINCTRL_FUNC_UART 0
14
#define MPS2_PINCTRL_FUNC_GPIO 1
15
#define MPS2_PINCTRL_FUNC_I2C 2
16
#define MPS2_PINCTRL_FUNC_SPI 3
17
18
19
#define MPS2_PINMUX(alt_func, exp_num) (exp_num << MPS2_EXP_NUM_POS | \
20
alt_func << MPS2_ALT_FUNC_POS)
19
#define MPS2_PINMUX(alt_func, exp_num) (exp_num << MPS2_EXP_NUM_POS | \
…
21
22
23
24
/*
25
* This is the mapping from the ARM MPS2 Board pins to GPIO
26
* controllers.
27
*
28
* D0 : EXT_0
29
* D1 : EXT_4
30
* D2 : EXT_2
31
* D3 : EXT_3
32
* D4 : EXT_1
33
* D5 : EXT_6
34
* D6 : EXT_7
35
* D7 : EXT_8
36
* D8 : EXT_9
37
* D9 : EXT_10
38
* D10 : EXT_12
39
* D11 : EXT_13
40
* D12 : EXT_14
41
* D13 : EXT_11
42
* D14 : EXT_15
43
* D15 : EXT_5
44
* D16 : EXT_16
45
* D17 : EXT_17
46
* D18 : EXT_18
47
* D19 : EXT_19
48
* D20 : EXT_20
49
* D21 : EXT_21
50
* D22 : EXT_22
51
* D23 : EXT_23
52
* D24 : EXT_24
53
* D25 : EXT_25
54
* D26 : EXT_26
55
* D27 : EXT_30
56
* D28 : EXT_28
57
* D29 : EXT_29
58
* D30 : EXT_27
59
* D31 : EXT_32
60
* D32 : EXT_33
61
* D33 : EXT_34
62
* D34 : EXT_35
63
* D35 : EXT_36
64
* D36 : EXT_38
65
* D37 : EXT_39
66
* D38 : EXT_40
67
* D39 : EXT_44
68
* D40 : EXT_41
69
* D41 : EXT_31
70
* D42 : EXT_37
71
* D43 : EXT_42
72
* D44 : EXT_43
73
* D45 : EXT_45
74
* D46 : EXT_46
75
* D47 : EXT_47
76
* D48 : EXT_48
77
* D49 : EXT_49
78
* D50 : EXT_50
79
* D51 : EXT_51
80
*
81
* UART_3_RX : D0
82
* UART_3_TX : D1
83
* SPI_3_CS : D10
84
* SPI_3_MOSI : D11
85
* SPI_3_MISO : D12
86
* SPI_3_SCLK : D13
87
* I2C_3_SDA : D14
88
* I2C_3_SCL : D15
89
* UART_4_RX : D26
90
* UART_4_TX : D30
91
* SPI_4_CS : D36
92
* SPI_4_MOSI : D37
93
* SPI_4_MISO : D38
94
* SPI_4_SCK : D39
95
* I2C_4_SDA : D40
96
* I2C_4_SCL : D41
97
*
98
*/
99
100
/* GPIO 0 */
101
#define UART3_RXD_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_UART, 0)
102
#define UART3_TXD_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_UART, 4)
103
#define SBCON2_SCL_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_I2C, 5)
104
#define SBCON2_SDA_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_I2C, 15)
105
#define SPI3_SCK_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 11)
106
#define SPI3_SS_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 12)
107
#define SPI3_MOSI_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 13)
108
#define SPI3_MISO_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 14)
109
110
/* GPIO 1 */
111
#define SPI2_SS_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 16)
112
#define SPI2_MISO_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 17)
113
#define SPI2_MOSI_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 18)
114
#define SPI2_SCK_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 19)
115
#define UART4_RXD_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_UART, 26)
116
#define UART4_TXD_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_UART, 30)
117
#define SBCON3_SCL_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_I2C, 31)
118
119
/* GPIO 2 */
120
#define SBCON3_SDA_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_I2C, 41)
121
#define SPI4_SS_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 38)
122
#define SPI4_MOSI_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 39)
123
#define SPI4_MISO_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 40)
124
#define SPI4_SCK_EXP MPS2_PINMUX(MPS2_PINCTRL_FUNC_SPI, 44)
zephyr
dt-bindings
pinctrl
arm-mps2-pinctrl.h
Generated on
for Zephyr API Documentation by
1.14.0