xref: /openbmc/linux/drivers/pinctrl/mediatek/Kconfig (revision 2cf1c348)
1# SPDX-License-Identifier: GPL-2.0-only
2menu "MediaTek pinctrl drivers"
3	depends on ARCH_MEDIATEK || COMPILE_TEST
4
5config EINT_MTK
6	tristate "MediaTek External Interrupt Support"
7	depends on PINCTRL_MTK || PINCTRL_MTK_MOORE || PINCTRL_MTK_PARIS || COMPILE_TEST
8	select GPIOLIB
9	select IRQ_DOMAIN
10	default y if PINCTRL_MTK || PINCTRL_MTK_MOORE
11	default PINCTRL_MTK_PARIS
12
13config PINCTRL_MTK
14	bool
15	depends on OF
16	select PINMUX
17	select GENERIC_PINCONF
18	select GPIOLIB
19	select EINT_MTK
20	select OF_GPIO
21
22config PINCTRL_MTK_V2
23	tristate
24
25config PINCTRL_MTK_MOORE
26	bool
27	depends on OF
28	select GENERIC_PINCONF
29	select GENERIC_PINCTRL_GROUPS
30	select GENERIC_PINMUX_FUNCTIONS
31	select GPIOLIB
32	select OF_GPIO
33	select PINCTRL_MTK_V2
34
35config PINCTRL_MTK_PARIS
36	tristate
37	depends on OF
38	select PINMUX
39	select GENERIC_PINCONF
40	select GPIOLIB
41	select EINT_MTK
42	select OF_GPIO
43	select PINCTRL_MTK_V2
44
45# For ARMv7 SoCs
46config PINCTRL_MT2701
47	bool "Mediatek MT2701 pin control"
48	depends on MACH_MT7623 || MACH_MT2701 || COMPILE_TEST
49	depends on OF
50	default MACH_MT2701
51	select PINCTRL_MTK
52
53config PINCTRL_MT7623
54	bool "Mediatek MT7623 pin control with generic binding"
55	depends on MACH_MT7623 || COMPILE_TEST
56	depends on OF
57	default MACH_MT7623
58	select PINCTRL_MTK_MOORE
59
60config PINCTRL_MT7629
61	bool "Mediatek MT7629 pin control"
62	depends on MACH_MT7629 || COMPILE_TEST
63	depends on OF
64	default MACH_MT7629
65	select PINCTRL_MTK_MOORE
66
67config PINCTRL_MT8135
68	bool "Mediatek MT8135 pin control"
69	depends on MACH_MT8135 || COMPILE_TEST
70	depends on OF
71	default MACH_MT8135
72	select PINCTRL_MTK
73
74config PINCTRL_MT8127
75	bool "Mediatek MT8127 pin control"
76	depends on MACH_MT8127 || COMPILE_TEST
77	depends on OF
78	default MACH_MT8127
79	select PINCTRL_MTK
80
81# For ARMv8 SoCs
82config PINCTRL_MT2712
83	bool "MediaTek MT2712 pin control"
84	depends on OF
85	depends on ARM64 || COMPILE_TEST
86	default ARM64 && ARCH_MEDIATEK
87	select PINCTRL_MTK
88
89config PINCTRL_MT6765
90	tristate "Mediatek MT6765 pin control"
91	depends on OF
92	depends on ARM64 || COMPILE_TEST
93	default ARM64 && ARCH_MEDIATEK
94	select PINCTRL_MTK_PARIS
95
96config PINCTRL_MT6779
97	tristate "Mediatek MT6779 pin control"
98	depends on OF
99	depends on ARM64 || COMPILE_TEST
100	default ARM64 && ARCH_MEDIATEK
101	select PINCTRL_MTK_PARIS
102	help
103	  Say yes here to support pin controller and gpio driver
104	  on Mediatek MT6779 SoC.
105	  In MTK platform, we support virtual gpio and use it to
106	  map specific eint which doesn't have real gpio pin.
107
108config PINCTRL_MT6797
109	bool "Mediatek MT6797 pin control"
110	depends on OF
111	depends on ARM64 || COMPILE_TEST
112	default ARM64 && ARCH_MEDIATEK
113	select PINCTRL_MTK_PARIS
114
115config PINCTRL_MT7622
116	bool "MediaTek MT7622 pin control"
117	depends on OF
118	depends on ARM64 || COMPILE_TEST
119	default ARM64 && ARCH_MEDIATEK
120	select PINCTRL_MTK_MOORE
121
122config PINCTRL_MT7986
123	bool "Mediatek MT7986 pin control"
124	depends on OF
125	depends on ARM64 || COMPILE_TEST
126	default ARM64 && ARCH_MEDIATEK
127	select PINCTRL_MTK_MOORE
128
129config PINCTRL_MT8167
130	bool "Mediatek MT8167 pin control"
131	depends on OF
132	depends on ARM64 || COMPILE_TEST
133	default ARM64 && ARCH_MEDIATEK
134	select PINCTRL_MTK
135
136config PINCTRL_MT8173
137	bool "Mediatek MT8173 pin control"
138	depends on OF
139	depends on ARM64 || COMPILE_TEST
140	default ARM64 && ARCH_MEDIATEK
141	select PINCTRL_MTK
142
143config PINCTRL_MT8183
144	bool "Mediatek MT8183 pin control"
145	depends on OF
146	depends on ARM64 || COMPILE_TEST
147	default ARM64 && ARCH_MEDIATEK
148	select PINCTRL_MTK_PARIS
149
150config PINCTRL_MT8192
151	bool "Mediatek MT8192 pin control"
152	depends on OF
153	depends on ARM64 || COMPILE_TEST
154	default ARM64 && ARCH_MEDIATEK
155	select PINCTRL_MTK_PARIS
156
157config PINCTRL_MT8195
158	bool "Mediatek MT8195 pin control"
159	depends on OF
160	depends on ARM64 || COMPILE_TEST
161	select PINCTRL_MTK_PARIS
162
163config PINCTRL_MT8365
164	bool "Mediatek MT8365 pin control"
165	depends on OF
166	depends on ARM64 || COMPILE_TEST
167	default ARM64 && ARCH_MEDIATEK
168	select PINCTRL_MTK
169
170config PINCTRL_MT8516
171	bool "Mediatek MT8516 pin control"
172	depends on OF
173	depends on ARM64 || COMPILE_TEST
174	default ARM64 && ARCH_MEDIATEK
175	select PINCTRL_MTK
176
177# For PMIC
178config PINCTRL_MT6397
179	bool "Mediatek MT6397 pin control"
180	depends on MFD_MT6397 || COMPILE_TEST
181	depends on OF
182	default MFD_MT6397
183	select PINCTRL_MTK
184
185endmenu
186