blob: 53048b4207ac5670d7e18077d830ffb7e6f06b11 [file] [log] [blame]
rjw1f884582022-01-06 17:20:42 +08001// SPDX-License-Identifier: GPL-2.0
2/*
3 * Copyright (C) 2018 MediaTek Inc.
4 * Author: Zhiyong Tao <zhiyong.tao@mediatek.com>
5 *
6 */
7
8#include <linux/module.h>
9#include <linux/platform_device.h>
10#include <linux/of.h>
11#include <linux/of_device.h>
12#include <linux/pinctrl/pinctrl.h>
13#include <linux/regmap.h>
14#include <linux/pinctrl/pinconf-generic.h>
15#include <dt-bindings/pinctrl/mt65xx.h>
16
17#include "pinctrl-mtk-common.h"
18#include "pinctrl-mtk-mt8183.h"
19
20#define MAX_GPIO_MODE_PER_REG 8
21#define GPIO_MODE_BITS 4
22
23struct mtk_pin_info mt8183_pin_info_ies[] = {
24 MTK_PIN_INFO(0, 0x000, 3, 1, 6),
25 MTK_PIN_INFO(1, 0x000, 3, 1, 6),
26 MTK_PIN_INFO(2, 0x000, 3, 1, 6),
27 MTK_PIN_INFO(3, 0x000, 3, 1, 6),
28 MTK_PIN_INFO(4, 0x000, 5, 1, 6),
29 MTK_PIN_INFO(5, 0x000, 5, 1, 6),
30 MTK_PIN_INFO(6, 0x000, 5, 1, 6),
31 MTK_PIN_INFO(7, 0x000, 5, 1, 6),
32 MTK_PIN_INFO(8, 0x000, 0, 1, 6),
33 MTK_PIN_INFO(9, 0x000, 12, 1, 6),
34 MTK_PIN_INFO(10, 0x000, 12, 1, 6),
35 MTK_PIN_INFO(11, 0x000, 3, 1, 1),
36 MTK_PIN_INFO(12, 0x000, 7, 1, 1),
37 MTK_PIN_INFO(13, 0x000, 2, 1, 2),
38 MTK_PIN_INFO(14, 0x000, 2, 1, 2),
39 MTK_PIN_INFO(15, 0x000, 2, 1, 2),
40 MTK_PIN_INFO(16, 0x000, 2, 1, 2),
41 MTK_PIN_INFO(17, 0x000, 3, 1, 2),
42 MTK_PIN_INFO(18, 0x000, 3, 1, 2),
43 MTK_PIN_INFO(19, 0x000, 3, 1, 2),
44 MTK_PIN_INFO(20, 0x000, 3, 1, 2),
45 MTK_PIN_INFO(21, 0x000, 4, 1, 2),
46 MTK_PIN_INFO(22, 0x000, 4, 1, 2),
47 MTK_PIN_INFO(23, 0x000, 4, 1, 2),
48 MTK_PIN_INFO(24, 0x000, 4, 1, 2),
49 MTK_PIN_INFO(25, 0x000, 5, 1, 2),
50 MTK_PIN_INFO(26, 0x000, 5, 1, 2),
51 MTK_PIN_INFO(27, 0x000, 5, 1, 2),
52 MTK_PIN_INFO(28, 0x000, 5, 1, 2),
53 MTK_PIN_INFO(29, 0x000, 6, 1, 2),
54 MTK_PIN_INFO(30, 0x000, 7, 1, 2),
55 MTK_PIN_INFO(31, 0x000, 8, 1, 2),
56 MTK_PIN_INFO(32, 0x000, 7, 1, 2),
57 MTK_PIN_INFO(33, 0x000, 7, 1, 2),
58 MTK_PIN_INFO(34, 0x000, 7, 1, 2),
59 MTK_PIN_INFO(35, 0x000, 0, 1, 3),
60 MTK_PIN_INFO(36, 0x000, 0, 1, 3),
61 MTK_PIN_INFO(37, 0x000, 0, 1, 3),
62 MTK_PIN_INFO(38, 0x000, 1, 1, 3),
63 MTK_PIN_INFO(39, 0x000, 1, 1, 3),
64 MTK_PIN_INFO(40, 0x000, 1, 1, 3),
65 MTK_PIN_INFO(41, 0x000, 2, 1, 3),
66 MTK_PIN_INFO(42, 0x000, 2, 1, 3),
67 MTK_PIN_INFO(43, 0x000, 3, 1, 3),
68 MTK_PIN_INFO(44, 0x000, 3, 1, 3),
69 MTK_PIN_INFO(45, 0x000, 3, 1, 3),
70 MTK_PIN_INFO(46, 0x000, 4, 1, 3),
71 MTK_PIN_INFO(47, 0x000, 4, 1, 3),
72 MTK_PIN_INFO(48, 0x000, 5, 1, 3),
73 MTK_PIN_INFO(49, 0x000, 5, 1, 3),
74 MTK_PIN_INFO(50, 0x000, 0, 1, 4),
75 MTK_PIN_INFO(51, 0x000, 0, 1, 4),
76 MTK_PIN_INFO(52, 0x000, 1, 1, 4),
77 MTK_PIN_INFO(53, 0x000, 1, 1, 4),
78 MTK_PIN_INFO(54, 0x000, 1, 1, 4),
79 MTK_PIN_INFO(55, 0x000, 1, 1, 4),
80 MTK_PIN_INFO(56, 0x000, 1, 1, 4),
81 MTK_PIN_INFO(57, 0x000, 1, 1, 4),
82 MTK_PIN_INFO(58, 0x000, 2, 1, 4),
83 MTK_PIN_INFO(59, 0x000, 2, 1, 4),
84 MTK_PIN_INFO(60, 0x000, 2, 1, 4),
85 MTK_PIN_INFO(61, 0x000, 0, 1, 5),
86 MTK_PIN_INFO(62, 0x000, 0, 1, 5),
87 MTK_PIN_INFO(63, 0x000, 0, 1, 5),
88 MTK_PIN_INFO(64, 0x000, 0, 1, 5),
89 MTK_PIN_INFO(65, 0x000, 1, 1, 5),
90 MTK_PIN_INFO(66, 0x000, 1, 1, 5),
91 MTK_PIN_INFO(67, 0x000, 2, 1, 5),
92 MTK_PIN_INFO(68, 0x000, 2, 1, 5),
93 MTK_PIN_INFO(69, 0x000, 3, 1, 5),
94 MTK_PIN_INFO(70, 0x000, 3, 1, 5),
95 MTK_PIN_INFO(71, 0x000, 3, 1, 5),
96 MTK_PIN_INFO(72, 0x000, 4, 1, 5),
97 MTK_PIN_INFO(73, 0x000, 4, 1, 5),
98 MTK_PIN_INFO(74, 0x000, 4, 1, 5),
99 MTK_PIN_INFO(75, 0x000, 4, 1, 5),
100 MTK_PIN_INFO(76, 0x000, 4, 1, 5),
101 MTK_PIN_INFO(77, 0x000, 5, 1, 5),
102 MTK_PIN_INFO(78, 0x000, 5, 1, 5),
103 MTK_PIN_INFO(79, 0x000, 5, 1, 5),
104 MTK_PIN_INFO(80, 0x000, 5, 1, 5),
105 MTK_PIN_INFO(81, 0x000, 6, 1, 5),
106 MTK_PIN_INFO(82, 0x000, 7, 1, 5),
107 MTK_PIN_INFO(83, 0x000, 7, 1, 5),
108 MTK_PIN_INFO(84, 0x000, 6, 1, 5),
109 MTK_PIN_INFO(85, 0x000, 8, 1, 5),
110 MTK_PIN_INFO(86, 0x000, 8, 1, 5),
111 MTK_PIN_INFO(87, 0x000, 8, 1, 5),
112 MTK_PIN_INFO(88, 0x000, 8, 1, 5),
113 MTK_PIN_INFO(89, 0x000, 11, 1, 6),
114 MTK_PIN_INFO(90, 0x000, 1, 1, 6),
115 MTK_PIN_INFO(91, 0x000, 2, 1, 6),
116 MTK_PIN_INFO(92, 0x000, 2, 1, 6),
117 MTK_PIN_INFO(93, 0x000, 2, 1, 6),
118 MTK_PIN_INFO(94, 0x000, 2, 1, 6),
119 MTK_PIN_INFO(95, 0x000, 6, 1, 6),
120 MTK_PIN_INFO(96, 0x000, 6, 1, 6),
121 MTK_PIN_INFO(97, 0x000, 7, 1, 6),
122 MTK_PIN_INFO(98, 0x000, 7, 1, 6),
123 MTK_PIN_INFO(99, 0x000, 8, 1, 6),
124 MTK_PIN_INFO(100, 0x000, 9, 1, 6),
125 MTK_PIN_INFO(101, 0x000, 10, 1, 6),
126 MTK_PIN_INFO(102, 0x000, 10, 1, 6),
127 MTK_PIN_INFO(103, 0x000, 13, 1, 6),
128 MTK_PIN_INFO(104, 0x000, 13, 1, 6),
129 MTK_PIN_INFO(105, 0x000, 14, 1, 6),
130 MTK_PIN_INFO(106, 0x000, 14, 1, 6),
131 MTK_PIN_INFO(107, 0x000, 0, 1, 7),
132 MTK_PIN_INFO(108, 0x000, 1, 1, 7),
133 MTK_PIN_INFO(109, 0x000, 2, 1, 7),
134 MTK_PIN_INFO(110, 0x000, 0, 1, 7),
135 MTK_PIN_INFO(111, 0x000, 3, 1, 7),
136 MTK_PIN_INFO(112, 0x000, 2, 1, 7),
137 MTK_PIN_INFO(113, 0x000, 4, 1, 7),
138 MTK_PIN_INFO(114, 0x000, 5, 1, 7),
139 MTK_PIN_INFO(115, 0x000, 6, 1, 7),
140 MTK_PIN_INFO(116, 0x000, 7, 1, 7),
141 MTK_PIN_INFO(117, 0x000, 8, 1, 7),
142 MTK_PIN_INFO(118, 0x000, 9, 1, 7),
143 MTK_PIN_INFO(119, 0x000, 10, 1, 7),
144 MTK_PIN_INFO(120, 0x000, 11, 1, 7),
145 MTK_PIN_INFO(121, 0x000, 12, 1, 7),
146 MTK_PIN_INFO(122, 0x000, 0, 1, 8),
147 MTK_PIN_INFO(123, 0x000, 1, 1, 8),
148 MTK_PIN_INFO(124, 0x000, 2, 1, 8),
149 MTK_PIN_INFO(125, 0x000, 1, 1, 8),
150 MTK_PIN_INFO(126, 0x000, 1, 1, 8),
151 MTK_PIN_INFO(127, 0x000, 1, 1, 8),
152 MTK_PIN_INFO(128, 0x000, 1, 1, 8),
153 MTK_PIN_INFO(129, 0x000, 1, 1, 8),
154 MTK_PIN_INFO(130, 0x000, 1, 1, 8),
155 MTK_PIN_INFO(131, 0x000, 3, 1, 8),
156 MTK_PIN_INFO(132, 0x000, 1, 1, 8),
157 MTK_PIN_INFO(133, 0x000, 4, 1, 8),
158 MTK_PIN_INFO(134, 0x000, 0, 1, 1),
159 MTK_PIN_INFO(135, 0x000, 1, 1, 1),
160 MTK_PIN_INFO(136, 0x000, 2, 1, 1),
161 MTK_PIN_INFO(137, 0x000, 2, 1, 1),
162 MTK_PIN_INFO(138, 0x000, 2, 1, 1),
163 MTK_PIN_INFO(139, 0x000, 2, 1, 1),
164 MTK_PIN_INFO(140, 0x000, 2, 1, 1),
165 MTK_PIN_INFO(141, 0x000, 2, 1, 1),
166 MTK_PIN_INFO(142, 0x000, 2, 1, 1),
167 MTK_PIN_INFO(143, 0x000, 2, 1, 1),
168 MTK_PIN_INFO(144, 0x000, 4, 1, 1),
169 MTK_PIN_INFO(145, 0x000, 4, 1, 1),
170 MTK_PIN_INFO(146, 0x000, 4, 1, 1),
171 MTK_PIN_INFO(147, 0x000, 4, 1, 1),
172 MTK_PIN_INFO(148, 0x000, 5, 1, 1),
173 MTK_PIN_INFO(149, 0x000, 6, 1, 1),
174 MTK_PIN_INFO(150, 0x000, 8, 1, 1),
175 MTK_PIN_INFO(151, 0x000, 8, 1, 1),
176 MTK_PIN_INFO(152, 0x000, 8, 1, 1),
177 MTK_PIN_INFO(153, 0x000, 8, 1, 1),
178 MTK_PIN_INFO(154, 0x000, 9, 1, 1),
179 MTK_PIN_INFO(155, 0x000, 10, 1, 1),
180 MTK_PIN_INFO(156, 0x000, 10, 1, 1),
181 MTK_PIN_INFO(157, 0x000, 10, 1, 1),
182 MTK_PIN_INFO(158, 0x000, 8, 1, 1),
183 MTK_PIN_INFO(159, 0x000, 8, 1, 1),
184 MTK_PIN_INFO(160, 0x000, 8, 1, 1),
185 MTK_PIN_INFO(161, 0x000, 0, 1, 2),
186 MTK_PIN_INFO(162, 0x000, 0, 1, 2),
187 MTK_PIN_INFO(163, 0x000, 0, 1, 2),
188 MTK_PIN_INFO(164, 0x000, 0, 1, 2),
189 MTK_PIN_INFO(165, 0x000, 1, 1, 2),
190 MTK_PIN_INFO(166, 0x000, 1, 1, 2),
191 MTK_PIN_INFO(167, 0x000, 2, 1, 4),
192 MTK_PIN_INFO(168, 0x000, 2, 1, 4),
193 MTK_PIN_INFO(169, 0x000, 3, 1, 4),
194 MTK_PIN_INFO(170, 0x000, 4, 1, 4),
195 MTK_PIN_INFO(171, 0x000, 4, 1, 4),
196 MTK_PIN_INFO(172, 0x000, 4, 1, 4),
197 MTK_PIN_INFO(173, 0x000, 4, 1, 4),
198 MTK_PIN_INFO(174, 0x000, 4, 1, 4),
199 MTK_PIN_INFO(175, 0x000, 3, 1, 4),
200 MTK_PIN_INFO(176, 0x000, 3, 1, 4),
201 MTK_PIN_INFO(177, 0x000, 4, 1, 6),
202 MTK_PIN_INFO(178, 0x000, 4, 1, 6),
203 MTK_PIN_INFO(179, 0x000, 4, 1, 6),
204};
205
206struct mtk_pin_info mt8183_pin_info_smt[] = {
207 MTK_PIN_INFO(0, 0x010, 3, 1, 6),
208 MTK_PIN_INFO(1, 0x010, 3, 1, 6),
209 MTK_PIN_INFO(2, 0x010, 3, 1, 6),
210 MTK_PIN_INFO(3, 0x010, 3, 1, 6),
211 MTK_PIN_INFO(4, 0x010, 5, 1, 6),
212 MTK_PIN_INFO(5, 0x010, 5, 1, 6),
213 MTK_PIN_INFO(6, 0x010, 5, 1, 6),
214 MTK_PIN_INFO(7, 0x010, 5, 1, 6),
215 MTK_PIN_INFO(8, 0x010, 0, 1, 6),
216 MTK_PIN_INFO(9, 0x010, 12, 1, 6),
217 MTK_PIN_INFO(10, 0x010, 12, 1, 6),
218 MTK_PIN_INFO(11, 0x010, 3, 1, 1),
219 MTK_PIN_INFO(12, 0x010, 7, 1, 1),
220 MTK_PIN_INFO(13, 0x010, 2, 1, 2),
221 MTK_PIN_INFO(14, 0x010, 2, 1, 2),
222 MTK_PIN_INFO(15, 0x010, 2, 1, 2),
223 MTK_PIN_INFO(16, 0x010, 2, 1, 2),
224 MTK_PIN_INFO(17, 0x010, 3, 1, 2),
225 MTK_PIN_INFO(18, 0x010, 3, 1, 2),
226 MTK_PIN_INFO(19, 0x010, 3, 1, 2),
227 MTK_PIN_INFO(20, 0x010, 3, 1, 2),
228 MTK_PIN_INFO(21, 0x010, 4, 1, 2),
229 MTK_PIN_INFO(22, 0x010, 4, 1, 2),
230 MTK_PIN_INFO(23, 0x010, 4, 1, 2),
231 MTK_PIN_INFO(24, 0x010, 4, 1, 2),
232 MTK_PIN_INFO(25, 0x010, 5, 1, 2),
233 MTK_PIN_INFO(26, 0x010, 5, 1, 2),
234 MTK_PIN_INFO(27, 0x010, 5, 1, 2),
235 MTK_PIN_INFO(28, 0x010, 5, 1, 2),
236 MTK_PIN_INFO(29, 0x010, 6, 1, 2),
237 MTK_PIN_INFO(30, 0x010, 7, 1, 2),
238 MTK_PIN_INFO(31, 0x010, 8, 1, 2),
239 MTK_PIN_INFO(32, 0x010, 7, 1, 2),
240 MTK_PIN_INFO(33, 0x010, 7, 1, 2),
241 MTK_PIN_INFO(34, 0x010, 7, 1, 2),
242 MTK_PIN_INFO(35, 0x010, 0, 1, 3),
243 MTK_PIN_INFO(36, 0x010, 0, 1, 3),
244 MTK_PIN_INFO(37, 0x010, 0, 1, 3),
245 MTK_PIN_INFO(38, 0x010, 1, 1, 3),
246 MTK_PIN_INFO(39, 0x010, 1, 1, 3),
247 MTK_PIN_INFO(40, 0x010, 1, 1, 3),
248 MTK_PIN_INFO(41, 0x010, 2, 1, 3),
249 MTK_PIN_INFO(42, 0x010, 2, 1, 3),
250 MTK_PIN_INFO(43, 0x010, 3, 1, 3),
251 MTK_PIN_INFO(44, 0x010, 3, 1, 3),
252 MTK_PIN_INFO(45, 0x010, 3, 1, 3),
253 MTK_PIN_INFO(46, 0x010, 4, 1, 3),
254 MTK_PIN_INFO(47, 0x010, 4, 1, 3),
255 MTK_PIN_INFO(48, 0x010, 5, 1, 3),
256 MTK_PIN_INFO(49, 0x010, 5, 1, 3),
257 MTK_PIN_INFO(50, 0x010, 0, 1, 4),
258 MTK_PIN_INFO(51, 0x010, 0, 1, 4),
259 MTK_PIN_INFO(52, 0x010, 1, 1, 4),
260 MTK_PIN_INFO(53, 0x010, 1, 1, 4),
261 MTK_PIN_INFO(54, 0x010, 1, 1, 4),
262 MTK_PIN_INFO(55, 0x010, 1, 1, 4),
263 MTK_PIN_INFO(56, 0x010, 1, 1, 4),
264 MTK_PIN_INFO(57, 0x010, 1, 1, 4),
265 MTK_PIN_INFO(58, 0x010, 2, 1, 4),
266 MTK_PIN_INFO(59, 0x010, 2, 1, 4),
267 MTK_PIN_INFO(60, 0x010, 2, 1, 4),
268 MTK_PIN_INFO(61, 0x010, 0, 1, 5),
269 MTK_PIN_INFO(62, 0x010, 0, 1, 5),
270 MTK_PIN_INFO(63, 0x010, 0, 1, 5),
271 MTK_PIN_INFO(64, 0x010, 0, 1, 5),
272 MTK_PIN_INFO(65, 0x010, 1, 1, 5),
273 MTK_PIN_INFO(66, 0x010, 1, 1, 5),
274 MTK_PIN_INFO(67, 0x010, 2, 1, 5),
275 MTK_PIN_INFO(68, 0x010, 2, 1, 5),
276 MTK_PIN_INFO(69, 0x010, 3, 1, 5),
277 MTK_PIN_INFO(70, 0x010, 3, 1, 5),
278 MTK_PIN_INFO(71, 0x010, 3, 1, 5),
279 MTK_PIN_INFO(72, 0x010, 4, 1, 5),
280 MTK_PIN_INFO(73, 0x010, 4, 1, 5),
281 MTK_PIN_INFO(74, 0x010, 4, 1, 5),
282 MTK_PIN_INFO(75, 0x010, 4, 1, 5),
283 MTK_PIN_INFO(76, 0x010, 4, 1, 5),
284 MTK_PIN_INFO(77, 0x010, 5, 1, 5),
285 MTK_PIN_INFO(78, 0x010, 5, 1, 5),
286 MTK_PIN_INFO(79, 0x010, 5, 1, 5),
287 MTK_PIN_INFO(80, 0x010, 5, 1, 5),
288 MTK_PIN_INFO(81, 0x010, 6, 1, 5),
289 MTK_PIN_INFO(82, 0x010, 7, 1, 5),
290 MTK_PIN_INFO(83, 0x010, 7, 1, 5),
291 MTK_PIN_INFO(84, 0x010, 6, 1, 5),
292 MTK_PIN_INFO(85, 0x010, 8, 1, 5),
293 MTK_PIN_INFO(86, 0x010, 8, 1, 5),
294 MTK_PIN_INFO(87, 0x010, 8, 1, 5),
295 MTK_PIN_INFO(88, 0x010, 8, 1, 5),
296 MTK_PIN_INFO(89, 0x010, 11, 1, 6),
297 MTK_PIN_INFO(90, 0x010, 1, 1, 6),
298 MTK_PIN_INFO(91, 0x010, 2, 1, 6),
299 MTK_PIN_INFO(92, 0x010, 2, 1, 6),
300 MTK_PIN_INFO(93, 0x010, 2, 1, 6),
301 MTK_PIN_INFO(94, 0x010, 2, 1, 6),
302 MTK_PIN_INFO(95, 0x010, 6, 1, 6),
303 MTK_PIN_INFO(96, 0x010, 6, 1, 6),
304 MTK_PIN_INFO(97, 0x010, 7, 1, 6),
305 MTK_PIN_INFO(98, 0x010, 7, 1, 6),
306 MTK_PIN_INFO(99, 0x010, 8, 1, 6),
307 MTK_PIN_INFO(100, 0x010, 9, 1, 6),
308 MTK_PIN_INFO(101, 0x010, 10, 1, 6),
309 MTK_PIN_INFO(102, 0x010, 10, 1, 6),
310 MTK_PIN_INFO(103, 0x010, 13, 1, 6),
311 MTK_PIN_INFO(104, 0x010, 13, 1, 6),
312 MTK_PIN_INFO(105, 0x010, 14, 1, 6),
313 MTK_PIN_INFO(106, 0x010, 14, 1, 6),
314 MTK_PIN_INFO(107, 0x010, 0, 1, 7),
315 MTK_PIN_INFO(108, 0x010, 1, 1, 7),
316 MTK_PIN_INFO(109, 0x010, 2, 1, 7),
317 MTK_PIN_INFO(110, 0x010, 0, 1, 7),
318 MTK_PIN_INFO(111, 0x010, 3, 1, 7),
319 MTK_PIN_INFO(112, 0x010, 2, 1, 7),
320 MTK_PIN_INFO(113, 0x010, 4, 1, 7),
321 MTK_PIN_INFO(114, 0x010, 5, 1, 7),
322 MTK_PIN_INFO(115, 0x010, 6, 1, 7),
323 MTK_PIN_INFO(116, 0x010, 7, 1, 7),
324 MTK_PIN_INFO(117, 0x010, 8, 1, 7),
325 MTK_PIN_INFO(118, 0x010, 9, 1, 7),
326 MTK_PIN_INFO(119, 0x010, 10, 1, 7),
327 MTK_PIN_INFO(120, 0x010, 11, 1, 7),
328 MTK_PIN_INFO(121, 0x010, 12, 1, 7),
329 MTK_PIN_INFO(122, 0x010, 0, 1, 8),
330 MTK_PIN_INFO(123, 0x010, 1, 1, 8),
331 MTK_PIN_INFO(124, 0x010, 2, 1, 8),
332 MTK_PIN_INFO(125, 0x010, 1, 1, 8),
333 MTK_PIN_INFO(126, 0x010, 1, 1, 8),
334 MTK_PIN_INFO(127, 0x010, 1, 1, 8),
335 MTK_PIN_INFO(128, 0x010, 1, 1, 8),
336 MTK_PIN_INFO(129, 0x010, 1, 1, 8),
337 MTK_PIN_INFO(130, 0x010, 1, 1, 8),
338 MTK_PIN_INFO(131, 0x010, 3, 1, 8),
339 MTK_PIN_INFO(132, 0x010, 1, 1, 8),
340 MTK_PIN_INFO(133, 0x010, 4, 1, 8),
341 MTK_PIN_INFO(134, 0x010, 0, 1, 1),
342 MTK_PIN_INFO(135, 0x010, 1, 1, 1),
343 MTK_PIN_INFO(136, 0x010, 2, 1, 1),
344 MTK_PIN_INFO(137, 0x010, 2, 1, 1),
345 MTK_PIN_INFO(138, 0x010, 2, 1, 1),
346 MTK_PIN_INFO(139, 0x010, 2, 1, 1),
347 MTK_PIN_INFO(140, 0x010, 2, 1, 1),
348 MTK_PIN_INFO(141, 0x010, 2, 1, 1),
349 MTK_PIN_INFO(142, 0x010, 2, 1, 1),
350 MTK_PIN_INFO(143, 0x010, 2, 1, 1),
351 MTK_PIN_INFO(144, 0x010, 4, 1, 1),
352 MTK_PIN_INFO(145, 0x010, 4, 1, 1),
353 MTK_PIN_INFO(146, 0x010, 4, 1, 1),
354 MTK_PIN_INFO(147, 0x010, 4, 1, 1),
355 MTK_PIN_INFO(148, 0x010, 5, 1, 1),
356 MTK_PIN_INFO(149, 0x010, 6, 1, 1),
357 MTK_PIN_INFO(150, 0x010, 8, 1, 1),
358 MTK_PIN_INFO(151, 0x010, 8, 1, 1),
359 MTK_PIN_INFO(152, 0x010, 8, 1, 1),
360 MTK_PIN_INFO(153, 0x010, 8, 1, 1),
361 MTK_PIN_INFO(154, 0x010, 9, 1, 1),
362 MTK_PIN_INFO(155, 0x010, 10, 1, 1),
363 MTK_PIN_INFO(156, 0x010, 10, 1, 1),
364 MTK_PIN_INFO(157, 0x010, 10, 1, 1),
365 MTK_PIN_INFO(158, 0x010, 8, 1, 1),
366 MTK_PIN_INFO(159, 0x010, 8, 1, 1),
367 MTK_PIN_INFO(160, 0x010, 8, 1, 1),
368 MTK_PIN_INFO(161, 0x010, 0, 1, 2),
369 MTK_PIN_INFO(162, 0x010, 0, 1, 2),
370 MTK_PIN_INFO(163, 0x010, 0, 1, 2),
371 MTK_PIN_INFO(164, 0x010, 0, 1, 2),
372 MTK_PIN_INFO(165, 0x010, 1, 1, 2),
373 MTK_PIN_INFO(166, 0x010, 1, 1, 2),
374 MTK_PIN_INFO(167, 0x010, 2, 1, 4),
375 MTK_PIN_INFO(168, 0x010, 2, 1, 4),
376 MTK_PIN_INFO(169, 0x010, 3, 1, 4),
377 MTK_PIN_INFO(170, 0x010, 4, 1, 4),
378 MTK_PIN_INFO(171, 0x010, 4, 1, 4),
379 MTK_PIN_INFO(172, 0x010, 4, 1, 4),
380 MTK_PIN_INFO(173, 0x010, 4, 1, 4),
381 MTK_PIN_INFO(174, 0x010, 4, 1, 4),
382 MTK_PIN_INFO(175, 0x010, 3, 1, 4),
383 MTK_PIN_INFO(176, 0x010, 3, 1, 4),
384 MTK_PIN_INFO(177, 0x010, 4, 1, 6),
385 MTK_PIN_INFO(178, 0x010, 4, 1, 6),
386 MTK_PIN_INFO(179, 0x010, 4, 1, 6),
387};
388
389struct mtk_pin_info mt8183_pin_info_pullen[] = {
390 MTK_PIN_INFO(0, 0x060, 6, 1, 6),
391 MTK_PIN_INFO(1, 0x060, 7, 1, 6),
392 MTK_PIN_INFO(2, 0x060, 8, 1, 6),
393 MTK_PIN_INFO(3, 0x060, 9, 1, 6),
394 MTK_PIN_INFO(4, 0x060, 11, 1, 6),
395 MTK_PIN_INFO(5, 0x060, 12, 1, 6),
396 MTK_PIN_INFO(6, 0x060, 13, 1, 6),
397 MTK_PIN_INFO(7, 0x060, 14, 1, 6),
398 MTK_PIN_INFO(8, 0x060, 0, 1, 6),
399 MTK_PIN_INFO(9, 0x060, 26, 1, 6),
400 MTK_PIN_INFO(10, 0x060, 27, 1, 6),
401 MTK_PIN_INFO(11, 0x060, 10, 1, 1),
402 MTK_PIN_INFO(12, 0x060, 17, 1, 1),
403 MTK_PIN_INFO(13, 0x060, 6, 1, 2),
404 MTK_PIN_INFO(14, 0x060, 7, 1, 2),
405 MTK_PIN_INFO(15, 0x060, 8, 1, 2),
406 MTK_PIN_INFO(16, 0x060, 9, 1, 2),
407 MTK_PIN_INFO(17, 0x060, 10, 1, 2),
408 MTK_PIN_INFO(18, 0x060, 11, 1, 2),
409 MTK_PIN_INFO(19, 0x060, 12, 1, 2),
410 MTK_PIN_INFO(20, 0x060, 13, 1, 2),
411 MTK_PIN_INFO(21, 0x060, 14, 1, 2),
412 MTK_PIN_INFO(22, 0x060, 15, 1, 2),
413 MTK_PIN_INFO(23, 0x060, 16, 1, 2),
414 MTK_PIN_INFO(24, 0x060, 17, 1, 2),
415 MTK_PIN_INFO(25, 0x060, 18, 1, 2),
416 MTK_PIN_INFO(26, 0x060, 19, 1, 2),
417 MTK_PIN_INFO(27, 0x060, 20, 1, 2),
418 MTK_PIN_INFO(28, 0x060, 21, 1, 2),
419 MTK_PIN_INFO(43, 0x060, 8, 1, 3),
420 MTK_PIN_INFO(44, 0x060, 9, 1, 3),
421 MTK_PIN_INFO(45, 0x060, 10, 1, 3),
422 MTK_PIN_INFO(46, 0x060, 11, 1, 3),
423 MTK_PIN_INFO(47, 0x060, 12, 1, 3),
424 MTK_PIN_INFO(48, 0x060, 13, 1, 3),
425 MTK_PIN_INFO(49, 0x060, 14, 1, 3),
426 MTK_PIN_INFO(50, 0x060, 0, 1, 4),
427 MTK_PIN_INFO(51, 0x060, 1, 1, 4),
428 MTK_PIN_INFO(52, 0x060, 2, 1, 4),
429 MTK_PIN_INFO(53, 0x060, 3, 1, 4),
430 MTK_PIN_INFO(54, 0x060, 4, 1, 4),
431 MTK_PIN_INFO(55, 0x060, 5, 1, 4),
432 MTK_PIN_INFO(56, 0x060, 6, 1, 4),
433 MTK_PIN_INFO(57, 0x060, 7, 1, 4),
434 MTK_PIN_INFO(58, 0x060, 8, 1, 4),
435 MTK_PIN_INFO(59, 0x060, 9, 1, 4),
436 MTK_PIN_INFO(60, 0x060, 10, 1, 4),
437 MTK_PIN_INFO(61, 0x060, 0, 1, 5),
438 MTK_PIN_INFO(62, 0x060, 1, 1, 5),
439 MTK_PIN_INFO(63, 0x060, 2, 1, 5),
440 MTK_PIN_INFO(64, 0x060, 3, 1, 5),
441 MTK_PIN_INFO(65, 0x060, 4, 1, 5),
442 MTK_PIN_INFO(66, 0x060, 5, 1, 5),
443 MTK_PIN_INFO(67, 0x060, 6, 1, 5),
444 MTK_PIN_INFO(68, 0x060, 7, 1, 5),
445 MTK_PIN_INFO(69, 0x060, 8, 1, 5),
446 MTK_PIN_INFO(70, 0x060, 9, 1, 5),
447 MTK_PIN_INFO(71, 0x060, 10, 1, 5),
448 MTK_PIN_INFO(72, 0x060, 11, 1, 5),
449 MTK_PIN_INFO(73, 0x060, 12, 1, 5),
450 MTK_PIN_INFO(74, 0x060, 13, 1, 5),
451 MTK_PIN_INFO(75, 0x060, 14, 1, 5),
452 MTK_PIN_INFO(76, 0x060, 15, 1, 5),
453 MTK_PIN_INFO(77, 0x060, 16, 1, 5),
454 MTK_PIN_INFO(78, 0x060, 17, 1, 5),
455 MTK_PIN_INFO(79, 0x060, 18, 1, 5),
456 MTK_PIN_INFO(80, 0x060, 19, 1, 5),
457 MTK_PIN_INFO(81, 0x060, 20, 1, 5),
458 MTK_PIN_INFO(82, 0x060, 21, 1, 5),
459 MTK_PIN_INFO(83, 0x060, 22, 1, 5),
460 MTK_PIN_INFO(84, 0x060, 23, 1, 5),
461 MTK_PIN_INFO(85, 0x060, 24, 1, 5),
462 MTK_PIN_INFO(86, 0x060, 25, 1, 5),
463 MTK_PIN_INFO(87, 0x060, 26, 1, 5),
464 MTK_PIN_INFO(88, 0x060, 27, 1, 5),
465 MTK_PIN_INFO(89, 0x060, 24, 1, 6),
466 MTK_PIN_INFO(90, 0x060, 1, 1, 6),
467 MTK_PIN_INFO(95, 0x060, 15, 1, 6),
468 MTK_PIN_INFO(96, 0x060, 17, 1, 6),
469 MTK_PIN_INFO(97, 0x060, 18, 1, 6),
470 MTK_PIN_INFO(98, 0x060, 19, 1, 6),
471 MTK_PIN_INFO(99, 0x060, 20, 1, 6),
472 MTK_PIN_INFO(100, 0x060, 21, 1, 6),
473 MTK_PIN_INFO(101, 0x060, 22, 1, 6),
474 MTK_PIN_INFO(102, 0x060, 23, 1, 6),
475 MTK_PIN_INFO(103, 0x060, 28, 1, 6),
476 MTK_PIN_INFO(104, 0x060, 29, 1, 6),
477 MTK_PIN_INFO(105, 0x060, 30, 1, 6),
478 MTK_PIN_INFO(106, 0x060, 31, 1, 6),
479 MTK_PIN_INFO(107, 0x060, 0, 1, 7),
480 MTK_PIN_INFO(108, 0x060, 1, 1, 7),
481 MTK_PIN_INFO(109, 0x060, 2, 1, 7),
482 MTK_PIN_INFO(110, 0x060, 3, 1, 7),
483 MTK_PIN_INFO(111, 0x060, 4, 1, 7),
484 MTK_PIN_INFO(112, 0x060, 5, 1, 7),
485 MTK_PIN_INFO(113, 0x060, 6, 1, 7),
486 MTK_PIN_INFO(114, 0x060, 7, 1, 7),
487 MTK_PIN_INFO(115, 0x060, 8, 1, 7),
488 MTK_PIN_INFO(116, 0x060, 9, 1, 7),
489 MTK_PIN_INFO(117, 0x060, 10, 1, 7),
490 MTK_PIN_INFO(118, 0x060, 11, 1, 7),
491 MTK_PIN_INFO(119, 0x060, 12, 1, 7),
492 MTK_PIN_INFO(120, 0x060, 13, 1, 7),
493 MTK_PIN_INFO(121, 0x060, 14, 1, 7),
494 MTK_PIN_INFO(134, 0x060, 0, 1, 1),
495 MTK_PIN_INFO(135, 0x060, 1, 1, 1),
496 MTK_PIN_INFO(136, 0x060, 2, 1, 1),
497 MTK_PIN_INFO(137, 0x060, 3, 1, 1),
498 MTK_PIN_INFO(138, 0x060, 4, 1, 1),
499 MTK_PIN_INFO(139, 0x060, 5, 1, 1),
500 MTK_PIN_INFO(140, 0x060, 6, 1, 1),
501 MTK_PIN_INFO(141, 0x060, 7, 1, 1),
502 MTK_PIN_INFO(142, 0x060, 8, 1, 1),
503 MTK_PIN_INFO(143, 0x060, 9, 1, 1),
504 MTK_PIN_INFO(144, 0x060, 11, 1, 1),
505 MTK_PIN_INFO(145, 0x060, 12, 1, 1),
506 MTK_PIN_INFO(146, 0x060, 13, 1, 1),
507 MTK_PIN_INFO(147, 0x060, 14, 1, 1),
508 MTK_PIN_INFO(148, 0x060, 15, 1, 1),
509 MTK_PIN_INFO(149, 0x060, 16, 1, 1),
510 MTK_PIN_INFO(150, 0x060, 18, 1, 1),
511 MTK_PIN_INFO(151, 0x060, 19, 1, 1),
512 MTK_PIN_INFO(152, 0x060, 20, 1, 1),
513 MTK_PIN_INFO(153, 0x060, 21, 1, 1),
514 MTK_PIN_INFO(154, 0x060, 22, 1, 1),
515 MTK_PIN_INFO(155, 0x060, 23, 1, 1),
516 MTK_PIN_INFO(156, 0x060, 24, 1, 1),
517 MTK_PIN_INFO(157, 0x060, 25, 1, 1),
518 MTK_PIN_INFO(158, 0x060, 26, 1, 1),
519 MTK_PIN_INFO(159, 0x060, 27, 1, 1),
520 MTK_PIN_INFO(160, 0x060, 28, 1, 1),
521 MTK_PIN_INFO(161, 0x060, 0, 1, 2),
522 MTK_PIN_INFO(162, 0x060, 1, 1, 2),
523 MTK_PIN_INFO(163, 0x060, 2, 1, 2),
524 MTK_PIN_INFO(164, 0x060, 3, 1, 2),
525 MTK_PIN_INFO(165, 0x060, 4, 1, 2),
526 MTK_PIN_INFO(166, 0x060, 5, 1, 2),
527 MTK_PIN_INFO(167, 0x060, 11, 1, 4),
528 MTK_PIN_INFO(168, 0x060, 12, 1, 4),
529 MTK_PIN_INFO(169, 0x060, 13, 1, 4),
530 MTK_PIN_INFO(170, 0x060, 14, 1, 4),
531 MTK_PIN_INFO(171, 0x060, 15, 1, 4),
532 MTK_PIN_INFO(172, 0x060, 16, 1, 4),
533 MTK_PIN_INFO(173, 0x060, 17, 1, 4),
534 MTK_PIN_INFO(174, 0x060, 18, 1, 4),
535 MTK_PIN_INFO(175, 0x060, 19, 1, 4),
536 MTK_PIN_INFO(176, 0x060, 20, 1, 4),
537 MTK_PIN_INFO(177, 0x060, 10, 1, 6),
538 MTK_PIN_INFO(178, 0x060, 16, 1, 6),
539 MTK_PIN_INFO(179, 0x060, 25, 1, 6),
540};
541
542struct mtk_pin_info mt8183_pin_info_pullsel[] = {
543 MTK_PIN_INFO(0, 0x080, 6, 1, 6),
544 MTK_PIN_INFO(1, 0x080, 7, 1, 6),
545 MTK_PIN_INFO(2, 0x080, 8, 1, 6),
546 MTK_PIN_INFO(3, 0x080, 9, 1, 6),
547 MTK_PIN_INFO(4, 0x080, 11, 1, 6),
548 MTK_PIN_INFO(5, 0x080, 12, 1, 6),
549 MTK_PIN_INFO(6, 0x080, 13, 1, 6),
550 MTK_PIN_INFO(7, 0x080, 14, 1, 6),
551 MTK_PIN_INFO(8, 0x080, 0, 1, 6),
552 MTK_PIN_INFO(9, 0x080, 26, 1, 6),
553 MTK_PIN_INFO(10, 0x080, 27, 1, 6),
554 MTK_PIN_INFO(11, 0x080, 10, 1, 1),
555 MTK_PIN_INFO(12, 0x080, 17, 1, 1),
556 MTK_PIN_INFO(13, 0x080, 6, 1, 2),
557 MTK_PIN_INFO(14, 0x080, 7, 1, 2),
558 MTK_PIN_INFO(15, 0x080, 8, 1, 2),
559 MTK_PIN_INFO(16, 0x080, 9, 1, 2),
560 MTK_PIN_INFO(17, 0x080, 10, 1, 2),
561 MTK_PIN_INFO(18, 0x080, 11, 1, 2),
562 MTK_PIN_INFO(19, 0x080, 12, 1, 2),
563 MTK_PIN_INFO(20, 0x080, 13, 1, 2),
564 MTK_PIN_INFO(21, 0x080, 14, 1, 2),
565 MTK_PIN_INFO(22, 0x080, 15, 1, 2),
566 MTK_PIN_INFO(23, 0x080, 16, 1, 2),
567 MTK_PIN_INFO(24, 0x080, 17, 1, 2),
568 MTK_PIN_INFO(25, 0x080, 18, 1, 2),
569 MTK_PIN_INFO(26, 0x080, 19, 1, 2),
570 MTK_PIN_INFO(27, 0x080, 20, 1, 2),
571 MTK_PIN_INFO(28, 0x080, 21, 1, 2),
572 MTK_PIN_INFO(43, 0x080, 8, 1, 3),
573 MTK_PIN_INFO(44, 0x080, 9, 1, 3),
574 MTK_PIN_INFO(45, 0x080, 10, 1, 3),
575 MTK_PIN_INFO(46, 0x080, 11, 1, 3),
576 MTK_PIN_INFO(47, 0x080, 12, 1, 3),
577 MTK_PIN_INFO(48, 0x080, 13, 1, 3),
578 MTK_PIN_INFO(49, 0x080, 14, 1, 3),
579 MTK_PIN_INFO(50, 0x080, 0, 1, 4),
580 MTK_PIN_INFO(51, 0x080, 1, 1, 4),
581 MTK_PIN_INFO(52, 0x080, 2, 1, 4),
582 MTK_PIN_INFO(53, 0x080, 3, 1, 4),
583 MTK_PIN_INFO(54, 0x080, 4, 1, 4),
584 MTK_PIN_INFO(55, 0x080, 5, 1, 4),
585 MTK_PIN_INFO(56, 0x080, 6, 1, 4),
586 MTK_PIN_INFO(57, 0x080, 7, 1, 4),
587 MTK_PIN_INFO(58, 0x080, 8, 1, 4),
588 MTK_PIN_INFO(59, 0x080, 9, 1, 4),
589 MTK_PIN_INFO(60, 0x080, 10, 1, 4),
590 MTK_PIN_INFO(61, 0x080, 0, 1, 5),
591 MTK_PIN_INFO(62, 0x080, 1, 1, 5),
592 MTK_PIN_INFO(63, 0x080, 2, 1, 5),
593 MTK_PIN_INFO(64, 0x080, 3, 1, 5),
594 MTK_PIN_INFO(65, 0x080, 4, 1, 5),
595 MTK_PIN_INFO(66, 0x080, 5, 1, 5),
596 MTK_PIN_INFO(67, 0x080, 6, 1, 5),
597 MTK_PIN_INFO(68, 0x080, 7, 1, 5),
598 MTK_PIN_INFO(69, 0x080, 8, 1, 5),
599 MTK_PIN_INFO(70, 0x080, 9, 1, 5),
600 MTK_PIN_INFO(71, 0x080, 10, 1, 5),
601 MTK_PIN_INFO(72, 0x080, 11, 1, 5),
602 MTK_PIN_INFO(73, 0x080, 12, 1, 5),
603 MTK_PIN_INFO(74, 0x080, 13, 1, 5),
604 MTK_PIN_INFO(75, 0x080, 14, 1, 5),
605 MTK_PIN_INFO(76, 0x080, 15, 1, 5),
606 MTK_PIN_INFO(77, 0x080, 16, 1, 5),
607 MTK_PIN_INFO(78, 0x080, 17, 1, 5),
608 MTK_PIN_INFO(79, 0x080, 18, 1, 5),
609 MTK_PIN_INFO(80, 0x080, 19, 1, 5),
610 MTK_PIN_INFO(81, 0x080, 20, 1, 5),
611 MTK_PIN_INFO(82, 0x080, 21, 1, 5),
612 MTK_PIN_INFO(83, 0x080, 22, 1, 5),
613 MTK_PIN_INFO(84, 0x080, 23, 1, 5),
614 MTK_PIN_INFO(85, 0x080, 24, 1, 5),
615 MTK_PIN_INFO(86, 0x080, 25, 1, 5),
616 MTK_PIN_INFO(87, 0x080, 26, 1, 5),
617 MTK_PIN_INFO(88, 0x080, 27, 1, 5),
618 MTK_PIN_INFO(89, 0x080, 24, 1, 6),
619 MTK_PIN_INFO(90, 0x080, 1, 1, 6),
620 MTK_PIN_INFO(95, 0x080, 15, 1, 6),
621 MTK_PIN_INFO(96, 0x080, 17, 1, 6),
622 MTK_PIN_INFO(97, 0x080, 18, 1, 6),
623 MTK_PIN_INFO(98, 0x080, 19, 1, 6),
624 MTK_PIN_INFO(99, 0x080, 20, 1, 6),
625 MTK_PIN_INFO(100, 0x080, 21, 1, 6),
626 MTK_PIN_INFO(101, 0x080, 22, 1, 6),
627 MTK_PIN_INFO(102, 0x080, 23, 1, 6),
628 MTK_PIN_INFO(103, 0x080, 28, 1, 6),
629 MTK_PIN_INFO(104, 0x080, 29, 1, 6),
630 MTK_PIN_INFO(105, 0x080, 30, 1, 6),
631 MTK_PIN_INFO(106, 0x080, 31, 1, 6),
632 MTK_PIN_INFO(107, 0x080, 0, 1, 7),
633 MTK_PIN_INFO(108, 0x080, 1, 1, 7),
634 MTK_PIN_INFO(109, 0x080, 2, 1, 7),
635 MTK_PIN_INFO(110, 0x080, 3, 1, 7),
636 MTK_PIN_INFO(111, 0x080, 4, 1, 7),
637 MTK_PIN_INFO(112, 0x080, 5, 1, 7),
638 MTK_PIN_INFO(113, 0x080, 6, 1, 7),
639 MTK_PIN_INFO(114, 0x080, 7, 1, 7),
640 MTK_PIN_INFO(115, 0x080, 8, 1, 7),
641 MTK_PIN_INFO(116, 0x080, 9, 1, 7),
642 MTK_PIN_INFO(117, 0x080, 10, 1, 7),
643 MTK_PIN_INFO(118, 0x080, 11, 1, 7),
644 MTK_PIN_INFO(119, 0x080, 12, 1, 7),
645 MTK_PIN_INFO(120, 0x080, 13, 1, 7),
646 MTK_PIN_INFO(121, 0x080, 14, 1, 7),
647 MTK_PIN_INFO(134, 0x080, 0, 1, 1),
648 MTK_PIN_INFO(135, 0x080, 1, 1, 1),
649 MTK_PIN_INFO(136, 0x080, 2, 1, 1),
650 MTK_PIN_INFO(137, 0x080, 3, 1, 1),
651 MTK_PIN_INFO(138, 0x080, 4, 1, 1),
652 MTK_PIN_INFO(139, 0x080, 5, 1, 1),
653 MTK_PIN_INFO(140, 0x080, 6, 1, 1),
654 MTK_PIN_INFO(141, 0x080, 7, 1, 1),
655 MTK_PIN_INFO(142, 0x080, 8, 1, 1),
656 MTK_PIN_INFO(143, 0x080, 9, 1, 1),
657 MTK_PIN_INFO(144, 0x080, 11, 1, 1),
658 MTK_PIN_INFO(145, 0x080, 12, 1, 1),
659 MTK_PIN_INFO(146, 0x080, 13, 1, 1),
660 MTK_PIN_INFO(147, 0x080, 14, 1, 1),
661 MTK_PIN_INFO(148, 0x080, 15, 1, 1),
662 MTK_PIN_INFO(149, 0x080, 16, 1, 1),
663 MTK_PIN_INFO(150, 0x080, 18, 1, 1),
664 MTK_PIN_INFO(151, 0x080, 19, 1, 1),
665 MTK_PIN_INFO(152, 0x080, 20, 1, 1),
666 MTK_PIN_INFO(153, 0x080, 21, 1, 1),
667 MTK_PIN_INFO(154, 0x080, 22, 1, 1),
668 MTK_PIN_INFO(155, 0x080, 23, 1, 1),
669 MTK_PIN_INFO(156, 0x080, 24, 1, 1),
670 MTK_PIN_INFO(157, 0x080, 25, 1, 1),
671 MTK_PIN_INFO(158, 0x080, 26, 1, 1),
672 MTK_PIN_INFO(159, 0x080, 27, 1, 1),
673 MTK_PIN_INFO(160, 0x080, 28, 1, 1),
674 MTK_PIN_INFO(161, 0x080, 0, 1, 2),
675 MTK_PIN_INFO(162, 0x080, 1, 1, 2),
676 MTK_PIN_INFO(163, 0x080, 2, 1, 2),
677 MTK_PIN_INFO(164, 0x080, 3, 1, 2),
678 MTK_PIN_INFO(165, 0x080, 4, 1, 2),
679 MTK_PIN_INFO(166, 0x080, 5, 1, 2),
680 MTK_PIN_INFO(167, 0x080, 11, 1, 4),
681 MTK_PIN_INFO(168, 0x080, 12, 1, 4),
682 MTK_PIN_INFO(169, 0x080, 13, 1, 4),
683 MTK_PIN_INFO(170, 0x080, 14, 1, 4),
684 MTK_PIN_INFO(171, 0x080, 15, 1, 4),
685 MTK_PIN_INFO(172, 0x080, 16, 1, 4),
686 MTK_PIN_INFO(173, 0x080, 17, 1, 4),
687 MTK_PIN_INFO(174, 0x080, 18, 1, 4),
688 MTK_PIN_INFO(175, 0x080, 19, 1, 4),
689 MTK_PIN_INFO(176, 0x080, 20, 1, 4),
690 MTK_PIN_INFO(177, 0x080, 10, 1, 6),
691 MTK_PIN_INFO(178, 0x080, 16, 1, 6),
692 MTK_PIN_INFO(179, 0x080, 25, 1, 6),
693};
694
695struct mtk_pin_info mt8183_pin_info_pupd_r1r0[] = {
696 MTK_PIN_INFO(29, 0x0C0, 0, 3, 2),
697 MTK_PIN_INFO(30, 0x0C0, 4, 3, 2),
698 MTK_PIN_INFO(31, 0x0C0, 8, 3, 2),
699 MTK_PIN_INFO(32, 0x0C0, 12, 3, 2),
700 MTK_PIN_INFO(33, 0x0C0, 16, 3, 2),
701 MTK_PIN_INFO(34, 0x0C0, 20, 3, 2),
702 MTK_PIN_INFO(35, 0x0C0, 0, 3, 3),
703 MTK_PIN_INFO(36, 0x0C0, 4, 3, 3),
704 MTK_PIN_INFO(37, 0x0C0, 8, 3, 3),
705 MTK_PIN_INFO(38, 0x0C0, 12, 3, 3),
706 MTK_PIN_INFO(39, 0x0C0, 16, 3, 3),
707 MTK_PIN_INFO(40, 0x0C0, 20, 3, 3),
708 MTK_PIN_INFO(41, 0x0C0, 24, 3, 3),
709 MTK_PIN_INFO(42, 0x0C0, 28, 3, 3),
710 MTK_PIN_INFO(91, 0x0C0, 0, 3, 6),
711 MTK_PIN_INFO(92, 0x0C0, 4, 3, 6),
712 MTK_PIN_INFO(93, 0x0C0, 8, 3, 6),
713 MTK_PIN_INFO(94, 0x0C0, 12, 3, 6),
714 MTK_PIN_INFO(122, 0x0C0, 0, 3, 8),
715 MTK_PIN_INFO(123, 0x0C0, 4, 3, 8),
716 MTK_PIN_INFO(124, 0x0C0, 8, 3, 8),
717 MTK_PIN_INFO(125, 0x0C0, 12, 3, 8),
718 MTK_PIN_INFO(126, 0x0C0, 16, 3, 8),
719 MTK_PIN_INFO(127, 0x0C0, 20, 3, 8),
720 MTK_PIN_INFO(128, 0x0C0, 24, 3, 8),
721 MTK_PIN_INFO(129, 0x0C0, 28, 3, 8),
722 MTK_PIN_INFO(130, 0x0D0, 0, 3, 8),
723 MTK_PIN_INFO(131, 0x0D0, 4, 3, 8),
724 MTK_PIN_INFO(132, 0x0D0, 8, 3, 8),
725 MTK_PIN_INFO(133, 0x0D0, 12, 3, 8),
726};
727
728struct mtk_pin_info mt8183_pin_info_mode[] = {
729 MTK_PIN_INFO(0, 0x300, 0, 3, 0),
730 MTK_PIN_INFO(1, 0x300, 4, 3, 0),
731 MTK_PIN_INFO(2, 0x300, 8, 3, 0),
732 MTK_PIN_INFO(3, 0x300, 12, 3, 0),
733 MTK_PIN_INFO(4, 0x300, 16, 3, 0),
734 MTK_PIN_INFO(5, 0x300, 20, 3, 0),
735 MTK_PIN_INFO(6, 0x300, 24, 3, 0),
736 MTK_PIN_INFO(7, 0x300, 28, 3, 0),
737 MTK_PIN_INFO(8, 0x310, 0, 3, 0),
738 MTK_PIN_INFO(9, 0x310, 4, 3, 0),
739 MTK_PIN_INFO(10, 0x310, 8, 3, 0),
740 MTK_PIN_INFO(11, 0x310, 12, 3, 0),
741 MTK_PIN_INFO(12, 0x310, 16, 3, 0),
742 MTK_PIN_INFO(13, 0x310, 20, 3, 0),
743 MTK_PIN_INFO(14, 0x310, 24, 3, 0),
744 MTK_PIN_INFO(15, 0x310, 28, 3, 0),
745 MTK_PIN_INFO(16, 0x320, 0, 3, 0),
746 MTK_PIN_INFO(17, 0x320, 4, 3, 0),
747 MTK_PIN_INFO(18, 0x320, 8, 3, 0),
748 MTK_PIN_INFO(19, 0x320, 12, 3, 0),
749 MTK_PIN_INFO(20, 0x320, 16, 3, 0),
750 MTK_PIN_INFO(21, 0x320, 20, 3, 0),
751 MTK_PIN_INFO(22, 0x320, 24, 3, 0),
752 MTK_PIN_INFO(23, 0x320, 28, 3, 0),
753 MTK_PIN_INFO(24, 0x330, 0, 3, 0),
754 MTK_PIN_INFO(25, 0x330, 4, 3, 0),
755 MTK_PIN_INFO(26, 0x330, 8, 3, 0),
756 MTK_PIN_INFO(27, 0x330, 12, 3, 0),
757 MTK_PIN_INFO(28, 0x330, 16, 3, 0),
758 MTK_PIN_INFO(29, 0x330, 20, 3, 0),
759 MTK_PIN_INFO(30, 0x330, 24, 3, 0),
760 MTK_PIN_INFO(31, 0x330, 28, 3, 0),
761 MTK_PIN_INFO(32, 0x340, 0, 3, 0),
762 MTK_PIN_INFO(33, 0x340, 4, 3, 0),
763 MTK_PIN_INFO(34, 0x340, 8, 3, 0),
764 MTK_PIN_INFO(35, 0x340, 12, 3, 0),
765 MTK_PIN_INFO(36, 0x340, 16, 3, 0),
766 MTK_PIN_INFO(37, 0x340, 20, 3, 0),
767 MTK_PIN_INFO(38, 0x340, 24, 3, 0),
768 MTK_PIN_INFO(39, 0x340, 28, 3, 0),
769 MTK_PIN_INFO(40, 0x350, 0, 3, 0),
770 MTK_PIN_INFO(41, 0x350, 4, 3, 0),
771 MTK_PIN_INFO(42, 0x350, 8, 3, 0),
772 MTK_PIN_INFO(43, 0x350, 12, 3, 0),
773 MTK_PIN_INFO(44, 0x350, 16, 3, 0),
774 MTK_PIN_INFO(45, 0x350, 20, 3, 0),
775 MTK_PIN_INFO(46, 0x350, 24, 3, 0),
776 MTK_PIN_INFO(47, 0x350, 28, 3, 0),
777 MTK_PIN_INFO(48, 0x360, 0, 3, 0),
778 MTK_PIN_INFO(49, 0x360, 4, 3, 0),
779 MTK_PIN_INFO(50, 0x360, 8, 3, 0),
780 MTK_PIN_INFO(51, 0x360, 12, 3, 0),
781 MTK_PIN_INFO(52, 0x360, 16, 3, 0),
782 MTK_PIN_INFO(53, 0x360, 20, 3, 0),
783 MTK_PIN_INFO(54, 0x360, 24, 3, 0),
784 MTK_PIN_INFO(55, 0x360, 28, 3, 0),
785 MTK_PIN_INFO(56, 0x370, 0, 3, 0),
786 MTK_PIN_INFO(57, 0x370, 4, 3, 0),
787 MTK_PIN_INFO(58, 0x370, 8, 3, 0),
788 MTK_PIN_INFO(59, 0x370, 12, 3, 0),
789 MTK_PIN_INFO(60, 0x370, 16, 3, 0),
790 MTK_PIN_INFO(61, 0x370, 20, 3, 0),
791 MTK_PIN_INFO(62, 0x370, 24, 3, 0),
792 MTK_PIN_INFO(63, 0x370, 28, 3, 0),
793 MTK_PIN_INFO(64, 0x380, 0, 3, 0),
794 MTK_PIN_INFO(65, 0x380, 4, 3, 0),
795 MTK_PIN_INFO(66, 0x380, 8, 3, 0),
796 MTK_PIN_INFO(67, 0x380, 12, 3, 0),
797 MTK_PIN_INFO(68, 0x380, 16, 3, 0),
798 MTK_PIN_INFO(69, 0x380, 20, 3, 0),
799 MTK_PIN_INFO(70, 0x380, 24, 3, 0),
800 MTK_PIN_INFO(71, 0x380, 28, 3, 0),
801 MTK_PIN_INFO(72, 0x390, 0, 3, 0),
802 MTK_PIN_INFO(73, 0x390, 4, 3, 0),
803 MTK_PIN_INFO(74, 0x390, 8, 3, 0),
804 MTK_PIN_INFO(75, 0x390, 12, 3, 0),
805 MTK_PIN_INFO(76, 0x390, 16, 3, 0),
806 MTK_PIN_INFO(77, 0x390, 20, 3, 0),
807 MTK_PIN_INFO(78, 0x390, 24, 3, 0),
808 MTK_PIN_INFO(79, 0x390, 28, 3, 0),
809 MTK_PIN_INFO(80, 0x3A0, 0, 3, 0),
810 MTK_PIN_INFO(81, 0x3A0, 4, 3, 0),
811 MTK_PIN_INFO(82, 0x3A0, 8, 3, 0),
812 MTK_PIN_INFO(83, 0x3A0, 12, 3, 0),
813 MTK_PIN_INFO(84, 0x3A0, 16, 3, 0),
814 MTK_PIN_INFO(85, 0x3A0, 20, 3, 0),
815 MTK_PIN_INFO(86, 0x3A0, 24, 3, 0),
816 MTK_PIN_INFO(87, 0x3A0, 28, 3, 0),
817 MTK_PIN_INFO(88, 0x3B0, 0, 3, 0),
818 MTK_PIN_INFO(89, 0x3B0, 4, 3, 0),
819 MTK_PIN_INFO(90, 0x3B0, 8, 3, 0),
820 MTK_PIN_INFO(91, 0x3B0, 12, 3, 0),
821 MTK_PIN_INFO(92, 0x3B0, 16, 3, 0),
822 MTK_PIN_INFO(93, 0x3B0, 20, 3, 0),
823 MTK_PIN_INFO(94, 0x3B0, 24, 3, 0),
824 MTK_PIN_INFO(95, 0x3B0, 28, 3, 0),
825 MTK_PIN_INFO(96, 0x3C0, 0, 3, 0),
826 MTK_PIN_INFO(97, 0x3C0, 4, 3, 0),
827 MTK_PIN_INFO(98, 0x3C0, 8, 3, 0),
828 MTK_PIN_INFO(99, 0x3C0, 12, 3, 0),
829 MTK_PIN_INFO(100, 0x3C0, 16, 3, 0),
830 MTK_PIN_INFO(101, 0x3C0, 20, 3, 0),
831 MTK_PIN_INFO(102, 0x3C0, 24, 3, 0),
832 MTK_PIN_INFO(103, 0x3C0, 28, 3, 0),
833 MTK_PIN_INFO(104, 0x3D0, 0, 3, 0),
834 MTK_PIN_INFO(105, 0x3D0, 4, 3, 0),
835 MTK_PIN_INFO(106, 0x3D0, 8, 3, 0),
836 MTK_PIN_INFO(107, 0x3D0, 12, 3, 0),
837 MTK_PIN_INFO(108, 0x3D0, 16, 3, 0),
838 MTK_PIN_INFO(109, 0x3D0, 20, 3, 0),
839 MTK_PIN_INFO(110, 0x3D0, 24, 3, 0),
840 MTK_PIN_INFO(111, 0x3D0, 28, 3, 0),
841 MTK_PIN_INFO(112, 0x3E0, 0, 3, 0),
842 MTK_PIN_INFO(113, 0x3E0, 4, 3, 0),
843 MTK_PIN_INFO(114, 0x3E0, 8, 3, 0),
844 MTK_PIN_INFO(115, 0x3E0, 12, 3, 0),
845 MTK_PIN_INFO(116, 0x3E0, 16, 3, 0),
846 MTK_PIN_INFO(117, 0x3E0, 20, 3, 0),
847 MTK_PIN_INFO(118, 0x3E0, 24, 3, 0),
848 MTK_PIN_INFO(119, 0x3E0, 28, 3, 0),
849 MTK_PIN_INFO(120, 0x3F0, 0, 3, 0),
850 MTK_PIN_INFO(121, 0x3F0, 4, 3, 0),
851 MTK_PIN_INFO(122, 0x3F0, 8, 3, 0),
852 MTK_PIN_INFO(123, 0x3F0, 12, 3, 0),
853 MTK_PIN_INFO(124, 0x3F0, 16, 3, 0),
854 MTK_PIN_INFO(125, 0x3F0, 20, 3, 0),
855 MTK_PIN_INFO(126, 0x3F0, 24, 3, 0),
856 MTK_PIN_INFO(127, 0x3F0, 28, 3, 0),
857 MTK_PIN_INFO(128, 0x400, 0, 3, 0),
858 MTK_PIN_INFO(129, 0x400, 4, 3, 0),
859 MTK_PIN_INFO(130, 0x400, 8, 3, 0),
860 MTK_PIN_INFO(131, 0x400, 12, 3, 0),
861 MTK_PIN_INFO(132, 0x400, 16, 3, 0),
862 MTK_PIN_INFO(133, 0x400, 20, 3, 0),
863 MTK_PIN_INFO(134, 0x400, 24, 3, 0),
864 MTK_PIN_INFO(135, 0x400, 28, 3, 0),
865 MTK_PIN_INFO(136, 0x410, 0, 3, 0),
866 MTK_PIN_INFO(137, 0x410, 4, 3, 0),
867 MTK_PIN_INFO(138, 0x410, 8, 3, 0),
868 MTK_PIN_INFO(139, 0x410, 12, 3, 0),
869 MTK_PIN_INFO(140, 0x410, 16, 3, 0),
870 MTK_PIN_INFO(141, 0x410, 20, 3, 0),
871 MTK_PIN_INFO(142, 0x410, 24, 3, 0),
872 MTK_PIN_INFO(143, 0x410, 28, 3, 0),
873 MTK_PIN_INFO(144, 0x420, 0, 3, 0),
874 MTK_PIN_INFO(145, 0x420, 4, 3, 0),
875 MTK_PIN_INFO(146, 0x420, 8, 3, 0),
876 MTK_PIN_INFO(147, 0x420, 12, 3, 0),
877 MTK_PIN_INFO(148, 0x420, 16, 3, 0),
878 MTK_PIN_INFO(149, 0x420, 20, 3, 0),
879 MTK_PIN_INFO(150, 0x420, 24, 3, 0),
880 MTK_PIN_INFO(151, 0x420, 28, 3, 0),
881 MTK_PIN_INFO(152, 0x430, 0, 3, 0),
882 MTK_PIN_INFO(153, 0x430, 4, 3, 0),
883 MTK_PIN_INFO(154, 0x430, 8, 3, 0),
884 MTK_PIN_INFO(155, 0x430, 12, 3, 0),
885 MTK_PIN_INFO(156, 0x430, 16, 3, 0),
886 MTK_PIN_INFO(157, 0x430, 20, 3, 0),
887 MTK_PIN_INFO(158, 0x430, 24, 3, 0),
888 MTK_PIN_INFO(159, 0x430, 28, 3, 0),
889 MTK_PIN_INFO(160, 0x440, 0, 3, 0),
890 MTK_PIN_INFO(161, 0x440, 4, 3, 0),
891 MTK_PIN_INFO(162, 0x440, 8, 3, 0),
892 MTK_PIN_INFO(163, 0x440, 12, 3, 0),
893 MTK_PIN_INFO(164, 0x440, 16, 3, 0),
894 MTK_PIN_INFO(165, 0x440, 20, 3, 0),
895 MTK_PIN_INFO(166, 0x440, 24, 3, 0),
896 MTK_PIN_INFO(167, 0x440, 28, 3, 0),
897 MTK_PIN_INFO(168, 0x450, 0, 3, 0),
898 MTK_PIN_INFO(169, 0x450, 4, 3, 0),
899 MTK_PIN_INFO(170, 0x450, 8, 3, 0),
900 MTK_PIN_INFO(171, 0x450, 12, 3, 0),
901 MTK_PIN_INFO(172, 0x450, 16, 3, 0),
902 MTK_PIN_INFO(173, 0x450, 20, 3, 0),
903 MTK_PIN_INFO(174, 0x450, 24, 3, 0),
904 MTK_PIN_INFO(175, 0x450, 28, 3, 0),
905 MTK_PIN_INFO(176, 0x460, 0, 3, 0),
906 MTK_PIN_INFO(177, 0x460, 4, 3, 0),
907 MTK_PIN_INFO(178, 0x460, 8, 3, 0),
908 MTK_PIN_INFO(179, 0x460, 12, 3, 0),
909};
910
911struct mtk_pin_info mt8183_pin_info_dataout[] = {
912 MTK_PIN_INFO(0, 0x100, 0, 1, 0),
913 MTK_PIN_INFO(1, 0x100, 1, 1, 0),
914 MTK_PIN_INFO(2, 0x100, 2, 1, 0),
915 MTK_PIN_INFO(3, 0x100, 3, 1, 0),
916 MTK_PIN_INFO(4, 0x100, 4, 1, 0),
917 MTK_PIN_INFO(5, 0x100, 5, 1, 0),
918 MTK_PIN_INFO(6, 0x100, 6, 1, 0),
919 MTK_PIN_INFO(7, 0x100, 7, 1, 0),
920 MTK_PIN_INFO(8, 0x100, 8, 1, 0),
921 MTK_PIN_INFO(9, 0x100, 9, 1, 0),
922 MTK_PIN_INFO(10, 0x100, 10, 1, 0),
923 MTK_PIN_INFO(11, 0x100, 11, 1, 0),
924 MTK_PIN_INFO(12, 0x100, 12, 1, 0),
925 MTK_PIN_INFO(13, 0x100, 13, 1, 0),
926 MTK_PIN_INFO(14, 0x100, 14, 1, 0),
927 MTK_PIN_INFO(15, 0x100, 15, 1, 0),
928 MTK_PIN_INFO(16, 0x100, 16, 1, 0),
929 MTK_PIN_INFO(17, 0x100, 17, 1, 0),
930 MTK_PIN_INFO(18, 0x100, 18, 1, 0),
931 MTK_PIN_INFO(19, 0x100, 19, 1, 0),
932 MTK_PIN_INFO(20, 0x100, 20, 1, 0),
933 MTK_PIN_INFO(21, 0x100, 21, 1, 0),
934 MTK_PIN_INFO(22, 0x100, 22, 1, 0),
935 MTK_PIN_INFO(23, 0x100, 23, 1, 0),
936 MTK_PIN_INFO(24, 0x100, 24, 1, 0),
937 MTK_PIN_INFO(25, 0x100, 25, 1, 0),
938 MTK_PIN_INFO(26, 0x100, 26, 1, 0),
939 MTK_PIN_INFO(27, 0x100, 27, 1, 0),
940 MTK_PIN_INFO(28, 0x100, 28, 1, 0),
941 MTK_PIN_INFO(29, 0x100, 29, 1, 0),
942 MTK_PIN_INFO(30, 0x100, 30, 1, 0),
943 MTK_PIN_INFO(31, 0x100, 31, 1, 0),
944 MTK_PIN_INFO(32, 0x110, 0, 1, 0),
945 MTK_PIN_INFO(33, 0x110, 1, 1, 0),
946 MTK_PIN_INFO(34, 0x110, 2, 1, 0),
947 MTK_PIN_INFO(35, 0x110, 3, 1, 0),
948 MTK_PIN_INFO(36, 0x110, 4, 1, 0),
949 MTK_PIN_INFO(37, 0x110, 5, 1, 0),
950 MTK_PIN_INFO(38, 0x110, 6, 1, 0),
951 MTK_PIN_INFO(39, 0x110, 7, 1, 0),
952 MTK_PIN_INFO(40, 0x110, 8, 1, 0),
953 MTK_PIN_INFO(41, 0x110, 9, 1, 0),
954 MTK_PIN_INFO(42, 0x110, 10, 1, 0),
955 MTK_PIN_INFO(43, 0x110, 11, 1, 0),
956 MTK_PIN_INFO(44, 0x110, 12, 1, 0),
957 MTK_PIN_INFO(45, 0x110, 13, 1, 0),
958 MTK_PIN_INFO(46, 0x110, 14, 1, 0),
959 MTK_PIN_INFO(47, 0x110, 15, 1, 0),
960 MTK_PIN_INFO(48, 0x110, 16, 1, 0),
961 MTK_PIN_INFO(49, 0x110, 17, 1, 0),
962 MTK_PIN_INFO(50, 0x110, 18, 1, 0),
963 MTK_PIN_INFO(51, 0x110, 19, 1, 0),
964 MTK_PIN_INFO(52, 0x110, 20, 1, 0),
965 MTK_PIN_INFO(53, 0x110, 21, 1, 0),
966 MTK_PIN_INFO(54, 0x110, 22, 1, 0),
967 MTK_PIN_INFO(55, 0x110, 23, 1, 0),
968 MTK_PIN_INFO(56, 0x110, 24, 1, 0),
969 MTK_PIN_INFO(57, 0x110, 25, 1, 0),
970 MTK_PIN_INFO(58, 0x110, 26, 1, 0),
971 MTK_PIN_INFO(59, 0x110, 27, 1, 0),
972 MTK_PIN_INFO(60, 0x110, 28, 1, 0),
973 MTK_PIN_INFO(61, 0x110, 29, 1, 0),
974 MTK_PIN_INFO(62, 0x110, 30, 1, 0),
975 MTK_PIN_INFO(63, 0x110, 31, 1, 0),
976 MTK_PIN_INFO(64, 0x120, 0, 1, 0),
977 MTK_PIN_INFO(65, 0x120, 1, 1, 0),
978 MTK_PIN_INFO(66, 0x120, 2, 1, 0),
979 MTK_PIN_INFO(67, 0x120, 3, 1, 0),
980 MTK_PIN_INFO(68, 0x120, 4, 1, 0),
981 MTK_PIN_INFO(69, 0x120, 5, 1, 0),
982 MTK_PIN_INFO(70, 0x120, 6, 1, 0),
983 MTK_PIN_INFO(71, 0x120, 7, 1, 0),
984 MTK_PIN_INFO(72, 0x120, 8, 1, 0),
985 MTK_PIN_INFO(73, 0x120, 9, 1, 0),
986 MTK_PIN_INFO(74, 0x120, 10, 1, 0),
987 MTK_PIN_INFO(75, 0x120, 11, 1, 0),
988 MTK_PIN_INFO(76, 0x120, 12, 1, 0),
989 MTK_PIN_INFO(77, 0x120, 13, 1, 0),
990 MTK_PIN_INFO(78, 0x120, 14, 1, 0),
991 MTK_PIN_INFO(79, 0x120, 15, 1, 0),
992 MTK_PIN_INFO(80, 0x120, 16, 1, 0),
993 MTK_PIN_INFO(81, 0x120, 17, 1, 0),
994 MTK_PIN_INFO(82, 0x120, 18, 1, 0),
995 MTK_PIN_INFO(83, 0x120, 19, 1, 0),
996 MTK_PIN_INFO(84, 0x120, 20, 1, 0),
997 MTK_PIN_INFO(85, 0x120, 21, 1, 0),
998 MTK_PIN_INFO(86, 0x120, 22, 1, 0),
999 MTK_PIN_INFO(87, 0x120, 23, 1, 0),
1000 MTK_PIN_INFO(88, 0x120, 24, 1, 0),
1001 MTK_PIN_INFO(89, 0x120, 25, 1, 0),
1002 MTK_PIN_INFO(90, 0x120, 26, 1, 0),
1003 MTK_PIN_INFO(91, 0x120, 27, 1, 0),
1004 MTK_PIN_INFO(92, 0x120, 28, 1, 0),
1005 MTK_PIN_INFO(93, 0x120, 29, 1, 0),
1006 MTK_PIN_INFO(94, 0x120, 30, 1, 0),
1007 MTK_PIN_INFO(95, 0x120, 31, 1, 0),
1008 MTK_PIN_INFO(96, 0x130, 0, 1, 0),
1009 MTK_PIN_INFO(97, 0x130, 1, 1, 0),
1010 MTK_PIN_INFO(98, 0x130, 2, 1, 0),
1011 MTK_PIN_INFO(99, 0x130, 3, 1, 0),
1012 MTK_PIN_INFO(100, 0x130, 4, 1, 0),
1013 MTK_PIN_INFO(101, 0x130, 5, 1, 0),
1014 MTK_PIN_INFO(102, 0x130, 6, 1, 0),
1015 MTK_PIN_INFO(103, 0x130, 7, 1, 0),
1016 MTK_PIN_INFO(104, 0x130, 8, 1, 0),
1017 MTK_PIN_INFO(105, 0x130, 9, 1, 0),
1018 MTK_PIN_INFO(106, 0x130, 10, 1, 0),
1019 MTK_PIN_INFO(107, 0x130, 11, 1, 0),
1020 MTK_PIN_INFO(108, 0x130, 12, 1, 0),
1021 MTK_PIN_INFO(109, 0x130, 13, 1, 0),
1022 MTK_PIN_INFO(110, 0x130, 14, 1, 0),
1023 MTK_PIN_INFO(111, 0x130, 15, 1, 0),
1024 MTK_PIN_INFO(112, 0x130, 16, 1, 0),
1025 MTK_PIN_INFO(113, 0x130, 17, 1, 0),
1026 MTK_PIN_INFO(114, 0x130, 18, 1, 0),
1027 MTK_PIN_INFO(115, 0x130, 19, 1, 0),
1028 MTK_PIN_INFO(116, 0x130, 20, 1, 0),
1029 MTK_PIN_INFO(117, 0x130, 21, 1, 0),
1030 MTK_PIN_INFO(118, 0x130, 22, 1, 0),
1031 MTK_PIN_INFO(119, 0x130, 23, 1, 0),
1032 MTK_PIN_INFO(120, 0x130, 24, 1, 0),
1033 MTK_PIN_INFO(121, 0x130, 25, 1, 0),
1034 MTK_PIN_INFO(122, 0x130, 26, 1, 0),
1035 MTK_PIN_INFO(123, 0x130, 27, 1, 0),
1036 MTK_PIN_INFO(124, 0x130, 28, 1, 0),
1037 MTK_PIN_INFO(125, 0x130, 29, 1, 0),
1038 MTK_PIN_INFO(126, 0x130, 30, 1, 0),
1039 MTK_PIN_INFO(127, 0x130, 31, 1, 0),
1040 MTK_PIN_INFO(128, 0x140, 0, 1, 0),
1041 MTK_PIN_INFO(129, 0x140, 1, 1, 0),
1042 MTK_PIN_INFO(130, 0x140, 2, 1, 0),
1043 MTK_PIN_INFO(131, 0x140, 3, 1, 0),
1044 MTK_PIN_INFO(132, 0x140, 4, 1, 0),
1045 MTK_PIN_INFO(133, 0x140, 5, 1, 0),
1046 MTK_PIN_INFO(134, 0x140, 6, 1, 0),
1047 MTK_PIN_INFO(135, 0x140, 7, 1, 0),
1048 MTK_PIN_INFO(136, 0x140, 8, 1, 0),
1049 MTK_PIN_INFO(137, 0x140, 9, 1, 0),
1050 MTK_PIN_INFO(138, 0x140, 10, 1, 0),
1051 MTK_PIN_INFO(139, 0x140, 11, 1, 0),
1052 MTK_PIN_INFO(140, 0x140, 12, 1, 0),
1053 MTK_PIN_INFO(141, 0x140, 13, 1, 0),
1054 MTK_PIN_INFO(142, 0x140, 14, 1, 0),
1055 MTK_PIN_INFO(143, 0x140, 15, 1, 0),
1056 MTK_PIN_INFO(144, 0x140, 16, 1, 0),
1057 MTK_PIN_INFO(145, 0x140, 17, 1, 0),
1058 MTK_PIN_INFO(146, 0x140, 18, 1, 0),
1059 MTK_PIN_INFO(147, 0x140, 19, 1, 0),
1060 MTK_PIN_INFO(148, 0x140, 20, 1, 0),
1061 MTK_PIN_INFO(149, 0x140, 21, 1, 0),
1062 MTK_PIN_INFO(150, 0x140, 22, 1, 0),
1063 MTK_PIN_INFO(151, 0x140, 23, 1, 0),
1064 MTK_PIN_INFO(152, 0x140, 24, 1, 0),
1065 MTK_PIN_INFO(153, 0x140, 25, 1, 0),
1066 MTK_PIN_INFO(154, 0x140, 26, 1, 0),
1067 MTK_PIN_INFO(155, 0x140, 27, 1, 0),
1068 MTK_PIN_INFO(156, 0x140, 28, 1, 0),
1069 MTK_PIN_INFO(157, 0x140, 29, 1, 0),
1070 MTK_PIN_INFO(158, 0x140, 30, 1, 0),
1071 MTK_PIN_INFO(159, 0x140, 31, 1, 0),
1072 MTK_PIN_INFO(160, 0x150, 0, 1, 0),
1073 MTK_PIN_INFO(161, 0x150, 1, 1, 0),
1074 MTK_PIN_INFO(162, 0x150, 2, 1, 0),
1075 MTK_PIN_INFO(163, 0x150, 3, 1, 0),
1076 MTK_PIN_INFO(164, 0x150, 4, 1, 0),
1077 MTK_PIN_INFO(165, 0x150, 5, 1, 0),
1078 MTK_PIN_INFO(166, 0x150, 6, 1, 0),
1079 MTK_PIN_INFO(167, 0x150, 7, 1, 0),
1080 MTK_PIN_INFO(168, 0x150, 8, 1, 0),
1081 MTK_PIN_INFO(169, 0x150, 9, 1, 0),
1082 MTK_PIN_INFO(170, 0x150, 10, 1, 0),
1083 MTK_PIN_INFO(171, 0x150, 11, 1, 0),
1084 MTK_PIN_INFO(172, 0x150, 12, 1, 0),
1085 MTK_PIN_INFO(173, 0x150, 13, 1, 0),
1086 MTK_PIN_INFO(174, 0x150, 14, 1, 0),
1087 MTK_PIN_INFO(175, 0x150, 15, 1, 0),
1088 MTK_PIN_INFO(176, 0x150, 16, 1, 0),
1089 MTK_PIN_INFO(177, 0x150, 17, 1, 0),
1090 MTK_PIN_INFO(178, 0x150, 18, 1, 0),
1091 MTK_PIN_INFO(179, 0x150, 19, 1, 0),
1092};
1093
1094struct mtk_pin_info mt8183_pin_info_datain[] = {
1095 MTK_PIN_INFO(0, 0x200, 0, 1, 0),
1096 MTK_PIN_INFO(1, 0x200, 1, 1, 0),
1097 MTK_PIN_INFO(2, 0x200, 2, 1, 0),
1098 MTK_PIN_INFO(3, 0x200, 3, 1, 0),
1099 MTK_PIN_INFO(4, 0x200, 4, 1, 0),
1100 MTK_PIN_INFO(5, 0x200, 5, 1, 0),
1101 MTK_PIN_INFO(6, 0x200, 6, 1, 0),
1102 MTK_PIN_INFO(7, 0x200, 7, 1, 0),
1103 MTK_PIN_INFO(8, 0x200, 8, 1, 0),
1104 MTK_PIN_INFO(9, 0x200, 9, 1, 0),
1105 MTK_PIN_INFO(10, 0x200, 10, 1, 0),
1106 MTK_PIN_INFO(11, 0x200, 11, 1, 0),
1107 MTK_PIN_INFO(12, 0x200, 12, 1, 0),
1108 MTK_PIN_INFO(13, 0x200, 13, 1, 0),
1109 MTK_PIN_INFO(14, 0x200, 14, 1, 0),
1110 MTK_PIN_INFO(15, 0x200, 15, 1, 0),
1111 MTK_PIN_INFO(16, 0x200, 16, 1, 0),
1112 MTK_PIN_INFO(17, 0x200, 17, 1, 0),
1113 MTK_PIN_INFO(18, 0x200, 18, 1, 0),
1114 MTK_PIN_INFO(19, 0x200, 19, 1, 0),
1115 MTK_PIN_INFO(20, 0x200, 20, 1, 0),
1116 MTK_PIN_INFO(21, 0x200, 21, 1, 0),
1117 MTK_PIN_INFO(22, 0x200, 22, 1, 0),
1118 MTK_PIN_INFO(23, 0x200, 23, 1, 0),
1119 MTK_PIN_INFO(24, 0x200, 24, 1, 0),
1120 MTK_PIN_INFO(25, 0x200, 25, 1, 0),
1121 MTK_PIN_INFO(26, 0x200, 26, 1, 0),
1122 MTK_PIN_INFO(27, 0x200, 27, 1, 0),
1123 MTK_PIN_INFO(28, 0x200, 28, 1, 0),
1124 MTK_PIN_INFO(29, 0x200, 29, 1, 0),
1125 MTK_PIN_INFO(30, 0x200, 30, 1, 0),
1126 MTK_PIN_INFO(31, 0x200, 31, 1, 0),
1127 MTK_PIN_INFO(32, 0x210, 0, 1, 0),
1128 MTK_PIN_INFO(33, 0x210, 1, 1, 0),
1129 MTK_PIN_INFO(34, 0x210, 2, 1, 0),
1130 MTK_PIN_INFO(35, 0x210, 3, 1, 0),
1131 MTK_PIN_INFO(36, 0x210, 4, 1, 0),
1132 MTK_PIN_INFO(37, 0x210, 5, 1, 0),
1133 MTK_PIN_INFO(38, 0x210, 6, 1, 0),
1134 MTK_PIN_INFO(39, 0x210, 7, 1, 0),
1135 MTK_PIN_INFO(40, 0x210, 8, 1, 0),
1136 MTK_PIN_INFO(41, 0x210, 9, 1, 0),
1137 MTK_PIN_INFO(42, 0x210, 10, 1, 0),
1138 MTK_PIN_INFO(43, 0x210, 11, 1, 0),
1139 MTK_PIN_INFO(44, 0x210, 12, 1, 0),
1140 MTK_PIN_INFO(45, 0x210, 13, 1, 0),
1141 MTK_PIN_INFO(46, 0x210, 14, 1, 0),
1142 MTK_PIN_INFO(47, 0x210, 15, 1, 0),
1143 MTK_PIN_INFO(48, 0x210, 16, 1, 0),
1144 MTK_PIN_INFO(49, 0x210, 17, 1, 0),
1145 MTK_PIN_INFO(50, 0x210, 18, 1, 0),
1146 MTK_PIN_INFO(51, 0x210, 19, 1, 0),
1147 MTK_PIN_INFO(52, 0x210, 20, 1, 0),
1148 MTK_PIN_INFO(53, 0x210, 21, 1, 0),
1149 MTK_PIN_INFO(54, 0x210, 22, 1, 0),
1150 MTK_PIN_INFO(55, 0x210, 23, 1, 0),
1151 MTK_PIN_INFO(56, 0x210, 24, 1, 0),
1152 MTK_PIN_INFO(57, 0x210, 25, 1, 0),
1153 MTK_PIN_INFO(58, 0x210, 26, 1, 0),
1154 MTK_PIN_INFO(59, 0x210, 27, 1, 0),
1155 MTK_PIN_INFO(60, 0x210, 28, 1, 0),
1156 MTK_PIN_INFO(61, 0x210, 29, 1, 0),
1157 MTK_PIN_INFO(62, 0x210, 30, 1, 0),
1158 MTK_PIN_INFO(63, 0x210, 31, 1, 0),
1159 MTK_PIN_INFO(64, 0x220, 0, 1, 0),
1160 MTK_PIN_INFO(65, 0x220, 1, 1, 0),
1161 MTK_PIN_INFO(66, 0x220, 2, 1, 0),
1162 MTK_PIN_INFO(67, 0x220, 3, 1, 0),
1163 MTK_PIN_INFO(68, 0x220, 4, 1, 0),
1164 MTK_PIN_INFO(69, 0x220, 5, 1, 0),
1165 MTK_PIN_INFO(70, 0x220, 6, 1, 0),
1166 MTK_PIN_INFO(71, 0x220, 7, 1, 0),
1167 MTK_PIN_INFO(72, 0x220, 8, 1, 0),
1168 MTK_PIN_INFO(73, 0x220, 9, 1, 0),
1169 MTK_PIN_INFO(74, 0x220, 10, 1, 0),
1170 MTK_PIN_INFO(75, 0x220, 11, 1, 0),
1171 MTK_PIN_INFO(76, 0x220, 12, 1, 0),
1172 MTK_PIN_INFO(77, 0x220, 13, 1, 0),
1173 MTK_PIN_INFO(78, 0x220, 14, 1, 0),
1174 MTK_PIN_INFO(79, 0x220, 15, 1, 0),
1175 MTK_PIN_INFO(80, 0x220, 16, 1, 0),
1176 MTK_PIN_INFO(81, 0x220, 17, 1, 0),
1177 MTK_PIN_INFO(82, 0x220, 18, 1, 0),
1178 MTK_PIN_INFO(83, 0x220, 19, 1, 0),
1179 MTK_PIN_INFO(84, 0x220, 20, 1, 0),
1180 MTK_PIN_INFO(85, 0x220, 21, 1, 0),
1181 MTK_PIN_INFO(86, 0x220, 22, 1, 0),
1182 MTK_PIN_INFO(87, 0x220, 23, 1, 0),
1183 MTK_PIN_INFO(88, 0x220, 24, 1, 0),
1184 MTK_PIN_INFO(89, 0x220, 25, 1, 0),
1185 MTK_PIN_INFO(90, 0x220, 26, 1, 0),
1186 MTK_PIN_INFO(91, 0x220, 27, 1, 0),
1187 MTK_PIN_INFO(92, 0x220, 28, 1, 0),
1188 MTK_PIN_INFO(93, 0x220, 29, 1, 0),
1189 MTK_PIN_INFO(94, 0x220, 30, 1, 0),
1190 MTK_PIN_INFO(95, 0x220, 31, 1, 0),
1191 MTK_PIN_INFO(96, 0x230, 0, 1, 0),
1192 MTK_PIN_INFO(97, 0x230, 1, 1, 0),
1193 MTK_PIN_INFO(98, 0x230, 2, 1, 0),
1194 MTK_PIN_INFO(99, 0x230, 3, 1, 0),
1195 MTK_PIN_INFO(100, 0x230, 4, 1, 0),
1196 MTK_PIN_INFO(101, 0x230, 5, 1, 0),
1197 MTK_PIN_INFO(102, 0x230, 6, 1, 0),
1198 MTK_PIN_INFO(103, 0x230, 7, 1, 0),
1199 MTK_PIN_INFO(104, 0x230, 8, 1, 0),
1200 MTK_PIN_INFO(105, 0x230, 9, 1, 0),
1201 MTK_PIN_INFO(106, 0x230, 10, 1, 0),
1202 MTK_PIN_INFO(107, 0x230, 11, 1, 0),
1203 MTK_PIN_INFO(108, 0x230, 12, 1, 0),
1204 MTK_PIN_INFO(109, 0x230, 13, 1, 0),
1205 MTK_PIN_INFO(110, 0x230, 14, 1, 0),
1206 MTK_PIN_INFO(111, 0x230, 15, 1, 0),
1207 MTK_PIN_INFO(112, 0x230, 16, 1, 0),
1208 MTK_PIN_INFO(113, 0x230, 17, 1, 0),
1209 MTK_PIN_INFO(114, 0x230, 18, 1, 0),
1210 MTK_PIN_INFO(115, 0x230, 19, 1, 0),
1211 MTK_PIN_INFO(116, 0x230, 20, 1, 0),
1212 MTK_PIN_INFO(117, 0x230, 21, 1, 0),
1213 MTK_PIN_INFO(118, 0x230, 22, 1, 0),
1214 MTK_PIN_INFO(119, 0x230, 23, 1, 0),
1215 MTK_PIN_INFO(120, 0x230, 24, 1, 0),
1216 MTK_PIN_INFO(121, 0x230, 25, 1, 0),
1217 MTK_PIN_INFO(122, 0x230, 26, 1, 0),
1218 MTK_PIN_INFO(123, 0x230, 27, 1, 0),
1219 MTK_PIN_INFO(124, 0x230, 28, 1, 0),
1220 MTK_PIN_INFO(125, 0x230, 29, 1, 0),
1221 MTK_PIN_INFO(126, 0x230, 30, 1, 0),
1222 MTK_PIN_INFO(127, 0x230, 31, 1, 0),
1223 MTK_PIN_INFO(128, 0x240, 0, 1, 0),
1224 MTK_PIN_INFO(129, 0x240, 1, 1, 0),
1225 MTK_PIN_INFO(130, 0x240, 2, 1, 0),
1226 MTK_PIN_INFO(131, 0x240, 3, 1, 0),
1227 MTK_PIN_INFO(132, 0x240, 4, 1, 0),
1228 MTK_PIN_INFO(133, 0x240, 5, 1, 0),
1229 MTK_PIN_INFO(134, 0x240, 6, 1, 0),
1230 MTK_PIN_INFO(135, 0x240, 7, 1, 0),
1231 MTK_PIN_INFO(136, 0x240, 8, 1, 0),
1232 MTK_PIN_INFO(137, 0x240, 9, 1, 0),
1233 MTK_PIN_INFO(138, 0x240, 10, 1, 0),
1234 MTK_PIN_INFO(139, 0x240, 11, 1, 0),
1235 MTK_PIN_INFO(140, 0x240, 12, 1, 0),
1236 MTK_PIN_INFO(141, 0x240, 13, 1, 0),
1237 MTK_PIN_INFO(142, 0x240, 14, 1, 0),
1238 MTK_PIN_INFO(143, 0x240, 15, 1, 0),
1239 MTK_PIN_INFO(144, 0x240, 16, 1, 0),
1240 MTK_PIN_INFO(145, 0x240, 17, 1, 0),
1241 MTK_PIN_INFO(146, 0x240, 18, 1, 0),
1242 MTK_PIN_INFO(147, 0x240, 19, 1, 0),
1243 MTK_PIN_INFO(148, 0x240, 20, 1, 0),
1244 MTK_PIN_INFO(149, 0x240, 21, 1, 0),
1245 MTK_PIN_INFO(150, 0x240, 22, 1, 0),
1246 MTK_PIN_INFO(151, 0x240, 23, 1, 0),
1247 MTK_PIN_INFO(152, 0x240, 24, 1, 0),
1248 MTK_PIN_INFO(153, 0x240, 25, 1, 0),
1249 MTK_PIN_INFO(154, 0x240, 26, 1, 0),
1250 MTK_PIN_INFO(155, 0x240, 27, 1, 0),
1251 MTK_PIN_INFO(156, 0x240, 28, 1, 0),
1252 MTK_PIN_INFO(157, 0x240, 29, 1, 0),
1253 MTK_PIN_INFO(158, 0x240, 30, 1, 0),
1254 MTK_PIN_INFO(159, 0x240, 31, 1, 0),
1255 MTK_PIN_INFO(160, 0x250, 0, 1, 0),
1256 MTK_PIN_INFO(161, 0x250, 1, 1, 0),
1257 MTK_PIN_INFO(162, 0x250, 2, 1, 0),
1258 MTK_PIN_INFO(163, 0x250, 3, 1, 0),
1259 MTK_PIN_INFO(164, 0x250, 4, 1, 0),
1260 MTK_PIN_INFO(165, 0x250, 5, 1, 0),
1261 MTK_PIN_INFO(166, 0x250, 6, 1, 0),
1262 MTK_PIN_INFO(167, 0x250, 7, 1, 0),
1263 MTK_PIN_INFO(168, 0x250, 8, 1, 0),
1264 MTK_PIN_INFO(169, 0x250, 9, 1, 0),
1265 MTK_PIN_INFO(170, 0x250, 10, 1, 0),
1266 MTK_PIN_INFO(171, 0x250, 11, 1, 0),
1267 MTK_PIN_INFO(172, 0x250, 12, 1, 0),
1268 MTK_PIN_INFO(173, 0x250, 13, 1, 0),
1269 MTK_PIN_INFO(174, 0x250, 14, 1, 0),
1270 MTK_PIN_INFO(175, 0x250, 15, 1, 0),
1271 MTK_PIN_INFO(176, 0x250, 16, 1, 0),
1272 MTK_PIN_INFO(177, 0x250, 17, 1, 0),
1273 MTK_PIN_INFO(178, 0x250, 18, 1, 0),
1274 MTK_PIN_INFO(179, 0x250, 19, 1, 0),
1275};
1276
1277struct mtk_pin_info mt8183_pin_info_dir[] = {
1278 MTK_PIN_INFO(0, 0x000, 0, 1, 0),
1279 MTK_PIN_INFO(1, 0x000, 1, 1, 0),
1280 MTK_PIN_INFO(2, 0x000, 2, 1, 0),
1281 MTK_PIN_INFO(3, 0x000, 3, 1, 0),
1282 MTK_PIN_INFO(4, 0x000, 4, 1, 0),
1283 MTK_PIN_INFO(5, 0x000, 5, 1, 0),
1284 MTK_PIN_INFO(6, 0x000, 6, 1, 0),
1285 MTK_PIN_INFO(7, 0x000, 7, 1, 0),
1286 MTK_PIN_INFO(8, 0x000, 8, 1, 0),
1287 MTK_PIN_INFO(9, 0x000, 9, 1, 0),
1288 MTK_PIN_INFO(10, 0x000, 10, 1, 0),
1289 MTK_PIN_INFO(11, 0x000, 11, 1, 0),
1290 MTK_PIN_INFO(12, 0x000, 12, 1, 0),
1291 MTK_PIN_INFO(13, 0x000, 13, 1, 0),
1292 MTK_PIN_INFO(14, 0x000, 14, 1, 0),
1293 MTK_PIN_INFO(15, 0x000, 15, 1, 0),
1294 MTK_PIN_INFO(16, 0x000, 16, 1, 0),
1295 MTK_PIN_INFO(17, 0x000, 17, 1, 0),
1296 MTK_PIN_INFO(18, 0x000, 18, 1, 0),
1297 MTK_PIN_INFO(19, 0x000, 19, 1, 0),
1298 MTK_PIN_INFO(20, 0x000, 20, 1, 0),
1299 MTK_PIN_INFO(21, 0x000, 21, 1, 0),
1300 MTK_PIN_INFO(22, 0x000, 22, 1, 0),
1301 MTK_PIN_INFO(23, 0x000, 23, 1, 0),
1302 MTK_PIN_INFO(24, 0x000, 24, 1, 0),
1303 MTK_PIN_INFO(25, 0x000, 25, 1, 0),
1304 MTK_PIN_INFO(26, 0x000, 26, 1, 0),
1305 MTK_PIN_INFO(27, 0x000, 27, 1, 0),
1306 MTK_PIN_INFO(28, 0x000, 28, 1, 0),
1307 MTK_PIN_INFO(29, 0x000, 29, 1, 0),
1308 MTK_PIN_INFO(30, 0x000, 30, 1, 0),
1309 MTK_PIN_INFO(31, 0x000, 31, 1, 0),
1310 MTK_PIN_INFO(32, 0x010, 0, 1, 0),
1311 MTK_PIN_INFO(33, 0x010, 1, 1, 0),
1312 MTK_PIN_INFO(34, 0x010, 2, 1, 0),
1313 MTK_PIN_INFO(35, 0x010, 3, 1, 0),
1314 MTK_PIN_INFO(36, 0x010, 4, 1, 0),
1315 MTK_PIN_INFO(37, 0x010, 5, 1, 0),
1316 MTK_PIN_INFO(38, 0x010, 6, 1, 0),
1317 MTK_PIN_INFO(39, 0x010, 7, 1, 0),
1318 MTK_PIN_INFO(40, 0x010, 8, 1, 0),
1319 MTK_PIN_INFO(41, 0x010, 9, 1, 0),
1320 MTK_PIN_INFO(42, 0x010, 10, 1, 0),
1321 MTK_PIN_INFO(43, 0x010, 11, 1, 0),
1322 MTK_PIN_INFO(44, 0x010, 12, 1, 0),
1323 MTK_PIN_INFO(45, 0x010, 13, 1, 0),
1324 MTK_PIN_INFO(46, 0x010, 14, 1, 0),
1325 MTK_PIN_INFO(47, 0x010, 15, 1, 0),
1326 MTK_PIN_INFO(48, 0x010, 16, 1, 0),
1327 MTK_PIN_INFO(49, 0x010, 17, 1, 0),
1328 MTK_PIN_INFO(50, 0x010, 18, 1, 0),
1329 MTK_PIN_INFO(51, 0x010, 19, 1, 0),
1330 MTK_PIN_INFO(52, 0x010, 20, 1, 0),
1331 MTK_PIN_INFO(53, 0x010, 21, 1, 0),
1332 MTK_PIN_INFO(54, 0x010, 22, 1, 0),
1333 MTK_PIN_INFO(55, 0x010, 23, 1, 0),
1334 MTK_PIN_INFO(56, 0x010, 24, 1, 0),
1335 MTK_PIN_INFO(57, 0x010, 25, 1, 0),
1336 MTK_PIN_INFO(58, 0x010, 26, 1, 0),
1337 MTK_PIN_INFO(59, 0x010, 27, 1, 0),
1338 MTK_PIN_INFO(60, 0x010, 28, 1, 0),
1339 MTK_PIN_INFO(61, 0x010, 29, 1, 0),
1340 MTK_PIN_INFO(62, 0x010, 30, 1, 0),
1341 MTK_PIN_INFO(63, 0x010, 31, 1, 0),
1342 MTK_PIN_INFO(64, 0x020, 0, 1, 0),
1343 MTK_PIN_INFO(65, 0x020, 1, 1, 0),
1344 MTK_PIN_INFO(66, 0x020, 2, 1, 0),
1345 MTK_PIN_INFO(67, 0x020, 3, 1, 0),
1346 MTK_PIN_INFO(68, 0x020, 4, 1, 0),
1347 MTK_PIN_INFO(69, 0x020, 5, 1, 0),
1348 MTK_PIN_INFO(70, 0x020, 6, 1, 0),
1349 MTK_PIN_INFO(71, 0x020, 7, 1, 0),
1350 MTK_PIN_INFO(72, 0x020, 8, 1, 0),
1351 MTK_PIN_INFO(73, 0x020, 9, 1, 0),
1352 MTK_PIN_INFO(74, 0x020, 10, 1, 0),
1353 MTK_PIN_INFO(75, 0x020, 11, 1, 0),
1354 MTK_PIN_INFO(76, 0x020, 12, 1, 0),
1355 MTK_PIN_INFO(77, 0x020, 13, 1, 0),
1356 MTK_PIN_INFO(78, 0x020, 14, 1, 0),
1357 MTK_PIN_INFO(79, 0x020, 15, 1, 0),
1358 MTK_PIN_INFO(80, 0x020, 16, 1, 0),
1359 MTK_PIN_INFO(81, 0x020, 17, 1, 0),
1360 MTK_PIN_INFO(82, 0x020, 18, 1, 0),
1361 MTK_PIN_INFO(83, 0x020, 19, 1, 0),
1362 MTK_PIN_INFO(84, 0x020, 20, 1, 0),
1363 MTK_PIN_INFO(85, 0x020, 21, 1, 0),
1364 MTK_PIN_INFO(86, 0x020, 22, 1, 0),
1365 MTK_PIN_INFO(87, 0x020, 23, 1, 0),
1366 MTK_PIN_INFO(88, 0x020, 24, 1, 0),
1367 MTK_PIN_INFO(89, 0x020, 25, 1, 0),
1368 MTK_PIN_INFO(90, 0x020, 26, 1, 0),
1369 MTK_PIN_INFO(91, 0x020, 27, 1, 0),
1370 MTK_PIN_INFO(92, 0x020, 28, 1, 0),
1371 MTK_PIN_INFO(93, 0x020, 29, 1, 0),
1372 MTK_PIN_INFO(94, 0x020, 30, 1, 0),
1373 MTK_PIN_INFO(95, 0x020, 31, 1, 0),
1374 MTK_PIN_INFO(96, 0x030, 0, 1, 0),
1375 MTK_PIN_INFO(97, 0x030, 1, 1, 0),
1376 MTK_PIN_INFO(98, 0x030, 2, 1, 0),
1377 MTK_PIN_INFO(99, 0x030, 3, 1, 0),
1378 MTK_PIN_INFO(100, 0x030, 4, 1, 0),
1379 MTK_PIN_INFO(101, 0x030, 5, 1, 0),
1380 MTK_PIN_INFO(102, 0x030, 6, 1, 0),
1381 MTK_PIN_INFO(103, 0x030, 7, 1, 0),
1382 MTK_PIN_INFO(104, 0x030, 8, 1, 0),
1383 MTK_PIN_INFO(105, 0x030, 9, 1, 0),
1384 MTK_PIN_INFO(106, 0x030, 10, 1, 0),
1385 MTK_PIN_INFO(107, 0x030, 11, 1, 0),
1386 MTK_PIN_INFO(108, 0x030, 12, 1, 0),
1387 MTK_PIN_INFO(109, 0x030, 13, 1, 0),
1388 MTK_PIN_INFO(110, 0x030, 14, 1, 0),
1389 MTK_PIN_INFO(111, 0x030, 15, 1, 0),
1390 MTK_PIN_INFO(112, 0x030, 16, 1, 0),
1391 MTK_PIN_INFO(113, 0x030, 17, 1, 0),
1392 MTK_PIN_INFO(114, 0x030, 18, 1, 0),
1393 MTK_PIN_INFO(115, 0x030, 19, 1, 0),
1394 MTK_PIN_INFO(116, 0x030, 20, 1, 0),
1395 MTK_PIN_INFO(117, 0x030, 21, 1, 0),
1396 MTK_PIN_INFO(118, 0x030, 22, 1, 0),
1397 MTK_PIN_INFO(119, 0x030, 23, 1, 0),
1398 MTK_PIN_INFO(120, 0x030, 24, 1, 0),
1399 MTK_PIN_INFO(121, 0x030, 25, 1, 0),
1400 MTK_PIN_INFO(122, 0x030, 26, 1, 0),
1401 MTK_PIN_INFO(123, 0x030, 27, 1, 0),
1402 MTK_PIN_INFO(124, 0x030, 28, 1, 0),
1403 MTK_PIN_INFO(125, 0x030, 29, 1, 0),
1404 MTK_PIN_INFO(126, 0x030, 30, 1, 0),
1405 MTK_PIN_INFO(127, 0x030, 31, 1, 0),
1406 MTK_PIN_INFO(128, 0x040, 0, 1, 0),
1407 MTK_PIN_INFO(129, 0x040, 1, 1, 0),
1408 MTK_PIN_INFO(130, 0x040, 2, 1, 0),
1409 MTK_PIN_INFO(131, 0x040, 3, 1, 0),
1410 MTK_PIN_INFO(132, 0x040, 4, 1, 0),
1411 MTK_PIN_INFO(133, 0x040, 5, 1, 0),
1412 MTK_PIN_INFO(134, 0x040, 6, 1, 0),
1413 MTK_PIN_INFO(135, 0x040, 7, 1, 0),
1414 MTK_PIN_INFO(136, 0x040, 8, 1, 0),
1415 MTK_PIN_INFO(137, 0x040, 9, 1, 0),
1416 MTK_PIN_INFO(138, 0x040, 10, 1, 0),
1417 MTK_PIN_INFO(139, 0x040, 11, 1, 0),
1418 MTK_PIN_INFO(140, 0x040, 12, 1, 0),
1419 MTK_PIN_INFO(141, 0x040, 13, 1, 0),
1420 MTK_PIN_INFO(142, 0x040, 14, 1, 0),
1421 MTK_PIN_INFO(143, 0x040, 15, 1, 0),
1422 MTK_PIN_INFO(144, 0x040, 16, 1, 0),
1423 MTK_PIN_INFO(145, 0x040, 17, 1, 0),
1424 MTK_PIN_INFO(146, 0x040, 18, 1, 0),
1425 MTK_PIN_INFO(147, 0x040, 19, 1, 0),
1426 MTK_PIN_INFO(148, 0x040, 20, 1, 0),
1427 MTK_PIN_INFO(149, 0x040, 21, 1, 0),
1428 MTK_PIN_INFO(150, 0x040, 22, 1, 0),
1429 MTK_PIN_INFO(151, 0x040, 23, 1, 0),
1430 MTK_PIN_INFO(152, 0x040, 24, 1, 0),
1431 MTK_PIN_INFO(153, 0x040, 25, 1, 0),
1432 MTK_PIN_INFO(154, 0x040, 26, 1, 0),
1433 MTK_PIN_INFO(155, 0x040, 27, 1, 0),
1434 MTK_PIN_INFO(156, 0x040, 28, 1, 0),
1435 MTK_PIN_INFO(157, 0x040, 29, 1, 0),
1436 MTK_PIN_INFO(158, 0x040, 30, 1, 0),
1437 MTK_PIN_INFO(159, 0x040, 31, 1, 0),
1438 MTK_PIN_INFO(160, 0x050, 0, 1, 0),
1439 MTK_PIN_INFO(161, 0x050, 1, 1, 0),
1440 MTK_PIN_INFO(162, 0x050, 2, 1, 0),
1441 MTK_PIN_INFO(163, 0x050, 3, 1, 0),
1442 MTK_PIN_INFO(164, 0x050, 4, 1, 0),
1443 MTK_PIN_INFO(165, 0x050, 5, 1, 0),
1444 MTK_PIN_INFO(166, 0x050, 6, 1, 0),
1445 MTK_PIN_INFO(167, 0x050, 7, 1, 0),
1446 MTK_PIN_INFO(168, 0x050, 8, 1, 0),
1447 MTK_PIN_INFO(169, 0x050, 9, 1, 0),
1448 MTK_PIN_INFO(170, 0x050, 10, 1, 0),
1449 MTK_PIN_INFO(171, 0x050, 11, 1, 0),
1450 MTK_PIN_INFO(172, 0x050, 12, 1, 0),
1451 MTK_PIN_INFO(173, 0x050, 13, 1, 0),
1452 MTK_PIN_INFO(174, 0x050, 14, 1, 0),
1453 MTK_PIN_INFO(175, 0x050, 15, 1, 0),
1454 MTK_PIN_INFO(176, 0x050, 16, 1, 0),
1455 MTK_PIN_INFO(177, 0x050, 17, 1, 0),
1456 MTK_PIN_INFO(178, 0x050, 18, 1, 0),
1457 MTK_PIN_INFO(179, 0x050, 19, 1, 0),
1458};
1459
1460struct mtk_pin_info mt8183_pin_info_drv[] = {
1461 MTK_PIN_INFO(0, 0x0A0, 12, 3, 6),
1462 MTK_PIN_INFO(1, 0x0A0, 12, 3, 6),
1463 MTK_PIN_INFO(2, 0x0A0, 12, 3, 6),
1464 MTK_PIN_INFO(3, 0x0A0, 12, 3, 6),
1465 MTK_PIN_INFO(4, 0x0A0, 20, 3, 6),
1466 MTK_PIN_INFO(5, 0x0A0, 20, 3, 6),
1467 MTK_PIN_INFO(6, 0x0A0, 20, 3, 6),
1468 MTK_PIN_INFO(7, 0x0A0, 20, 3, 6),
1469 MTK_PIN_INFO(8, 0x0A0, 0, 3, 6),
1470 MTK_PIN_INFO(9, 0x0B0, 16, 3, 6),
1471 MTK_PIN_INFO(10, 0x0B0, 16, 3, 6),
1472 MTK_PIN_INFO(11, 0x0A0, 12, 3, 1),
1473 MTK_PIN_INFO(12, 0x0A0, 28, 3, 1),
1474 MTK_PIN_INFO(13, 0x0A0, 8, 3, 2),
1475 MTK_PIN_INFO(14, 0x0A0, 8, 3, 2),
1476 MTK_PIN_INFO(15, 0x0A0, 8, 3, 2),
1477 MTK_PIN_INFO(16, 0x0A0, 8, 3, 2),
1478 MTK_PIN_INFO(17, 0x0A0, 12, 3, 2),
1479 MTK_PIN_INFO(18, 0x0A0, 12, 3, 2),
1480 MTK_PIN_INFO(19, 0x0A0, 12, 3, 2),
1481 MTK_PIN_INFO(20, 0x0A0, 12, 3, 2),
1482 MTK_PIN_INFO(21, 0x0A0, 16, 3, 2),
1483 MTK_PIN_INFO(22, 0x0A0, 16, 3, 2),
1484 MTK_PIN_INFO(23, 0x0A0, 16, 3, 2),
1485 MTK_PIN_INFO(24, 0x0A0, 16, 3, 2),
1486 MTK_PIN_INFO(25, 0x0A0, 20, 3, 2),
1487 MTK_PIN_INFO(26, 0x0A0, 20, 3, 2),
1488 MTK_PIN_INFO(27, 0x0A0, 20, 3, 2),
1489 MTK_PIN_INFO(28, 0x0A0, 20, 3, 2),
1490 MTK_PIN_INFO(29, 0x0A0, 24, 3, 2),
1491 MTK_PIN_INFO(30, 0x0A0, 28, 3, 2),
1492 MTK_PIN_INFO(31, 0x0B0, 0, 3, 2),
1493 MTK_PIN_INFO(32, 0x0A0, 28, 3, 2),
1494 MTK_PIN_INFO(33, 0x0A0, 28, 3, 2),
1495 MTK_PIN_INFO(34, 0x0A0, 28, 3, 2),
1496 MTK_PIN_INFO(35, 0x0A0, 0, 3, 3),
1497 MTK_PIN_INFO(36, 0x0A0, 0, 3, 3),
1498 MTK_PIN_INFO(37, 0x0A0, 0, 3, 3),
1499 MTK_PIN_INFO(38, 0x0A0, 4, 3, 3),
1500 MTK_PIN_INFO(39, 0x0A0, 4, 3, 3),
1501 MTK_PIN_INFO(40, 0x0A0, 4, 3, 3),
1502 MTK_PIN_INFO(41, 0x0A0, 8, 3, 3),
1503 MTK_PIN_INFO(42, 0x0A0, 8, 3, 3),
1504 MTK_PIN_INFO(43, 0x0A0, 12, 3, 3),
1505 MTK_PIN_INFO(44, 0x0A0, 12, 3, 3),
1506 MTK_PIN_INFO(45, 0x0A0, 12, 3, 3),
1507 MTK_PIN_INFO(46, 0x0A0, 16, 3, 3),
1508 MTK_PIN_INFO(47, 0x0A0, 16, 3, 3),
1509 MTK_PIN_INFO(48, 0x0A0, 20, 3, 3),
1510 MTK_PIN_INFO(49, 0x0A0, 20, 3, 3),
1511 MTK_PIN_INFO(50, 0x0A0, 0, 3, 4),
1512 MTK_PIN_INFO(51, 0x0A0, 0, 3, 4),
1513 MTK_PIN_INFO(52, 0x0A0, 4, 3, 4),
1514 MTK_PIN_INFO(53, 0x0A0, 4, 3, 4),
1515 MTK_PIN_INFO(54, 0x0A0, 4, 3, 4),
1516 MTK_PIN_INFO(55, 0x0A0, 4, 3, 4),
1517 MTK_PIN_INFO(56, 0x0A0, 4, 3, 4),
1518 MTK_PIN_INFO(57, 0x0A0, 4, 3, 4),
1519 MTK_PIN_INFO(58, 0x0A0, 8, 3, 4),
1520 MTK_PIN_INFO(59, 0x0A0, 8, 3, 4),
1521 MTK_PIN_INFO(60, 0x0A0, 8, 3, 4),
1522 MTK_PIN_INFO(61, 0x0A0, 0, 3, 5),
1523 MTK_PIN_INFO(62, 0x0A0, 0, 3, 5),
1524 MTK_PIN_INFO(63, 0x0A0, 0, 3, 5),
1525 MTK_PIN_INFO(64, 0x0A0, 0, 3, 5),
1526 MTK_PIN_INFO(65, 0x0A0, 4, 3, 5),
1527 MTK_PIN_INFO(66, 0x0A0, 4, 3, 5),
1528 MTK_PIN_INFO(67, 0x0A0, 8, 3, 5),
1529 MTK_PIN_INFO(68, 0x0A0, 8, 3, 5),
1530 MTK_PIN_INFO(69, 0x0A0, 12, 3, 5),
1531 MTK_PIN_INFO(70, 0x0A0, 12, 3, 5),
1532 MTK_PIN_INFO(71, 0x0A0, 12, 3, 5),
1533 MTK_PIN_INFO(72, 0x0A0, 16, 3, 5),
1534 MTK_PIN_INFO(73, 0x0A0, 16, 3, 5),
1535 MTK_PIN_INFO(74, 0x0A0, 16, 3, 5),
1536 MTK_PIN_INFO(75, 0x0A0, 16, 3, 5),
1537 MTK_PIN_INFO(76, 0x0A0, 16, 3, 5),
1538 MTK_PIN_INFO(77, 0x0A0, 20, 3, 5),
1539 MTK_PIN_INFO(78, 0x0A0, 20, 3, 5),
1540 MTK_PIN_INFO(79, 0x0A0, 20, 3, 5),
1541 MTK_PIN_INFO(80, 0x0A0, 20, 3, 5),
1542 MTK_PIN_INFO(81, 0x0A0, 24, 3, 5),
1543 MTK_PIN_INFO(82, 0x0A0, 28, 3, 5),
1544 MTK_PIN_INFO(83, 0x0A0, 28, 3, 5),
1545 MTK_PIN_INFO(84, 0x0A0, 24, 3, 5),
1546 MTK_PIN_INFO(85, 0x0B0, 0, 3, 5),
1547 MTK_PIN_INFO(86, 0x0B0, 0, 3, 5),
1548 MTK_PIN_INFO(87, 0x0B0, 0, 3, 5),
1549 MTK_PIN_INFO(88, 0x0B0, 0, 3, 5),
1550 MTK_PIN_INFO(89, 0x0B0, 12, 3, 6),
1551 MTK_PIN_INFO(90, 0x0A0, 4, 3, 6),
1552 MTK_PIN_INFO(91, 0x0A0, 8, 3, 6),
1553 MTK_PIN_INFO(92, 0x0A0, 8, 3, 6),
1554 MTK_PIN_INFO(93, 0x0A0, 8, 3, 6),
1555 MTK_PIN_INFO(94, 0x0A0, 8, 3, 6),
1556 MTK_PIN_INFO(95, 0x0A0, 24, 3, 6),
1557 MTK_PIN_INFO(96, 0x0A0, 24, 3, 6),
1558 MTK_PIN_INFO(97, 0x0A0, 28, 3, 6),
1559 MTK_PIN_INFO(98, 0x0A0, 28, 3, 6),
1560 MTK_PIN_INFO(99, 0x0B0, 0, 3, 6),
1561 MTK_PIN_INFO(100, 0x0B0, 4, 3, 6),
1562 MTK_PIN_INFO(101, 0x0B0, 8, 3, 6),
1563 MTK_PIN_INFO(102, 0x0B0, 8, 3, 6),
1564 MTK_PIN_INFO(103, 0x0B0, 20, 3, 6),
1565 MTK_PIN_INFO(104, 0x0B0, 20, 3, 6),
1566 MTK_PIN_INFO(105, 0x0B0, 24, 3, 6),
1567 MTK_PIN_INFO(106, 0x0B0, 24, 3, 6),
1568 MTK_PIN_INFO(107, 0x0A0, 0, 3, 7),
1569 MTK_PIN_INFO(108, 0x0A0, 4, 3, 7),
1570 MTK_PIN_INFO(109, 0x0A0, 8, 3, 7),
1571 MTK_PIN_INFO(110, 0x0A0, 0, 3, 7),
1572 MTK_PIN_INFO(111, 0x0A0, 12, 3, 7),
1573 MTK_PIN_INFO(112, 0x0A0, 8, 3, 7),
1574 MTK_PIN_INFO(113, 0x0A0, 16, 3, 7),
1575 MTK_PIN_INFO(114, 0x0A0, 20, 3, 7),
1576 MTK_PIN_INFO(115, 0x0A0, 24, 3, 7),
1577 MTK_PIN_INFO(116, 0x0A0, 28, 3, 7),
1578 MTK_PIN_INFO(117, 0x0B0, 0, 3, 7),
1579 MTK_PIN_INFO(118, 0x0B0, 4, 3, 7),
1580 MTK_PIN_INFO(119, 0x0B0, 8, 3, 7),
1581 MTK_PIN_INFO(120, 0x0B0, 12, 3, 7),
1582 MTK_PIN_INFO(121, 0x0B0, 16, 3, 7),
1583 MTK_PIN_INFO(122, 0x0A0, 0, 3, 8),
1584 MTK_PIN_INFO(123, 0x0A0, 4, 3, 8),
1585 MTK_PIN_INFO(124, 0x0A0, 8, 3, 8),
1586 MTK_PIN_INFO(125, 0x0A0, 4, 3, 8),
1587 MTK_PIN_INFO(126, 0x0A0, 4, 3, 8),
1588 MTK_PIN_INFO(127, 0x0A0, 4, 3, 8),
1589 MTK_PIN_INFO(128, 0x0A0, 4, 3, 8),
1590 MTK_PIN_INFO(129, 0x0A0, 4, 3, 8),
1591 MTK_PIN_INFO(130, 0x0A0, 4, 3, 8),
1592 MTK_PIN_INFO(131, 0x0A0, 12, 3, 8),
1593 MTK_PIN_INFO(132, 0x0A0, 4, 3, 8),
1594 MTK_PIN_INFO(133, 0x0A0, 16, 3, 8),
1595 MTK_PIN_INFO(134, 0x0A0, 0, 3, 1),
1596 MTK_PIN_INFO(135, 0x0A0, 4, 3, 1),
1597 MTK_PIN_INFO(136, 0x0A0, 8, 3, 1),
1598 MTK_PIN_INFO(137, 0x0A0, 8, 3, 1),
1599 MTK_PIN_INFO(138, 0x0A0, 8, 3, 1),
1600 MTK_PIN_INFO(139, 0x0A0, 8, 3, 1),
1601 MTK_PIN_INFO(140, 0x0A0, 8, 3, 1),
1602 MTK_PIN_INFO(141, 0x0A0, 8, 3, 1),
1603 MTK_PIN_INFO(142, 0x0A0, 8, 3, 1),
1604 MTK_PIN_INFO(143, 0x0A0, 8, 3, 1),
1605 MTK_PIN_INFO(144, 0x0A0, 16, 3, 1),
1606 MTK_PIN_INFO(145, 0x0A0, 16, 3, 1),
1607 MTK_PIN_INFO(146, 0x0A0, 16, 3, 1),
1608 MTK_PIN_INFO(147, 0x0A0, 16, 3, 1),
1609 MTK_PIN_INFO(148, 0x0A0, 20, 3, 1),
1610 MTK_PIN_INFO(149, 0x0A0, 24, 3, 1),
1611 MTK_PIN_INFO(150, 0x0B0, 0, 3, 1),
1612 MTK_PIN_INFO(151, 0x0B0, 0, 3, 1),
1613 MTK_PIN_INFO(152, 0x0B0, 0, 3, 1),
1614 MTK_PIN_INFO(153, 0x0B0, 0, 3, 1),
1615 MTK_PIN_INFO(154, 0x0B0, 4, 3, 1),
1616 MTK_PIN_INFO(155, 0x0B0, 8, 3, 1),
1617 MTK_PIN_INFO(156, 0x0B0, 8, 3, 1),
1618 MTK_PIN_INFO(157, 0x0B0, 8, 3, 1),
1619 MTK_PIN_INFO(158, 0x0B0, 0, 3, 1),
1620 MTK_PIN_INFO(159, 0x0B0, 0, 3, 1),
1621 MTK_PIN_INFO(160, 0x0B0, 0, 3, 1),
1622 MTK_PIN_INFO(161, 0x0A0, 0, 3, 2),
1623 MTK_PIN_INFO(162, 0x0A0, 0, 3, 2),
1624 MTK_PIN_INFO(163, 0x0A0, 0, 3, 2),
1625 MTK_PIN_INFO(164, 0x0A0, 0, 3, 2),
1626 MTK_PIN_INFO(165, 0x0A0, 4, 3, 2),
1627 MTK_PIN_INFO(166, 0x0A0, 4, 3, 2),
1628 MTK_PIN_INFO(167, 0x0A0, 8, 3, 4),
1629 MTK_PIN_INFO(168, 0x0A0, 8, 3, 4),
1630 MTK_PIN_INFO(169, 0x0A0, 12, 3, 4),
1631 MTK_PIN_INFO(170, 0x0A0, 16, 3, 4),
1632 MTK_PIN_INFO(171, 0x0A0, 16, 3, 4),
1633 MTK_PIN_INFO(172, 0x0A0, 16, 3, 4),
1634 MTK_PIN_INFO(173, 0x0A0, 16, 3, 4),
1635 MTK_PIN_INFO(174, 0x0A0, 16, 3, 4),
1636 MTK_PIN_INFO(175, 0x0A0, 12, 3, 4),
1637 MTK_PIN_INFO(176, 0x0A0, 12, 3, 4),
1638 MTK_PIN_INFO(177, 0x0A0, 16, 3, 6),
1639 MTK_PIN_INFO(178, 0x0A0, 16, 3, 6),
1640 MTK_PIN_INFO(179, 0x0A0, 16, 3, 6),
1641};
1642
1643static const struct mtk_pin_spec_pupd_set_samereg mt8183_spec_pupd[] = {
1644 MTK_PIN_PUPD_SPEC_SR(29, 0x0C0, 2, 1, 0, 2),
1645 MTK_PIN_PUPD_SPEC_SR(30, 0x0C0, 6, 5, 4, 2),
1646 MTK_PIN_PUPD_SPEC_SR(31, 0x0C0, 10, 9, 8, 2),
1647 MTK_PIN_PUPD_SPEC_SR(32, 0x0C0, 14, 13, 12, 2),
1648 MTK_PIN_PUPD_SPEC_SR(33, 0x0C0, 18, 17, 16, 2),
1649 MTK_PIN_PUPD_SPEC_SR(34, 0x0C0, 22, 21, 20, 2),
1650 MTK_PIN_PUPD_SPEC_SR(35, 0x0C0, 2, 1, 0, 3),
1651 MTK_PIN_PUPD_SPEC_SR(36, 0x0C0, 6, 5, 4, 3),
1652 MTK_PIN_PUPD_SPEC_SR(37, 0x0C0, 10, 9, 8, 3),
1653 MTK_PIN_PUPD_SPEC_SR(38, 0x0C0, 14, 13, 12, 3),
1654 MTK_PIN_PUPD_SPEC_SR(39, 0x0C0, 18, 17, 16, 3),
1655 MTK_PIN_PUPD_SPEC_SR(40, 0x0C0, 22, 21, 20, 3),
1656 MTK_PIN_PUPD_SPEC_SR(41, 0x0C0, 26, 25, 24, 3),
1657 MTK_PIN_PUPD_SPEC_SR(42, 0x0C0, 30, 29, 28, 3),
1658 MTK_PIN_PUPD_SPEC_SR(91, 0x0C0, 2, 1, 0, 6),
1659 MTK_PIN_PUPD_SPEC_SR(92, 0x0C0, 6, 5, 4, 6),
1660 MTK_PIN_PUPD_SPEC_SR(93, 0x0C0, 10, 9, 8, 6),
1661 MTK_PIN_PUPD_SPEC_SR(94, 0x0C0, 14, 13, 12, 6),
1662 MTK_PIN_PUPD_SPEC_SR(122, 0x0C0, 2, 1, 0, 8),
1663 MTK_PIN_PUPD_SPEC_SR(123, 0x0C0, 6, 5, 4, 8),
1664 MTK_PIN_PUPD_SPEC_SR(124, 0x0C0, 10, 9, 8, 8),
1665 MTK_PIN_PUPD_SPEC_SR(125, 0x0C0, 14, 13, 12, 8),
1666 MTK_PIN_PUPD_SPEC_SR(126, 0x0C0, 18, 17, 16, 8),
1667 MTK_PIN_PUPD_SPEC_SR(127, 0x0C0, 22, 21, 20, 8),
1668 MTK_PIN_PUPD_SPEC_SR(128, 0x0C0, 26, 25, 24, 8),
1669 MTK_PIN_PUPD_SPEC_SR(129, 0x0C0, 30, 29, 28, 8),
1670 MTK_PIN_PUPD_SPEC_SR(130, 0x0D0, 2, 1, 0, 8),
1671 MTK_PIN_PUPD_SPEC_SR(131, 0x0D0, 6, 5, 4, 8),
1672 MTK_PIN_PUPD_SPEC_SR(132, 0x0D0, 10, 9, 8, 8),
1673 MTK_PIN_PUPD_SPEC_SR(133, 0x0D0, 14, 13, 12, 8),
1674};
1675
1676static int mtk_pinctrl_set_gpio_ies(struct mtk_pinctrl *pctl,
1677 int pin, bool enable)
1678{
1679 return mtk_pinctrl_set_gpio_value(pctl, pin, enable,
1680 pctl->devdata->n_pin_ies, pctl->devdata->pin_ies_grps);
1681}
1682
1683static int mtk_pinctrl_set_gpio_smt(struct mtk_pinctrl *pctl,
1684 int pin, bool enable)
1685{
1686 return mtk_pinctrl_set_gpio_value(pctl, pin, enable,
1687 pctl->devdata->n_pin_smt, pctl->devdata->pin_smt_grps);
1688}
1689
1690static int mt8183_ies_smt_set(struct mtk_pinctrl *pctl,
1691 struct regmap *regmap, unsigned int pin,
1692 unsigned char align, int value, enum pin_config_param arg)
1693{
1694 if (arg == PIN_CONFIG_INPUT_ENABLE)
1695 return mtk_pinctrl_set_gpio_ies(pctl,
1696 pin, value);
1697 else if (arg == PIN_CONFIG_INPUT_SCHMITT_ENABLE)
1698 return mtk_pinctrl_set_gpio_smt(pctl,
1699 pin, value);
1700 return -EINVAL;
1701}
1702
1703static int mt8183_spec_pull_set(struct mtk_pinctrl *pctl,
1704 struct regmap *regmap, unsigned int pin,
1705 unsigned char align, bool isup, unsigned int r1r0)
1706{
1707 return mtk_pctrl_spec_pull_set_samereg(pctl, regmap, mt8183_spec_pupd,
1708 ARRAY_SIZE(mt8183_spec_pupd), pin, align, isup, r1r0);
1709}
1710
1711static void mt8183_spec_pinmux_set(struct regmap *reg, unsigned int pin,
1712 unsigned int mode)
1713{
1714 unsigned int reg_addr;
1715 unsigned char bit;
1716 unsigned int val;
1717 unsigned int mask = (1L << GPIO_MODE_BITS) - 1;
1718
1719 reg_addr = ((pin / MAX_GPIO_MODE_PER_REG) << 4) + 0x0300;
1720 mode &= mask;
1721 bit = pin % MAX_GPIO_MODE_PER_REG;
1722 mask <<= (GPIO_MODE_BITS * bit);
1723 val = (mode << (GPIO_MODE_BITS * bit));
1724
1725 regmap_update_bits(reg, reg_addr, mask, val);
1726}
1727
1728static const struct mtk_pinctrl_devdata mt8183_pinctrl_data = {
1729 .pins = mtk_pins_mt8183,
1730 .npins = ARRAY_SIZE(mtk_pins_mt8183),
1731 .pin_drv_grps = mt8183_pin_info_drv,
1732 .n_pin_drv = ARRAY_SIZE(mt8183_pin_info_drv),
1733 .pin_mode_grps = mt8183_pin_info_mode,
1734 .n_pin_mode = ARRAY_SIZE(mt8183_pin_info_mode),
1735 .pin_ies_grps = mt8183_pin_info_ies,
1736 .n_pin_ies = ARRAY_SIZE(mt8183_pin_info_ies),
1737 .pin_smt_grps = mt8183_pin_info_smt,
1738 .n_pin_smt = ARRAY_SIZE(mt8183_pin_info_smt),
1739 .pin_pullsel_grps = mt8183_pin_info_pullsel,
1740 .n_pin_pullsel = ARRAY_SIZE(mt8183_pin_info_pullsel),
1741 .pin_pullen_grps = mt8183_pin_info_pullen,
1742 .n_pin_pullen = ARRAY_SIZE(mt8183_pin_info_pullen),
1743 .pin_pupd_r1r0_grps = mt8183_pin_info_pupd_r1r0,
1744 .n_pin_pupd_r1r0 = ARRAY_SIZE(mt8183_pin_info_pupd_r1r0),
1745 .spec_ies_smt_set = mt8183_ies_smt_set,
1746 .spec_pull_set = mt8183_spec_pull_set,
1747 .spec_pinmux_set = mt8183_spec_pinmux_set,
1748 .dir_offset = 0x0000,
1749 .dout_offset = 0x0100,
1750 .din_offset = 0x0200,
1751 .pinmux_offset = 0x0300,
1752 .ies_offset = 0x0000,
1753 .smt_offset = 0x0010,
1754 .pullen_offset = 0x0060,
1755 .pullsel_offset = 0x0080,
1756 .drv_offset = 0x00a0,
1757 .type1_start = 192,
1758 .type1_end = 192,
1759 .regmap_num = 9,
1760 .port_shf = 4,
1761 .port_mask = 0x1f,
1762 .port_align = 4,
1763 .port_pin_shf = 5,
1764 .eint_offsets = {
1765 .name = "mt8183_eint",
1766 .stat = 0x000,
1767 .ack = 0x040,
1768 .mask = 0x080,
1769 .mask_set = 0x0c0,
1770 .mask_clr = 0x100,
1771 .sens = 0x140,
1772 .sens_set = 0x180,
1773 .sens_clr = 0x1c0,
1774 .soft = 0x200,
1775 .soft_set = 0x240,
1776 .soft_clr = 0x280,
1777 .pol = 0x300,
1778 .pol_set = 0x340,
1779 .pol_clr = 0x380,
1780 .dom_en = 0x400,
1781 .dbnc_ctrl = 0x500,
1782 .dbnc_set = 0x600,
1783 .dbnc_clr = 0x700,
1784 .port_mask = 7,
1785 .ports = 6,
1786 },
1787 .ap_num = 212,
1788 .db_cnt = 13,
1789};
1790
1791static int mtk_pinctrl_probe(struct platform_device *pdev)
1792{
1793 return mtk_pctrl_init(pdev, &mt8183_pinctrl_data, NULL);
1794}
1795
1796static const struct of_device_id mt8183_pctrl_match[] = {
1797 {
1798 .compatible = "mediatek,mt8183-pinctrl",
1799 },
1800 { }
1801};
1802
1803static struct platform_driver mtk_pinctrl_driver = {
1804 .probe = mtk_pinctrl_probe,
1805 .driver = {
1806 .name = "mediatek-mt8183-pinctrl",
1807 .owner = THIS_MODULE,
1808 .of_match_table = mt8183_pctrl_match,
1809 .pm = &mtk_eint_pm_ops,
1810 },
1811};
1812
1813static int __init mtk_pinctrl_init(void)
1814{
1815 return platform_driver_register(&mtk_pinctrl_driver);
1816}
1817
1818arch_initcall(mtk_pinctrl_init);
1819MODULE_LICENSE("GPL");
1820MODULE_DESCRIPTION("MediaTek Pinctrl Driver");
1821MODULE_AUTHOR("Zhiyong Tao <zhiyong.tao@mediatek.com>");