xref: /linux/drivers/pinctrl/mediatek/Kconfig (revision a110f942672c8995dc1cacb5a44c6730856743aa)
1# SPDX-License-Identifier: GPL-2.0-only
2menu "MediaTek pinctrl drivers"
3	depends on ARCH_MEDIATEK || ARCH_AIROHA || RALINK || 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
21config PINCTRL_MTK_V2
22	tristate
23
24config PINCTRL_MTK_MTMIPS
25	bool
26	depends on RALINK
27	select PINMUX
28	select GENERIC_PINCONF
29
30config PINCTRL_MTK_MOORE
31	bool
32	depends on OF
33	select GENERIC_PINCONF
34	select GENERIC_PINCTRL_GROUPS
35	select GENERIC_PINMUX_FUNCTIONS
36	select GPIOLIB
37	select EINT_MTK
38	select PINCTRL_MTK_V2
39
40config PINCTRL_MTK_PARIS
41	tristate
42	depends on OF
43	select PINMUX
44	select GENERIC_PINCONF
45	select GPIOLIB
46	select EINT_MTK
47	select PINCTRL_MTK_V2
48
49# For MIPS SoCs
50config PINCTRL_MT7620
51	bool "MediaTek MT7620 pin control"
52	depends on SOC_MT7620 || COMPILE_TEST
53	depends on RALINK
54	default SOC_MT7620
55	select PINCTRL_MTK_MTMIPS
56
57config PINCTRL_MT7621
58	bool "MediaTek MT7621 pin control"
59	depends on SOC_MT7621 || COMPILE_TEST
60	depends on RALINK
61	default SOC_MT7621
62	select PINCTRL_MTK_MTMIPS
63
64config PINCTRL_MT76X8
65	bool "MediaTek MT76X8 pin control"
66	depends on SOC_MT7620 || COMPILE_TEST
67	depends on RALINK
68	default SOC_MT7620
69	select PINCTRL_MTK_MTMIPS
70
71config PINCTRL_RT2880
72	bool "Ralink RT2880 pin control"
73	depends on SOC_RT288X || COMPILE_TEST
74	depends on RALINK
75	default SOC_RT288X
76	select PINCTRL_MTK_MTMIPS
77
78config PINCTRL_RT305X
79	bool "Ralink RT305X pin control"
80	depends on SOC_RT305X || COMPILE_TEST
81	depends on RALINK
82	default SOC_RT305X
83	select PINCTRL_MTK_MTMIPS
84
85config PINCTRL_RT3883
86	bool "Ralink RT3883 pin control"
87	depends on SOC_RT3883 || COMPILE_TEST
88	depends on RALINK
89	default SOC_RT3883
90	select PINCTRL_MTK_MTMIPS
91
92# For ARMv7 SoCs
93config PINCTRL_MT2701
94	bool "MediaTek MT2701 pin control"
95	depends on MACH_MT7623 || MACH_MT2701 || COMPILE_TEST
96	depends on OF
97	default MACH_MT2701
98	select PINCTRL_MTK
99
100config PINCTRL_MT7623
101	bool "MediaTek MT7623 pin control with generic binding"
102	depends on MACH_MT7623 || COMPILE_TEST
103	depends on OF
104	default MACH_MT7623
105	select PINCTRL_MTK_MOORE
106
107config PINCTRL_MT7629
108	bool "MediaTek MT7629 pin control"
109	depends on MACH_MT7629 || COMPILE_TEST
110	depends on OF
111	default MACH_MT7629
112	select PINCTRL_MTK_MOORE
113
114config PINCTRL_MT8135
115	bool "MediaTek MT8135 pin control"
116	depends on MACH_MT8135 || COMPILE_TEST
117	depends on OF
118	default MACH_MT8135
119	select PINCTRL_MTK
120
121config PINCTRL_MT8127
122	bool "MediaTek MT8127 pin control"
123	depends on MACH_MT8127 || COMPILE_TEST
124	depends on OF
125	default MACH_MT8127
126	select PINCTRL_MTK
127
128# For ARMv8 SoCs
129config PINCTRL_AIROHA
130	tristate "Airoha EN7581 pin control"
131	depends on OF
132	depends on ARM64 || COMPILE_TEST
133	select PINMUX
134	select GENERIC_PINCONF
135	select GENERIC_PINCTRL_GROUPS
136	select GENERIC_PINMUX_FUNCTIONS
137	select GPIOLIB
138	select GPIOLIB_IRQCHIP
139	select REGMAP_MMIO
140	help
141	  Say yes here to support pin controller and gpio driver
142	  on Airoha EN7581 SoC.
143
144config PINCTRL_MT2712
145	bool "MediaTek MT2712 pin control"
146	depends on OF
147	depends on ARM64 || COMPILE_TEST
148	default ARM64 && ARCH_MEDIATEK
149	select PINCTRL_MTK
150
151config PINCTRL_MT6765
152	tristate "MediaTek MT6765 pin control"
153	depends on OF
154	depends on ARM64 || COMPILE_TEST
155	default ARM64 && ARCH_MEDIATEK
156	select PINCTRL_MTK_PARIS
157
158config PINCTRL_MT6779
159	tristate "MediaTek MT6779 pin control"
160	depends on OF
161	depends on ARM64 || COMPILE_TEST
162	default ARM64 && ARCH_MEDIATEK
163	select PINCTRL_MTK_PARIS
164	help
165	  Say yes here to support pin controller and gpio driver
166	  on MediaTek MT6779 SoC.
167	  In MTK platform, we support virtual gpio and use it to
168	  map specific eint which doesn't have real gpio pin.
169
170config PINCTRL_MT6795
171	bool "MediaTek MT6795 pin control"
172	depends on OF
173	depends on ARM64 || COMPILE_TEST
174	default ARM64 && ARCH_MEDIATEK
175	select PINCTRL_MTK_PARIS
176
177config PINCTRL_MT6797
178	bool "MediaTek MT6797 pin control"
179	depends on OF
180	depends on ARM64 || COMPILE_TEST
181	default ARM64 && ARCH_MEDIATEK
182	select PINCTRL_MTK_PARIS
183
184config PINCTRL_MT6878
185	bool "MediaTek MT6878 pin control"
186	depends on OF
187	depends on ARM64 || COMPILE_TEST
188	default ARM64 && ARCH_MEDIATEK
189	select PINCTRL_MTK_PARIS
190	help
191	  Say yes here to support pin controller and gpio driver
192	  on the MediaTek MT6878 SoC.
193
194config PINCTRL_MT6893
195	bool "MediaTek Dimensity MT6893 pin control"
196	depends on OF
197	depends on ARM64 || COMPILE_TEST
198	default ARM64 && ARCH_MEDIATEK
199	select PINCTRL_MTK_PARIS
200	help
201	  Say yes here to support pin controller and gpio driver
202	  on the MediaTek Dimensity 1200 MT6893 Smartphone SoC.
203
204config PINCTRL_MT7622
205	bool "MediaTek MT7622 pin control"
206	depends on OF
207	depends on ARM64 || COMPILE_TEST
208	default ARM64 && ARCH_MEDIATEK
209	select PINCTRL_MTK_MOORE
210
211config PINCTRL_MT7981
212	bool "MediaTek MT7981 pin control"
213	depends on OF
214	depends on ARM64 || COMPILE_TEST
215	default ARM64 && ARCH_MEDIATEK
216	select PINCTRL_MTK_MOORE
217
218config PINCTRL_MT7986
219	bool "MediaTek MT7986 pin control"
220	depends on OF
221	depends on ARM64 || COMPILE_TEST
222	default ARM64 && ARCH_MEDIATEK
223	select PINCTRL_MTK_MOORE
224
225config PINCTRL_MT7988
226	bool "Mediatek MT7988 pin control"
227	depends on OF
228	depends on ARM64 || COMPILE_TEST
229	default ARM64 && ARCH_MEDIATEK
230	select PINCTRL_MTK_MOORE
231
232config PINCTRL_MT8167
233	bool "MediaTek MT8167 pin control"
234	depends on OF
235	depends on ARM64 || COMPILE_TEST
236	default ARM64 && ARCH_MEDIATEK
237	select PINCTRL_MTK
238
239config PINCTRL_MT8173
240	bool "MediaTek MT8173 pin control"
241	depends on OF
242	depends on ARM64 || COMPILE_TEST
243	default ARM64 && ARCH_MEDIATEK
244	select PINCTRL_MTK
245
246config PINCTRL_MT8183
247	bool "MediaTek MT8183 pin control"
248	depends on OF
249	depends on ARM64 || COMPILE_TEST
250	default ARM64 && ARCH_MEDIATEK
251	select PINCTRL_MTK_PARIS
252
253config PINCTRL_MT8186
254	bool "MediaTek MT8186 pin control"
255	depends on OF
256	depends on ARM64 || COMPILE_TEST
257	default ARM64 && ARCH_MEDIATEK
258	select PINCTRL_MTK_PARIS
259
260config PINCTRL_MT8188
261	bool "MediaTek MT8188 pin control"
262	depends on OF
263	depends on ARM64 || COMPILE_TEST
264	default ARM64 && ARCH_MEDIATEK
265	select PINCTRL_MTK_PARIS
266	help
267	  Say yes here to support pin controller and gpio driver
268	  on MediaTek MT8188 SoC.
269	  In MTK platform, we support virtual gpio and use it to
270	  map specific eint which doesn't have real gpio pin.
271
272config PINCTRL_MT8189
273        bool "MediaTek MT8189 pin control"
274        depends on OF
275        depends on ARM64 || COMPILE_TEST
276        default ARM64 && ARCH_MEDIATEK
277        select PINCTRL_MTK_PARIS
278        help
279          Say yes here to support pin controller and gpio driver
280          on MediaTek MT8189 SoC.
281          In MTK platform, we support virtual gpio and use it to
282          map specific eint which doesn't have real gpio pin.
283
284config PINCTRL_MT8192
285	bool "MediaTek MT8192 pin control"
286	depends on OF
287	depends on ARM64 || COMPILE_TEST
288	default ARM64 && ARCH_MEDIATEK
289	select PINCTRL_MTK_PARIS
290
291config PINCTRL_MT8195
292	bool "MediaTek MT8195 pin control"
293	depends on OF
294	depends on ARM64 || COMPILE_TEST
295	default ARM64 && ARCH_MEDIATEK
296	select PINCTRL_MTK_PARIS
297
298config PINCTRL_MT8196
299	bool "MediaTek MT8196 pin control"
300	depends on OF
301	depends on ARM64 || COMPILE_TEST
302	default ARM64 && ARCH_MEDIATEK
303	select PINCTRL_MTK_PARIS
304	help
305	  Say yes here to support pin controller and gpio driver
306	  on MediaTek MT8196 SoC.
307	  In MTK platform, we support virtual gpio and use it to
308	  map specific eint which doesn't have real gpio pin.
309
310config PINCTRL_MT8365
311	bool "MediaTek MT8365 pin control"
312	depends on OF
313	depends on ARM64 || COMPILE_TEST
314	default ARM64 && ARCH_MEDIATEK
315	select PINCTRL_MTK
316
317config PINCTRL_MT8516
318	bool "MediaTek MT8516 pin control"
319	depends on OF
320	depends on ARM64 || COMPILE_TEST
321	default ARM64 && ARCH_MEDIATEK
322	select PINCTRL_MTK
323
324# For PMIC
325config PINCTRL_MT6397
326	bool "MediaTek MT6397 pin control"
327	depends on MFD_MT6397 || COMPILE_TEST
328	depends on OF
329	default MFD_MT6397
330	select PINCTRL_MTK
331
332endmenu
333