xref: /linux/drivers/pinctrl/mediatek/pinctrl-mt8192.c (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
1d32f38f2SZhiyong Tao // SPDX-License-Identifier: GPL-2.0
2d32f38f2SZhiyong Tao /*
3d32f38f2SZhiyong Tao  * Copyright (C) 2019 MediaTek Inc.
4d32f38f2SZhiyong Tao  * Author: Zhiyong Tao <zhiyong.tao@mediatek.com>
5d32f38f2SZhiyong Tao  *
6d32f38f2SZhiyong Tao  */
7d32f38f2SZhiyong Tao 
8d32f38f2SZhiyong Tao #include <linux/module.h>
9d32f38f2SZhiyong Tao #include "pinctrl-mtk-mt8192.h"
10d32f38f2SZhiyong Tao #include "pinctrl-paris.h"
11d32f38f2SZhiyong Tao 
12d32f38f2SZhiyong Tao /* MT8192 have multiple bases to program pin configuration listed as the below:
13d32f38f2SZhiyong Tao  * iocfg0:0x10005000, iocfg_rm:0x11C20000, iocfg_bm:0x11D10000,
14d32f38f2SZhiyong Tao  * iocfg_bl:0x11D30000, iocfg_br:0x11D40000, iocfg_lm:0x11E20000,
15d32f38f2SZhiyong Tao  * iocfg_lb:0x11E70000, iocfg_rt:0x11EA0000, iocfg_lt:0x11F20000,
16d32f38f2SZhiyong Tao  * iocfg_tl:0x11F30000
17d32f38f2SZhiyong Tao  * _i_based could be used to indicate what base the pin should be mapped into.
18d32f38f2SZhiyong Tao  */
19d32f38f2SZhiyong Tao 
20d32f38f2SZhiyong Tao #define PIN_FIELD_BASE(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits) \
21d32f38f2SZhiyong Tao 	PIN_FIELD_CALC(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits, \
22d32f38f2SZhiyong Tao 		       32, 0)
23d32f38f2SZhiyong Tao 
24d32f38f2SZhiyong Tao #define PINS_FIELD_BASE(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits) \
25d32f38f2SZhiyong Tao 	PIN_FIELD_CALC(s_pin, e_pin, i_base, s_addr, x_addrs, s_bit, x_bits,  \
26d32f38f2SZhiyong Tao 		       32, 1)
27d32f38f2SZhiyong Tao 
28d32f38f2SZhiyong Tao static const struct mtk_pin_field_calc mt8192_pin_mode_range[] = {
29d32f38f2SZhiyong Tao 	PIN_FIELD(0, 228, 0x300, 0x10, 0, 4),
30d32f38f2SZhiyong Tao };
31d32f38f2SZhiyong Tao 
32d32f38f2SZhiyong Tao static const struct mtk_pin_field_calc mt8192_pin_dir_range[] = {
33d32f38f2SZhiyong Tao 	PIN_FIELD(0, 228, 0x0, 0x10, 0, 1),
34d32f38f2SZhiyong Tao };
35d32f38f2SZhiyong Tao 
36d32f38f2SZhiyong Tao static const struct mtk_pin_field_calc mt8192_pin_di_range[] = {
37d32f38f2SZhiyong Tao 	PIN_FIELD(0, 228, 0x200, 0x10, 0, 1),
38d32f38f2SZhiyong Tao };
39d32f38f2SZhiyong Tao 
40d32f38f2SZhiyong Tao static const struct mtk_pin_field_calc mt8192_pin_do_range[] = {
41d32f38f2SZhiyong Tao 	PIN_FIELD(0, 228, 0x100, 0x10, 0, 1),
42d32f38f2SZhiyong Tao };
43d32f38f2SZhiyong Tao 
44d32f38f2SZhiyong Tao static const struct mtk_pin_field_calc mt8192_pin_smt_range[] = {
45d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(0, 0, 4, 0x00f0, 0x10, 8, 1),
46d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(1, 1, 4, 0x00f0, 0x10, 8, 1),
47d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(2, 2, 4, 0x00f0, 0x10, 8, 1),
48d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(3, 3, 4, 0x00f0, 0x10, 8, 1),
49d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(4, 4, 4, 0x00f0, 0x10, 8, 1),
50d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(5, 5, 4, 0x00f0, 0x10, 9, 1),
51d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(6, 6, 4, 0x00f0, 0x10, 9, 1),
52d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(7, 7, 4, 0x00f0, 0x10, 9, 1),
53d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(8, 8, 4, 0x00f0, 0x10, 9, 1),
54d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(9, 9, 4, 0x00f0, 0x10, 5, 1),
55d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(10, 10, 6, 0x0070, 0x10, 0, 1),
56d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(11, 11, 6, 0x0070, 0x10, 1, 1),
57d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(12, 12, 6, 0x0070, 0x10, 2, 1),
58d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(13, 13, 6, 0x0070, 0x10, 3, 1),
59d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(14, 14, 6, 0x0070, 0x10, 4, 1),
60d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(15, 15, 6, 0x0070, 0x10, 5, 1),
61d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(16, 16, 8, 0x0080, 0x10, 0, 1),
62d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(17, 17, 8, 0x0080, 0x10, 0, 1),
63d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(18, 18, 7, 0x0100, 0x10, 4, 1),
64d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(19, 19, 7, 0x0100, 0x10, 4, 1),
65d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(20, 20, 7, 0x0100, 0x10, 5, 1),
66d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(21, 21, 7, 0x0100, 0x10, 5, 1),
67d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(22, 22, 2, 0x00c0, 0x10, 3, 1),
68d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(23, 23, 2, 0x00c0, 0x10, 3, 1),
69d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(24, 24, 2, 0x00c0, 0x10, 3, 1),
70d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(25, 25, 2, 0x00c0, 0x10, 3, 1),
71d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(26, 26, 3, 0x00a0, 0x10, 10, 1),
72d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(27, 27, 3, 0x00a0, 0x10, 10, 1),
73d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(28, 28, 3, 0x00a0, 0x10, 11, 1),
74d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(29, 29, 3, 0x00a0, 0x10, 11, 1),
75d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(30, 30, 3, 0x00a0, 0x10, 11, 1),
76d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(31, 31, 3, 0x00a0, 0x10, 11, 1),
77d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(32, 32, 3, 0x00a0, 0x10, 12, 1),
78d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(33, 33, 3, 0x00a0, 0x10, 12, 1),
79d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(34, 34, 3, 0x00a0, 0x10, 12, 1),
80d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(35, 35, 3, 0x00a0, 0x10, 12, 1),
81d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(36, 36, 2, 0x00c0, 0x10, 2, 1),
82d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(37, 37, 2, 0x00c0, 0x10, 2, 1),
83d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(38, 38, 2, 0x00c0, 0x10, 2, 1),
84d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(39, 39, 2, 0x00c0, 0x10, 2, 1),
85d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(40, 40, 8, 0x0080, 0x10, 0, 1),
86d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(41, 41, 8, 0x0080, 0x10, 0, 1),
87d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(42, 42, 8, 0x0080, 0x10, 1, 1),
88d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(43, 43, 7, 0x0100, 0x10, 4, 1),
89d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(44, 44, 7, 0x0100, 0x10, 4, 1),
90d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(45, 45, 1, 0x00c0, 0x10, 12, 1),
91d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(46, 46, 1, 0x00c0, 0x10, 12, 1),
92d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(47, 47, 1, 0x00c0, 0x10, 12, 1),
93d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(48, 48, 1, 0x00c0, 0x10, 13, 1),
94d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(49, 49, 1, 0x00c0, 0x10, 13, 1),
95d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(50, 50, 1, 0x00c0, 0x10, 13, 1),
96d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(51, 51, 1, 0x00c0, 0x10, 4, 1),
97d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(52, 52, 1, 0x00c0, 0x10, 5, 1),
98d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(53, 53, 1, 0x00c0, 0x10, 9, 1),
99d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(54, 54, 1, 0x00c0, 0x10, 6, 1),
100d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(55, 55, 1, 0x00c0, 0x10, 8, 1),
101d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(56, 56, 1, 0x00c0, 0x10, 7, 1),
102d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(57, 57, 3, 0x00a0, 0x10, 8, 1),
103d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(58, 58, 3, 0x00a0, 0x10, 8, 1),
104d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(59, 59, 3, 0x00a0, 0x10, 9, 1),
105d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(60, 60, 3, 0x00a0, 0x10, 9, 1),
106d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(61, 61, 3, 0x00a0, 0x10, 10, 1),
107d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(62, 62, 3, 0x00a0, 0x10, 10, 1),
108d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(63, 63, 3, 0x00a0, 0x10, 0, 1),
109d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(64, 64, 3, 0x00a0, 0x10, 0, 1),
110d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(65, 65, 3, 0x00a0, 0x10, 0, 1),
111d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(66, 66, 3, 0x00a0, 0x10, 0, 1),
112d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(67, 67, 3, 0x00a0, 0x10, 1, 1),
113d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(68, 68, 3, 0x00a0, 0x10, 1, 1),
114d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(69, 69, 3, 0x00a0, 0x10, 1, 1),
115d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(70, 70, 3, 0x00a0, 0x10, 1, 1),
116d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(71, 71, 3, 0x00a0, 0x10, 2, 1),
117d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(72, 72, 3, 0x00a0, 0x10, 2, 1),
118d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(73, 73, 3, 0x00a0, 0x10, 2, 1),
119d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(74, 74, 3, 0x00a0, 0x10, 2, 1),
120d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(75, 75, 3, 0x00a0, 0x10, 3, 1),
121d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(76, 76, 3, 0x00a0, 0x10, 3, 1),
122d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(77, 77, 3, 0x00a0, 0x10, 3, 1),
123d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(78, 78, 3, 0x00a0, 0x10, 3, 1),
124d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(79, 79, 3, 0x00a0, 0x10, 4, 1),
125d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(80, 80, 3, 0x00a0, 0x10, 4, 1),
126d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(81, 81, 3, 0x00a0, 0x10, 4, 1),
127d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(82, 82, 3, 0x00a0, 0x10, 4, 1),
128d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(83, 83, 3, 0x00a0, 0x10, 5, 1),
129d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(84, 84, 3, 0x00a0, 0x10, 5, 1),
130d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(85, 85, 3, 0x00a0, 0x10, 7, 1),
131d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(86, 86, 3, 0x00a0, 0x10, 7, 1),
132d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(87, 87, 3, 0x00a0, 0x10, 6, 1),
133d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(88, 88, 3, 0x00a0, 0x10, 6, 1),
134d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(89, 89, 2, 0x00c0, 0x10, 9, 1),
135d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(90, 90, 2, 0x00c0, 0x10, 10, 1),
136d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(91, 91, 2, 0x00c0, 0x10, 4, 1),
137d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(92, 92, 2, 0x00c0, 0x10, 4, 1),
138d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(93, 93, 2, 0x00c0, 0x10, 4, 1),
139d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(94, 94, 2, 0x00c0, 0x10, 4, 1),
140d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(95, 95, 2, 0x00c0, 0x10, 5, 1),
141d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(96, 96, 2, 0x00c0, 0x10, 5, 1),
142d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(97, 97, 2, 0x00c0, 0x10, 5, 1),
143d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(98, 98, 2, 0x00c0, 0x10, 5, 1),
144d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(99, 99, 2, 0x00c0, 0x10, 6, 1),
145d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(100, 100, 2, 0x00c0, 0x10, 6, 1),
146d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(101, 101, 2, 0x00c0, 0x10, 6, 1),
147d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(102, 102, 2, 0x00c0, 0x10, 6, 1),
148d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(103, 103, 2, 0x00c0, 0x10, 7, 1),
149d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(104, 104, 2, 0x00c0, 0x10, 7, 1),
150d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(105, 105, 2, 0x00c0, 0x10, 7, 1),
151d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(106, 106, 2, 0x00c0, 0x10, 7, 1),
152d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(107, 107, 2, 0x00c0, 0x10, 8, 1),
153d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(108, 108, 2, 0x00c0, 0x10, 8, 1),
154d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(109, 109, 2, 0x00c0, 0x10, 0, 1),
155d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(110, 110, 2, 0x00c0, 0x10, 8, 1),
156d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(111, 111, 2, 0x00c0, 0x10, 0, 1),
157d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(112, 112, 2, 0x00c0, 0x10, 0, 1),
158d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(113, 113, 2, 0x00c0, 0x10, 8, 1),
159d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(114, 114, 2, 0x00c0, 0x10, 1, 1),
160d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(115, 115, 2, 0x00c0, 0x10, 1, 1),
161d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(116, 116, 2, 0x00c0, 0x10, 1, 1),
162d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(117, 117, 2, 0x00c0, 0x10, 0, 1),
163d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(118, 118, 4, 0x00f0, 0x10, 12, 1),
164d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(119, 119, 4, 0x00f0, 0x10, 18, 1),
165d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(120, 120, 4, 0x00f0, 0x10, 17, 1),
166d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(121, 121, 4, 0x00f0, 0x10, 23, 1),
167d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(122, 122, 4, 0x00f0, 0x10, 16, 1),
168d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(123, 123, 4, 0x00f0, 0x10, 22, 1),
169d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(124, 124, 4, 0x00f0, 0x10, 15, 1),
170d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(125, 125, 4, 0x00f0, 0x10, 21, 1),
171d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(126, 126, 4, 0x00f0, 0x10, 6, 1),
172d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(127, 127, 4, 0x00f0, 0x10, 7, 1),
173d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(128, 128, 4, 0x00f0, 0x10, 10, 1),
174d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(129, 129, 4, 0x00f0, 0x10, 10, 1),
175d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(130, 130, 4, 0x00f0, 0x10, 3, 1),
176d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(131, 131, 4, 0x00f0, 0x10, 4, 1),
177d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(132, 132, 4, 0x00f0, 0x10, 11, 1),
178d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(133, 133, 4, 0x00f0, 0x10, 10, 1),
179d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(134, 134, 4, 0x00f0, 0x10, 10, 1),
180d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(135, 135, 4, 0x00f0, 0x10, 11, 1),
181d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(136, 136, 4, 0x00f0, 0x10, 0, 1),
182d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(137, 137, 4, 0x00f0, 0x10, 1, 1),
183d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(138, 138, 4, 0x00f0, 0x10, 2, 1),
184d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(139, 139, 4, 0x00f0, 0x10, 14, 1),
185d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(140, 140, 4, 0x00f0, 0x10, 20, 1),
186d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(141, 141, 4, 0x00f0, 0x10, 13, 1),
187d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(142, 142, 4, 0x00f0, 0x10, 19, 1),
188d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(143, 143, 1, 0x00c0, 0x10, 10, 1),
189d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(144, 144, 1, 0x00c0, 0x10, 10, 1),
190d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(145, 145, 1, 0x00c0, 0x10, 11, 1),
191d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(146, 146, 1, 0x00c0, 0x10, 10, 1),
192d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(147, 147, 1, 0x00c0, 0x10, 10, 1),
193d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(148, 148, 1, 0x00c0, 0x10, 3, 1),
194d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(149, 149, 1, 0x00c0, 0x10, 0, 1),
195d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(150, 150, 1, 0x00c0, 0x10, 1, 1),
196d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(151, 151, 1, 0x00c0, 0x10, 2, 1),
197d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(152, 152, 7, 0x0100, 0x10, 6, 1),
198d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(153, 153, 7, 0x0100, 0x10, 6, 1),
199d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(154, 154, 7, 0x0100, 0x10, 6, 1),
200d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(155, 155, 7, 0x0100, 0x10, 6, 1),
201d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(156, 156, 7, 0x0100, 0x10, 7, 1),
202d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(157, 157, 7, 0x0100, 0x10, 7, 1),
203d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(158, 158, 7, 0x0100, 0x10, 7, 1),
204d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(159, 159, 7, 0x0100, 0x10, 7, 1),
205d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(160, 160, 7, 0x0100, 0x10, 12, 1),
206d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(161, 161, 7, 0x0100, 0x10, 13, 1),
207d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(162, 162, 7, 0x0100, 0x10, 0, 1),
208d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(163, 163, 7, 0x0100, 0x10, 1, 1),
209d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(164, 164, 7, 0x0100, 0x10, 8, 1),
210d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(165, 165, 7, 0x0100, 0x10, 8, 1),
211d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(166, 166, 7, 0x0100, 0x10, 8, 1),
212d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(167, 167, 7, 0x0100, 0x10, 8, 1),
213d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(168, 168, 7, 0x0100, 0x10, 2, 1),
214d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(169, 169, 7, 0x0100, 0x10, 3, 1),
215d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(170, 170, 7, 0x0100, 0x10, 8, 1),
216d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(171, 171, 7, 0x0100, 0x10, 8, 1),
217d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(172, 172, 7, 0x0100, 0x10, 9, 1),
218d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(173, 173, 7, 0x0100, 0x10, 10, 1),
219d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(174, 174, 7, 0x0100, 0x10, 9, 1),
220d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(175, 175, 7, 0x0100, 0x10, 10, 1),
221d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(176, 176, 7, 0x0100, 0x10, 9, 1),
222d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(177, 177, 7, 0x0100, 0x10, 9, 1),
223d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(178, 178, 7, 0x0100, 0x10, 10, 1),
224d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(179, 179, 7, 0x0100, 0x10, 10, 1),
225d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(180, 180, 7, 0x0100, 0x10, 11, 1),
226d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(181, 181, 7, 0x0100, 0x10, 11, 1),
227d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(182, 182, 7, 0x0100, 0x10, 11, 1),
228d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(183, 183, 9, 0x0090, 0x10, 1, 1),
229d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(184, 184, 9, 0x0090, 0x10, 2, 1),
230d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(185, 185, 9, 0x0090, 0x10, 4, 1),
231d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(186, 186, 9, 0x0090, 0x10, 6, 1),
232d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(187, 187, 9, 0x0090, 0x10, 8, 1),
233d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(188, 188, 9, 0x0090, 0x10, 3, 1),
234d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(189, 189, 9, 0x0090, 0x10, 7, 1),
235d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(190, 190, 9, 0x0090, 0x10, 9, 1),
236d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(191, 191, 9, 0x0090, 0x10, 10, 1),
237d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(192, 192, 9, 0x0090, 0x10, 0, 1),
238d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(193, 193, 9, 0x0090, 0x10, 5, 1),
239d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(194, 194, 9, 0x0090, 0x10, 11, 1),
240d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(195, 195, 5, 0x0080, 0x10, 1, 1),
241d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(196, 196, 5, 0x0080, 0x10, 3, 1),
242d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(197, 197, 5, 0x0080, 0x10, 3, 1),
243d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(198, 198, 5, 0x0080, 0x10, 3, 1),
244d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(199, 199, 5, 0x0080, 0x10, 4, 1),
245d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(200, 200, 8, 0x0080, 0x10, 3, 1),
246d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(201, 201, 8, 0x0080, 0x10, 5, 1),
247d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(202, 202, 5, 0x0080, 0x10, 5, 1),
248d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(203, 203, 5, 0x0080, 0x10, 6, 1),
249d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(204, 204, 8, 0x0080, 0x10, 2, 1),
250d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(205, 205, 8, 0x0080, 0x10, 4, 1),
251d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(206, 206, 5, 0x0080, 0x10, 1, 1),
252d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(207, 207, 5, 0x0080, 0x10, 1, 1),
253d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(208, 208, 5, 0x0080, 0x10, 7, 1),
254d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(209, 209, 5, 0x0080, 0x10, 0, 1),
255d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(210, 210, 5, 0x0080, 0x10, 0, 1),
256d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(211, 211, 5, 0x0080, 0x10, 0, 1),
257d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(212, 212, 5, 0x0080, 0x10, 0, 1),
258d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(213, 213, 5, 0x0080, 0x10, 1, 1),
259d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(214, 214, 5, 0x0080, 0x10, 2, 1),
260d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(215, 215, 5, 0x0080, 0x10, 2, 1),
261d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(216, 216, 5, 0x0080, 0x10, 2, 1),
262d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(217, 217, 5, 0x0080, 0x10, 2, 1),
263d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(218, 218, 5, 0x0080, 0x10, 3, 1),
264d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(219, 219, 5, 0x0080, 0x10, 4, 1),
265d32f38f2SZhiyong Tao };
266d32f38f2SZhiyong Tao 
267d32f38f2SZhiyong Tao static const struct mtk_pin_field_calc mt8192_pin_ies_range[] = {
268d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(0, 0, 4, 0x0070, 0x10, 9, 1),
269d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(1, 1, 4, 0x0070, 0x10, 10, 1),
270d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(2, 2, 4, 0x0070, 0x10, 11, 1),
271d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(3, 3, 4, 0x0070, 0x10, 12, 1),
272d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(4, 4, 4, 0x0070, 0x10, 13, 1),
273d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(5, 5, 4, 0x0070, 0x10, 14, 1),
274d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(6, 6, 4, 0x0070, 0x10, 15, 1),
275d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(7, 7, 4, 0x0070, 0x10, 16, 1),
276d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(8, 8, 4, 0x0070, 0x10, 17, 1),
277d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(9, 9, 4, 0x0070, 0x10, 18, 1),
278d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(10, 10, 6, 0x0010, 0x10, 0, 1),
279d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(11, 11, 6, 0x0010, 0x10, 1, 1),
280d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(12, 12, 6, 0x0010, 0x10, 2, 1),
281d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(13, 13, 6, 0x0010, 0x10, 3, 1),
282d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(14, 14, 6, 0x0010, 0x10, 4, 1),
283d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(15, 15, 6, 0x0010, 0x10, 5, 1),
284d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(16, 16, 8, 0x0030, 0x10, 2, 1),
285d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(17, 17, 8, 0x0030, 0x10, 3, 1),
286d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(18, 18, 7, 0x0050, 0x10, 21, 1),
287d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(19, 19, 7, 0x0050, 0x10, 22, 1),
288d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(20, 20, 7, 0x0050, 0x10, 23, 1),
289d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(21, 21, 7, 0x0050, 0x10, 24, 1),
290d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(22, 22, 2, 0x0050, 0x10, 3, 1),
291d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(23, 23, 2, 0x0050, 0x10, 4, 1),
292d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(24, 24, 2, 0x0050, 0x10, 5, 1),
293d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(25, 25, 2, 0x0050, 0x10, 6, 1),
294d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(26, 26, 3, 0x0040, 0x10, 5, 1),
295d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(27, 27, 3, 0x0040, 0x10, 6, 1),
296d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(28, 28, 3, 0x0040, 0x10, 7, 1),
297d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(29, 29, 3, 0x0040, 0x10, 8, 1),
298d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(30, 30, 3, 0x0040, 0x10, 9, 1),
299d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(31, 31, 3, 0x0030, 0x10, 27, 1),
300d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(32, 32, 3, 0x0030, 0x10, 24, 1),
301d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(33, 33, 3, 0x0030, 0x10, 26, 1),
302d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(34, 34, 3, 0x0030, 0x10, 23, 1),
303d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(35, 35, 3, 0x0030, 0x10, 25, 1),
304d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(36, 36, 2, 0x0050, 0x10, 20, 1),
305d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(37, 37, 2, 0x0050, 0x10, 21, 1),
306d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(38, 38, 2, 0x0050, 0x10, 22, 1),
307d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(39, 39, 2, 0x0050, 0x10, 23, 1),
308d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(40, 40, 8, 0x0030, 0x10, 0, 1),
309d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(41, 41, 8, 0x0030, 0x10, 1, 1),
310d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(42, 42, 8, 0x0030, 0x10, 4, 1),
311d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(43, 43, 7, 0x0050, 0x10, 25, 1),
312d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(44, 44, 7, 0x0050, 0x10, 26, 1),
313d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(45, 45, 1, 0x0030, 0x10, 18, 1),
314d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(46, 46, 1, 0x0030, 0x10, 20, 1),
315d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(47, 47, 1, 0x0030, 0x10, 19, 1),
316d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(48, 48, 1, 0x0030, 0x10, 16, 1),
317d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(49, 49, 1, 0x0030, 0x10, 17, 1),
318d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(50, 50, 1, 0x0030, 0x10, 15, 1),
319d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(51, 51, 1, 0x0030, 0x10, 9, 1),
320d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(52, 52, 1, 0x0030, 0x10, 10, 1),
321d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(53, 53, 1, 0x0030, 0x10, 14, 1),
322d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(54, 54, 1, 0x0030, 0x10, 11, 1),
323d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(55, 55, 1, 0x0030, 0x10, 13, 1),
324d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(56, 56, 1, 0x0030, 0x10, 12, 1),
325d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(57, 57, 3, 0x0040, 0x10, 1, 1),
326d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(58, 58, 3, 0x0040, 0x10, 2, 1),
327d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(59, 59, 3, 0x0040, 0x10, 3, 1),
328d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(60, 60, 3, 0x0040, 0x10, 4, 1),
329d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(61, 61, 3, 0x0030, 0x10, 28, 1),
330d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(62, 62, 3, 0x0030, 0x10, 22, 1),
331d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(63, 63, 3, 0x0030, 0x10, 0, 1),
332d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(64, 64, 3, 0x0030, 0x10, 1, 1),
333d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(65, 65, 3, 0x0030, 0x10, 12, 1),
334d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(66, 66, 3, 0x0030, 0x10, 15, 1),
335d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(67, 67, 3, 0x0030, 0x10, 16, 1),
336d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(68, 68, 3, 0x0030, 0x10, 17, 1),
337d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(69, 69, 3, 0x0030, 0x10, 18, 1),
338d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(70, 70, 3, 0x0030, 0x10, 19, 1),
339d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(71, 71, 3, 0x0030, 0x10, 20, 1),
340d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(72, 72, 3, 0x0030, 0x10, 21, 1),
341d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(73, 73, 3, 0x0030, 0x10, 2, 1),
342d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(74, 74, 3, 0x0030, 0x10, 3, 1),
343d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(75, 75, 3, 0x0030, 0x10, 4, 1),
344d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(76, 76, 3, 0x0030, 0x10, 5, 1),
345d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(77, 77, 3, 0x0030, 0x10, 6, 1),
346d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(78, 78, 3, 0x0030, 0x10, 7, 1),
347d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(79, 79, 3, 0x0030, 0x10, 8, 1),
348d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(80, 80, 3, 0x0030, 0x10, 9, 1),
349d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(81, 81, 3, 0x0030, 0x10, 10, 1),
350d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(82, 82, 3, 0x0030, 0x10, 11, 1),
351d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(83, 83, 3, 0x0030, 0x10, 13, 1),
352d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(84, 84, 3, 0x0030, 0x10, 14, 1),
353d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(85, 85, 3, 0x0030, 0x10, 31, 1),
354d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(86, 86, 3, 0x0040, 0x10, 0, 1),
355d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(87, 87, 3, 0x0030, 0x10, 29, 1),
356d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(88, 88, 3, 0x0030, 0x10, 30, 1),
357d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(89, 89, 2, 0x0050, 0x10, 24, 1),
358d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(90, 90, 2, 0x0050, 0x10, 25, 1),
359d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(91, 91, 2, 0x0050, 0x10, 0, 1),
360d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(92, 92, 2, 0x0060, 0x10, 1, 1),
361d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(93, 93, 2, 0x0060, 0x10, 3, 1),
362d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(94, 94, 2, 0x0060, 0x10, 2, 1),
363d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(95, 95, 2, 0x0060, 0x10, 4, 1),
364d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(96, 96, 2, 0x0050, 0x10, 31, 1),
365d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(97, 97, 2, 0x0050, 0x10, 26, 1),
366d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(98, 98, 2, 0x0060, 0x10, 0, 1),
367d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(99, 99, 2, 0x0050, 0x10, 27, 1),
368d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(100, 100, 2, 0x0050, 0x10, 28, 1),
369d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(101, 101, 2, 0x0050, 0x10, 29, 1),
370d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(102, 102, 2, 0x0050, 0x10, 30, 1),
371d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(103, 103, 2, 0x0050, 0x10, 18, 1),
372d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(104, 104, 2, 0x0050, 0x10, 17, 1),
373d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(105, 105, 2, 0x0050, 0x10, 19, 1),
374d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(106, 106, 2, 0x0050, 0x10, 16, 1),
375d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(107, 107, 2, 0x0050, 0x10, 1, 1),
376d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(108, 108, 2, 0x0050, 0x10, 2, 1),
377d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(109, 109, 2, 0x0050, 0x10, 10, 1),
378d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(110, 110, 2, 0x0050, 0x10, 7, 1),
379d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(111, 111, 2, 0x0050, 0x10, 9, 1),
380d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(112, 112, 2, 0x0050, 0x10, 11, 1),
381d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(113, 113, 2, 0x0050, 0x10, 8, 1),
382d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(114, 114, 2, 0x0050, 0x10, 14, 1),
383d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(115, 115, 2, 0x0050, 0x10, 13, 1),
384d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(116, 116, 2, 0x0050, 0x10, 15, 1),
385d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(117, 117, 2, 0x0050, 0x10, 12, 1),
386d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(118, 118, 4, 0x0070, 0x10, 23, 1),
387d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(119, 119, 4, 0x0070, 0x10, 29, 1),
388d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(120, 120, 4, 0x0070, 0x10, 28, 1),
389d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(121, 121, 4, 0x0080, 0x10, 2, 1),
390d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(122, 122, 4, 0x0070, 0x10, 27, 1),
391d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(123, 123, 4, 0x0080, 0x10, 1, 1),
392d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(124, 124, 4, 0x0070, 0x10, 26, 1),
393d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(125, 125, 4, 0x0080, 0x10, 0, 1),
394d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(126, 126, 4, 0x0070, 0x10, 19, 1),
395d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(127, 127, 4, 0x0070, 0x10, 20, 1),
396d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(128, 128, 4, 0x0070, 0x10, 21, 1),
397d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(129, 129, 4, 0x0070, 0x10, 22, 1),
398d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(130, 130, 4, 0x0070, 0x10, 6, 1),
399d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(131, 131, 4, 0x0070, 0x10, 7, 1),
400d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(132, 132, 4, 0x0070, 0x10, 8, 1),
401d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(133, 133, 4, 0x0070, 0x10, 3, 1),
402d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(134, 134, 4, 0x0070, 0x10, 4, 1),
403d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(135, 135, 4, 0x0070, 0x10, 5, 1),
404d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(136, 136, 4, 0x0070, 0x10, 0, 1),
405d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(137, 137, 4, 0x0070, 0x10, 1, 1),
406d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(138, 138, 4, 0x0070, 0x10, 2, 1),
407d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(139, 139, 4, 0x0070, 0x10, 25, 1),
408d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(140, 140, 4, 0x0070, 0x10, 31, 1),
409d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(141, 141, 4, 0x0070, 0x10, 24, 1),
410d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(142, 142, 4, 0x0070, 0x10, 30, 1),
411d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(143, 143, 1, 0x0030, 0x10, 6, 1),
412d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(144, 144, 1, 0x0030, 0x10, 7, 1),
413d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(145, 145, 1, 0x0030, 0x10, 8, 1),
414d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(146, 146, 1, 0x0030, 0x10, 3, 1),
415d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(147, 147, 1, 0x0030, 0x10, 4, 1),
416d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(148, 148, 1, 0x0030, 0x10, 5, 1),
417d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(149, 149, 1, 0x0030, 0x10, 0, 1),
418d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(150, 150, 1, 0x0030, 0x10, 1, 1),
419d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(151, 151, 1, 0x0030, 0x10, 2, 1),
420d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(152, 152, 7, 0x0050, 0x10, 30, 1),
421d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(153, 153, 7, 0x0050, 0x10, 29, 1),
422d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(154, 154, 7, 0x0050, 0x10, 27, 1),
423d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(155, 155, 7, 0x0050, 0x10, 28, 1),
424d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(156, 156, 7, 0x0060, 0x10, 1, 1),
425d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(157, 157, 7, 0x0060, 0x10, 2, 1),
426d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(158, 158, 7, 0x0060, 0x10, 3, 1),
427d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(159, 159, 7, 0x0060, 0x10, 4, 1),
428d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(160, 160, 7, 0x0050, 0x10, 31, 1),
429d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(161, 161, 7, 0x0060, 0x10, 0, 1),
430d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(162, 162, 7, 0x0050, 0x10, 0, 1),
431d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(163, 163, 7, 0x0050, 0x10, 1, 1),
432d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(164, 164, 7, 0x0050, 0x10, 2, 1),
433d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(165, 165, 7, 0x0050, 0x10, 3, 1),
434d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(166, 166, 7, 0x0050, 0x10, 4, 1),
435d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(167, 167, 7, 0x0050, 0x10, 5, 1),
436d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(168, 168, 7, 0x0050, 0x10, 6, 1),
437d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(169, 169, 7, 0x0050, 0x10, 7, 1),
438d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(170, 170, 7, 0x0050, 0x10, 8, 1),
439d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(171, 171, 7, 0x0050, 0x10, 9, 1),
440d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(172, 172, 7, 0x0050, 0x10, 13, 1),
441d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(173, 173, 7, 0x0050, 0x10, 14, 1),
442d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(174, 174, 7, 0x0050, 0x10, 12, 1),
443d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(175, 175, 7, 0x0050, 0x10, 15, 1),
444d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(176, 176, 7, 0x0050, 0x10, 10, 1),
445d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(177, 177, 7, 0x0050, 0x10, 11, 1),
446d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(178, 178, 7, 0x0050, 0x10, 16, 1),
447d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(179, 179, 7, 0x0050, 0x10, 17, 1),
448d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(180, 180, 7, 0x0050, 0x10, 18, 1),
449d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(181, 181, 7, 0x0050, 0x10, 19, 1),
450d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(182, 182, 7, 0x0050, 0x10, 20, 1),
451d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(183, 183, 9, 0x0020, 0x10, 1, 1),
452d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(184, 184, 9, 0x0020, 0x10, 2, 1),
453d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(185, 185, 9, 0x0020, 0x10, 4, 1),
454d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(186, 186, 9, 0x0020, 0x10, 6, 1),
455d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(187, 187, 9, 0x0020, 0x10, 8, 1),
456d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(188, 188, 9, 0x0020, 0x10, 3, 1),
457d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(189, 189, 9, 0x0020, 0x10, 7, 1),
458d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(190, 190, 9, 0x0020, 0x10, 9, 1),
459d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(191, 191, 9, 0x0020, 0x10, 10, 1),
460d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(192, 192, 9, 0x0020, 0x10, 0, 1),
461d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(193, 193, 9, 0x0020, 0x10, 5, 1),
462d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(194, 194, 9, 0x0020, 0x10, 11, 1),
463d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(195, 195, 5, 0x0030, 0x10, 16, 1),
464d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(196, 196, 5, 0x0030, 0x10, 6, 1),
465d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(197, 197, 5, 0x0030, 0x10, 8, 1),
466d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(198, 198, 5, 0x0030, 0x10, 7, 1),
467d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(199, 199, 5, 0x0030, 0x10, 3, 1),
468d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(200, 200, 8, 0x0030, 0x10, 6, 1),
469d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(201, 201, 8, 0x0030, 0x10, 8, 1),
470d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(202, 202, 5, 0x0030, 0x10, 15, 1),
471d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(203, 203, 5, 0x0030, 0x10, 17, 1),
472d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(204, 204, 8, 0x0030, 0x10, 5, 1),
473d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(205, 205, 8, 0x0030, 0x10, 7, 1),
474d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(206, 206, 5, 0x0030, 0x10, 18, 1),
475d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(207, 207, 5, 0x0030, 0x10, 19, 1),
476d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(208, 208, 5, 0x0030, 0x10, 20, 1),
477d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(209, 209, 5, 0x0030, 0x10, 12, 1),
478d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(210, 210, 5, 0x0030, 0x10, 11, 1),
479d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(211, 211, 5, 0x0030, 0x10, 13, 1),
480d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(212, 212, 5, 0x0030, 0x10, 10, 1),
481d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(213, 213, 5, 0x0030, 0x10, 14, 1),
482d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(214, 214, 5, 0x0030, 0x10, 0, 1),
483d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(215, 215, 5, 0x0030, 0x10, 9, 1),
484d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(216, 216, 5, 0x0030, 0x10, 4, 1),
485d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(217, 217, 5, 0x0030, 0x10, 5, 1),
486d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(218, 218, 5, 0x0030, 0x10, 1, 1),
487d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(219, 219, 5, 0x0030, 0x10, 2, 1),
488d32f38f2SZhiyong Tao };
489d32f38f2SZhiyong Tao 
490d32f38f2SZhiyong Tao static const struct mtk_pin_field_calc mt8192_pin_pu_range[] = {
491d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(0, 0, 4, 0x00b0, 0x10, 9, 1),
492d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(1, 1, 4, 0x00b0, 0x10, 10, 1),
493d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(2, 2, 4, 0x00b0, 0x10, 11, 1),
494d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(3, 3, 4, 0x00b0, 0x10, 12, 1),
495d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(4, 4, 4, 0x00b0, 0x10, 13, 1),
496d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(5, 5, 4, 0x00b0, 0x10, 14, 1),
497d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(6, 6, 4, 0x00b0, 0x10, 15, 1),
498d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(7, 7, 4, 0x00b0, 0x10, 16, 1),
499d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(8, 8, 4, 0x00b0, 0x10, 17, 1),
500d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(9, 9, 4, 0x00b0, 0x10, 18, 1),
501d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(16, 16, 8, 0x0050, 0x10, 2, 1),
502d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(17, 17, 8, 0x0050, 0x10, 3, 1),
503d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(18, 18, 7, 0x00a0, 0x10, 21, 1),
504d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(19, 19, 7, 0x00a0, 0x10, 22, 1),
505d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(20, 20, 7, 0x00a0, 0x10, 23, 1),
506d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(21, 21, 7, 0x00a0, 0x10, 24, 1),
507d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(22, 22, 2, 0x0090, 0x10, 3, 1),
508d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(23, 23, 2, 0x0090, 0x10, 4, 1),
509d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(24, 24, 2, 0x0090, 0x10, 5, 1),
510d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(25, 25, 2, 0x0090, 0x10, 6, 1),
511d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(26, 26, 3, 0x0080, 0x10, 5, 1),
512d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(27, 27, 3, 0x0080, 0x10, 6, 1),
513d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(28, 28, 3, 0x0080, 0x10, 7, 1),
514d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(29, 29, 3, 0x0080, 0x10, 8, 1),
515d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(30, 30, 3, 0x0080, 0x10, 9, 1),
516d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(31, 31, 3, 0x0070, 0x10, 27, 1),
517d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(32, 32, 3, 0x0070, 0x10, 24, 1),
518d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(33, 33, 3, 0x0070, 0x10, 26, 1),
519d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(34, 34, 3, 0x0070, 0x10, 23, 1),
520d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(35, 35, 3, 0x0070, 0x10, 25, 1),
521d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(36, 36, 2, 0x0090, 0x10, 20, 1),
522d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(37, 37, 2, 0x0090, 0x10, 21, 1),
523d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(38, 38, 2, 0x0090, 0x10, 22, 1),
524d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(39, 39, 2, 0x0090, 0x10, 23, 1),
525d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(40, 40, 8, 0x0050, 0x10, 0, 1),
526d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(41, 41, 8, 0x0050, 0x10, 1, 1),
527d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(42, 42, 8, 0x0050, 0x10, 4, 1),
528d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(43, 43, 7, 0x00a0, 0x10, 25, 1),
529d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(44, 44, 7, 0x00a0, 0x10, 26, 1),
530d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(57, 57, 3, 0x0080, 0x10, 1, 1),
531d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(58, 58, 3, 0x0080, 0x10, 2, 1),
532d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(59, 59, 3, 0x0080, 0x10, 3, 1),
533d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(60, 60, 3, 0x0080, 0x10, 4, 1),
534d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(61, 61, 3, 0x0070, 0x10, 28, 1),
535d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(62, 62, 3, 0x0070, 0x10, 22, 1),
536d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(63, 63, 3, 0x0070, 0x10, 0, 1),
537d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(64, 64, 3, 0x0070, 0x10, 1, 1),
538d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(65, 65, 3, 0x0070, 0x10, 12, 1),
539d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(66, 66, 3, 0x0070, 0x10, 15, 1),
540d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(67, 67, 3, 0x0070, 0x10, 16, 1),
541d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(68, 68, 3, 0x0070, 0x10, 17, 1),
542d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(69, 69, 3, 0x0070, 0x10, 18, 1),
543d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(70, 70, 3, 0x0070, 0x10, 19, 1),
544d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(71, 71, 3, 0x0070, 0x10, 20, 1),
545d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(72, 72, 3, 0x0070, 0x10, 21, 1),
546d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(73, 73, 3, 0x0070, 0x10, 2, 1),
547d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(74, 74, 3, 0x0070, 0x10, 3, 1),
548d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(75, 75, 3, 0x0070, 0x10, 4, 1),
549d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(76, 76, 3, 0x0070, 0x10, 5, 1),
550d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(77, 77, 3, 0x0070, 0x10, 6, 1),
551d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(78, 78, 3, 0x0070, 0x10, 7, 1),
552d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(79, 79, 3, 0x0070, 0x10, 8, 1),
553d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(80, 80, 3, 0x0070, 0x10, 9, 1),
554d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(81, 81, 3, 0x0070, 0x10, 10, 1),
555d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(82, 82, 3, 0x0070, 0x10, 11, 1),
556d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(83, 83, 3, 0x0070, 0x10, 13, 1),
557d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(84, 84, 3, 0x0070, 0x10, 14, 1),
558d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(85, 85, 3, 0x0070, 0x10, 31, 1),
559d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(86, 86, 3, 0x0080, 0x10, 0, 1),
560d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(87, 87, 3, 0x0070, 0x10, 29, 1),
561d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(88, 88, 3, 0x0070, 0x10, 30, 1),
562d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(89, 89, 2, 0x0090, 0x10, 24, 1),
563d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(90, 90, 2, 0x0090, 0x10, 25, 1),
564d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(91, 91, 2, 0x0090, 0x10, 0, 1),
565d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(92, 92, 2, 0x00a0, 0x10, 2, 1),
566d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(93, 93, 2, 0x00a0, 0x10, 4, 1),
567d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(94, 94, 2, 0x00a0, 0x10, 3, 1),
568d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(95, 95, 2, 0x00a0, 0x10, 5, 1),
569d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(96, 96, 2, 0x0090, 0x10, 31, 1),
570d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(97, 97, 2, 0x0090, 0x10, 26, 1),
571d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(98, 98, 2, 0x00a0, 0x10, 0, 1),
572d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(99, 99, 2, 0x0090, 0x10, 27, 1),
573d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(100, 100, 2, 0x0090, 0x10, 28, 1),
574d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(101, 101, 2, 0x0090, 0x10, 29, 1),
575d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(102, 102, 2, 0x0090, 0x10, 30, 1),
576d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(103, 103, 2, 0x0090, 0x10, 18, 1),
577d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(104, 104, 2, 0x0090, 0x10, 17, 1),
578d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(105, 105, 2, 0x0090, 0x10, 19, 1),
579d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(106, 106, 2, 0x0090, 0x10, 16, 1),
580d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(107, 107, 2, 0x0090, 0x10, 1, 1),
581d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(108, 108, 2, 0x0090, 0x10, 2, 1),
582d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(109, 109, 2, 0x0090, 0x10, 10, 1),
583d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(110, 110, 2, 0x0090, 0x10, 7, 1),
584d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(111, 111, 2, 0x0090, 0x10, 9, 1),
585d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(112, 112, 2, 0x0090, 0x10, 11, 1),
586d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(113, 113, 2, 0x0090, 0x10, 8, 1),
587d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(114, 114, 2, 0x0090, 0x10, 14, 1),
588d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(115, 115, 2, 0x0090, 0x10, 13, 1),
589d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(116, 116, 2, 0x0090, 0x10, 15, 1),
590d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(117, 117, 2, 0x0090, 0x10, 12, 1),
591d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(118, 118, 4, 0x00b0, 0x10, 23, 1),
592d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(119, 119, 4, 0x00b0, 0x10, 29, 1),
593d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(120, 120, 4, 0x00b0, 0x10, 28, 1),
594d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(121, 121, 4, 0x00c0, 0x10, 2, 1),
595d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(122, 122, 4, 0x00b0, 0x10, 27, 1),
596d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(123, 123, 4, 0x00c0, 0x10, 1, 1),
597d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(124, 124, 4, 0x00b0, 0x10, 26, 1),
598d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(125, 125, 4, 0x00c0, 0x10, 0, 1),
599d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(126, 126, 4, 0x00b0, 0x10, 19, 1),
600d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(127, 127, 4, 0x00b0, 0x10, 20, 1),
601d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(128, 128, 4, 0x00b0, 0x10, 21, 1),
602d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(129, 129, 4, 0x00b0, 0x10, 22, 1),
603d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(130, 130, 4, 0x00b0, 0x10, 6, 1),
604d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(131, 131, 4, 0x00b0, 0x10, 7, 1),
605d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(132, 132, 4, 0x00b0, 0x10, 8, 1),
606d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(133, 133, 4, 0x00b0, 0x10, 3, 1),
607d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(134, 134, 4, 0x00b0, 0x10, 4, 1),
608d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(135, 135, 4, 0x00b0, 0x10, 5, 1),
609d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(136, 136, 4, 0x00b0, 0x10, 0, 1),
610d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(137, 137, 4, 0x00b0, 0x10, 1, 1),
611d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(138, 138, 4, 0x00b0, 0x10, 2, 1),
612d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(139, 139, 4, 0x00b0, 0x10, 25, 1),
613d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(140, 140, 4, 0x00b0, 0x10, 31, 1),
614d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(141, 141, 4, 0x00b0, 0x10, 24, 1),
615d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(142, 142, 4, 0x00b0, 0x10, 30, 1),
616d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(143, 143, 1, 0x0070, 0x10, 6, 1),
617d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(144, 144, 1, 0x0070, 0x10, 7, 1),
618d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(145, 145, 1, 0x0070, 0x10, 8, 1),
619d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(146, 146, 1, 0x0070, 0x10, 3, 1),
620d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(147, 147, 1, 0x0070, 0x10, 4, 1),
621d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(148, 148, 1, 0x0070, 0x10, 5, 1),
622d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(149, 149, 1, 0x0070, 0x10, 0, 1),
623d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(150, 150, 1, 0x0070, 0x10, 1, 1),
624d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(151, 151, 1, 0x0070, 0x10, 2, 1),
625d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(156, 156, 7, 0x00a0, 0x10, 29, 1),
626d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(157, 157, 7, 0x00a0, 0x10, 30, 1),
627d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(158, 158, 7, 0x00a0, 0x10, 31, 1),
628d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(159, 159, 7, 0x00b0, 0x10, 0, 1),
629d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(160, 160, 7, 0x00a0, 0x10, 27, 1),
630d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(161, 161, 7, 0x00a0, 0x10, 28, 1),
631d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(162, 162, 7, 0x00a0, 0x10, 0, 1),
632d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(163, 163, 7, 0x00a0, 0x10, 1, 1),
633d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(164, 164, 7, 0x00a0, 0x10, 2, 1),
634d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(165, 165, 7, 0x00a0, 0x10, 3, 1),
635d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(166, 166, 7, 0x00a0, 0x10, 4, 1),
636d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(167, 167, 7, 0x00a0, 0x10, 5, 1),
637d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(168, 168, 7, 0x00a0, 0x10, 6, 1),
638d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(169, 169, 7, 0x00a0, 0x10, 7, 1),
639d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(170, 170, 7, 0x00a0, 0x10, 8, 1),
640d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(171, 171, 7, 0x00a0, 0x10, 9, 1),
641d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(172, 172, 7, 0x00a0, 0x10, 13, 1),
642d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(173, 173, 7, 0x00a0, 0x10, 14, 1),
643d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(174, 174, 7, 0x00a0, 0x10, 12, 1),
644d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(175, 175, 7, 0x00a0, 0x10, 15, 1),
645d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(176, 176, 7, 0x00a0, 0x10, 10, 1),
646d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(177, 177, 7, 0x00a0, 0x10, 11, 1),
647d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(178, 178, 7, 0x00a0, 0x10, 16, 1),
648d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(179, 179, 7, 0x00a0, 0x10, 17, 1),
649d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(180, 180, 7, 0x00a0, 0x10, 18, 1),
650d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(181, 181, 7, 0x00a0, 0x10, 19, 1),
651d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(182, 182, 7, 0x00a0, 0x10, 20, 1),
652d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(195, 195, 5, 0x0050, 0x10, 16, 1),
653d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(196, 196, 5, 0x0050, 0x10, 6, 1),
654d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(197, 197, 5, 0x0050, 0x10, 8, 1),
655d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(198, 198, 5, 0x0050, 0x10, 7, 1),
656d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(199, 199, 5, 0x0050, 0x10, 3, 1),
657d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(200, 200, 8, 0x0050, 0x10, 6, 1),
658d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(201, 201, 8, 0x0050, 0x10, 8, 1),
659d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(202, 202, 5, 0x0050, 0x10, 15, 1),
660d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(203, 203, 5, 0x0050, 0x10, 17, 1),
661d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(204, 204, 8, 0x0050, 0x10, 5, 1),
662d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(205, 205, 8, 0x0050, 0x10, 7, 1),
663d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(206, 206, 5, 0x0050, 0x10, 18, 1),
664d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(207, 207, 5, 0x0050, 0x10, 19, 1),
665d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(208, 208, 5, 0x0050, 0x10, 20, 1),
666d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(209, 209, 5, 0x0050, 0x10, 12, 1),
667d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(210, 210, 5, 0x0050, 0x10, 11, 1),
668d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(211, 211, 5, 0x0050, 0x10, 13, 1),
669d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(212, 212, 5, 0x0050, 0x10, 10, 1),
670d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(213, 213, 5, 0x0050, 0x10, 14, 1),
671d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(214, 214, 5, 0x0050, 0x10, 0, 1),
672d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(215, 215, 5, 0x0050, 0x10, 9, 1),
673d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(216, 216, 5, 0x0050, 0x10, 4, 1),
674d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(217, 217, 5, 0x0050, 0x10, 5, 1),
675d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(218, 218, 5, 0x0050, 0x10, 1, 1),
676d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(219, 219, 5, 0x0050, 0x10, 2, 1),
677d32f38f2SZhiyong Tao };
678d32f38f2SZhiyong Tao 
679d32f38f2SZhiyong Tao static const struct mtk_pin_field_calc mt8192_pin_pd_range[] = {
680d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(0, 0, 4, 0x0090, 0x10, 9, 1),
681d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(1, 1, 4, 0x0090, 0x10, 10, 1),
682d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(2, 2, 4, 0x0090, 0x10, 11, 1),
683d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(3, 3, 4, 0x0090, 0x10, 12, 1),
684d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(4, 4, 4, 0x0090, 0x10, 13, 1),
685d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(5, 5, 4, 0x0090, 0x10, 14, 1),
686d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(6, 6, 4, 0x0090, 0x10, 15, 1),
687d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(7, 7, 4, 0x0090, 0x10, 16, 1),
688d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(8, 8, 4, 0x0090, 0x10, 17, 1),
689d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(9, 9, 4, 0x0090, 0x10, 18, 1),
690d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(16, 16, 8, 0x0040, 0x10, 2, 1),
691d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(17, 17, 8, 0x0040, 0x10, 3, 1),
692d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(18, 18, 7, 0x0070, 0x10, 21, 1),
693d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(19, 19, 7, 0x0070, 0x10, 22, 1),
694d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(20, 20, 7, 0x0070, 0x10, 23, 1),
695d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(21, 21, 7, 0x0070, 0x10, 24, 1),
696d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(22, 22, 2, 0x0070, 0x10, 3, 1),
697d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(23, 23, 2, 0x0070, 0x10, 4, 1),
698d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(24, 24, 2, 0x0070, 0x10, 5, 1),
699d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(25, 25, 2, 0x0070, 0x10, 6, 1),
700d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(26, 26, 3, 0x0060, 0x10, 5, 1),
701d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(27, 27, 3, 0x0060, 0x10, 6, 1),
702d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(28, 28, 3, 0x0060, 0x10, 7, 1),
703d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(29, 29, 3, 0x0060, 0x10, 8, 1),
704d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(30, 30, 3, 0x0060, 0x10, 9, 1),
705d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(31, 31, 3, 0x0050, 0x10, 27, 1),
706d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(32, 32, 3, 0x0050, 0x10, 24, 1),
707d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(33, 33, 3, 0x0050, 0x10, 26, 1),
708d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(34, 34, 3, 0x0050, 0x10, 23, 1),
709d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(35, 35, 3, 0x0050, 0x10, 25, 1),
710d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(36, 36, 2, 0x0070, 0x10, 20, 1),
711d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(37, 37, 2, 0x0070, 0x10, 21, 1),
712d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(38, 38, 2, 0x0070, 0x10, 22, 1),
713d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(39, 39, 2, 0x0070, 0x10, 23, 1),
714d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(40, 40, 8, 0x0040, 0x10, 0, 1),
715d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(41, 41, 8, 0x0040, 0x10, 1, 1),
716d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(42, 42, 8, 0x0040, 0x10, 4, 1),
717d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(43, 43, 7, 0x0070, 0x10, 25, 1),
718d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(44, 44, 7, 0x0070, 0x10, 26, 1),
719d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(57, 57, 3, 0x0060, 0x10, 1, 1),
720d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(58, 58, 3, 0x0060, 0x10, 2, 1),
721d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(59, 59, 3, 0x0060, 0x10, 3, 1),
722d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(60, 60, 3, 0x0060, 0x10, 4, 1),
723d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(61, 61, 3, 0x0050, 0x10, 28, 1),
724d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(62, 62, 3, 0x0050, 0x10, 22, 1),
725d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(63, 63, 3, 0x0050, 0x10, 0, 1),
726d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(64, 64, 3, 0x0050, 0x10, 1, 1),
727d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(65, 65, 3, 0x0050, 0x10, 12, 1),
728d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(66, 66, 3, 0x0050, 0x10, 15, 1),
729d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(67, 67, 3, 0x0050, 0x10, 16, 1),
730d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(68, 68, 3, 0x0050, 0x10, 17, 1),
731d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(69, 69, 3, 0x0050, 0x10, 18, 1),
732d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(70, 70, 3, 0x0050, 0x10, 19, 1),
733d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(71, 71, 3, 0x0050, 0x10, 20, 1),
734d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(72, 72, 3, 0x0050, 0x10, 21, 1),
735d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(73, 73, 3, 0x0050, 0x10, 2, 1),
736d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(74, 74, 3, 0x0050, 0x10, 3, 1),
737d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(75, 75, 3, 0x0050, 0x10, 4, 1),
738d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(76, 76, 3, 0x0050, 0x10, 5, 1),
739d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(77, 77, 3, 0x0050, 0x10, 6, 1),
740d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(78, 78, 3, 0x0050, 0x10, 7, 1),
741d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(79, 79, 3, 0x0050, 0x10, 8, 1),
742d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(80, 80, 3, 0x0050, 0x10, 9, 1),
743d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(81, 81, 3, 0x0050, 0x10, 10, 1),
744d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(82, 82, 3, 0x0050, 0x10, 11, 1),
745d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(83, 83, 3, 0x0050, 0x10, 13, 1),
746d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(84, 84, 3, 0x0050, 0x10, 14, 1),
747d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(85, 85, 3, 0x0050, 0x10, 31, 1),
748d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(86, 86, 3, 0x0060, 0x10, 0, 1),
749d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(87, 87, 3, 0x0050, 0x10, 29, 1),
750d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(88, 88, 3, 0x0050, 0x10, 30, 1),
751d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(89, 89, 2, 0x0070, 0x10, 24, 1),
752d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(90, 90, 2, 0x0070, 0x10, 25, 1),
753d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(91, 91, 2, 0x0070, 0x10, 0, 1),
754d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(92, 92, 2, 0x0080, 0x10, 2, 1),
755d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(93, 93, 2, 0x0080, 0x10, 4, 1),
756d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(94, 94, 2, 0x0080, 0x10, 3, 1),
757d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(95, 95, 2, 0x0080, 0x10, 5, 1),
758d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(96, 96, 2, 0x0070, 0x10, 31, 1),
759d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(97, 97, 2, 0x0070, 0x10, 26, 1),
760d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(98, 98, 2, 0x0080, 0x10, 0, 1),
761d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(99, 99, 2, 0x0070, 0x10, 27, 1),
762d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(100, 100, 2, 0x0070, 0x10, 28, 1),
763d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(101, 101, 2, 0x0070, 0x10, 29, 1),
764d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(102, 102, 2, 0x0070, 0x10, 30, 1),
765d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(103, 103, 2, 0x0070, 0x10, 18, 1),
766d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(104, 104, 2, 0x0070, 0x10, 17, 1),
767d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(105, 105, 2, 0x0070, 0x10, 19, 1),
768d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(106, 106, 2, 0x0070, 0x10, 16, 1),
769d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(107, 107, 2, 0x0070, 0x10, 1, 1),
770d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(108, 108, 2, 0x0070, 0x10, 2, 1),
771d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(109, 109, 2, 0x0070, 0x10, 10, 1),
772d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(110, 110, 2, 0x0070, 0x10, 7, 1),
773d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(111, 111, 2, 0x0070, 0x10, 9, 1),
774d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(112, 112, 2, 0x0070, 0x10, 11, 1),
775d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(113, 113, 2, 0x0070, 0x10, 8, 1),
776d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(114, 114, 2, 0x0070, 0x10, 14, 1),
777d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(115, 115, 2, 0x0070, 0x10, 13, 1),
778d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(116, 116, 2, 0x0070, 0x10, 15, 1),
779d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(117, 117, 2, 0x0070, 0x10, 12, 1),
780d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(118, 118, 4, 0x0090, 0x10, 23, 1),
781d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(119, 119, 4, 0x0090, 0x10, 29, 1),
782d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(120, 120, 4, 0x0090, 0x10, 28, 1),
783d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(121, 121, 4, 0x00a0, 0x10, 2, 1),
784d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(122, 122, 4, 0x0090, 0x10, 27, 1),
785d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(123, 123, 4, 0x00a0, 0x10, 1, 1),
786d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(124, 124, 4, 0x0090, 0x10, 26, 1),
787d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(125, 125, 4, 0x00a0, 0x10, 0, 1),
788d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(126, 126, 4, 0x0090, 0x10, 19, 1),
789d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(127, 127, 4, 0x0090, 0x10, 20, 1),
790d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(128, 128, 4, 0x0090, 0x10, 21, 1),
791d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(129, 129, 4, 0x0090, 0x10, 22, 1),
792d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(130, 130, 4, 0x0090, 0x10, 6, 1),
793d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(131, 131, 4, 0x0090, 0x10, 7, 1),
794d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(132, 132, 4, 0x0090, 0x10, 8, 1),
795d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(133, 133, 4, 0x0090, 0x10, 3, 1),
796d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(134, 134, 4, 0x0090, 0x10, 4, 1),
797d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(135, 135, 4, 0x0090, 0x10, 5, 1),
798d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(136, 136, 4, 0x0090, 0x10, 0, 1),
799d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(137, 137, 4, 0x0090, 0x10, 1, 1),
800d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(138, 138, 4, 0x0090, 0x10, 2, 1),
801d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(139, 139, 4, 0x0090, 0x10, 25, 1),
802d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(140, 140, 4, 0x0090, 0x10, 31, 1),
803d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(141, 141, 4, 0x0090, 0x10, 24, 1),
804d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(142, 142, 4, 0x0090, 0x10, 30, 1),
805d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(143, 143, 1, 0x0050, 0x10, 6, 1),
806d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(144, 144, 1, 0x0050, 0x10, 7, 1),
807d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(145, 145, 1, 0x0050, 0x10, 8, 1),
808d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(146, 146, 1, 0x0050, 0x10, 3, 1),
809d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(147, 147, 1, 0x0050, 0x10, 4, 1),
810d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(148, 148, 1, 0x0050, 0x10, 5, 1),
811d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(149, 149, 1, 0x0050, 0x10, 0, 1),
812d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(150, 150, 1, 0x0050, 0x10, 1, 1),
813d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(151, 151, 1, 0x0050, 0x10, 2, 1),
814d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(156, 156, 7, 0x0070, 0x10, 29, 1),
815d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(157, 157, 7, 0x0070, 0x10, 30, 1),
816d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(158, 158, 7, 0x0070, 0x10, 31, 1),
817d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(159, 159, 7, 0x0080, 0x10, 0, 1),
818d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(160, 160, 7, 0x0070, 0x10, 27, 1),
819d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(161, 161, 7, 0x0070, 0x10, 28, 1),
820d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(162, 162, 7, 0x0070, 0x10, 0, 1),
821d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(163, 163, 7, 0x0070, 0x10, 1, 1),
822d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(164, 164, 7, 0x0070, 0x10, 2, 1),
823d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(165, 165, 7, 0x0070, 0x10, 3, 1),
824d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(166, 166, 7, 0x0070, 0x10, 4, 1),
825d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(167, 167, 7, 0x0070, 0x10, 5, 1),
826d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(168, 168, 7, 0x0070, 0x10, 6, 1),
827d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(169, 169, 7, 0x0070, 0x10, 7, 1),
828d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(170, 170, 7, 0x0070, 0x10, 8, 1),
829d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(171, 171, 7, 0x0070, 0x10, 9, 1),
830d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(172, 172, 7, 0x0070, 0x10, 13, 1),
831d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(173, 173, 7, 0x0070, 0x10, 14, 1),
832d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(174, 174, 7, 0x0070, 0x10, 12, 1),
833d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(175, 175, 7, 0x0070, 0x10, 15, 1),
834d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(176, 176, 7, 0x0070, 0x10, 10, 1),
835d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(177, 177, 7, 0x0070, 0x10, 11, 1),
836d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(178, 178, 7, 0x0070, 0x10, 16, 1),
837d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(179, 179, 7, 0x0070, 0x10, 17, 1),
838d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(180, 180, 7, 0x0070, 0x10, 18, 1),
839d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(181, 181, 7, 0x0070, 0x10, 19, 1),
840d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(182, 182, 7, 0x0070, 0x10, 20, 1),
841d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(195, 195, 5, 0x0040, 0x10, 16, 1),
842d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(196, 196, 5, 0x0040, 0x10, 6, 1),
843d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(197, 197, 5, 0x0040, 0x10, 8, 1),
844d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(198, 198, 5, 0x0040, 0x10, 7, 1),
845d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(199, 199, 5, 0x0040, 0x10, 3, 1),
846d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(200, 200, 8, 0x0040, 0x10, 6, 1),
847d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(201, 201, 8, 0x0040, 0x10, 8, 1),
848d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(202, 202, 5, 0x0040, 0x10, 15, 1),
849d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(203, 203, 5, 0x0040, 0x10, 17, 1),
850d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(204, 204, 8, 0x0040, 0x10, 5, 1),
851d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(205, 205, 8, 0x0040, 0x10, 7, 1),
852d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(206, 206, 5, 0x0040, 0x10, 18, 1),
853d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(207, 207, 5, 0x0040, 0x10, 19, 1),
854d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(208, 208, 5, 0x0040, 0x10, 20, 1),
855d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(209, 209, 5, 0x0040, 0x10, 12, 1),
856d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(210, 210, 5, 0x0040, 0x10, 11, 1),
857d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(211, 211, 5, 0x0040, 0x10, 13, 1),
858d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(212, 212, 5, 0x0040, 0x10, 10, 1),
859d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(213, 213, 5, 0x0040, 0x10, 14, 1),
860d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(214, 214, 5, 0x0040, 0x10, 0, 1),
861d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(215, 215, 5, 0x0040, 0x10, 9, 1),
862d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(216, 216, 5, 0x0040, 0x10, 4, 1),
863d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(217, 217, 5, 0x0040, 0x10, 5, 1),
864d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(218, 218, 5, 0x0040, 0x10, 1, 1),
865d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(219, 219, 5, 0x0040, 0x10, 2, 1),
866d32f38f2SZhiyong Tao };
867d32f38f2SZhiyong Tao 
868d32f38f2SZhiyong Tao static const struct mtk_pin_field_calc mt8192_pin_drv_range[] = {
869d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(0, 0, 4, 0x0000, 0x10, 18, 3),
870d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(1, 1, 4, 0x0000, 0x10, 21, 3),
871d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(2, 2, 4, 0x0000, 0x10, 24, 3),
872d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(3, 3, 4, 0x0000, 0x10, 27, 3),
873d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(4, 4, 4, 0x0010, 0x10, 0, 3),
874d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(5, 5, 4, 0x0010, 0x10, 3, 3),
875d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(6, 6, 4, 0x0010, 0x10, 6, 3),
876d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(7, 7, 4, 0x0010, 0x10, 9, 3),
877d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(8, 8, 4, 0x0010, 0x10, 12, 3),
878d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(9, 9, 4, 0x0010, 0x10, 15, 3),
879d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(10, 10, 6, 0x0000, 0x10, 0, 3),
880d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(11, 11, 6, 0x0000, 0x10, 3, 3),
881d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(12, 12, 6, 0x0000, 0x10, 6, 3),
882d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(13, 13, 6, 0x0000, 0x10, 9, 3),
883d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(14, 14, 6, 0x0000, 0x10, 12, 3),
884d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(15, 15, 6, 0x0000, 0x10, 15, 3),
885d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(16, 16, 8, 0x0000, 0x10, 0, 3),
886d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(17, 17, 8, 0x0000, 0x10, 0, 3),
887d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(18, 18, 7, 0x0010, 0x10, 15, 3),
888d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(19, 19, 7, 0x0010, 0x10, 15, 3),
889d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(20, 20, 7, 0x0010, 0x10, 18, 3),
890d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(21, 21, 7, 0x0010, 0x10, 18, 3),
891d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(22, 22, 2, 0x0000, 0x10, 6, 3),
892d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(23, 23, 2, 0x0000, 0x10, 9, 3),
893d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(24, 24, 2, 0x0000, 0x10, 12, 3),
894d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(25, 25, 2, 0x0000, 0x10, 15, 3),
895d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(26, 26, 3, 0x0000, 0x10, 15, 3),
896d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(27, 27, 3, 0x0000, 0x10, 18, 3),
897d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(28, 28, 3, 0x0000, 0x10, 21, 3),
898d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(29, 29, 3, 0x0000, 0x10, 24, 3),
899d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(30, 30, 3, 0x0000, 0x10, 27, 3),
900d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(31, 31, 3, 0x0000, 0x10, 12, 3),
901d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(32, 32, 3, 0x0000, 0x10, 3, 3),
902d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(33, 33, 3, 0x0000, 0x10, 9, 3),
903d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(34, 34, 3, 0x0000, 0x10, 0, 3),
904d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(35, 35, 3, 0x0000, 0x10, 6, 3),
905d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(36, 36, 2, 0x0010, 0x10, 21, 3),
906d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(37, 37, 2, 0x0010, 0x10, 24, 3),
907d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(38, 38, 2, 0x0010, 0x10, 27, 3),
908d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(39, 39, 2, 0x0020, 0x10, 0, 3),
909d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(40, 40, 8, 0x0000, 0x10, 0, 3),
910d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(41, 41, 8, 0x0000, 0x10, 0, 3),
911d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(42, 42, 8, 0x0000, 0x10, 3, 3),
912d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(43, 43, 7, 0x0010, 0x10, 15, 3),
913d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(44, 44, 7, 0x0010, 0x10, 15, 3),
914d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(45, 45, 1, 0x0010, 0x10, 6, 2),
915d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(46, 46, 1, 0x0010, 0x10, 6, 2),
916d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(47, 47, 1, 0x0010, 0x10, 6, 2),
917d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(48, 48, 1, 0x0010, 0x10, 8, 2),
918d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(49, 49, 1, 0x0010, 0x10, 8, 2),
919d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(50, 50, 1, 0x0010, 0x10, 8, 2),
920d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(51, 51, 1, 0x0000, 0x10, 12, 3),
921d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(52, 52, 1, 0x0000, 0x10, 15, 3),
922d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(53, 53, 1, 0x0000, 0x10, 27, 3),
923d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(54, 54, 1, 0x0000, 0x10, 18, 3),
924d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(55, 55, 1, 0x0000, 0x10, 24, 3),
925d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(56, 56, 1, 0x0000, 0x10, 21, 3),
926d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(57, 57, 3, 0x0010, 0x10, 24, 3),
927d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(58, 58, 3, 0x0010, 0x10, 24, 3),
928d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(59, 59, 3, 0x0010, 0x10, 27, 3),
929d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(60, 60, 3, 0x0010, 0x10, 27, 3),
930d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(61, 61, 3, 0x0020, 0x10, 0, 3),
931d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(62, 62, 3, 0x0020, 0x10, 0, 3),
932d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(63, 63, 3, 0x0010, 0x10, 0, 3),
933d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(64, 64, 3, 0x0010, 0x10, 0, 3),
934d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(65, 65, 3, 0x0010, 0x10, 0, 3),
935d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(66, 66, 3, 0x0010, 0x10, 0, 3),
936d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(67, 67, 3, 0x0010, 0x10, 3, 3),
937d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(68, 68, 3, 0x0010, 0x10, 3, 3),
938d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(69, 69, 3, 0x0010, 0x10, 3, 3),
939d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(70, 70, 3, 0x0010, 0x10, 3, 3),
940d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(71, 71, 3, 0x0010, 0x10, 6, 3),
941d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(72, 72, 3, 0x0010, 0x10, 6, 3),
942d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(73, 73, 3, 0x0010, 0x10, 6, 3),
943d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(74, 74, 3, 0x0010, 0x10, 6, 3),
944d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(75, 75, 3, 0x0010, 0x10, 9, 3),
945d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(76, 76, 3, 0x0010, 0x10, 9, 3),
946d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(77, 77, 3, 0x0010, 0x10, 9, 3),
947d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(78, 78, 3, 0x0010, 0x10, 9, 3),
948d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(79, 79, 3, 0x0010, 0x10, 12, 3),
949d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(80, 80, 3, 0x0010, 0x10, 12, 3),
950d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(81, 81, 3, 0x0010, 0x10, 12, 3),
951d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(82, 82, 3, 0x0010, 0x10, 12, 3),
952d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(83, 83, 3, 0x0010, 0x10, 15, 3),
953d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(84, 84, 3, 0x0010, 0x10, 15, 3),
954d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(85, 85, 3, 0x0010, 0x10, 21, 3),
955d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(86, 86, 3, 0x0010, 0x10, 21, 3),
956d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(87, 87, 3, 0x0010, 0x10, 18, 3),
957d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(88, 88, 3, 0x0010, 0x10, 18, 3),
958d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(89, 89, 2, 0x0020, 0x10, 3, 3),
959d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(90, 90, 2, 0x0020, 0x10, 6, 3),
960d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(91, 91, 2, 0x0010, 0x10, 3, 3),
961d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(92, 92, 2, 0x0010, 0x10, 3, 3),
962d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(93, 93, 2, 0x0010, 0x10, 3, 3),
963d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(94, 94, 2, 0x0010, 0x10, 3, 3),
964d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(95, 95, 2, 0x0010, 0x10, 3, 3),
965d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(96, 96, 2, 0x0020, 0x10, 24, 3),
966d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(97, 97, 2, 0x0020, 0x10, 9, 3),
967d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(98, 98, 2, 0x0020, 0x10, 27, 3),
968d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(99, 99, 2, 0x0020, 0x10, 12, 3),
969d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(100, 100, 2, 0x0020, 0x10, 15, 3),
970d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(101, 101, 2, 0x0020, 0x10, 18, 3),
971d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(102, 102, 2, 0x0020, 0x10, 21, 3),
972d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(103, 103, 2, 0x0010, 0x10, 6, 3),
973d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(104, 104, 2, 0x0010, 0x10, 6, 3),
974d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(105, 105, 2, 0x0010, 0x10, 6, 3),
975d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(106, 106, 2, 0x0010, 0x10, 6, 3),
976d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(107, 107, 2, 0x0000, 0x10, 0, 3),
977d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(108, 108, 2, 0x0000, 0x10, 3, 3),
978d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(109, 109, 2, 0x0000, 0x10, 27, 3),
979d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(110, 110, 2, 0x0000, 0x10, 18, 3),
980d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(111, 111, 2, 0x0000, 0x10, 24, 3),
981d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(112, 112, 2, 0x0010, 0x10, 0, 3),
982d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(113, 113, 2, 0x0000, 0x10, 21, 3),
983d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(114, 114, 2, 0x0010, 0x10, 15, 3),
984d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(115, 115, 2, 0x0010, 0x10, 12, 3),
985d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(116, 116, 2, 0x0010, 0x10, 18, 3),
986d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(117, 117, 2, 0x0010, 0x10, 9, 3),
987d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(118, 118, 4, 0x0020, 0x10, 3, 3),
988d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(119, 119, 4, 0x0020, 0x10, 21, 3),
989d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(120, 120, 4, 0x0020, 0x10, 18, 3),
990d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(121, 121, 4, 0x0030, 0x10, 6, 3),
991d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(122, 122, 4, 0x0020, 0x10, 15, 3),
992d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(123, 123, 4, 0x0030, 0x10, 3, 3),
993d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(124, 124, 4, 0x0020, 0x10, 12, 3),
994d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(125, 125, 4, 0x0030, 0x10, 0, 3),
995d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(126, 126, 4, 0x0010, 0x10, 18, 3),
996d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(127, 127, 4, 0x0010, 0x10, 21, 3),
997d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(128, 128, 4, 0x0010, 0x10, 24, 3),
998d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(129, 129, 4, 0x0010, 0x10, 27, 3),
999d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(130, 130, 4, 0x0000, 0x10, 9, 3),
1000d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(131, 131, 4, 0x0000, 0x10, 12, 3),
1001d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(132, 132, 4, 0x0000, 0x10, 15, 3),
1002d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(133, 133, 4, 0x0020, 0x10, 0, 3),
1003d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(134, 134, 4, 0x0020, 0x10, 0, 3),
1004d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(135, 135, 4, 0x0020, 0x10, 0, 3),
1005d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(136, 136, 4, 0x0000, 0x10, 0, 3),
1006d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(137, 137, 4, 0x0000, 0x10, 3, 3),
1007d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(138, 138, 4, 0x0000, 0x10, 6, 3),
1008d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(139, 139, 4, 0x0020, 0x10, 9, 3),
1009d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(140, 140, 4, 0x0020, 0x10, 27, 3),
1010d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(141, 141, 4, 0x0020, 0x10, 6, 3),
1011d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(142, 142, 4, 0x0020, 0x10, 24, 3),
1012d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(143, 143, 1, 0x0010, 0x10, 0, 3),
1013d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(144, 144, 1, 0x0010, 0x10, 0, 3),
1014d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(145, 145, 1, 0x0010, 0x10, 3, 3),
1015d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(146, 146, 1, 0x0010, 0x10, 0, 3),
1016d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(147, 147, 1, 0x0010, 0x10, 0, 3),
1017d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(148, 148, 1, 0x0000, 0x10, 9, 3),
1018d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(149, 149, 1, 0x0000, 0x10, 0, 3),
1019d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(150, 150, 1, 0x0000, 0x10, 3, 3),
1020d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(151, 151, 1, 0x0000, 0x10, 6, 3),
1021d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(152, 152, 7, 0x0010, 0x10, 21, 3),
1022d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(153, 153, 7, 0x0010, 0x10, 21, 3),
1023d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(154, 154, 7, 0x0010, 0x10, 21, 3),
1024d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(155, 155, 7, 0x0010, 0x10, 21, 3),
1025d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(156, 156, 7, 0x0020, 0x10, 3, 3),
1026d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(157, 157, 7, 0x0020, 0x10, 6, 3),
1027d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(158, 158, 7, 0x0020, 0x10, 9, 3),
1028d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(159, 159, 7, 0x0020, 0x10, 12, 3),
1029d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(160, 160, 7, 0x0010, 0x10, 27, 3),
1030d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(161, 161, 7, 0x0020, 0x10, 0, 3),
1031d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(162, 162, 7, 0x0000, 0x10, 0, 3),
1032d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(163, 163, 7, 0x0000, 0x10, 3, 3),
1033d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(164, 164, 7, 0x0010, 0x10, 24, 3),
1034d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(165, 165, 7, 0x0010, 0x10, 24, 3),
1035d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(166, 166, 7, 0x0010, 0x10, 24, 3),
1036d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(167, 167, 7, 0x0010, 0x10, 24, 3),
1037d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(168, 168, 7, 0x0000, 0x10, 6, 3),
1038d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(169, 169, 7, 0x0000, 0x10, 9, 3),
1039d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(170, 170, 7, 0x0010, 0x10, 24, 3),
1040d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(171, 171, 7, 0x0010, 0x10, 24, 3),
1041d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(172, 172, 7, 0x0000, 0x10, 21, 3),
1042d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(173, 173, 7, 0x0000, 0x10, 24, 3),
1043d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(174, 174, 7, 0x0000, 0x10, 18, 3),
1044d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(175, 175, 7, 0x0000, 0x10, 27, 3),
1045d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(176, 176, 7, 0x0000, 0x10, 12, 3),
1046d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(177, 177, 7, 0x0000, 0x10, 15, 3),
1047d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(178, 178, 7, 0x0010, 0x10, 0, 3),
1048d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(179, 179, 7, 0x0010, 0x10, 3, 3),
1049d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(180, 180, 7, 0x0010, 0x10, 6, 3),
1050d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(181, 181, 7, 0x0010, 0x10, 9, 3),
1051d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(182, 182, 7, 0x0010, 0x10, 12, 3),
1052d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(183, 183, 9, 0x0000, 0x10, 3, 3),
1053d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(184, 184, 9, 0x0000, 0x10, 6, 3),
1054d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(185, 185, 9, 0x0000, 0x10, 12, 3),
1055d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(186, 186, 9, 0x0000, 0x10, 18, 3),
1056d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(187, 187, 9, 0x0000, 0x10, 24, 3),
1057d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(188, 188, 9, 0x0000, 0x10, 9, 3),
1058d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(189, 189, 9, 0x0000, 0x10, 21, 3),
1059d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(190, 190, 9, 0x0000, 0x10, 27, 3),
1060d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(191, 191, 9, 0x0010, 0x10, 0, 3),
1061d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(192, 192, 9, 0x0000, 0x10, 0, 3),
1062d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(193, 193, 9, 0x0000, 0x10, 15, 3),
1063d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(194, 194, 9, 0x0010, 0x10, 3, 3),
1064d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(195, 195, 5, 0x0010, 0x10, 3, 3),
1065d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(196, 196, 5, 0x0000, 0x10, 18, 3),
1066d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(197, 197, 5, 0x0000, 0x10, 24, 3),
1067d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(198, 198, 5, 0x0000, 0x10, 21, 3),
1068d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(199, 199, 5, 0x0000, 0x10, 9, 3),
1069d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(200, 200, 8, 0x0000, 0x10, 9, 3),
1070d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(201, 201, 8, 0x0000, 0x10, 15, 3),
1071d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(202, 202, 5, 0x0010, 0x10, 6, 3),
1072d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(203, 203, 5, 0x0010, 0x10, 9, 3),
1073d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(204, 204, 8, 0x0000, 0x10, 6, 3),
1074d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(205, 205, 8, 0x0000, 0x10, 12, 3),
1075d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(206, 206, 5, 0x0010, 0x10, 3, 3),
1076d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(207, 207, 5, 0x0010, 0x10, 3, 3),
1077d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(208, 208, 5, 0x0010, 0x10, 12, 3),
1078d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(209, 209, 5, 0x0010, 0x10, 0, 3),
1079d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(210, 210, 5, 0x0010, 0x10, 0, 3),
1080d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(211, 211, 5, 0x0010, 0x10, 0, 3),
1081d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(212, 212, 5, 0x0010, 0x10, 0, 3),
1082d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(213, 213, 5, 0x0010, 0x10, 3, 3),
1083d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(214, 214, 5, 0x0000, 0x10, 0, 3),
1084d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(215, 215, 5, 0x0000, 0x10, 27, 3),
1085d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(216, 216, 5, 0x0000, 0x10, 12, 3),
1086d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(217, 217, 5, 0x0000, 0x10, 15, 3),
1087d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(218, 218, 5, 0x0000, 0x10, 3, 3),
1088d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(219, 219, 5, 0x0000, 0x10, 6, 3),
1089d32f38f2SZhiyong Tao };
1090d32f38f2SZhiyong Tao 
1091d32f38f2SZhiyong Tao static const struct mtk_pin_field_calc mt8192_pin_pupd_range[] = {
1092d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(10, 10, 6, 0x0020, 0x10, 0, 1),
1093d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(11, 11, 6, 0x0020, 0x10, 1, 1),
1094d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(12, 12, 6, 0x0020, 0x10, 2, 1),
1095d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(13, 13, 6, 0x0020, 0x10, 3, 1),
1096d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(14, 14, 6, 0x0020, 0x10, 4, 1),
1097d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(15, 15, 6, 0x0020, 0x10, 5, 1),
1098d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(45, 45, 1, 0x0060, 0x10, 9, 1),
1099d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(46, 46, 1, 0x0060, 0x10, 11, 1),
1100d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(47, 47, 1, 0x0060, 0x10, 10, 1),
1101d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(48, 48, 1, 0x0060, 0x10, 7, 1),
1102d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(49, 49, 1, 0x0060, 0x10, 8, 1),
1103d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(50, 50, 1, 0x0060, 0x10, 6, 1),
1104d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(51, 51, 1, 0x0060, 0x10, 0, 1),
1105d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(52, 52, 1, 0x0060, 0x10, 1, 1),
1106d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(53, 53, 1, 0x0060, 0x10, 5, 1),
1107d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(54, 54, 1, 0x0060, 0x10, 2, 1),
1108d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(55, 55, 1, 0x0060, 0x10, 4, 1),
1109d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(56, 56, 1, 0x0060, 0x10, 3, 1),
1110d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(152, 152, 7, 0x0090, 0x10, 3, 1),
1111d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(153, 153, 7, 0x0090, 0x10, 2, 1),
1112d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(154, 154, 7, 0x0090, 0x10, 0, 1),
1113d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(155, 155, 7, 0x0090, 0x10, 1, 1),
1114d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(183, 183, 9, 0x0030, 0x10, 1, 1),
1115d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(184, 184, 9, 0x0030, 0x10, 2, 1),
1116d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(185, 185, 9, 0x0030, 0x10, 4, 1),
1117d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(186, 186, 9, 0x0030, 0x10, 6, 1),
1118d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(187, 187, 9, 0x0030, 0x10, 8, 1),
1119d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(188, 188, 9, 0x0030, 0x10, 3, 1),
1120d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(189, 189, 9, 0x0030, 0x10, 7, 1),
1121d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(190, 190, 9, 0x0030, 0x10, 9, 1),
1122d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(191, 191, 9, 0x0030, 0x10, 10, 1),
1123d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(192, 192, 9, 0x0030, 0x10, 0, 1),
1124d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(193, 193, 9, 0x0030, 0x10, 5, 1),
1125d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(194, 194, 9, 0x0030, 0x10, 11, 1),
1126d32f38f2SZhiyong Tao };
1127d32f38f2SZhiyong Tao 
1128d32f38f2SZhiyong Tao static const struct mtk_pin_field_calc mt8192_pin_r0_range[] = {
1129d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(10, 10, 6, 0x0030, 0x10, 0, 1),
1130d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(11, 11, 6, 0x0030, 0x10, 1, 1),
1131d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(12, 12, 6, 0x0030, 0x10, 2, 1),
1132d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(13, 13, 6, 0x0030, 0x10, 3, 1),
1133d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(14, 14, 6, 0x0030, 0x10, 4, 1),
1134d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(15, 15, 6, 0x0030, 0x10, 5, 1),
1135d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(45, 45, 1, 0x0080, 0x10, 9, 1),
1136d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(46, 46, 1, 0x0080, 0x10, 11, 1),
1137d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(47, 47, 1, 0x0080, 0x10, 10, 1),
1138d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(48, 48, 1, 0x0080, 0x10, 7, 1),
1139d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(49, 49, 1, 0x0080, 0x10, 8, 1),
1140d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(50, 50, 1, 0x0080, 0x10, 6, 1),
1141d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(51, 51, 1, 0x0080, 0x10, 0, 1),
1142d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(52, 52, 1, 0x0080, 0x10, 1, 1),
1143d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(53, 53, 1, 0x0080, 0x10, 5, 1),
1144d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(54, 54, 1, 0x0080, 0x10, 2, 1),
1145d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(55, 55, 1, 0x0080, 0x10, 4, 1),
1146d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(56, 56, 1, 0x0080, 0x10, 3, 1),
1147d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(152, 152, 7, 0x00c0, 0x10, 3, 1),
1148d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(153, 153, 7, 0x00c0, 0x10, 2, 1),
1149d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(154, 154, 7, 0x00c0, 0x10, 0, 1),
1150d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(155, 155, 7, 0x00c0, 0x10, 1, 1),
1151d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(183, 183, 9, 0x0040, 0x10, 1, 1),
1152d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(184, 184, 9, 0x0040, 0x10, 2, 1),
1153d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(185, 185, 9, 0x0040, 0x10, 4, 1),
1154d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(186, 186, 9, 0x0040, 0x10, 6, 1),
1155d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(187, 187, 9, 0x0040, 0x10, 8, 1),
1156d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(188, 188, 9, 0x0040, 0x10, 3, 1),
1157d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(189, 189, 9, 0x0040, 0x10, 7, 1),
1158d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(190, 190, 9, 0x0040, 0x10, 9, 1),
1159d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(191, 191, 9, 0x0040, 0x10, 10, 1),
1160d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(192, 192, 9, 0x0040, 0x10, 0, 1),
1161d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(193, 193, 9, 0x0040, 0x10, 5, 1),
1162d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(194, 194, 9, 0x0040, 0x10, 11, 1),
1163d32f38f2SZhiyong Tao };
1164d32f38f2SZhiyong Tao 
1165d32f38f2SZhiyong Tao static const struct mtk_pin_field_calc mt8192_pin_r1_range[] = {
1166d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(10, 10, 6, 0x0040, 0x10, 0, 1),
1167d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(11, 11, 6, 0x0040, 0x10, 1, 1),
1168d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(12, 12, 6, 0x0040, 0x10, 2, 1),
1169d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(13, 13, 6, 0x0040, 0x10, 3, 1),
1170d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(14, 14, 6, 0x0040, 0x10, 4, 1),
1171d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(15, 15, 6, 0x0040, 0x10, 5, 1),
1172d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(45, 45, 1, 0x0090, 0x10, 9, 1),
1173d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(46, 46, 1, 0x0090, 0x10, 11, 1),
1174d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(47, 47, 1, 0x0090, 0x10, 10, 1),
1175d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(48, 48, 1, 0x0090, 0x10, 7, 1),
1176d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(49, 49, 1, 0x0090, 0x10, 8, 1),
1177d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(50, 50, 1, 0x0090, 0x10, 6, 1),
1178d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(51, 51, 1, 0x0090, 0x10, 0, 1),
1179d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(52, 52, 1, 0x0090, 0x10, 1, 1),
1180d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(53, 53, 1, 0x0090, 0x10, 5, 1),
1181d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(54, 54, 1, 0x0090, 0x10, 2, 1),
1182d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(55, 55, 1, 0x0090, 0x10, 4, 1),
1183d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(56, 56, 1, 0x0090, 0x10, 3, 1),
1184d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(152, 152, 7, 0x00d0, 0x10, 3, 1),
1185d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(153, 153, 7, 0x00d0, 0x10, 2, 1),
1186d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(154, 154, 7, 0x00d0, 0x10, 0, 1),
1187d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(155, 155, 7, 0x00d0, 0x10, 1, 1),
1188d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(183, 183, 9, 0x0050, 0x10, 1, 1),
1189d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(184, 184, 9, 0x0050, 0x10, 2, 1),
1190d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(185, 185, 9, 0x0050, 0x10, 4, 1),
1191d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(186, 186, 9, 0x0050, 0x10, 6, 1),
1192d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(187, 187, 9, 0x0050, 0x10, 8, 1),
1193d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(188, 188, 9, 0x0050, 0x10, 3, 1),
1194d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(189, 189, 9, 0x0050, 0x10, 7, 1),
1195d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(190, 190, 9, 0x0050, 0x10, 9, 1),
1196d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(191, 191, 9, 0x0050, 0x10, 10, 1),
1197d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(192, 192, 9, 0x0050, 0x10, 0, 1),
1198d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(193, 193, 9, 0x0050, 0x10, 5, 1),
1199d32f38f2SZhiyong Tao 	PIN_FIELD_BASE(194, 194, 9, 0x0050, 0x10, 11, 1),
1200d32f38f2SZhiyong Tao };
1201d32f38f2SZhiyong Tao 
1202e104141aSGuodong Liu static const struct mtk_pin_field_calc mt8192_pin_drv_adv_range[] = {
1203e104141aSGuodong Liu 	PIN_FIELD_BASE(89, 89, 2, 0x0040, 0x10, 0, 5),
1204e104141aSGuodong Liu 	PIN_FIELD_BASE(90, 90, 2, 0x0040, 0x10, 5, 5),
1205e104141aSGuodong Liu 
1206e104141aSGuodong Liu 	PIN_FIELD_BASE(118, 118, 4, 0x0040, 0x10, 0, 3),
1207e104141aSGuodong Liu 	PIN_FIELD_BASE(119, 119, 4, 0x0040, 0x10, 18, 3),
1208e104141aSGuodong Liu 	PIN_FIELD_BASE(120, 120, 4, 0x0040, 0x10, 15, 3),
1209e104141aSGuodong Liu 	PIN_FIELD_BASE(121, 121, 4, 0x0050, 0x10, 3, 3),
1210e104141aSGuodong Liu 	PIN_FIELD_BASE(122, 122, 4, 0x0040, 0x10, 12, 3),
1211e104141aSGuodong Liu 	PIN_FIELD_BASE(123, 123, 4, 0x0050, 0x10, 0, 3),
1212e104141aSGuodong Liu 	PIN_FIELD_BASE(124, 124, 4, 0x0040, 0x10, 9, 3),
1213e104141aSGuodong Liu 	PIN_FIELD_BASE(125, 125, 4, 0x0040, 0x10, 27, 3),
1214e104141aSGuodong Liu 	PIN_FIELD_BASE(139, 139, 4, 0x0040, 0x10, 6, 3),
1215e104141aSGuodong Liu 	PIN_FIELD_BASE(140, 140, 4, 0x0040, 0x10, 24, 3),
1216e104141aSGuodong Liu 	PIN_FIELD_BASE(141, 141, 4, 0x0040, 0x10, 3, 3),
1217e104141aSGuodong Liu 	PIN_FIELD_BASE(142, 142, 4, 0x0040, 0x10, 21, 3),
1218e104141aSGuodong Liu 	PIN_FIELD_BASE(160, 160, 7, 0x0030, 0x10, 0, 3),
1219e104141aSGuodong Liu 	PIN_FIELD_BASE(161, 161, 7, 0x0030, 0x10, 3, 3),
1220e104141aSGuodong Liu 	PIN_FIELD_BASE(200, 200, 8, 0x0010, 0x10, 3, 3),
1221e104141aSGuodong Liu 	PIN_FIELD_BASE(201, 201, 8, 0x0010, 0x10, 9, 3),
1222e104141aSGuodong Liu 	PIN_FIELD_BASE(202, 202, 5, 0x0020, 0x10, 0, 3),
1223e104141aSGuodong Liu 	PIN_FIELD_BASE(203, 203, 5, 0x0020, 0x10, 3, 3),
1224e104141aSGuodong Liu 	PIN_FIELD_BASE(204, 204, 8, 0x0010, 0x10, 0, 3),
1225e104141aSGuodong Liu 	PIN_FIELD_BASE(205, 205, 8, 0x0010, 0x10, 6, 3),
1226d32f38f2SZhiyong Tao };
1227d32f38f2SZhiyong Tao 
1228fe44e498SGuodong Liu static const struct mtk_pin_field_calc mt8192_pin_rsel_range[] = {
1229fe44e498SGuodong Liu 	PIN_FIELD_BASE(118, 118, 4, 0x00e0, 0x10, 0, 2),
1230fe44e498SGuodong Liu 	PIN_FIELD_BASE(119, 119, 4, 0x00e0, 0x10, 12, 2),
1231fe44e498SGuodong Liu 	PIN_FIELD_BASE(120, 120, 4, 0x00e0, 0x10, 10, 2),
1232fe44e498SGuodong Liu 	PIN_FIELD_BASE(121, 121, 4, 0x00e0, 0x10, 22, 2),
1233fe44e498SGuodong Liu 	PIN_FIELD_BASE(122, 122, 4, 0x00e0, 0x10, 8, 2),
1234fe44e498SGuodong Liu 	PIN_FIELD_BASE(123, 123, 4, 0x00e0, 0x10, 20, 2),
1235fe44e498SGuodong Liu 	PIN_FIELD_BASE(124, 124, 4, 0x00e0, 0x10, 6, 2),
1236fe44e498SGuodong Liu 	PIN_FIELD_BASE(125, 125, 4, 0x00e0, 0x10, 18, 2),
1237fe44e498SGuodong Liu 	PIN_FIELD_BASE(139, 139, 4, 0x00e0, 0x10, 4, 2),
1238fe44e498SGuodong Liu 	PIN_FIELD_BASE(140, 140, 4, 0x00e0, 0x10, 16, 2),
1239fe44e498SGuodong Liu 	PIN_FIELD_BASE(141, 141, 4, 0x00e0, 0x10, 2, 2),
1240fe44e498SGuodong Liu 	PIN_FIELD_BASE(142, 142, 4, 0x00e0, 0x10, 14, 2),
1241fe44e498SGuodong Liu 	PIN_FIELD_BASE(160, 160, 7, 0x00f0, 0x10, 0, 2),
1242fe44e498SGuodong Liu 	PIN_FIELD_BASE(161, 161, 7, 0x00f0, 0x10, 2, 2),
1243fe44e498SGuodong Liu 	PIN_FIELD_BASE(200, 200, 8, 0x0070, 0x10, 2, 2),
1244fe44e498SGuodong Liu 	PIN_FIELD_BASE(201, 201, 8, 0x0070, 0x10, 6, 2),
1245fe44e498SGuodong Liu 	PIN_FIELD_BASE(202, 202, 5, 0x0070, 0x10, 0, 2),
1246fe44e498SGuodong Liu 	PIN_FIELD_BASE(203, 203, 5, 0x0070, 0x10, 2, 2),
1247fe44e498SGuodong Liu 	PIN_FIELD_BASE(204, 204, 8, 0x0070, 0x10, 0, 2),
1248fe44e498SGuodong Liu 	PIN_FIELD_BASE(205, 205, 8, 0x0070, 0x10, 4, 2),
1249fe44e498SGuodong Liu };
1250d32f38f2SZhiyong Tao 
1251fe44e498SGuodong Liu static const unsigned int mt8192_pull_type[] = {
1252fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*0*/ MTK_PULL_PU_PD_TYPE,/*1*/
1253fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*2*/ MTK_PULL_PU_PD_TYPE,/*3*/
1254fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*4*/ MTK_PULL_PU_PD_TYPE,/*5*/
1255fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*6*/ MTK_PULL_PU_PD_TYPE,/*7*/
1256fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*8*/ MTK_PULL_PU_PD_TYPE,/*9*/
1257fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*10*/ MTK_PULL_PUPD_R1R0_TYPE,/*11*/
1258fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*12*/ MTK_PULL_PUPD_R1R0_TYPE,/*13*/
1259fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*14*/ MTK_PULL_PUPD_R1R0_TYPE,/*15*/
1260fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*16*/ MTK_PULL_PU_PD_TYPE,/*17*/
1261fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*18*/ MTK_PULL_PU_PD_TYPE,/*19*/
1262fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*20*/ MTK_PULL_PU_PD_TYPE,/*21*/
1263fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*22*/ MTK_PULL_PU_PD_TYPE,/*23*/
1264fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*24*/ MTK_PULL_PU_PD_TYPE,/*25*/
1265fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*26*/ MTK_PULL_PU_PD_TYPE,/*27*/
1266fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*28*/ MTK_PULL_PU_PD_TYPE,/*29*/
1267fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*30*/ MTK_PULL_PU_PD_TYPE,/*31*/
1268fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*32*/ MTK_PULL_PU_PD_TYPE,/*33*/
1269fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*34*/ MTK_PULL_PU_PD_TYPE,/*35*/
1270fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*36*/ MTK_PULL_PU_PD_TYPE,/*37*/
1271fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*38*/ MTK_PULL_PU_PD_TYPE,/*39*/
1272fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*40*/ MTK_PULL_PU_PD_TYPE,/*41*/
1273fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*42*/ MTK_PULL_PU_PD_TYPE,/*43*/
1274fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*44*/ MTK_PULL_PUPD_R1R0_TYPE,/*45*/
1275fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*46*/ MTK_PULL_PUPD_R1R0_TYPE,/*47*/
1276fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*48*/ MTK_PULL_PUPD_R1R0_TYPE,/*49*/
1277fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*50*/ MTK_PULL_PUPD_R1R0_TYPE,/*51*/
1278fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*52*/ MTK_PULL_PUPD_R1R0_TYPE,/*53*/
1279fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*54*/ MTK_PULL_PUPD_R1R0_TYPE,/*55*/
1280fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*56*/ MTK_PULL_PU_PD_TYPE,/*57*/
1281fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*58*/ MTK_PULL_PU_PD_TYPE,/*59*/
1282fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*60*/ MTK_PULL_PU_PD_TYPE,/*61*/
1283fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*62*/ MTK_PULL_PU_PD_TYPE,/*63*/
1284fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*64*/ MTK_PULL_PU_PD_TYPE,/*65*/
1285fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*66*/ MTK_PULL_PU_PD_TYPE,/*67*/
1286fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*68*/ MTK_PULL_PU_PD_TYPE,/*69*/
1287fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*70*/ MTK_PULL_PU_PD_TYPE,/*71*/
1288fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*72*/ MTK_PULL_PU_PD_TYPE,/*73*/
1289fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*74*/ MTK_PULL_PU_PD_TYPE,/*75*/
1290fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*76*/ MTK_PULL_PU_PD_TYPE,/*77*/
1291fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*78*/ MTK_PULL_PU_PD_TYPE,/*79*/
1292fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*80*/ MTK_PULL_PU_PD_TYPE,/*81*/
1293fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*82*/ MTK_PULL_PU_PD_TYPE,/*83*/
1294fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*84*/ MTK_PULL_PU_PD_TYPE,/*85*/
1295fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*86*/ MTK_PULL_PU_PD_TYPE,/*87*/
1296fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*88*/ MTK_PULL_PU_PD_TYPE,/*89*/
1297fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*90*/ MTK_PULL_PU_PD_TYPE,/*91*/
1298fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*92*/ MTK_PULL_PU_PD_TYPE,/*93*/
1299fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*94*/ MTK_PULL_PU_PD_TYPE,/*95*/
1300fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*96*/ MTK_PULL_PU_PD_TYPE,/*97*/
1301fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*98*/ MTK_PULL_PU_PD_TYPE,/*99*/
130228d860ddSLinus Walleij 	MTK_PULL_PU_PD_TYPE,/*100*/ MTK_PULL_PU_PD_TYPE,/*101*/
130328d860ddSLinus Walleij 	MTK_PULL_PU_PD_TYPE,/*102*/ MTK_PULL_PU_PD_TYPE,/*103*/
130428d860ddSLinus Walleij 	MTK_PULL_PU_PD_TYPE,/*104*/ MTK_PULL_PU_PD_TYPE,/*105*/
130528d860ddSLinus Walleij 	MTK_PULL_PU_PD_TYPE,/*106*/ MTK_PULL_PU_PD_TYPE,/*107*/
130628d860ddSLinus Walleij 	MTK_PULL_PU_PD_TYPE,/*108*/ MTK_PULL_PU_PD_TYPE,/*109*/
130728d860ddSLinus Walleij 	MTK_PULL_PU_PD_TYPE,/*110*/ MTK_PULL_PU_PD_TYPE,/*111*/
130828d860ddSLinus Walleij 	MTK_PULL_PU_PD_TYPE,/*112*/ MTK_PULL_PU_PD_TYPE,/*113*/
130928d860ddSLinus Walleij 	MTK_PULL_PU_PD_TYPE,/*114*/ MTK_PULL_PU_PD_TYPE,/*115*/
131028d860ddSLinus Walleij 	MTK_PULL_PU_PD_TYPE,/*116*/ MTK_PULL_PU_PD_TYPE,/*117*/
1311fe44e498SGuodong Liu 	MTK_PULL_PU_PD_RSEL_TYPE,/*118*/ MTK_PULL_PU_PD_RSEL_TYPE,/*119*/
1312fe44e498SGuodong Liu 	MTK_PULL_PU_PD_RSEL_TYPE,/*120*/ MTK_PULL_PU_PD_RSEL_TYPE,/*121*/
1313fe44e498SGuodong Liu 	MTK_PULL_PU_PD_RSEL_TYPE,/*122*/ MTK_PULL_PU_PD_RSEL_TYPE,/*123*/
1314fe44e498SGuodong Liu 	MTK_PULL_PU_PD_RSEL_TYPE,/*124*/ MTK_PULL_PU_PD_RSEL_TYPE,/*125*/
1315fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*126*/ MTK_PULL_PU_PD_TYPE,/*127*/
1316fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*128*/ MTK_PULL_PU_PD_TYPE,/*129*/
1317fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*130*/ MTK_PULL_PU_PD_TYPE,/*131*/
1318fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*132*/ MTK_PULL_PU_PD_TYPE,/*133*/
1319fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*134*/ MTK_PULL_PU_PD_TYPE,/*135*/
1320fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*136*/ MTK_PULL_PU_PD_TYPE,/*137*/
1321fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*138*/ MTK_PULL_PU_PD_RSEL_TYPE,/*139*/
1322fe44e498SGuodong Liu 	MTK_PULL_PU_PD_RSEL_TYPE,/*140*/ MTK_PULL_PU_PD_RSEL_TYPE,/*141*/
1323fe44e498SGuodong Liu 	MTK_PULL_PU_PD_RSEL_TYPE,/*142*/ MTK_PULL_PU_PD_TYPE,/*143*/
1324fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*144*/ MTK_PULL_PU_PD_TYPE,/*145*/
1325fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*146*/ MTK_PULL_PU_PD_TYPE,/*147*/
1326fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*148*/ MTK_PULL_PU_PD_TYPE,/*149*/
1327fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*150*/ MTK_PULL_PU_PD_TYPE,/*151*/
1328fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*152*/ MTK_PULL_PUPD_R1R0_TYPE,/*153*/
1329fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*154*/ MTK_PULL_PUPD_R1R0_TYPE,/*155*/
1330fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*156*/ MTK_PULL_PU_PD_TYPE,/*157*/
1331fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*158*/ MTK_PULL_PU_PD_TYPE,/*159*/
1332fe44e498SGuodong Liu 	MTK_PULL_PU_PD_RSEL_TYPE,/*160*/ MTK_PULL_PU_PD_RSEL_TYPE,/*161*/
1333fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*162*/ MTK_PULL_PU_PD_TYPE,/*163*/
1334fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*164*/ MTK_PULL_PU_PD_TYPE,/*165*/
1335fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*166*/ MTK_PULL_PU_PD_TYPE,/*167*/
1336fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*168*/ MTK_PULL_PU_PD_TYPE,/*169*/
1337fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*170*/ MTK_PULL_PU_PD_TYPE,/*171*/
1338fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*172*/ MTK_PULL_PU_PD_TYPE,/*173*/
1339fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*174*/ MTK_PULL_PU_PD_TYPE,/*175*/
1340fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*176*/ MTK_PULL_PU_PD_TYPE,/*177*/
1341fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*178*/ MTK_PULL_PU_PD_TYPE,/*179*/
1342fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*180*/ MTK_PULL_PU_PD_TYPE,/*181*/
1343fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*182*/ MTK_PULL_PUPD_R1R0_TYPE,/*183*/
1344fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*184*/ MTK_PULL_PUPD_R1R0_TYPE,/*185*/
1345fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*186*/ MTK_PULL_PUPD_R1R0_TYPE,/*187*/
1346fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*188*/ MTK_PULL_PUPD_R1R0_TYPE,/*189*/
1347fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*190*/ MTK_PULL_PUPD_R1R0_TYPE,/*191*/
1348fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*192*/ MTK_PULL_PUPD_R1R0_TYPE,/*193*/
1349fe44e498SGuodong Liu 	MTK_PULL_PUPD_R1R0_TYPE,/*194*/ MTK_PULL_PU_PD_TYPE,/*195*/
1350fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*196*/ MTK_PULL_PU_PD_TYPE,/*197*/
1351fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*198*/ MTK_PULL_PU_PD_TYPE,/*199*/
1352fe44e498SGuodong Liu 	MTK_PULL_PU_PD_RSEL_TYPE,/*200*/ MTK_PULL_PU_PD_RSEL_TYPE,/*201*/
1353fe44e498SGuodong Liu 	MTK_PULL_PU_PD_RSEL_TYPE,/*202*/ MTK_PULL_PU_PD_RSEL_TYPE,/*203*/
1354fe44e498SGuodong Liu 	MTK_PULL_PU_PD_RSEL_TYPE,/*204*/ MTK_PULL_PU_PD_RSEL_TYPE,/*205*/
1355fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*206*/ MTK_PULL_PU_PD_TYPE,/*207*/
1356fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*208*/ MTK_PULL_PU_PD_TYPE,/*209*/
1357fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*210*/ MTK_PULL_PU_PD_TYPE,/*211*/
1358fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*212*/ MTK_PULL_PU_PD_TYPE,/*213*/
1359fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*214*/ MTK_PULL_PU_PD_TYPE,/*215*/
1360fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*216*/ MTK_PULL_PU_PD_TYPE,/*217*/
1361fe44e498SGuodong Liu 	MTK_PULL_PU_PD_TYPE,/*218*/ MTK_PULL_PU_PD_TYPE,/*219*/
1362fe44e498SGuodong Liu };
1363d32f38f2SZhiyong Tao 
1364d32f38f2SZhiyong Tao static const char * const mt8192_pinctrl_register_base_names[] = {
1365d32f38f2SZhiyong Tao 	"iocfg0", "iocfg_rm", "iocfg_bm", "iocfg_bl", "iocfg_br",
1366d32f38f2SZhiyong Tao 	"iocfg_lm", "iocfg_lb", "iocfg_rt", "iocfg_lt", "iocfg_tl",
1367d32f38f2SZhiyong Tao };
1368d32f38f2SZhiyong Tao 
1369d32f38f2SZhiyong Tao static const struct mtk_eint_hw mt8192_eint_hw = {
1370d32f38f2SZhiyong Tao 	.port_mask = 7,
1371d32f38f2SZhiyong Tao 	.ports     = 7,
1372d32f38f2SZhiyong Tao 	.ap_num    = 224,
1373d32f38f2SZhiyong Tao 	.db_cnt    = 32,
1374e1ff91f9SAngeloGioacchino Del Regno 	.db_time   = debounce_time_mt6765,
1375d32f38f2SZhiyong Tao };
1376d32f38f2SZhiyong Tao 
1377d32f38f2SZhiyong Tao static const struct mtk_pin_reg_calc mt8192_reg_cals[PINCTRL_PIN_REG_MAX] = {
1378d32f38f2SZhiyong Tao 	[PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt8192_pin_mode_range),
1379d32f38f2SZhiyong Tao 	[PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt8192_pin_dir_range),
1380d32f38f2SZhiyong Tao 	[PINCTRL_PIN_REG_DI] = MTK_RANGE(mt8192_pin_di_range),
1381d32f38f2SZhiyong Tao 	[PINCTRL_PIN_REG_DO] = MTK_RANGE(mt8192_pin_do_range),
1382d32f38f2SZhiyong Tao 	[PINCTRL_PIN_REG_SMT] = MTK_RANGE(mt8192_pin_smt_range),
1383d32f38f2SZhiyong Tao 	[PINCTRL_PIN_REG_IES] = MTK_RANGE(mt8192_pin_ies_range),
1384d32f38f2SZhiyong Tao 	[PINCTRL_PIN_REG_PU] = MTK_RANGE(mt8192_pin_pu_range),
1385d32f38f2SZhiyong Tao 	[PINCTRL_PIN_REG_PD] = MTK_RANGE(mt8192_pin_pd_range),
1386d32f38f2SZhiyong Tao 	[PINCTRL_PIN_REG_DRV] = MTK_RANGE(mt8192_pin_drv_range),
1387d32f38f2SZhiyong Tao 	[PINCTRL_PIN_REG_PUPD] = MTK_RANGE(mt8192_pin_pupd_range),
1388d32f38f2SZhiyong Tao 	[PINCTRL_PIN_REG_R0] = MTK_RANGE(mt8192_pin_r0_range),
1389d32f38f2SZhiyong Tao 	[PINCTRL_PIN_REG_R1] = MTK_RANGE(mt8192_pin_r1_range),
1390e104141aSGuodong Liu 	[PINCTRL_PIN_REG_DRV_ADV] = MTK_RANGE(mt8192_pin_drv_adv_range),
1391fe44e498SGuodong Liu 	[PINCTRL_PIN_REG_RSEL] = MTK_RANGE(mt8192_pin_rsel_range),
1392d32f38f2SZhiyong Tao };
1393d32f38f2SZhiyong Tao 
1394d32f38f2SZhiyong Tao static const struct mtk_pin_soc mt8192_data = {
1395d32f38f2SZhiyong Tao 	.reg_cal = mt8192_reg_cals,
1396d32f38f2SZhiyong Tao 	.pins = mtk_pins_mt8192,
1397d32f38f2SZhiyong Tao 	.npins = ARRAY_SIZE(mtk_pins_mt8192),
1398d32f38f2SZhiyong Tao 	.ngrps = ARRAY_SIZE(mtk_pins_mt8192),
1399d32f38f2SZhiyong Tao 	.base_names = mt8192_pinctrl_register_base_names,
1400d32f38f2SZhiyong Tao 	.nbase_names = ARRAY_SIZE(mt8192_pinctrl_register_base_names),
1401fe44e498SGuodong Liu 	.pull_type = mt8192_pull_type,
1402d32f38f2SZhiyong Tao 	.eint_hw = &mt8192_eint_hw,
1403d32f38f2SZhiyong Tao 	.nfuncs = 8,
1404d32f38f2SZhiyong Tao 	.gpio_m = 0,
1405d32f38f2SZhiyong Tao 	.bias_set_combo = mtk_pinconf_bias_set_combo,
1406d32f38f2SZhiyong Tao 	.bias_get_combo = mtk_pinconf_bias_get_combo,
1407a36474f5SGuodong Liu 	.drive_set = mtk_pinconf_drive_set_rev1,
1408a36474f5SGuodong Liu 	.drive_get = mtk_pinconf_drive_get_rev1,
1409e104141aSGuodong Liu 	.adv_drive_get = mtk_pinconf_adv_drive_get_raw,
1410e104141aSGuodong Liu 	.adv_drive_set = mtk_pinconf_adv_drive_set_raw,
1411d32f38f2SZhiyong Tao };
1412d32f38f2SZhiyong Tao 
1413d32f38f2SZhiyong Tao static const struct of_device_id mt8192_pinctrl_of_match[] = {
141478df7bbaSAngeloGioacchino Del Regno 	{ .compatible = "mediatek,mt8192-pinctrl", .data = &mt8192_data },
1415d32f38f2SZhiyong Tao 	{ }
1416d32f38f2SZhiyong Tao };
1417d32f38f2SZhiyong Tao 
1418d32f38f2SZhiyong Tao static struct platform_driver mt8192_pinctrl_driver = {
1419d32f38f2SZhiyong Tao 	.driver = {
1420d32f38f2SZhiyong Tao 		.name = "mt8192-pinctrl",
1421d32f38f2SZhiyong Tao 		.of_match_table = mt8192_pinctrl_of_match,
1422*142173c4SAndy Shevchenko 		.pm = pm_sleep_ptr(&mtk_paris_pinctrl_pm_ops),
1423d32f38f2SZhiyong Tao 	},
142478df7bbaSAngeloGioacchino Del Regno 	.probe = mtk_paris_pinctrl_probe,
1425d32f38f2SZhiyong Tao };
1426d32f38f2SZhiyong Tao 
mt8192_pinctrl_init(void)1427d32f38f2SZhiyong Tao static int __init mt8192_pinctrl_init(void)
1428d32f38f2SZhiyong Tao {
1429d32f38f2SZhiyong Tao 	return platform_driver_register(&mt8192_pinctrl_driver);
1430d32f38f2SZhiyong Tao }
1431d32f38f2SZhiyong Tao arch_initcall(mt8192_pinctrl_init);
1432d32f38f2SZhiyong Tao 
1433d32f38f2SZhiyong Tao MODULE_DESCRIPTION("MediaTek MT8192 Pinctrl Driver");
1434