xref: /linux/drivers/pinctrl/mediatek/Kconfig (revision 27aa791db7e7fe9e405a2143f2ddccdcd0d1c283)
1# SPDX-License-Identifier: GPL-2.0-only
2menu "MediaTek pinctrl drivers"
3	depends on ARCH_MEDIATEK || 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_MT2712
130	bool "MediaTek MT2712 pin control"
131	depends on OF
132	depends on ARM64 || COMPILE_TEST
133	default ARM64 && ARCH_MEDIATEK
134	select PINCTRL_MTK
135
136config PINCTRL_MT6765
137	tristate "MediaTek MT6765 pin control"
138	depends on OF
139	depends on ARM64 || COMPILE_TEST
140	default ARM64 && ARCH_MEDIATEK
141	select PINCTRL_MTK_PARIS
142
143config PINCTRL_MT6779
144	tristate "MediaTek MT6779 pin control"
145	depends on OF
146	depends on ARM64 || COMPILE_TEST
147	default ARM64 && ARCH_MEDIATEK
148	select PINCTRL_MTK_PARIS
149	help
150	  Say yes here to support pin controller and gpio driver
151	  on MediaTek MT6779 SoC.
152	  In MTK platform, we support virtual gpio and use it to
153	  map specific eint which doesn't have real gpio pin.
154
155config PINCTRL_MT6795
156	bool "MediaTek MT6795 pin control"
157	depends on OF
158	depends on ARM64 || COMPILE_TEST
159	default ARM64 && ARCH_MEDIATEK
160	select PINCTRL_MTK_PARIS
161
162config PINCTRL_MT6797
163	bool "MediaTek MT6797 pin control"
164	depends on OF
165	depends on ARM64 || COMPILE_TEST
166	default ARM64 && ARCH_MEDIATEK
167	select PINCTRL_MTK_PARIS
168
169config PINCTRL_MT6878
170	bool "MediaTek MT6878 pin control"
171	depends on OF
172	depends on ARM64 || COMPILE_TEST
173	default ARM64 && ARCH_MEDIATEK
174	select PINCTRL_MTK_PARIS
175	help
176	  Say yes here to support pin controller and gpio driver
177	  on the MediaTek MT6878 SoC.
178
179config PINCTRL_MT6893
180	bool "MediaTek Dimensity MT6893 pin control"
181	depends on OF
182	depends on ARM64 || COMPILE_TEST
183	default ARM64 && ARCH_MEDIATEK
184	select PINCTRL_MTK_PARIS
185	help
186	  Say yes here to support pin controller and gpio driver
187	  on the MediaTek Dimensity 1200 MT6893 Smartphone SoC.
188
189config PINCTRL_MT7622
190	bool "MediaTek MT7622 pin control"
191	depends on OF
192	depends on ARM64 || COMPILE_TEST
193	default ARM64 && ARCH_MEDIATEK
194	select PINCTRL_MTK_MOORE
195
196config PINCTRL_MT7981
197	bool "MediaTek MT7981 pin control"
198	depends on OF
199	depends on ARM64 || COMPILE_TEST
200	default ARM64 && ARCH_MEDIATEK
201	select PINCTRL_MTK_MOORE
202
203config PINCTRL_MT7986
204	bool "MediaTek MT7986 pin control"
205	depends on OF
206	depends on ARM64 || COMPILE_TEST
207	default ARM64 && ARCH_MEDIATEK
208	select PINCTRL_MTK_MOORE
209
210config PINCTRL_MT7988
211	bool "Mediatek MT7988 pin control"
212	depends on OF
213	depends on ARM64 || COMPILE_TEST
214	default ARM64 && ARCH_MEDIATEK
215	select PINCTRL_MTK_MOORE
216
217config PINCTRL_MT8167
218	bool "MediaTek MT8167 pin control"
219	depends on OF
220	depends on ARM64 || COMPILE_TEST
221	default ARM64 && ARCH_MEDIATEK
222	select PINCTRL_MTK
223
224config PINCTRL_MT8173
225	bool "MediaTek MT8173 pin control"
226	depends on OF
227	depends on ARM64 || COMPILE_TEST
228	default ARM64 && ARCH_MEDIATEK
229	select PINCTRL_MTK
230
231config PINCTRL_MT8183
232	bool "MediaTek MT8183 pin control"
233	depends on OF
234	depends on ARM64 || COMPILE_TEST
235	default ARM64 && ARCH_MEDIATEK
236	select PINCTRL_MTK_PARIS
237
238config PINCTRL_MT8186
239	bool "MediaTek MT8186 pin control"
240	depends on OF
241	depends on ARM64 || COMPILE_TEST
242	default ARM64 && ARCH_MEDIATEK
243	select PINCTRL_MTK_PARIS
244
245config PINCTRL_MT8188
246	bool "MediaTek MT8188 pin control"
247	depends on OF
248	depends on ARM64 || COMPILE_TEST
249	default ARM64 && ARCH_MEDIATEK
250	select PINCTRL_MTK_PARIS
251	help
252	  Say yes here to support pin controller and gpio driver
253	  on MediaTek MT8188 SoC.
254	  In MTK platform, we support virtual gpio and use it to
255	  map specific eint which doesn't have real gpio pin.
256
257config PINCTRL_MT8189
258        bool "MediaTek MT8189 pin control"
259        depends on OF
260        depends on ARM64 || COMPILE_TEST
261        default ARM64 && ARCH_MEDIATEK
262        select PINCTRL_MTK_PARIS
263        help
264          Say yes here to support pin controller and gpio driver
265          on MediaTek MT8189 SoC.
266          In MTK platform, we support virtual gpio and use it to
267          map specific eint which doesn't have real gpio pin.
268
269config PINCTRL_MT8192
270	bool "MediaTek MT8192 pin control"
271	depends on OF
272	depends on ARM64 || COMPILE_TEST
273	default ARM64 && ARCH_MEDIATEK
274	select PINCTRL_MTK_PARIS
275
276config PINCTRL_MT8195
277	bool "MediaTek MT8195 pin control"
278	depends on OF
279	depends on ARM64 || COMPILE_TEST
280	default ARM64 && ARCH_MEDIATEK
281	select PINCTRL_MTK_PARIS
282
283config PINCTRL_MT8196
284	bool "MediaTek MT8196 pin control"
285	depends on OF
286	depends on ARM64 || COMPILE_TEST
287	default ARM64 && ARCH_MEDIATEK
288	select PINCTRL_MTK_PARIS
289	help
290	  Say yes here to support pin controller and gpio driver
291	  on MediaTek MT8196 SoC.
292	  In MTK platform, we support virtual gpio and use it to
293	  map specific eint which doesn't have real gpio pin.
294
295config PINCTRL_MT8365
296	bool "MediaTek MT8365 pin control"
297	depends on OF
298	depends on ARM64 || COMPILE_TEST
299	default ARM64 && ARCH_MEDIATEK
300	select PINCTRL_MTK
301
302config PINCTRL_MT8516
303	bool "MediaTek MT8516 pin control"
304	depends on OF
305	depends on ARM64 || COMPILE_TEST
306	default ARM64 && ARCH_MEDIATEK
307	select PINCTRL_MTK
308
309# For PMIC
310config PINCTRL_MT6397
311	bool "MediaTek MT6397 pin control"
312	depends on MFD_MT6397 || COMPILE_TEST
313	depends on OF
314	default MFD_MT6397
315	select PINCTRL_MTK
316
317endmenu
318