Zephyr Project API 3.7.0
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
smartbond-pinctrl.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2022, Renesas Electronics Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_SMARTBOND_PINCTRL_H_
8#define ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_SMARTBOND_PINCTRL_H_
9
11#define SMARTBOND_FUNC_GPIO 0
12#define SMARTBOND_FUNC_UART_RX 1
13#define SMARTBOND_FUNC_UART_TX 2
14#define SMARTBOND_FUNC_UART2_RX 3
15#define SMARTBOND_FUNC_UART2_TX 4
16#define SMARTBOND_FUNC_UART2_CTSN 5
17#define SMARTBOND_FUNC_UART2_RTSN 6
18#define SMARTBOND_FUNC_UART3_RX 7
19#define SMARTBOND_FUNC_UART3_TX 8
20#define SMARTBOND_FUNC_UART3_CTSN 9
21#define SMARTBOND_FUNC_UART3_RTSN 10
22#define SMARTBOND_FUNC_ISO_CLK 11
23#define SMARTBOND_FUNC_ISO_DATA 12
24#define SMARTBOND_FUNC_SPI_DI 13
25#define SMARTBOND_FUNC_SPI_DO 14
26#define SMARTBOND_FUNC_SPI_CLK 15
27#define SMARTBOND_FUNC_SPI_EN 16
28#define SMARTBOND_FUNC_SPI2_DI 17
29#define SMARTBOND_FUNC_SPI2_DO 18
30#define SMARTBOND_FUNC_SPI2_CLK 19
31#define SMARTBOND_FUNC_SPI2_EN 20
32#define SMARTBOND_FUNC_I2C_SCL 21
33#define SMARTBOND_FUNC_I2C_SDA 22
34#define SMARTBOND_FUNC_I2C2_SCL 23
35#define SMARTBOND_FUNC_I2C2_SDA 24
36#define SMARTBOND_FUNC_USB_SOF 25
37#define SMARTBOND_FUNC_ADC 26
38#define SMARTBOND_FUNC_USB 27
39#define SMARTBOND_FUNC_PCM_DI 28
40#define SMARTBOND_FUNC_PCM_DO 29
41#define SMARTBOND_FUNC_PCM_FSC 30
42#define SMARTBOND_FUNC_PCM_CLK 31
43#define SMARTBOND_FUNC_PDM_DATA 32
44#define SMARTBOND_FUNC_PDM_CLK 33
45#define SMARTBOND_FUNC_COEX_EXT_ACT 34
46#define SMARTBOND_FUNC_COEX_SMART_ACT 35
47#define SMARTBOND_FUNC_COEX_SMART_PRI 36
48#define SMARTBOND_FUNC_PORT0_DCF 37
49#define SMARTBOND_FUNC_PORT1_DCF 38
50#define SMARTBOND_FUNC_PORT2_DCF 39
51#define SMARTBOND_FUNC_PORT3_DCF 40
52#define SMARTBOND_FUNC_PORT4_DCF 41
53#define SMARTBOND_FUNC_CLOCK 42
54#define SMARTBOND_FUNC_PG 43
55#define SMARTBOND_FUNC_LCD 44
56#define SMARTBOND_FUNC_LCD_SPI_DC 45
57#define SMARTBOND_FUNC_LCD_SPI_DO 46
58#define SMARTBOND_FUNC_LCD_SPI_CLK 47
59#define SMARTBOND_FUNC_LCD_SPI_EN 48
60#define SMARTBOND_FUNC_TIM_PWM 49
61#define SMARTBOND_FUNC_TIM2_PWM 50
62#define SMARTBOND_FUNC_TIM_1SHOT 51
63#define SMARTBOND_FUNC_TIM2_1SHOT 52
64#define SMARTBOND_FUNC_TIM3_PWM 53
65#define SMARTBOND_FUNC_TIM4_PWM 54
66
68#define SMARTBOND_PINMUX_PIN_POS 0
69#define SMARTBOND_PINMUX_PIN_MASK 0x1f
70#define SMARTBOND_PINMUX_PORT_POS 5
71#define SMARTBOND_PINMUX_PORT_MASK 0x01
72#define SMARTBOND_PINMUX_FUNC_POS 6
73#define SMARTBOND_PINMUX_FUNC_MASK 0xff
74
76#define SMARTBOND_PINMUX(func, port, pin) \
77 (((SMARTBOND_FUNC_ ## func) << SMARTBOND_PINMUX_FUNC_POS) | \
78 ((port) << SMARTBOND_PINMUX_PORT_POS) | \
79 (pin) << SMARTBOND_PINMUX_PIN_POS)
80
81#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_SMARTBOND_PINCTRL_H_ */