xref: /linux-6.15/drivers/pinctrl/mediatek/Kconfig (revision dc6ae205)
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	select OF_GPIO
21
22config PINCTRL_MTK_V2
23	tristate
24
25config PINCTRL_MTK_MTMIPS
26	bool
27	depends on RALINK
28	select PINMUX
29	select GENERIC_PINCONF
30
31config PINCTRL_MTK_MOORE
32	bool
33	depends on OF
34	select GENERIC_PINCONF
35	select GENERIC_PINCTRL_GROUPS
36	select GENERIC_PINMUX_FUNCTIONS
37	select GPIOLIB
38	select OF_GPIO
39	select EINT_MTK
40	select PINCTRL_MTK_V2
41
42config PINCTRL_MTK_PARIS
43	tristate
44	depends on OF
45	select PINMUX
46	select GENERIC_PINCONF
47	select GPIOLIB
48	select EINT_MTK
49	select OF_GPIO
50	select PINCTRL_MTK_V2
51
52# For MIPS SoCs
53config PINCTRL_MT7620
54	bool "MediaTek MT7620 pin control"
55	depends on SOC_MT7620 || COMPILE_TEST
56	depends on RALINK
57	default SOC_MT7620
58	select PINCTRL_MTK_MTMIPS
59
60config PINCTRL_MT7621
61	bool "MediaTek MT7621 pin control"
62	depends on SOC_MT7621 || COMPILE_TEST
63	depends on RALINK
64	default SOC_MT7621
65	select PINCTRL_MTK_MTMIPS
66
67config PINCTRL_MT76X8
68	bool "MediaTek MT76X8 pin control"
69	depends on SOC_MT7620 || COMPILE_TEST
70	depends on RALINK
71	default SOC_MT7620
72	select PINCTRL_MTK_MTMIPS
73
74config PINCTRL_RT2880
75	bool "Ralink RT2880 pin control"
76	depends on SOC_RT288X || COMPILE_TEST
77	depends on RALINK
78	default SOC_RT288X
79	select PINCTRL_MTK_MTMIPS
80
81config PINCTRL_RT305X
82	bool "Ralink RT305X pin control"
83	depends on SOC_RT305X || COMPILE_TEST
84	depends on RALINK
85	default SOC_RT305X
86	select PINCTRL_MTK_MTMIPS
87
88config PINCTRL_RT3883
89	bool "Ralink RT3883 pin control"
90	depends on SOC_RT3883 || COMPILE_TEST
91	depends on RALINK
92	default SOC_RT3883
93	select PINCTRL_MTK_MTMIPS
94
95# For ARMv7 SoCs
96config PINCTRL_MT2701
97	bool "Mediatek MT2701 pin control"
98	depends on MACH_MT7623 || MACH_MT2701 || COMPILE_TEST
99	depends on OF
100	default MACH_MT2701
101	select PINCTRL_MTK
102
103config PINCTRL_MT7623
104	bool "Mediatek MT7623 pin control with generic binding"
105	depends on MACH_MT7623 || COMPILE_TEST
106	depends on OF
107	default MACH_MT7623
108	select PINCTRL_MTK_MOORE
109
110config PINCTRL_MT7629
111	bool "Mediatek MT7629 pin control"
112	depends on MACH_MT7629 || COMPILE_TEST
113	depends on OF
114	default MACH_MT7629
115	select PINCTRL_MTK_MOORE
116
117config PINCTRL_MT8135
118	bool "Mediatek MT8135 pin control"
119	depends on MACH_MT8135 || COMPILE_TEST
120	depends on OF
121	default MACH_MT8135
122	select PINCTRL_MTK
123
124config PINCTRL_MT8127
125	bool "Mediatek MT8127 pin control"
126	depends on MACH_MT8127 || COMPILE_TEST
127	depends on OF
128	default MACH_MT8127
129	select PINCTRL_MTK
130
131# For ARMv8 SoCs
132config PINCTRL_MT2712
133	bool "MediaTek MT2712 pin control"
134	depends on OF
135	depends on ARM64 || COMPILE_TEST
136	default ARM64 && ARCH_MEDIATEK
137	select PINCTRL_MTK
138
139config PINCTRL_MT6765
140	tristate "Mediatek MT6765 pin control"
141	depends on OF
142	depends on ARM64 || COMPILE_TEST
143	default ARM64 && ARCH_MEDIATEK
144	select PINCTRL_MTK_PARIS
145
146config PINCTRL_MT6779
147	tristate "Mediatek MT6779 pin control"
148	depends on OF
149	depends on ARM64 || COMPILE_TEST
150	default ARM64 && ARCH_MEDIATEK
151	select PINCTRL_MTK_PARIS
152	help
153	  Say yes here to support pin controller and gpio driver
154	  on Mediatek MT6779 SoC.
155	  In MTK platform, we support virtual gpio and use it to
156	  map specific eint which doesn't have real gpio pin.
157
158config PINCTRL_MT6795
159	bool "Mediatek MT6795 pin control"
160	depends on OF
161	depends on ARM64 || COMPILE_TEST
162	default ARM64 && ARCH_MEDIATEK
163	select PINCTRL_MTK_PARIS
164
165config PINCTRL_MT6797
166	bool "Mediatek MT6797 pin control"
167	depends on OF
168	depends on ARM64 || COMPILE_TEST
169	default ARM64 && ARCH_MEDIATEK
170	select PINCTRL_MTK_PARIS
171
172config PINCTRL_MT7622
173	bool "MediaTek MT7622 pin control"
174	depends on OF
175	depends on ARM64 || COMPILE_TEST
176	default ARM64 && ARCH_MEDIATEK
177	select PINCTRL_MTK_MOORE
178
179config PINCTRL_MT7981
180	bool "Mediatek MT7981 pin control"
181	depends on OF
182	select PINCTRL_MTK_MOORE
183
184config PINCTRL_MT7986
185	bool "Mediatek MT7986 pin control"
186	depends on OF
187	depends on ARM64 || COMPILE_TEST
188	default ARM64 && ARCH_MEDIATEK
189	select PINCTRL_MTK_MOORE
190
191config PINCTRL_MT8167
192	bool "Mediatek MT8167 pin control"
193	depends on OF
194	depends on ARM64 || COMPILE_TEST
195	default ARM64 && ARCH_MEDIATEK
196	select PINCTRL_MTK
197
198config PINCTRL_MT8173
199	bool "Mediatek MT8173 pin control"
200	depends on OF
201	depends on ARM64 || COMPILE_TEST
202	default ARM64 && ARCH_MEDIATEK
203	select PINCTRL_MTK
204
205config PINCTRL_MT8183
206	bool "Mediatek MT8183 pin control"
207	depends on OF
208	depends on ARM64 || COMPILE_TEST
209	default ARM64 && ARCH_MEDIATEK
210	select PINCTRL_MTK_PARIS
211
212config PINCTRL_MT8186
213	bool "Mediatek MT8186 pin control"
214	depends on OF
215	depends on ARM64 || COMPILE_TEST
216	default ARM64 && ARCH_MEDIATEK
217	select PINCTRL_MTK_PARIS
218
219config PINCTRL_MT8188
220	bool "MediaTek MT8188 pin control"
221	depends on OF
222	depends on ARM64 || COMPILE_TEST
223	default ARM64 && ARCH_MEDIATEK
224	select PINCTRL_MTK_PARIS
225	help
226	  Say yes here to support pin controller and gpio driver
227	  on MediaTek MT8188 SoC.
228	  In MTK platform, we support virtual gpio and use it to
229	  map specific eint which doesn't have real gpio pin.
230
231config PINCTRL_MT8192
232	bool "Mediatek MT8192 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_MT8195
239	bool "Mediatek MT8195 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_MT8365
246	bool "Mediatek MT8365 pin control"
247	depends on OF
248	depends on ARM64 || COMPILE_TEST
249	default ARM64 && ARCH_MEDIATEK
250	select PINCTRL_MTK
251
252config PINCTRL_MT8516
253	bool "Mediatek MT8516 pin control"
254	depends on OF
255	depends on ARM64 || COMPILE_TEST
256	default ARM64 && ARCH_MEDIATEK
257	select PINCTRL_MTK
258
259# For PMIC
260config PINCTRL_MT6397
261	bool "Mediatek MT6397 pin control"
262	depends on MFD_MT6397 || COMPILE_TEST
263	depends on OF
264	default MFD_MT6397
265	select PINCTRL_MTK
266
267endmenu
268