aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2018-11-05 19:24:10 +0530
committerManivannan Sadhasivam <manivannan.sadhasivam@linaro.org>2018-11-05 21:46:20 +0530
commit75b62e423fff1853993c05b3b969b13064558ba4 (patch)
tree34c3b69ae17fb7a1c1d0163964d50e2ed0820518
parenteddb6d29e674a90481f4870b2e44e0c05fe22e4a (diff)
download96b-common-75b62e423fff1853993c05b3b969b13064558ba4.tar.gz
pinctrl: mediatek: mt6797: Add pinconfig support
Add several pinconfigs support such as Schmitt trigger, Pull up/down, IES, Drive Strength for Mediatek MT6797 SoC. Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
-rw-r--r--drivers/pinctrl/mediatek/pinctrl-mt6797.c771
1 files changed, 771 insertions, 0 deletions
diff --git a/drivers/pinctrl/mediatek/pinctrl-mt6797.c b/drivers/pinctrl/mediatek/pinctrl-mt6797.c
index adebe4333ed9..b86cea92f99b 100644
--- a/drivers/pinctrl/mediatek/pinctrl-mt6797.c
+++ b/drivers/pinctrl/mediatek/pinctrl-mt6797.c
@@ -36,11 +36,775 @@ static const struct mtk_pin_field_calc mt6797_pin_do_range[] = {
PIN_FIELD(0, 261, 0x100, 0x10, 0, 1),
};
+static const struct mtk_pin_field_calc mt6797_pin_smt_range[] = {
+ PINS_FIELD_BASE(28, 29, 1, 0x0040, 0x10, 0, 1),
+ PINS_FIELD_BASE(30, 31, 1, 0x0040, 0x10, 1, 1),
+ PINS_FIELD_BASE(32, 33, 1, 0x0040, 0x10, 2, 1),
+ PIN_FIELD_BASE(34, 34, 1, 0x0040, 0x10, 3, 1),
+ PINS_FIELD_BASE(35, 36, 1, 0x0040, 0x10, 4, 1),
+ PINS_FIELD_BASE(37, 38, 2, 0x0050, 0x10, 0, 1),
+ PINS_FIELD_BASE(39, 42, 1, 0x0040, 0x10, 6, 1),
+ PINS_FIELD_BASE(43, 46, 1, 0x0040, 0x10, 7, 1),
+ PINS_FIELD_BASE(47, 50, 1, 0x0040, 0x10, 8, 1),
+ PIN_FIELD_BASE(51, 51, 1, 0x0040, 0x10, 9, 1),
+ PIN_FIELD_BASE(52, 52, 1, 0x0040, 0x10, 10, 1),
+ PIN_FIELD_BASE(53, 53, 1, 0x0040, 0x10, 9, 1),
+ PIN_FIELD_BASE(54, 54, 1, 0x0040, 0x10, 9, 1),
+ PINS_FIELD_BASE(55, 56, 3, 0x0030, 0x10, 13, 1),
+ PIN_FIELD_BASE(57, 57, 2, 0x0050, 0x10, 3, 1),
+ PIN_FIELD_BASE(58, 58, 2, 0x0050, 0x10, 4, 1),
+ PINS_FIELD_BASE(59, 60, 2, 0x0050, 0x10, 5, 1),
+ PINS_FIELD_BASE(61, 64, 3, 0x0030, 0x10, 26, 1),
+ PINS_FIELD_BASE(65, 68, 3, 0x0030, 0x10, 27, 1),
+ PIN_FIELD_BASE(74, 74, 1, 0x0040, 0x10, 15, 1),
+ PIN_FIELD_BASE(75, 75, 1, 0x0040, 0x10, 15, 1),
+ PINS_FIELD_BASE(85, 86, 3, 0x0030, 0x10, 28, 1),
+ PINS_FIELD_BASE(87, 88, 2, 0x0050, 0x10, 8, 1),
+ PINS_FIELD_BASE(89, 93, 2, 0x0050, 0x10, 9, 1),
+ PIN_FIELD_BASE(94, 94, 3, 0x0030, 0x10, 23, 1),
+ PIN_FIELD_BASE(95, 95, 1, 0x0040, 0x10, 14, 1),
+ PIN_FIELD_BASE(96, 96, 1, 0x0040, 0x10, 14, 1),
+ PINS_FIELD_BASE(97, 98, 1, 0x0040, 0x10, 5, 1),
+ PIN_FIELD_BASE(99, 99, 3, 0x0030, 0x10, 16, 1),
+ PIN_FIELD_BASE(100, 100, 3, 0x0030, 0x10, 17, 1),
+ PIN_FIELD_BASE(101, 101, 3, 0x0030, 0x10, 18, 1),
+ PIN_FIELD_BASE(102, 102, 3, 0x0030, 0x10, 19, 1),
+ PIN_FIELD_BASE(103, 103, 3, 0x0030, 0x10, 20, 1),
+ PIN_FIELD_BASE(105, 105, 3, 0x0030, 0x10, 22, 1),
+ PINS_FIELD_BASE(106, 108, 2, 0x0050, 0x10, 1, 1),
+ PINS_FIELD_BASE(109, 111, 2, 0x0050, 0x10, 2, 1),
+ PIN_FIELD_BASE(129, 129, 3, 0x0030, 0x10, 0, 1),
+ PINS_FIELD_BASE(130, 133, 3, 0x0030, 0x10, 1, 1),
+ PIN_FIELD_BASE(134, 134, 3, 0x0030, 0x10, 2, 1),
+ PIN_FIELD_BASE(135, 135, 1, 0x0040, 0x10, 16, 1),
+ PIN_FIELD_BASE(136, 136, 1, 0x0040, 0x10, 17, 1),
+ PIN_FIELD_BASE(137, 137, 1, 0x0040, 0x10, 18, 1),
+ PINS_FIELD_BASE(138, 141, 1, 0x0040, 0x10, 19, 1),
+ PINS_FIELD_BASE(142, 143, 3, 0x0030, 0x10, 7, 1),
+ PIN_FIELD_BASE(144, 144, 3, 0x0030, 0x10, 8, 1),
+ PIN_FIELD_BASE(145, 145, 3, 0x0030, 0x10, 7, 1),
+ PIN_FIELD_BASE(146, 146, 3, 0x0030, 0x10, 9, 1),
+ PINS_FIELD_BASE(147, 148, 3, 0x0030, 0x10, 10, 1),
+ PIN_FIELD_BASE(149, 149, 3, 0x0030, 0x10, 11, 1),
+ PIN_FIELD_BASE(150, 150, 3, 0x0030, 0x10, 12, 1),
+ PINS_FIELD_BASE(151, 152, 3, 0x0030, 0x10, 14, 1),
+ PINS_FIELD_BASE(153, 154, 3, 0x0030, 0x10, 15, 1),
+ PIN_FIELD_BASE(178, 178, 4, 0x0030, 0x10, 0, 1),
+ PIN_FIELD_BASE(179, 179, 4, 0x0030, 0x10, 1, 1),
+ PIN_FIELD_BASE(180, 180, 4, 0x0030, 0x10, 2, 1),
+ PIN_FIELD_BASE(181, 181, 4, 0x0030, 0x10, 3, 1),
+ PIN_FIELD_BASE(183, 183, 4, 0x0030, 0x10, 19, 1),
+ PIN_FIELD_BASE(184, 184, 4, 0x0030, 0x10, 20, 1),
+ PINS_FIELD_BASE(185, 187, 4, 0x0030, 0x10, 21, 1),
+ PIN_FIELD_BASE(188, 188, 4, 0x0030, 0x10, 15, 1),
+ PIN_FIELD_BASE(189, 189, 4, 0x0030, 0x10, 16, 1),
+ PIN_FIELD_BASE(190, 190, 4, 0x0030, 0x10, 17, 1),
+ PIN_FIELD_BASE(191, 191, 4, 0x0030, 0x10, 18, 1),
+ PINS_FIELD_BASE(192, 195, 4, 0x0030, 0x10, 9, 1),
+ PINS_FIELD_BASE(196, 199, 4, 0x0030, 0x10, 8, 1),
+ PINS_FIELD_BASE(200, 203, 4, 0x0030, 0x10, 7, 1),
+ PINS_FIELD_BASE(204, 205, 4, 0x0030, 0x10, 6, 1),
+ PINS_FIELD_BASE(206, 210, 4, 0x0030, 0x10, 5, 1),
+ PIN_FIELD_BASE(211, 211, 4, 0x0030, 0x10, 4, 1),
+ PINS_FIELD_BASE(212, 215, 4, 0x0030, 0x10, 10, 1),
+ PIN_FIELD_BASE(216, 216, 4, 0x0030, 0x10, 11, 1),
+ PIN_FIELD_BASE(217, 217, 4, 0x0030, 0x10, 12, 1),
+ PIN_FIELD_BASE(218, 218, 4, 0x0030, 0x10, 13, 1),
+ PIN_FIELD_BASE(219, 219, 4, 0x0030, 0x10, 14, 1),
+ PINS_FIELD_BASE(232, 233, 3, 0x0030, 0x10, 24, 1),
+ PIN_FIELD_BASE(234, 234, 2, 0x0050, 0x10, 10, 1),
+ PIN_FIELD_BASE(235, 235, 2, 0x0050, 0x10, 11, 1),
+ PINS_FIELD_BASE(236, 237, 2, 0x0050, 0x10, 12, 1),
+ PINS_FIELD_BASE(238, 239, 2, 0x0050, 0x10, 13, 1),
+ PINS_FIELD_BASE(240, 241, 2, 0x0050, 0x10, 14, 1),
+ PIN_FIELD_BASE(242, 242, 2, 0x0050, 0x10, 15, 1),
+ PIN_FIELD_BASE(243, 243, 2, 0x0050, 0x10, 16, 1),
+ PINS_FIELD_BASE(244, 245, 2, 0x0050, 0x10, 17, 1),
+ PIN_FIELD_BASE(250, 250, 2, 0x0050, 0x10, 18, 1),
+ PIN_FIELD_BASE(251, 251, 2, 0x0050, 0x10, 19, 1),
+ PINS_FIELD_BASE(252, 253, 2, 0x0050, 0x10, 20, 1),
+ PIN_FIELD_BASE(255, 255, 2, 0x0050, 0x10, 21, 1),
+ PIN_FIELD_BASE(256, 256, 2, 0x0050, 0x10, 22, 1),
+ PIN_FIELD_BASE(257, 257, 1, 0x0040, 0x10, 11, 1),
+ PIN_FIELD_BASE(258, 258, 1, 0x0040, 0x10, 12, 1),
+ PIN_FIELD_BASE(259, 259, 1, 0x0040, 0x10, 13, 1),
+ PIN_FIELD_BASE(260, 260, 1, 0x0040, 0x10, 11, 1),
+ PIN_FIELD_BASE(261, 261, 1, 0x0040, 0x10, 11, 1),
+};
+
+static const struct mtk_pin_field_calc mt6797_pin_pd_range[] = {
+ PIN_FIELD_BASE(28, 28, 1, 0x00d0, 0x10, 0, 1),
+ PIN_FIELD_BASE(29, 29, 1, 0x00d0, 0x10, 1, 1),
+ PIN_FIELD_BASE(30, 30, 1, 0x00d0, 0x10, 2, 1),
+ PIN_FIELD_BASE(31, 31, 1, 0x00d0, 0x10, 3, 1),
+ PIN_FIELD_BASE(32, 32, 1, 0x00d0, 0x10, 4, 1),
+ PIN_FIELD_BASE(33, 33, 1, 0x00d0, 0x10, 5, 1),
+ PIN_FIELD_BASE(34, 34, 1, 0x00d0, 0x10, 6, 1),
+ PIN_FIELD_BASE(35, 35, 1, 0x00d0, 0x10, 7, 1),
+ PIN_FIELD_BASE(36, 36, 1, 0x00d0, 0x10, 8, 1),
+ PIN_FIELD_BASE(37, 37, 2, 0x0130, 0x10, 1, 1),
+ PIN_FIELD_BASE(38, 38, 2, 0x0130, 0x10, 0, 1),
+ PIN_FIELD_BASE(39, 39, 1, 0x00d0, 0x10, 12, 1),
+ PIN_FIELD_BASE(40, 40, 1, 0x00d0, 0x10, 13, 1),
+ PIN_FIELD_BASE(41, 41, 1, 0x00d0, 0x10, 14, 1),
+ PIN_FIELD_BASE(42, 42, 1, 0x00d0, 0x10, 15, 1),
+ PIN_FIELD_BASE(43, 43, 1, 0x00d0, 0x10, 16, 1),
+ PIN_FIELD_BASE(44, 44, 1, 0x00d0, 0x10, 17, 1),
+ PIN_FIELD_BASE(45, 45, 1, 0x00d0, 0x10, 18, 1),
+ PIN_FIELD_BASE(46, 46, 1, 0x00d0, 0x10, 19, 1),
+ PIN_FIELD_BASE(47, 47, 1, 0x00d0, 0x10, 20, 1),
+ PIN_FIELD_BASE(48, 48, 1, 0x00d0, 0x10, 21, 1),
+ PIN_FIELD_BASE(49, 49, 1, 0x00d0, 0x10, 22, 1),
+ PIN_FIELD_BASE(50, 50, 1, 0x00d0, 0x10, 23, 1),
+ PIN_FIELD_BASE(51, 51, 1, 0x00d0, 0x10, 24, 1),
+ PIN_FIELD_BASE(52, 52, 1, 0x00d0, 0x10, 25, 1),
+ PIN_FIELD_BASE(53, 53, 1, 0x00d0, 0x10, 26, 1),
+ PIN_FIELD_BASE(54, 54, 1, 0x00d0, 0x10, 27, 1),
+ PIN_FIELD_BASE(55, 55, 3, 0x00c0, 0x10, 0, 1),
+ PIN_FIELD_BASE(56, 56, 3, 0x00c0, 0x10, 1, 1),
+ PIN_FIELD_BASE(57, 57, 2, 0x0130, 0x10, 2, 1),
+ PIN_FIELD_BASE(58, 58, 2, 0x0130, 0x10, 3, 1),
+ PIN_FIELD_BASE(59, 59, 2, 0x0130, 0x10, 4, 1),
+ PIN_FIELD_BASE(60, 60, 2, 0x0130, 0x10, 5, 1),
+ PIN_FIELD_BASE(61, 61, 3, 0x00c0, 0x10, 8, 1),
+ PIN_FIELD_BASE(62, 62, 3, 0x00c0, 0x10, 9, 1),
+ PIN_FIELD_BASE(63, 63, 3, 0x00c0, 0x10, 10, 1),
+ PIN_FIELD_BASE(64, 64, 3, 0x00c0, 0x10, 11, 1),
+ PIN_FIELD_BASE(65, 65, 3, 0x00c0, 0x10, 12, 1),
+ PIN_FIELD_BASE(66, 66, 3, 0x00c0, 0x10, 13, 1),
+ PIN_FIELD_BASE(67, 67, 3, 0x00c0, 0x10, 14, 1),
+ PIN_FIELD_BASE(68, 68, 3, 0x00c0, 0x10, 15, 1),
+ PIN_FIELD_BASE(69, 69, 2, 0x0140, 0x10, 4, 1),
+ PIN_FIELD_BASE(70, 70, 2, 0x0140, 0x10, 5, 1),
+ PIN_FIELD_BASE(71, 71, 2, 0x0140, 0x10, 6, 1),
+ PIN_FIELD_BASE(72, 72, 2, 0x0140, 0x10, 7, 1),
+ PIN_FIELD_BASE(73, 73, 2, 0x0140, 0x10, 8, 1),
+ PIN_FIELD_BASE(74, 74, 1, 0x00d0, 0x10, 30, 1),
+ PIN_FIELD_BASE(75, 75, 1, 0x00d0, 0x10, 31, 1),
+ PIN_FIELD_BASE(87, 87, 2, 0x0130, 0x10, 16, 1),
+ PIN_FIELD_BASE(88, 88, 2, 0x0130, 0x10, 17, 1),
+ PIN_FIELD_BASE(89, 89, 2, 0x0130, 0x10, 18, 1),
+ PIN_FIELD_BASE(90, 90, 2, 0x0130, 0x10, 19, 1),
+ PIN_FIELD_BASE(91, 91, 2, 0x0130, 0x10, 20, 1),
+ PIN_FIELD_BASE(92, 92, 2, 0x0130, 0x10, 21, 1),
+ PIN_FIELD_BASE(93, 93, 2, 0x0130, 0x10, 22, 1),
+ PIN_FIELD_BASE(94, 94, 3, 0x00b0, 0x10, 26, 1),
+ PIN_FIELD_BASE(95, 95, 1, 0x00d0, 0x10, 29, 1),
+ PIN_FIELD_BASE(96, 96, 1, 0x00d0, 0x10, 28, 1),
+ PIN_FIELD_BASE(97, 97, 1, 0x00d0, 0x10, 10, 1),
+ PIN_FIELD_BASE(98, 98, 1, 0x00d0, 0x10, 11, 1),
+ PIN_FIELD_BASE(99, 99, 3, 0x00b0, 0x10, 19, 1),
+ PIN_FIELD_BASE(100, 100, 3, 0x00b0, 0x10, 20, 1),
+ PIN_FIELD_BASE(101, 101, 3, 0x00b0, 0x10, 21, 1),
+ PIN_FIELD_BASE(102, 102, 3, 0x00b0, 0x10, 22, 1),
+ PIN_FIELD_BASE(103, 103, 3, 0x00b0, 0x10, 23, 1),
+ PIN_FIELD_BASE(104, 104, 3, 0x00b0, 0x10, 24, 1),
+ PIN_FIELD_BASE(105, 105, 3, 0x00b0, 0x10, 25, 1),
+ PIN_FIELD_BASE(112, 112, 2, 0x0150, 0x10, 0, 1),
+ PIN_FIELD_BASE(113, 113, 2, 0x0150, 0x10, 1, 1),
+ PIN_FIELD_BASE(135, 135, 1, 0x00e0, 0x10, 6, 1),
+ PIN_FIELD_BASE(136, 136, 1, 0x00e0, 0x10, 7, 1),
+ PIN_FIELD_BASE(137, 137, 1, 0x00e0, 0x10, 8, 1),
+ PIN_FIELD_BASE(138, 138, 1, 0x00e0, 0x10, 9, 1),
+ PIN_FIELD_BASE(139, 139, 1, 0x00e0, 0x10, 10, 1),
+ PIN_FIELD_BASE(140, 140, 1, 0x00e0, 0x10, 11, 1),
+ PIN_FIELD_BASE(141, 141, 1, 0x00e0, 0x10, 12, 1),
+ PIN_FIELD_BASE(142, 142, 3, 0x00b0, 0x10, 10, 1),
+ PIN_FIELD_BASE(143, 143, 3, 0x00b0, 0x10, 11, 1),
+ PIN_FIELD_BASE(144, 144, 3, 0x00b0, 0x10, 12, 1),
+ PIN_FIELD_BASE(145, 145, 3, 0x00b0, 0x10, 13, 1),
+ PIN_FIELD_BASE(146, 146, 3, 0x00b0, 0x10, 14, 1),
+ PIN_FIELD_BASE(147, 147, 3, 0x00b0, 0x10, 15, 1),
+ PIN_FIELD_BASE(148, 148, 3, 0x00b0, 0x10, 16, 1),
+ PIN_FIELD_BASE(149, 149, 3, 0x00b0, 0x10, 17, 1),
+ PIN_FIELD_BASE(150, 150, 3, 0x00b0, 0x10, 18, 1),
+ PIN_FIELD_BASE(151, 151, 3, 0x00c0, 0x10, 2, 1),
+ PIN_FIELD_BASE(152, 152, 3, 0x00c0, 0x10, 3, 1),
+ PIN_FIELD_BASE(153, 153, 3, 0x00c0, 0x10, 4, 1),
+ PIN_FIELD_BASE(154, 154, 3, 0x00c0, 0x10, 5, 1),
+ PIN_FIELD_BASE(178, 178, 4, 0x0070, 0x10, 0, 1),
+ PIN_FIELD_BASE(179, 179, 4, 0x0070, 0x10, 1, 1),
+ PIN_FIELD_BASE(180, 180, 4, 0x0070, 0x10, 2, 1),
+ PIN_FIELD_BASE(181, 181, 4, 0x0070, 0x10, 3, 1),
+ PIN_FIELD_BASE(182, 182, 4, 0x0070, 0x10, 4, 1),
+ PIN_FIELD_BASE(183, 183, 4, 0x0070, 0x10, 13, 1),
+ PIN_FIELD_BASE(184, 184, 4, 0x0070, 0x10, 14, 1),
+ PIN_FIELD_BASE(185, 185, 4, 0x0070, 0x10, 15, 1),
+ PIN_FIELD_BASE(186, 186, 4, 0x0070, 0x10, 16, 1),
+ PIN_FIELD_BASE(187, 187, 4, 0x0070, 0x10, 17, 1),
+ PIN_FIELD_BASE(188, 188, 4, 0x0070, 0x10, 9, 1),
+ PIN_FIELD_BASE(189, 189, 4, 0x0070, 0x10, 10, 1),
+ PIN_FIELD_BASE(190, 190, 4, 0x0070, 0x10, 11, 1),
+ PIN_FIELD_BASE(191, 191, 4, 0x0070, 0x10, 12, 1),
+ PIN_FIELD_BASE(192, 192, 4, 0x0080, 0x10, 19, 1),
+ PIN_FIELD_BASE(193, 193, 4, 0x0080, 0x10, 18, 1),
+ PIN_FIELD_BASE(194, 194, 4, 0x0080, 0x10, 17, 1),
+ PIN_FIELD_BASE(195, 195, 4, 0x0080, 0x10, 16, 1),
+ PIN_FIELD_BASE(196, 196, 4, 0x0080, 0x10, 15, 1),
+ PIN_FIELD_BASE(197, 197, 4, 0x0080, 0x10, 14, 1),
+ PIN_FIELD_BASE(198, 198, 4, 0x0080, 0x10, 13, 1),
+ PIN_FIELD_BASE(199, 199, 4, 0x0080, 0x10, 12, 1),
+ PIN_FIELD_BASE(200, 200, 4, 0x0080, 0x10, 11, 1),
+ PIN_FIELD_BASE(201, 201, 4, 0x0080, 0x10, 10, 1),
+ PIN_FIELD_BASE(202, 202, 4, 0x0080, 0x10, 9, 1),
+ PIN_FIELD_BASE(203, 203, 4, 0x0080, 0x10, 8, 1),
+ PIN_FIELD_BASE(204, 204, 4, 0x0080, 0x10, 7, 1),
+ PIN_FIELD_BASE(205, 205, 4, 0x0080, 0x10, 6, 1),
+ PIN_FIELD_BASE(206, 206, 4, 0x0080, 0x10, 5, 1),
+ PIN_FIELD_BASE(207, 207, 4, 0x0080, 0x10, 4, 1),
+ PIN_FIELD_BASE(208, 208, 4, 0x0080, 0x10, 3, 1),
+ PIN_FIELD_BASE(209, 209, 4, 0x0080, 0x10, 2, 1),
+ PIN_FIELD_BASE(210, 210, 4, 0x0080, 0x10, 1, 1),
+ PIN_FIELD_BASE(211, 211, 4, 0x0080, 0x10, 0, 1),
+ PIN_FIELD_BASE(212, 212, 4, 0x0080, 0x10, 20, 1),
+ PIN_FIELD_BASE(213, 213, 4, 0x0080, 0x10, 21, 1),
+ PIN_FIELD_BASE(214, 214, 4, 0x0080, 0x10, 22, 1),
+ PIN_FIELD_BASE(215, 215, 4, 0x0080, 0x10, 23, 1),
+ PIN_FIELD_BASE(216, 216, 4, 0x0070, 0x10, 5, 1),
+ PIN_FIELD_BASE(217, 217, 4, 0x0070, 0x10, 6, 1),
+ PIN_FIELD_BASE(218, 218, 4, 0x0070, 0x10, 7, 1),
+ PIN_FIELD_BASE(219, 219, 4, 0x0070, 0x10, 8, 1),
+ PIN_FIELD_BASE(232, 232, 3, 0x00c0, 0x10, 6, 1),
+ PIN_FIELD_BASE(233, 233, 3, 0x00c0, 0x10, 7, 1),
+ PIN_FIELD_BASE(234, 234, 2, 0x0130, 0x10, 23, 1),
+ PIN_FIELD_BASE(235, 235, 2, 0x0130, 0x10, 24, 1),
+ PIN_FIELD_BASE(236, 236, 2, 0x0130, 0x10, 25, 1),
+ PIN_FIELD_BASE(237, 237, 2, 0x0130, 0x10, 26, 1),
+ PIN_FIELD_BASE(238, 238, 2, 0x0130, 0x10, 27, 1),
+ PIN_FIELD_BASE(239, 239, 2, 0x0130, 0x10, 28, 1),
+ PIN_FIELD_BASE(240, 240, 2, 0x0130, 0x10, 29, 1),
+ PIN_FIELD_BASE(241, 241, 2, 0x0130, 0x10, 30, 1),
+ PIN_FIELD_BASE(242, 242, 2, 0x0140, 0x10, 0, 1),
+ PIN_FIELD_BASE(243, 243, 2, 0x0140, 0x10, 1, 1),
+ PIN_FIELD_BASE(244, 244, 2, 0x0140, 0x10, 2, 1),
+ PIN_FIELD_BASE(245, 245, 2, 0x0140, 0x10, 3, 1),
+ PIN_FIELD_BASE(246, 246, 2, 0x0150, 0x10, 2, 1),
+ PIN_FIELD_BASE(247, 247, 2, 0x0150, 0x10, 3, 1),
+ PIN_FIELD_BASE(248, 248, 2, 0x0150, 0x10, 4, 1),
+ PIN_FIELD_BASE(249, 249, 2, 0x0150, 0x10, 5, 1),
+ PIN_FIELD_BASE(250, 250, 2, 0x0140, 0x10, 9, 1),
+ PIN_FIELD_BASE(251, 251, 2, 0x0140, 0x10, 10, 1),
+ PIN_FIELD_BASE(252, 252, 2, 0x0140, 0x10, 11, 1),
+ PIN_FIELD_BASE(253, 253, 2, 0x0140, 0x10, 12, 1),
+ PIN_FIELD_BASE(254, 254, 2, 0x0150, 0x10, 6, 1),
+ PIN_FIELD_BASE(255, 255, 2, 0x0140, 0x10, 13, 1),
+ PIN_FIELD_BASE(256, 256, 2, 0x0140, 0x10, 14, 1),
+ PIN_FIELD_BASE(257, 257, 1, 0x00e0, 0x10, 0, 1),
+ PIN_FIELD_BASE(258, 258, 1, 0x00e0, 0x10, 1, 1),
+ PIN_FIELD_BASE(259, 259, 1, 0x00e0, 0x10, 2, 1),
+ PIN_FIELD_BASE(260, 260, 1, 0x00e0, 0x10, 3, 1),
+ PIN_FIELD_BASE(261, 261, 1, 0x00e0, 0x10, 4, 1),
+};
+
+static const struct mtk_pin_field_calc mt6797_pin_pu_range[] = {
+ PIN_FIELD_BASE(28, 28, 1, 0x00b0, 0x10, 0, 1),
+ PIN_FIELD_BASE(29, 29, 1, 0x00b0, 0x10, 1, 1),
+ PIN_FIELD_BASE(30, 30, 1, 0x00b0, 0x10, 2, 1),
+ PIN_FIELD_BASE(31, 31, 1, 0x00b0, 0x10, 3, 1),
+ PIN_FIELD_BASE(32, 32, 1, 0x00b0, 0x10, 4, 1),
+ PIN_FIELD_BASE(33, 33, 1, 0x00b0, 0x10, 5, 1),
+ PIN_FIELD_BASE(34, 34, 1, 0x00b0, 0x10, 6, 1),
+ PIN_FIELD_BASE(35, 35, 1, 0x00b0, 0x10, 7, 1),
+ PIN_FIELD_BASE(36, 36, 1, 0x00b0, 0x10, 8, 1),
+ PIN_FIELD_BASE(37, 37, 2, 0x0160, 0x10, 1, 1),
+ PIN_FIELD_BASE(38, 38, 2, 0x0160, 0x10, 0, 1),
+ PIN_FIELD_BASE(39, 39, 1, 0x00b0, 0x10, 12, 1),
+ PIN_FIELD_BASE(40, 40, 1, 0x00b0, 0x10, 13, 1),
+ PIN_FIELD_BASE(41, 41, 1, 0x00b0, 0x10, 14, 1),
+ PIN_FIELD_BASE(42, 42, 1, 0x00b0, 0x10, 15, 1),
+ PIN_FIELD_BASE(43, 43, 1, 0x00b0, 0x10, 16, 1),
+ PIN_FIELD_BASE(44, 44, 1, 0x00b0, 0x10, 17, 1),
+ PIN_FIELD_BASE(45, 45, 1, 0x00b0, 0x10, 18, 1),
+ PIN_FIELD_BASE(46, 46, 1, 0x00b0, 0x10, 19, 1),
+ PIN_FIELD_BASE(47, 47, 1, 0x00b0, 0x10, 20, 1),
+ PIN_FIELD_BASE(48, 48, 1, 0x00b0, 0x10, 21, 1),
+ PIN_FIELD_BASE(49, 49, 1, 0x00b0, 0x10, 22, 1),
+ PIN_FIELD_BASE(50, 50, 1, 0x00b0, 0x10, 23, 1),
+ PIN_FIELD_BASE(51, 51, 1, 0x00b0, 0x10, 24, 1),
+ PIN_FIELD_BASE(52, 52, 1, 0x00b0, 0x10, 25, 1),
+ PIN_FIELD_BASE(53, 53, 1, 0x00b0, 0x10, 26, 1),
+ PIN_FIELD_BASE(54, 54, 1, 0x00b0, 0x10, 27, 1),
+ PIN_FIELD_BASE(55, 55, 3, 0x00c0, 0x10, 0, 1),
+ PIN_FIELD_BASE(56, 56, 3, 0x00c0, 0x10, 1, 1),
+ PIN_FIELD_BASE(57, 57, 2, 0x0160, 0x10, 0, 1),
+ PIN_FIELD_BASE(58, 58, 2, 0x0160, 0x10, 1, 1),
+ PIN_FIELD_BASE(59, 59, 2, 0x0160, 0x10, 2, 1),
+ PIN_FIELD_BASE(60, 60, 2, 0x0160, 0x10, 3, 1),
+ PIN_FIELD_BASE(61, 61, 3, 0x00e0, 0x10, 8, 1),
+ PIN_FIELD_BASE(62, 62, 3, 0x00e0, 0x10, 9, 1),
+ PIN_FIELD_BASE(63, 63, 3, 0x00e0, 0x10, 10, 1),
+ PIN_FIELD_BASE(64, 64, 3, 0x00e0, 0x10, 11, 1),
+ PIN_FIELD_BASE(65, 65, 3, 0x00e0, 0x10, 12, 1),
+ PIN_FIELD_BASE(66, 66, 3, 0x00e0, 0x10, 13, 1),
+ PIN_FIELD_BASE(67, 67, 3, 0x00e0, 0x10, 14, 1),
+ PIN_FIELD_BASE(68, 68, 3, 0x00e0, 0x10, 15, 1),
+ PIN_FIELD_BASE(69, 69, 2, 0x0170, 0x10, 0, 1),
+ PIN_FIELD_BASE(70, 70, 2, 0x0170, 0x10, 1, 1),
+ PIN_FIELD_BASE(71, 71, 2, 0x0170, 0x10, 2, 1),
+ PIN_FIELD_BASE(72, 72, 2, 0x0170, 0x10, 3, 1),
+ PIN_FIELD_BASE(73, 73, 2, 0x0170, 0x10, 4, 1),
+ PIN_FIELD_BASE(74, 74, 1, 0x00b0, 0x10, 30, 1),
+ PIN_FIELD_BASE(75, 75, 1, 0x00b0, 0x10, 31, 1),
+ PIN_FIELD_BASE(76, 76, 1, 0x00b0, 0x10, 13, 1),
+ PIN_FIELD_BASE(77, 77, 1, 0x00b0, 0x10, 14, 1),
+ PIN_FIELD_BASE(78, 78, 1, 0x00b0, 0x10, 15, 1),
+ PIN_FIELD_BASE(79, 79, 1, 0x00b0, 0x10, 16, 1),
+ PIN_FIELD_BASE(80, 80, 1, 0x00b0, 0x10, 17, 1),
+ PIN_FIELD_BASE(81, 81, 1, 0x00b0, 0x10, 18, 1),
+ PIN_FIELD_BASE(82, 82, 1, 0x00b0, 0x10, 19, 1),
+ PIN_FIELD_BASE(83, 83, 1, 0x00b0, 0x10, 20, 1),
+ PIN_FIELD_BASE(84, 84, 1, 0x00b0, 0x10, 21, 1),
+ PIN_FIELD_BASE(85, 85, 3, 0x00e0, 0x10, 16, 1),
+ PIN_FIELD_BASE(86, 86, 3, 0x00e0, 0x10, 17, 1),
+ PIN_FIELD_BASE(87, 87, 2, 0x0160, 0x10, 14, 1),
+ PIN_FIELD_BASE(88, 88, 2, 0x0160, 0x10, 15, 1),
+ PIN_FIELD_BASE(89, 89, 2, 0x0160, 0x10, 16, 1),
+ PIN_FIELD_BASE(90, 90, 2, 0x0160, 0x10, 17, 1),
+ PIN_FIELD_BASE(91, 91, 2, 0x0160, 0x10, 18, 1),
+ PIN_FIELD_BASE(92, 92, 2, 0x0160, 0x10, 19, 1),
+ PIN_FIELD_BASE(93, 93, 2, 0x0160, 0x10, 20, 1),
+ PIN_FIELD_BASE(94, 94, 3, 0x00d0, 0x10, 26, 1),
+ PIN_FIELD_BASE(95, 95, 1, 0x00b0, 0x10, 29, 1),
+ PIN_FIELD_BASE(96, 96, 1, 0x00b0, 0x10, 28, 1),
+ PIN_FIELD_BASE(97, 97, 1, 0x00b0, 0x10, 10, 1),
+ PIN_FIELD_BASE(98, 98, 1, 0x00b0, 0x10, 11, 1),
+ PIN_FIELD_BASE(99, 99, 3, 0x00d0, 0x10, 19, 1),
+ PIN_FIELD_BASE(100, 100, 3, 0x00d0, 0x10, 20, 1),
+ PIN_FIELD_BASE(101, 101, 3, 0x00d0, 0x10, 21, 1),
+ PIN_FIELD_BASE(102, 102, 3, 0x00d0, 0x10, 22, 1),
+ PIN_FIELD_BASE(103, 103, 3, 0x00d0, 0x10, 23, 1),
+ PIN_FIELD_BASE(104, 104, 3, 0x00d0, 0x10, 24, 1),
+ PIN_FIELD_BASE(105, 105, 3, 0x00d0, 0x10, 25, 1),
+ PIN_FIELD_BASE(135, 135, 1, 0x00c0, 0x10, 6, 1),
+ PIN_FIELD_BASE(136, 136, 1, 0x00c0, 0x10, 7, 1),
+ PIN_FIELD_BASE(137, 137, 1, 0x00c0, 0x10, 8, 1),
+ PIN_FIELD_BASE(138, 138, 1, 0x00c0, 0x10, 9, 1),
+ PIN_FIELD_BASE(139, 139, 1, 0x00c0, 0x10, 10, 1),
+ PIN_FIELD_BASE(140, 140, 1, 0x00c0, 0x10, 11, 1),
+ PIN_FIELD_BASE(141, 141, 1, 0x00c0, 0x10, 12, 1),
+ PIN_FIELD_BASE(142, 142, 3, 0x00d0, 0x10, 10, 1),
+ PIN_FIELD_BASE(143, 143, 3, 0x00d0, 0x10, 11, 1),
+ PIN_FIELD_BASE(144, 144, 3, 0x00d0, 0x10, 12, 1),
+ PIN_FIELD_BASE(145, 145, 3, 0x00d0, 0x10, 13, 1),
+ PIN_FIELD_BASE(146, 146, 3, 0x00d0, 0x10, 14, 1),
+ PIN_FIELD_BASE(147, 147, 3, 0x00d0, 0x10, 15, 1),
+ PIN_FIELD_BASE(148, 148, 3, 0x00d0, 0x10, 16, 1),
+ PIN_FIELD_BASE(149, 149, 3, 0x00d0, 0x10, 17, 1),
+ PIN_FIELD_BASE(150, 150, 3, 0x00d0, 0x10, 18, 1),
+ PIN_FIELD_BASE(151, 151, 3, 0x00e0, 0x10, 2, 1),
+ PIN_FIELD_BASE(152, 152, 3, 0x00e0, 0x10, 3, 1),
+ PIN_FIELD_BASE(153, 153, 3, 0x00d0, 0x10, 29, 1),
+ PIN_FIELD_BASE(154, 154, 3, 0x00d0, 0x10, 30, 1),
+ PIN_FIELD_BASE(178, 178, 4, 0x0090, 0x10, 0, 1),
+ PIN_FIELD_BASE(179, 179, 4, 0x0090, 0x10, 1, 1),
+ PIN_FIELD_BASE(180, 180, 4, 0x0090, 0x10, 2, 1),
+ PIN_FIELD_BASE(181, 181, 4, 0x0090, 0x10, 3, 1),
+ PIN_FIELD_BASE(182, 182, 4, 0x0090, 0x10, 4, 1),
+ PIN_FIELD_BASE(183, 183, 4, 0x0090, 0x10, 13, 1),
+ PIN_FIELD_BASE(184, 184, 4, 0x0090, 0x10, 14, 1),
+ PIN_FIELD_BASE(185, 185, 4, 0x0090, 0x10, 15, 1),
+ PIN_FIELD_BASE(186, 186, 4, 0x0090, 0x10, 16, 1),
+ PIN_FIELD_BASE(187, 187, 4, 0x0090, 0x10, 17, 1),
+ PIN_FIELD_BASE(188, 188, 4, 0x0090, 0x10, 9, 1),
+ PIN_FIELD_BASE(189, 189, 4, 0x0090, 0x10, 10, 1),
+ PIN_FIELD_BASE(190, 190, 4, 0x0090, 0x10, 11, 1),
+ PIN_FIELD_BASE(191, 191, 4, 0x0090, 0x10, 12, 1),
+ PIN_FIELD_BASE(192, 192, 4, 0x00a0, 0x10, 19, 1),
+ PIN_FIELD_BASE(193, 193, 4, 0x00a0, 0x10, 18, 1),
+ PIN_FIELD_BASE(194, 194, 4, 0x00a0, 0x10, 17, 1),
+ PIN_FIELD_BASE(195, 195, 4, 0x00a0, 0x10, 16, 1),
+ PIN_FIELD_BASE(196, 196, 4, 0x00a0, 0x10, 15, 1),
+ PIN_FIELD_BASE(197, 197, 4, 0x00a0, 0x10, 14, 1),
+ PIN_FIELD_BASE(198, 198, 4, 0x00a0, 0x10, 13, 1),
+ PIN_FIELD_BASE(199, 199, 4, 0x00a0, 0x10, 12, 1),
+ PIN_FIELD_BASE(200, 200, 4, 0x00a0, 0x10, 11, 1),
+ PIN_FIELD_BASE(201, 201, 4, 0x00a0, 0x10, 10, 1),
+ PIN_FIELD_BASE(202, 202, 4, 0x00a0, 0x10, 9, 1),
+ PIN_FIELD_BASE(203, 203, 4, 0x00a0, 0x10, 8, 1),
+ PIN_FIELD_BASE(204, 204, 4, 0x00a0, 0x10, 7, 1),
+ PIN_FIELD_BASE(205, 205, 4, 0x00a0, 0x10, 6, 1),
+ PIN_FIELD_BASE(206, 206, 4, 0x00a0, 0x10, 5, 1),
+ PIN_FIELD_BASE(207, 207, 4, 0x00a0, 0x10, 4, 1),
+ PIN_FIELD_BASE(208, 208, 4, 0x00a0, 0x10, 3, 1),
+ PIN_FIELD_BASE(209, 209, 4, 0x00a0, 0x10, 2, 1),
+ PIN_FIELD_BASE(210, 210, 4, 0x00a0, 0x10, 1, 1),
+ PIN_FIELD_BASE(211, 211, 4, 0x00a0, 0x10, 0, 1),
+ PIN_FIELD_BASE(212, 212, 4, 0x00a0, 0x10, 20, 1),
+ PIN_FIELD_BASE(213, 213, 4, 0x00a0, 0x10, 21, 1),
+ PIN_FIELD_BASE(214, 214, 4, 0x00a0, 0x10, 22, 1),
+ PIN_FIELD_BASE(215, 215, 4, 0x00a0, 0x10, 23, 1),
+ PIN_FIELD_BASE(216, 216, 4, 0x0090, 0x10, 5, 1),
+ PIN_FIELD_BASE(217, 217, 4, 0x0090, 0x10, 6, 1),
+ PIN_FIELD_BASE(218, 218, 4, 0x0090, 0x10, 7, 1),
+ PIN_FIELD_BASE(219, 219, 4, 0x0090, 0x10, 8, 1),
+ PIN_FIELD_BASE(232, 232, 3, 0x00e0, 0x10, 6, 1),
+ PIN_FIELD_BASE(233, 233, 3, 0x00e0, 0x10, 7, 1),
+ PIN_FIELD_BASE(234, 234, 2, 0x0160, 0x10, 21, 1),
+ PIN_FIELD_BASE(235, 235, 2, 0x0160, 0x10, 22, 1),
+ PIN_FIELD_BASE(236, 236, 2, 0x0160, 0x10, 23, 1),
+ PIN_FIELD_BASE(237, 237, 2, 0x0160, 0x10, 24, 1),
+ PIN_FIELD_BASE(238, 238, 2, 0x0160, 0x10, 27, 1),
+ PIN_FIELD_BASE(239, 239, 2, 0x0160, 0x10, 28, 1),
+ PIN_FIELD_BASE(240, 240, 2, 0x0160, 0x10, 29, 1),
+ PIN_FIELD_BASE(241, 241, 2, 0x0160, 0x10, 30, 1),
+ PIN_FIELD_BASE(242, 242, 2, 0x0160, 0x10, 25, 1),
+ PIN_FIELD_BASE(243, 243, 2, 0x0160, 0x10, 26, 1),
+ PIN_FIELD_BASE(244, 244, 2, 0x0160, 0x10, 27, 1),
+ PIN_FIELD_BASE(245, 245, 2, 0x0160, 0x10, 28, 1),
+ PIN_FIELD_BASE(250, 250, 2, 0x0170, 0x10, 5, 1),
+ PIN_FIELD_BASE(251, 251, 2, 0x0170, 0x10, 6, 1),
+ PIN_FIELD_BASE(252, 252, 2, 0x0170, 0x10, 7, 1),
+ PIN_FIELD_BASE(253, 253, 2, 0x0170, 0x10, 8, 1),
+ PIN_FIELD_BASE(255, 255, 2, 0x0170, 0x10, 9, 1),
+ PIN_FIELD_BASE(256, 256, 2, 0x0170, 0x10, 10, 1),
+ PIN_FIELD_BASE(257, 257, 1, 0x00c0, 0x10, 0, 1),
+ PIN_FIELD_BASE(258, 258, 1, 0x00c0, 0x10, 1, 1),
+ PIN_FIELD_BASE(259, 259, 1, 0x00c0, 0x10, 2, 1),
+ PIN_FIELD_BASE(260, 260, 1, 0x00c0, 0x10, 3, 1),
+ PIN_FIELD_BASE(261, 261, 1, 0x00c0, 0x10, 4, 1),
+};
+
+static const struct mtk_pin_field_calc mt6797_pin_drv_range[] = {
+ PINS_FIELD_BASE(28, 29, 1, 0x00f0, 0x10, 0, 2),
+ PINS_FIELD_BASE(30, 31, 1, 0x00f0, 0x10, 2, 2),
+ PINS_FIELD_BASE(32, 33, 1, 0x00f0, 0x10, 4, 2),
+ PIN_FIELD_BASE(34, 34, 1, 0x00f0, 0x10, 6, 2),
+ PINS_FIELD_BASE(35, 36, 1, 0x00f0, 0x10, 8, 2),
+ PIN_FIELD_BASE(36, 36, 2, 0x0190, 0x10, 1, 1),
+ PIN_FIELD_BASE(37, 37, 2, 0x0190, 0x10, 0, 1),
+ PINS_FIELD_BASE(39, 42, 1, 0x00f0, 0x10, 12, 2),
+ PINS_FIELD_BASE(43, 46, 1, 0x00f0, 0x10, 14, 2),
+ PINS_FIELD_BASE(47, 50, 1, 0x00f0, 0x10, 16, 2),
+ PIN_FIELD_BASE(51, 51, 1, 0x00f0, 0x10, 18, 2),
+ PIN_FIELD_BASE(52, 52, 1, 0x00f0, 0x10, 20, 2),
+ PIN_FIELD_BASE(53, 53, 1, 0x00f0, 0x10, 18, 2),
+ PIN_FIELD_BASE(54, 54, 1, 0x00f0, 0x10, 18, 2),
+ PINS_FIELD_BASE(55, 56, 3, 0x0100, 0x10, 0, 1),
+ PINS_FIELD_BASE(57, 60, 2, 0x0190, 0x10, 6, 2),
+ PINS_FIELD_BASE(61, 64, 3, 0x00f0, 0x10, 4, 2),
+ PINS_FIELD_BASE(65, 68, 3, 0x00f0, 0x10, 6, 2),
+ PIN_FIELD_BASE(69, 69, 2, 0x01b0, 0x10, 0, 2),
+ PIN_FIELD_BASE(70, 70, 2, 0x01b0, 0x10, 2, 2),
+ PIN_FIELD_BASE(71, 71, 2, 0x01b0, 0x10, 4, 2),
+ PINS_FIELD_BASE(72, 73, 2, 0x01b0, 0x10, 6, 2),
+ PIN_FIELD_BASE(74, 74, 1, 0x0100, 0x10, 2, 1),
+ PIN_FIELD_BASE(75, 75, 1, 0x0100, 0x10, 3, 1),
+ PIN_FIELD_BASE(76, 76, 1, 0x0100, 0x10, 9, 2),
+ PIN_FIELD_BASE(77, 77, 1, 0x0100, 0x10, 11, 1),
+ PIN_FIELD_BASE(78, 78, 1, 0x0100, 0x10, 14, 1),
+ PIN_FIELD_BASE(79, 79, 1, 0x0100, 0x10, 17, 2),
+ PIN_FIELD_BASE(80, 80, 1, 0x0100, 0x10, 20, 2),
+ PINS_FIELD_BASE(81, 82, 1, 0x0100, 0x10, 17, 2),
+ PIN_FIELD_BASE(83, 83, 1, 0x0100, 0x10, 22, 2),
+ PIN_FIELD_BASE(84, 84, 1, 0x0100, 0x10, 20, 2),
+ PINS_FIELD_BASE(85, 86, 3, 0x00f0, 0x10, 8, 2),
+ PINS_FIELD_BASE(87, 88, 2, 0x0190, 0x10, 12, 2),
+ PINS_FIELD_BASE(89, 93, 2, 0x0190, 0x10, 14, 1),
+ PIN_FIELD_BASE(95, 95, 1, 0x0100, 0x10, 1, 1),
+ PIN_FIELD_BASE(96, 96, 1, 0x0100, 0x10, 0, 1),
+ PINS_FIELD_BASE(97, 98, 1, 0x00f0, 0x10, 10, 1),
+ PINS_FIELD_BASE(99, 105, 3, 0x00f0, 0x10, 26, 2),
+ PINS_FIELD_BASE(106, 108, 2, 0x0190, 0x10, 2, 2),
+ PINS_FIELD_BASE(109, 111, 2, 0x0190, 0x10, 4, 2),
+ PIN_FIELD_BASE(112, 112, 2, 0x01a0, 0x10, 19, 2),
+ PIN_FIELD_BASE(113, 113, 2, 0x01a0, 0x10, 28, 2),
+ PINS_FIELD_BASE(114, 117, 2, 0x01a0, 0x10, 0, 3),
+ PINS_FIELD_BASE(118, 121, 2, 0x01a0, 0x10, 3, 3),
+ PIN_FIELD_BASE(122, 122, 2, 0x01a0, 0x10, 6, 3),
+ PIN_FIELD_BASE(123, 123, 2, 0x01a0, 0x10, 9, 3),
+ PINS_FIELD_BASE(124, 125, 2, 0x01a0, 0x10, 6, 3),
+ PIN_FIELD_BASE(126, 126, 2, 0x01a0, 0x10, 17, 2),
+ PINS_FIELD_BASE(127, 128, 2, 0x01a0, 0x10, 19, 2),
+ PIN_FIELD_BASE(129, 129, 2, 0x01b0, 0x10, 21, 3),
+ PINS_FIELD_BASE(130, 133, 2, 0x01b0, 0x10, 24, 1),
+ PIN_FIELD_BASE(134, 134, 2, 0x01b0, 0x10, 27, 1),
+ PINS_FIELD_BASE(135, 137, 1, 0x0100, 0x10, 4, 2),
+ PINS_FIELD_BASE(138, 141, 1, 0x0100, 0x10, 6, 2),
+ PINS_FIELD_BASE(142, 143, 3, 0x00f0, 0x10, 14, 2),
+ PIN_FIELD_BASE(144, 144, 3, 0x00f0, 0x10, 16, 2),
+ PIN_FIELD_BASE(145, 145, 3, 0x00f0, 0x10, 14, 2),
+ PIN_FIELD_BASE(146, 146, 3, 0x00f0, 0x10, 18, 2),
+ PINS_FIELD_BASE(147, 148, 3, 0x00f0, 0x10, 20, 2),
+ PIN_FIELD_BASE(149, 149, 3, 0x00f0, 0x10, 22, 1),
+ PINS_FIELD_BASE(151, 152, 3, 0x0100, 0x10, 1, 2),
+ PINS_FIELD_BASE(153, 154, 3, 0x0100, 0x10, 3, 2),
+ PIN_FIELD_BASE(155, 155, 2, 0x01a0, 0x10, 26, 2),
+ PINS_FIELD_BASE(156, 157, 2, 0x01a0, 0x10, 28, 2),
+ PINS_FIELD_BASE(178, 182, 4, 0x00b0, 0x10, 0, 2),
+ PINS_FIELD_BASE(183, 187, 4, 0x00b0, 0x10, 6, 2),
+ PINS_FIELD_BASE(188, 191, 4, 0x00b0, 0x10, 4, 2),
+ PINS_FIELD_BASE(192, 195, 4, 0x00b0, 0x10, 20, 2),
+ PINS_FIELD_BASE(196, 199, 4, 0x00b0, 0x10, 18, 2),
+ PINS_FIELD_BASE(200, 203, 4, 0x00b0, 0x10, 16, 2),
+ PINS_FIELD_BASE(204, 207, 4, 0x00b0, 0x10, 14, 2),
+ PINS_FIELD_BASE(208, 211, 4, 0x00b0, 0x10, 12, 2),
+ PINS_FIELD_BASE(212, 215, 4, 0x00b0, 0x10, 22, 2),
+ PINS_FIELD_BASE(216, 219, 4, 0x00b0, 0x10, 2, 2),
+ PINS_FIELD_BASE(232, 233, 3, 0x0100, 0x10, 5, 2),
+ PINS_FIELD_BASE(234, 237, 2, 0x0190, 0x10, 16, 2),
+ PINS_FIELD_BASE(238, 239, 2, 0x0190, 0x10, 18, 1),
+ PINS_FIELD_BASE(240, 241, 2, 0x0190, 0x10, 20, 1),
+ PINS_FIELD_BASE(242, 245, 2, 0x0190, 0x10, 22, 2),
+ PIN_FIELD_BASE(246, 246, 2, 0x01b0, 0x10, 8, 2),
+ PIN_FIELD_BASE(247, 247, 2, 0x01b0, 0x10, 10, 2),
+ PINS_FIELD_BASE(248, 249, 2, 0x01b0, 0x10, 14, 2),
+ PINS_FIELD_BASE(250, 253, 2, 0x0190, 0x10, 26, 2),
+ PIN_FIELD_BASE(254, 254, 2, 0x01b0, 0x10, 12, 2),
+ PINS_FIELD_BASE(256, 256, 2, 0x0190, 0x10, 28, 2),
+ PIN_FIELD_BASE(257, 257, 1, 0x00f0, 0x10, 22, 2),
+ PIN_FIELD_BASE(258, 258, 1, 0x00f0, 0x10, 24, 2),
+ PIN_FIELD_BASE(259, 259, 1, 0x00f0, 0x10, 26, 2),
+ PINS_FIELD_BASE(260, 261, 1, 0x00f0, 0x10, 22, 2),
+};
+
+static const struct mtk_pin_field_calc mt6797_pin_pupd_range[] = {
+ PIN_FIELD_BASE(106, 106, 1, 0x0100, 0x10, 3, 1),
+ PIN_FIELD_BASE(107, 107, 1, 0x0100, 0x10, 4, 1),
+ PIN_FIELD_BASE(108, 108, 1, 0x0100, 0x10, 5, 1),
+ PIN_FIELD_BASE(109, 109, 1, 0x0100, 0x10, 0, 1),
+ PIN_FIELD_BASE(110, 110, 1, 0x0100, 0x10, 1, 1),
+ PIN_FIELD_BASE(111, 111, 1, 0x0100, 0x10, 2, 1),
+ PIN_FIELD_BASE(114, 114, 1, 0x0100, 0x10, 6, 1),
+ PIN_FIELD_BASE(115, 115, 1, 0x0100, 0x10, 7, 1),
+ PIN_FIELD_BASE(116, 116, 1, 0x0100, 0x10, 8, 1),
+ PIN_FIELD_BASE(117, 117, 1, 0x0100, 0x10, 9, 1),
+ PIN_FIELD_BASE(118, 118, 1, 0x0100, 0x10, 10, 1),
+ PIN_FIELD_BASE(119, 119, 1, 0x0100, 0x10, 11, 1),
+ PIN_FIELD_BASE(120, 120, 1, 0x0100, 0x10, 12, 1),
+ PIN_FIELD_BASE(121, 121, 1, 0x0100, 0x10, 13, 1),
+ PIN_FIELD_BASE(122, 122, 1, 0x0100, 0x10, 14, 1),
+ PIN_FIELD_BASE(123, 123, 1, 0x0100, 0x10, 15, 1),
+ PIN_FIELD_BASE(124, 124, 1, 0x0100, 0x10, 16, 1),
+ PIN_FIELD_BASE(125, 125, 1, 0x0100, 0x10, 17, 1),
+ PIN_FIELD_BASE(126, 126, 1, 0x0100, 0x10, 24, 1),
+ PIN_FIELD_BASE(127, 127, 1, 0x0100, 0x10, 25, 1),
+ PIN_FIELD_BASE(128, 128, 1, 0x0100, 0x10, 26, 1),
+ PIN_FIELD_BASE(129, 129, 1, 0x0100, 0x10, 18, 1),
+ PIN_FIELD_BASE(130, 130, 1, 0x0100, 0x10, 19, 1),
+ PIN_FIELD_BASE(131, 131, 1, 0x0100, 0x10, 20, 1),
+ PIN_FIELD_BASE(132, 132, 1, 0x0100, 0x10, 21, 1),
+ PIN_FIELD_BASE(133, 133, 1, 0x0100, 0x10, 22, 1),
+ PIN_FIELD_BASE(134, 134, 1, 0x0100, 0x10, 23, 1),
+ PIN_FIELD_BASE(155, 155, 1, 0x0100, 0x10, 27, 1),
+ PIN_FIELD_BASE(156, 156, 1, 0x0100, 0x10, 28, 1),
+ PIN_FIELD_BASE(157, 157, 1, 0x0100, 0x10, 29, 1),
+};
+
+static const struct mtk_pin_field_calc mt6797_pin_ies_range[] = {
+ PIN_FIELD_BASE(28, 28, 1, 0x0000, 0x10, 0, 1),
+ PIN_FIELD_BASE(29, 29, 1, 0x0000, 0x10, 1, 1),
+ PIN_FIELD_BASE(30, 30, 1, 0x0000, 0x10, 2, 1),
+ PIN_FIELD_BASE(31, 31, 1, 0x0000, 0x10, 3, 1),
+ PIN_FIELD_BASE(32, 32, 1, 0x0000, 0x10, 4, 1),
+ PIN_FIELD_BASE(33, 33, 1, 0x0000, 0x10, 5, 1),
+ PIN_FIELD_BASE(34, 34, 1, 0x0000, 0x10, 6, 1),
+ PIN_FIELD_BASE(35, 35, 1, 0x0000, 0x10, 7, 1),
+ PIN_FIELD_BASE(36, 36, 1, 0x0000, 0x10, 8, 1),
+ PIN_FIELD_BASE(37, 37, 2, 0x0000, 0x10, 1, 1),
+ PIN_FIELD_BASE(38, 38, 2, 0x0000, 0x10, 0, 1),
+ PIN_FIELD_BASE(39, 39, 1, 0x0000, 0x10, 12, 1),
+ PIN_FIELD_BASE(40, 40, 1, 0x0000, 0x10, 13, 1),
+ PIN_FIELD_BASE(41, 41, 1, 0x0000, 0x10, 14, 1),
+ PIN_FIELD_BASE(42, 42, 1, 0x0000, 0x10, 15, 1),
+ PIN_FIELD_BASE(43, 43, 1, 0x0000, 0x10, 16, 1),
+ PIN_FIELD_BASE(44, 44, 1, 0x0000, 0x10, 17, 1),
+ PIN_FIELD_BASE(45, 45, 1, 0x0000, 0x10, 18, 1),
+ PIN_FIELD_BASE(46, 46, 1, 0x0000, 0x10, 19, 1),
+ PIN_FIELD_BASE(47, 47, 1, 0x0000, 0x10, 20, 1),
+ PIN_FIELD_BASE(48, 48, 1, 0x0000, 0x10, 21, 1),
+ PIN_FIELD_BASE(49, 49, 1, 0x0000, 0x10, 22, 1),
+ PIN_FIELD_BASE(50, 50, 1, 0x0000, 0x10, 23, 1),
+ PIN_FIELD_BASE(51, 51, 1, 0x0000, 0x10, 24, 1),
+ PIN_FIELD_BASE(52, 52, 1, 0x0000, 0x10, 25, 1),
+ PIN_FIELD_BASE(53, 53, 1, 0x0000, 0x10, 26, 1),
+ PIN_FIELD_BASE(54, 54, 1, 0x0000, 0x10, 27, 1),
+ PIN_FIELD_BASE(55, 55, 3, 0x0010, 0x10, 0, 1),
+ PIN_FIELD_BASE(56, 56, 3, 0x0010, 0x10, 1, 1),
+ PIN_FIELD_BASE(57, 57, 2, 0x0000, 0x10, 8, 1),
+ PIN_FIELD_BASE(58, 58, 2, 0x0000, 0x10, 9, 1),
+ PIN_FIELD_BASE(59, 59, 2, 0x0000, 0x10, 10, 1),
+ PIN_FIELD_BASE(60, 60, 2, 0x0000, 0x10, 11, 1),
+ PIN_FIELD_BASE(61, 61, 3, 0x0010, 0x10, 8, 1),
+ PIN_FIELD_BASE(62, 62, 3, 0x0010, 0x10, 9, 1),
+ PIN_FIELD_BASE(63, 63, 3, 0x0010, 0x10, 10, 1),
+ PIN_FIELD_BASE(64, 64, 3, 0x0010, 0x10, 11, 1),
+ PIN_FIELD_BASE(65, 65, 3, 0x0010, 0x10, 12, 1),
+ PIN_FIELD_BASE(66, 66, 3, 0x0010, 0x10, 13, 1),
+ PIN_FIELD_BASE(67, 67, 3, 0x0010, 0x10, 14, 1),
+ PIN_FIELD_BASE(68, 68, 3, 0x0010, 0x10, 15, 1),
+ PIN_FIELD_BASE(69, 69, 2, 0x0010, 0x10, 12, 1),
+ PIN_FIELD_BASE(70, 70, 2, 0x0010, 0x10, 13, 1),
+ PIN_FIELD_BASE(71, 71, 2, 0x0010, 0x10, 14, 1),
+ PIN_FIELD_BASE(72, 72, 2, 0x0010, 0x10, 15, 1),
+ PIN_FIELD_BASE(73, 73, 2, 0x0010, 0x10, 16, 1),
+ PIN_FIELD_BASE(74, 74, 1, 0x0010, 0x10, 7, 1),
+ PIN_FIELD_BASE(75, 75, 1, 0x0010, 0x10, 8, 1),
+ PIN_FIELD_BASE(76, 76, 1, 0x0010, 0x10, 16, 1),
+ PIN_FIELD_BASE(77, 77, 1, 0x0010, 0x10, 18, 1),
+ PIN_FIELD_BASE(78, 78, 1, 0x0010, 0x10, 17, 1),
+ PIN_FIELD_BASE(79, 79, 1, 0x0010, 0x10, 19, 1),
+ PIN_FIELD_BASE(80, 80, 1, 0x0010, 0x10, 22, 1),
+ PIN_FIELD_BASE(81, 81, 1, 0x0010, 0x10, 21, 1),
+ PIN_FIELD_BASE(82, 82, 1, 0x0010, 0x10, 20, 1),
+ PIN_FIELD_BASE(83, 83, 1, 0x0010, 0x10, 23, 1),
+ PIN_FIELD_BASE(84, 84, 1, 0x0010, 0x10, 24, 1),
+ PIN_FIELD_BASE(85, 85, 3, 0x0010, 0x10, 16, 1),
+ PIN_FIELD_BASE(86, 86, 3, 0x0010, 0x10, 17, 1),
+ PIN_FIELD_BASE(87, 87, 2, 0x0000, 0x10, 25, 1),
+ PIN_FIELD_BASE(88, 88, 2, 0x0000, 0x10, 26, 1),
+ PIN_FIELD_BASE(89, 89, 2, 0x0000, 0x10, 27, 1),
+ PIN_FIELD_BASE(90, 90, 2, 0x0000, 0x10, 28, 1),
+ PIN_FIELD_BASE(91, 91, 2, 0x0000, 0x10, 29, 1),
+ PIN_FIELD_BASE(92, 92, 2, 0x0000, 0x10, 30, 1),
+ PIN_FIELD_BASE(93, 93, 2, 0x0000, 0x10, 31, 1),
+ PIN_FIELD_BASE(94, 94, 3, 0x0000, 0x10, 27, 1),
+ PIN_FIELD_BASE(95, 95, 1, 0x0010, 0x10, 6, 1),
+ PIN_FIELD_BASE(96, 96, 1, 0x0010, 0x10, 5, 1),
+ PIN_FIELD_BASE(97, 97, 1, 0x0000, 0x10, 10, 1),
+ PIN_FIELD_BASE(98, 98, 1, 0x0000, 0x10, 11, 1),
+ PIN_FIELD_BASE(99, 99, 3, 0x0000, 0x10, 20, 1),
+ PIN_FIELD_BASE(100, 100, 3, 0x0000, 0x10, 21, 1),
+ PIN_FIELD_BASE(101, 101, 3, 0x0000, 0x10, 22, 1),
+ PIN_FIELD_BASE(102, 102, 3, 0x0000, 0x10, 23, 1),
+ PIN_FIELD_BASE(103, 103, 3, 0x0000, 0x10, 24, 1),
+ PIN_FIELD_BASE(105, 105, 3, 0x0000, 0x10, 26, 1),
+ PIN_FIELD_BASE(106, 106, 2, 0x0000, 0x10, 2, 1),
+ PIN_FIELD_BASE(107, 107, 2, 0x0000, 0x10, 3, 1),
+ PIN_FIELD_BASE(108, 108, 2, 0x0000, 0x10, 4, 1),
+ PIN_FIELD_BASE(109, 109, 2, 0x0000, 0x10, 5, 1),
+ PIN_FIELD_BASE(110, 110, 2, 0x0000, 0x10, 6, 1),
+ PIN_FIELD_BASE(111, 111, 2, 0x0000, 0x10, 7, 1),
+ PIN_FIELD_BASE(112, 112, 2, 0x0020, 0x10, 20, 1),
+ PIN_FIELD_BASE(113, 113, 2, 0x0020, 0x10, 24, 1),
+ PIN_FIELD_BASE(114, 114, 2, 0x0020, 0x10, 0, 1),
+ PIN_FIELD_BASE(115, 115, 2, 0x0020, 0x10, 1, 1),
+ PIN_FIELD_BASE(116, 116, 2, 0x0020, 0x10, 2, 1),
+ PIN_FIELD_BASE(117, 117, 2, 0x0020, 0x10, 3, 1),
+ PIN_FIELD_BASE(118, 118, 2, 0x0020, 0x10, 4, 1),
+ PIN_FIELD_BASE(119, 119, 2, 0x0020, 0x10, 5, 1),
+ PIN_FIELD_BASE(120, 120, 2, 0x0020, 0x10, 6, 1),
+ PIN_FIELD_BASE(121, 121, 2, 0x0020, 0x10, 7, 1),
+ PIN_FIELD_BASE(122, 122, 2, 0x0020, 0x10, 8, 1),
+ PIN_FIELD_BASE(123, 123, 2, 0x0020, 0x10, 9, 1),
+ PIN_FIELD_BASE(124, 124, 2, 0x0020, 0x10, 10, 1),
+ PIN_FIELD_BASE(125, 125, 2, 0x0020, 0x10, 11, 1),
+ PIN_FIELD_BASE(126, 126, 2, 0x0020, 0x10, 17, 1),
+ PIN_FIELD_BASE(127, 127, 2, 0x0020, 0x10, 18, 1),
+ PIN_FIELD_BASE(128, 128, 2, 0x0020, 0x10, 19, 1),
+ PIN_FIELD_BASE(129, 129, 2, 0x0020, 0x10, 25, 1),
+ PIN_FIELD_BASE(130, 130, 2, 0x0020, 0x10, 26, 1),
+ PIN_FIELD_BASE(131, 131, 2, 0x0020, 0x10, 27, 1),
+ PIN_FIELD_BASE(132, 132, 2, 0x0020, 0x10, 28, 1),
+ PIN_FIELD_BASE(133, 133, 2, 0x0020, 0x10, 29, 1),
+ PIN_FIELD_BASE(134, 134, 2, 0x0020, 0x10, 30, 1),
+ PIN_FIELD_BASE(135, 135, 1, 0x0010, 0x10, 9, 1),
+ PIN_FIELD_BASE(136, 136, 1, 0x0010, 0x10, 10, 1),
+ PIN_FIELD_BASE(137, 137, 1, 0x0010, 0x10, 11, 1),
+ PIN_FIELD_BASE(138, 138, 1, 0x0010, 0x10, 12, 1),
+ PIN_FIELD_BASE(139, 139, 1, 0x0010, 0x10, 13, 1),
+ PIN_FIELD_BASE(140, 140, 1, 0x0010, 0x10, 14, 1),
+ PIN_FIELD_BASE(141, 141, 1, 0x0010, 0x10, 15, 1),
+ PIN_FIELD_BASE(142, 142, 3, 0x0000, 0x10, 11, 1),
+ PIN_FIELD_BASE(143, 143, 3, 0x0000, 0x10, 12, 1),
+ PIN_FIELD_BASE(144, 144, 3, 0x0000, 0x10, 13, 1),
+ PIN_FIELD_BASE(145, 145, 3, 0x0000, 0x10, 14, 1),
+ PIN_FIELD_BASE(146, 146, 3, 0x0000, 0x10, 15, 1),
+ PIN_FIELD_BASE(147, 147, 3, 0x0000, 0x10, 16, 1),
+ PIN_FIELD_BASE(148, 148, 3, 0x0000, 0x10, 17, 1),
+ PIN_FIELD_BASE(149, 149, 3, 0x0000, 0x10, 18, 1),
+ PIN_FIELD_BASE(150, 150, 3, 0x0000, 0x10, 19, 1),
+ PIN_FIELD_BASE(151, 151, 3, 0x0010, 0x10, 2, 1),
+ PIN_FIELD_BASE(152, 152, 3, 0x0010, 0x10, 3, 1),
+ PIN_FIELD_BASE(153, 153, 3, 0x0010, 0x10, 4, 1),
+ PIN_FIELD_BASE(154, 154, 3, 0x0010, 0x10, 5, 1),
+ PIN_FIELD_BASE(155, 155, 2, 0x0020, 0x10, 21, 1),
+ PIN_FIELD_BASE(156, 156, 2, 0x0020, 0x10, 22, 1),
+ PIN_FIELD_BASE(157, 157, 2, 0x0020, 0x10, 23, 1),
+ PIN_FIELD_BASE(178, 178, 4, 0x0000, 0x10, 6, 1),
+ PIN_FIELD_BASE(179, 179, 4, 0x0000, 0x10, 7, 1),
+ PIN_FIELD_BASE(180, 180, 4, 0x0000, 0x10, 8, 1),
+ PIN_FIELD_BASE(181, 181, 4, 0x0000, 0x10, 9, 1),
+ PIN_FIELD_BASE(182, 182, 4, 0x0090, 0x10, 4, 1),
+ PIN_FIELD_BASE(183, 183, 4, 0x0000, 0x10, 18, 1),
+ PIN_FIELD_BASE(184, 184, 4, 0x0000, 0x10, 19, 1),
+ PIN_FIELD_BASE(185, 185, 4, 0x0000, 0x10, 20, 1),
+ PIN_FIELD_BASE(186, 186, 4, 0x0000, 0x10, 21, 1),
+ PIN_FIELD_BASE(187, 187, 4, 0x0000, 0x10, 22, 1),
+ PIN_FIELD_BASE(188, 188, 4, 0x0000, 0x10, 14, 1),
+ PIN_FIELD_BASE(189, 189, 4, 0x0000, 0x10, 15, 1),
+ PIN_FIELD_BASE(190, 190, 4, 0x0000, 0x10, 16, 1),
+ PIN_FIELD_BASE(191, 191, 4, 0x0000, 0x10, 17, 1),
+ PIN_FIELD_BASE(192, 192, 4, 0x0010, 0x10, 19, 1),
+ PIN_FIELD_BASE(193, 193, 4, 0x0010, 0x10, 18, 1),
+ PIN_FIELD_BASE(194, 194, 4, 0x0010, 0x10, 17, 1),
+ PIN_FIELD_BASE(195, 195, 4, 0x0010, 0x10, 16, 1),
+ PIN_FIELD_BASE(196, 196, 4, 0x0010, 0x10, 15, 1),
+ PIN_FIELD_BASE(197, 197, 4, 0x0010, 0x10, 14, 1),
+ PIN_FIELD_BASE(198, 198, 4, 0x0010, 0x10, 13, 1),
+ PIN_FIELD_BASE(199, 199, 4, 0x0010, 0x10, 12, 1),
+ PIN_FIELD_BASE(200, 200, 4, 0x0010, 0x10, 11, 1),
+ PIN_FIELD_BASE(201, 201, 4, 0x0010, 0x10, 10, 1),
+ PIN_FIELD_BASE(202, 202, 4, 0x0010, 0x10, 9, 1),
+ PIN_FIELD_BASE(203, 203, 4, 0x0010, 0x10, 8, 1),
+ PIN_FIELD_BASE(204, 204, 4, 0x0010, 0x10, 7, 1),
+ PIN_FIELD_BASE(205, 205, 4, 0x0010, 0x10, 6, 1),
+ PIN_FIELD_BASE(206, 206, 4, 0x0010, 0x10, 5, 1),
+ PIN_FIELD_BASE(207, 207, 4, 0x0010, 0x10, 4, 1),
+ PIN_FIELD_BASE(208, 208, 4, 0x0010, 0x10, 3, 1),
+ PIN_FIELD_BASE(209, 209, 4, 0x0010, 0x10, 2, 1),
+ PIN_FIELD_BASE(210, 210, 4, 0x0010, 0x10, 1, 1),
+ PIN_FIELD_BASE(211, 211, 4, 0x0010, 0x10, 0, 1),
+ PIN_FIELD_BASE(212, 212, 4, 0x0010, 0x10, 20, 1),
+ PIN_FIELD_BASE(213, 213, 4, 0x0010, 0x10, 21, 1),
+ PIN_FIELD_BASE(214, 214, 4, 0x0010, 0x10, 22, 1),
+ PIN_FIELD_BASE(215, 215, 4, 0x0010, 0x10, 23, 1),
+ PIN_FIELD_BASE(216, 216, 4, 0x0000, 0x10, 10, 1),
+ PIN_FIELD_BASE(217, 217, 4, 0x0000, 0x10, 11, 1),
+ PIN_FIELD_BASE(218, 218, 4, 0x0000, 0x10, 12, 1),
+ PIN_FIELD_BASE(219, 219, 4, 0x0000, 0x10, 13, 1),
+ PIN_FIELD_BASE(232, 232, 3, 0x0010, 0x10, 6, 1),
+ PIN_FIELD_BASE(233, 233, 3, 0x0010, 0x10, 7, 1),
+ PIN_FIELD_BASE(234, 234, 2, 0x0010, 0x10, 0, 1),
+ PIN_FIELD_BASE(235, 235, 2, 0x0010, 0x10, 1, 1),
+ PIN_FIELD_BASE(236, 236, 2, 0x0010, 0x10, 2, 1),
+ PIN_FIELD_BASE(237, 237, 2, 0x0010, 0x10, 3, 1),
+ PIN_FIELD_BASE(238, 238, 2, 0x0010, 0x10, 4, 1),
+ PIN_FIELD_BASE(239, 239, 2, 0x0010, 0x10, 5, 1),
+ PIN_FIELD_BASE(240, 240, 2, 0x0010, 0x10, 6, 1),
+ PIN_FIELD_BASE(241, 241, 2, 0x0010, 0x10, 7, 1),
+ PIN_FIELD_BASE(242, 242, 2, 0x0010, 0x10, 8, 1),
+ PIN_FIELD_BASE(243, 243, 2, 0x0010, 0x10, 9, 1),
+ PIN_FIELD_BASE(244, 244, 2, 0x0010, 0x10, 10, 1),
+ PIN_FIELD_BASE(245, 245, 2, 0x0010, 0x10, 11, 1),
+ PIN_FIELD_BASE(246, 246, 2, 0x0020, 0x10, 12, 1),
+ PIN_FIELD_BASE(247, 247, 2, 0x0020, 0x10, 13, 1),
+ PIN_FIELD_BASE(248, 248, 2, 0x0020, 0x10, 14, 1),
+ PIN_FIELD_BASE(249, 249, 2, 0x0020, 0x10, 15, 1),
+ PIN_FIELD_BASE(250, 250, 2, 0x0010, 0x10, 17, 1),
+ PIN_FIELD_BASE(251, 251, 2, 0x0010, 0x10, 18, 1),
+ PIN_FIELD_BASE(252, 252, 2, 0x0010, 0x10, 19, 1),
+ PIN_FIELD_BASE(253, 253, 2, 0x0010, 0x10, 20, 1),
+ PIN_FIELD_BASE(254, 254, 2, 0x0020, 0x10, 16, 1),
+ PIN_FIELD_BASE(255, 255, 2, 0x0010, 0x10, 21, 1),
+ PIN_FIELD_BASE(256, 256, 2, 0x0010, 0x10, 22, 1),
+ PIN_FIELD_BASE(257, 257, 1, 0x0010, 0x10, 0, 1),
+ PIN_FIELD_BASE(258, 258, 1, 0x0010, 0x10, 1, 1),
+ PIN_FIELD_BASE(259, 259, 1, 0x0010, 0x10, 2, 1),
+ PIN_FIELD_BASE(260, 260, 1, 0x0010, 0x10, 3, 1),
+ PIN_FIELD_BASE(261, 261, 1, 0x0010, 0x10, 4, 1),
+};
+
static const struct mtk_pin_reg_calc mt6797_reg_cals[PINCTRL_PIN_REG_MAX] = {
[PINCTRL_PIN_REG_MODE] = MTK_RANGE(mt6797_pin_mode_range),
[PINCTRL_PIN_REG_DIR] = MTK_RANGE(mt6797_pin_dir_range),
[PINCTRL_PIN_REG_DI] = MTK_RANGE(mt6797_pin_di_range),
[PINCTRL_PIN_REG_DO] = MTK_RANGE(mt6797_pin_do_range),
+ [PINCTRL_PIN_REG_SMT] = MTK_RANGE(mt6797_pin_smt_range),
+ [PINCTRL_PIN_REG_PD] = MTK_RANGE(mt6797_pin_pd_range),
+ [PINCTRL_PIN_REG_PU] = MTK_RANGE(mt6797_pin_pu_range),
+ [PINCTRL_PIN_REG_DRV] = MTK_RANGE(mt6797_pin_drv_range),
+ [PINCTRL_PIN_REG_PUPD] = MTK_RANGE(mt6797_pin_pupd_range),
+ [PINCTRL_PIN_REG_IES] = MTK_RANGE(mt6797_pin_ies_range),
};
static const char * const mt6797_pinctrl_register_base_names[] = {
@@ -53,8 +817,15 @@ static const struct mtk_pin_soc mt6797_data = {
.npins = ARRAY_SIZE(mtk_pins_mt6797),
.ngrps = ARRAY_SIZE(mtk_pins_mt6797),
.gpio_m = 0,
+ .ies_present = true,
.base_names = mt6797_pinctrl_register_base_names,
.nbase_names = ARRAY_SIZE(mt6797_pinctrl_register_base_names),
+ .bias_disable_set = mtk_pinconf_bias_disable_set,
+ .bias_disable_get = mtk_pinconf_bias_disable_get,
+ .bias_set = mtk_pinconf_bias_set,
+ .bias_get = mtk_pinconf_bias_get,
+ .drive_set = mtk_pinconf_drive_set_rev1,
+ .drive_get = mtk_pinconf_drive_get_rev1,
};
static const struct of_device_id mt6797_pinctrl_of_match[] = {