Zephyr Project API 4.4.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mtk-common-pinctrl.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2026 MediaTek Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#ifndef ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_MTK_COMMON_PINCTRL_H_
8#define ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_MTK_COMMON_PINCTRL_H_
9
10#ifdef __cplusplus
11extern "C" {
12#endif
13
14/*
15 * A pinmux entry packs the pin number and the function selected on it into a
16 * single cell: the pin number is held above the low four bits, which hold the
17 * function.
18 */
19#define MTK_PIN_NO(x) ((x) << 8)
20#define MTK_GET_PIN_NO(x) ((x) >> 8)
21#define MTK_GET_PIN_FUNC(x) ((x) & 0xf)
22
23#define MTK_PUPD_SET_R1R0_00 100
24#define MTK_PUPD_SET_R1R0_01 101
25#define MTK_PUPD_SET_R1R0_10 102
26#define MTK_PUPD_SET_R1R0_11 103
27#define MTK_RSEL_SET_R1R0_00 104
28#define MTK_RSEL_SET_R1R0_01 105
29#define MTK_RSEL_SET_R1R0_10 106
30#define MTK_RSEL_SET_R1R0_11 107
31
32#define MTK_PULL_SET_RSEL_000 200
33#define MTK_PULL_SET_RSEL_001 201
34#define MTK_PULL_SET_RSEL_010 202
35#define MTK_PULL_SET_RSEL_011 203
36#define MTK_PULL_SET_RSEL_100 204
37#define MTK_PULL_SET_RSEL_101 205
38#define MTK_PULL_SET_RSEL_110 206
39#define MTK_PULL_SET_RSEL_111 207
40
41#define MTK_DRIVE_2mA 2
42#define MTK_DRIVE_4mA 4
43#define MTK_DRIVE_6mA 6
44#define MTK_DRIVE_8mA 8
45#define MTK_DRIVE_10mA 10
46#define MTK_DRIVE_12mA 12
47#define MTK_DRIVE_14mA 14
48#define MTK_DRIVE_16mA 16
49#define MTK_DRIVE_20mA 20
50#define MTK_DRIVE_24mA 24
51#define MTK_DRIVE_28mA 28
52#define MTK_DRIVE_32mA 32
53
54#ifdef __cplusplus
55}
56#endif
57
58#endif /* ZEPHYR_INCLUDE_DT_BINDINGS_PINCTRL_MTK_COMMON_PINCTRL_H_ */